StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTrsChargeTransporter.hh
1 /**********************************************************************
2  *
3  * $Id: StTrsChargeTransporter.hh,v 1.4 2009/11/03 14:34:19 fisyak Exp $
4  *
5  * Author: brian June 1, 1998
6  *
7  **********************************************************************
8  *
9  * Description: Abstract Class interface for Transporter
10  *
11  **********************************************************************
12  *
13  * $Log: StTrsChargeTransporter.hh,v $
14  * Revision 1.4 2009/11/03 14:34:19 fisyak
15  * Remove default in zFromTB
16  *
17  * Revision 1.3 2000/02/24 16:23:48 long
18  * transportToWire(StTrsMiniChargeSegment&) --->transportToWire(StTrsMiniChargeSegment&,double &,double &) to calculate diffussion as a function of field
19  *
20  * Revision 1.2 1999/03/15 13:45:08 lasiuk
21  * omegaTau is calculated assuming mobility is independent of electric field
22  *
23  * Revision 1.1 1998/11/10 17:12:09 fisyak
24  * Put Brian trs versin into StRoot
25  *
26  * Revision 1.4 1998/11/05 19:00:44 lasiuk
27  * setGatingGridVoltage() added
28  *
29  * Revision 1.3 1998/11/02 22:47:15 lasiuk
30  * Initialization in base class
31  * add attachment
32  * add transparency
33  *
34  * Revision 1.2 1998/10/22 00:23:20 lasiuk
35  * Oct 22
36  *
37  * Revision 1.1 1998/06/04 23:32:20 lasiuk
38  * Initial Revision
39  *
40  **********************************************************************/
41 #ifndef ST_TRS_TRANSPORTER_HH
42 #define ST_TRS_TRANSPORTER_HH
43 
44 #include "StGlobals.hh"
45 #include "Randomize.h"
46 
47 //TRS
48 #include "StTpcGeometry.hh"
49 #include "StTpcSlowControl.hh"
50 #include "StMagneticField.hh"
51 #include "StTrsDeDx.hh"
52 #include "StTrsMiniChargeSegment.hh"
53 
55 public:
57  virtual ~StTrsChargeTransporter();
58  //StTrsChargeTransporter(const StTrsChargeTransporter&);
59  //StTrsChargeTransporter& operator=(const StTrsChargeTransporter&);
60 
61  // The Real Stuff is here...FAST or SLOW
62  virtual void transportToWire(StTrsMiniChargeSegment&,double &,double &) = 0;
63  virtual double chargeAttachment(double) const = 0;
64  virtual double wireGridTransmission() = 0;
65 
66  // switches
67  void setChargeAttachment(bool);
68  void setGatingGridTransparency(bool);
69  void setGatingGridVoltage(float);
70  void setTransverseDiffusion(bool);
71  void setLongitudinalDiffusion(bool);
72  void setExB(bool);
73  void setDriftVelocity(Double_t dv) {mDriftVelocity = dv;}
74 
75  double transparencyCalculation();
76 
77 private:
78  StTrsChargeTransporter() {/*never*/}
79 
80  // Transparency Calculations
81  void Lg(); // Calculate characteristic Length
82  double transitionVoltage(); // Onset of linear Transparency with gate voltage
83  double maximumTransparency(); // maximum Voltage for 100% Transparency
84  void sigmaGC(); // constant
85  void sigmaG(); // Total charge density of the gating grid
86  double sigmaGPlus(); // positive charge density of GG
87  double zeroGateVoltage(); // need for linearity Calc
88  double linearOnset(); // Transparency at Linear onset
89  double linearTransparency(); //
90  //double transparencyCalculation(); // Selects the region!
91 
92 protected:
93  bool mChargeAttachment;
94  bool mGatingGridTransparency;
95  bool mTransverseDiffusion;
96  bool mLongitudinalDiffusion;
97  bool mExB;
98  bool mDoTransparencyCalc;
99 
100  double mAttachment;
101  double mTransparency;
102  double mSigmaTransverse;
103  double mSigmaLongitudinal;
104  double mOmegaTau;
105  double mDriftVelocity;
106  double mO2Concentration; // should be from SC
107 
108  // For Transparency Calculation
109  // These must come from the slow control db!!!
110  // see StTrsChargeTransporter::transparencyCalculation()
111  double mGateVoltage; // "
112  double mLg; // for Gate Calc
113  double mSGC; // "
114  double mSG; // "
115  double mDriftVoltage;
116  double mDriftDistance;
117  double mGateWireRadius;
118  double mGatePitch;
119  double mZGate;
120 
121  StTpcGeometry* mGeomDb;
122  StTpcSlowControl* mSCDb;
123  StTrsDeDx* mGasDb;
124  StMagneticField* mMagDb;
125 
126 protected:
127  static HepJamesRandom mEngine;
128  static RandFlat mFlatDistribution;
129  static RandGauss mGaussDistribution;
130 };
131 inline void StTrsChargeTransporter::setChargeAttachment(bool a) {mChargeAttachment = a;}
132 inline void StTrsChargeTransporter::setGatingGridTransparency(bool t) {mGatingGridTransparency = t;}
133 inline void StTrsChargeTransporter::setGatingGridVoltage(float v) {mGateVoltage = v;}
134 inline void StTrsChargeTransporter::setTransverseDiffusion(bool td) {mTransverseDiffusion = td;}
135 inline void StTrsChargeTransporter::setLongitudinalDiffusion(bool ld) {mLongitudinalDiffusion = ld;}
136 inline void StTrsChargeTransporter::setExB(bool eb) {mExB = eb;}
137 #endif