FairRoot/PandaRoot
PndSttSingleStraw.h
Go to the documentation of this file.
1 #ifndef __PNDSTTSINGLESTRAW__
2 #define __PNDSTTSINGLESTRAW__
3 
4 #include "TNamed.h"
5 #include "TMatrix.h"
6 #include "TVector3.h"
7 #include "TH2.h"
8 #include <vector>
9 
10 #include "TMatrixD.h"
11 
12 
13 //ClassImp(TMatrixDBase)
14 //class TMatrixD;;
15 
16 class TH2F;
17 
18 class PndSttSingleStraw : public TNamed {
19 
20  // --------------------------------------------------------------------
21  public:
22 
24  virtual ~PndSttSingleStraw() {};
26 
27 
28  // Get methods
29 
30  Double_t GetCDist(Int_t k){ return CDist[k];};
31  Double_t GetCNele(Int_t k){ return CNele[k];};
32  Double_t GetCNeleT(Int_t k){return CNeleT[k];};
33  Double_t GetTeleTime(Int_t k){return TeleTime[k];};
34  Double_t GetPulse(Int_t k){return Pulse[k];};
35  Double_t GetPulseT(Int_t k){return PulseT[k];};
36  Double_t GetWi(){return Wi*1.e-09;}; // in GeV
38  Double_t GetXmax(){return Xmax;};
39  Double_t GetDx(){return Dx;};
40  Double_t GetEmed(){return Emed;};
41  Double_t GetEmin(){return Emin;};
42  Double_t GetNcl(){return Ncl;};
43  Double_t GetCsi(){return Csi;};
44  Double_t GetDelta(){return Delta;};
45  Double_t GetEmax(){return Emax;};
46  Double_t GetIAr(){return IAr;};
47  Int_t GetNNClus(){return NNClus;};
48  Int_t GetNchann(){return Nchann;};
50  Double_t GetGamma(){return gamma;};
51  Double_t GetBeta(){return beta;};
52  Double_t GetpSTP(){return pSTP;};
57  Double_t GetEup(){return Eup;};
58  Double_t GetAvUrb(){return AvUrb;};
59 
60  // coordinates
61  Double_t GetXin() {return Xin;};
62  Double_t GetYin() {return Yin;};
63  Double_t GetZin() {return Zin;};
64  Double_t GetXout(){return Xout;};
65  Double_t GetYout(){return Yout;};
66  Double_t GetZout(){return Zout;};
67  Double_t GetRpath(){return Rpath;};
68 
69  TVector3 GetWDist(Int_t k){return WDist[k];};
70 
71 
72  // put methods
74  Double_t v4, Double_t v5, Double_t v6)
75  {Xin=v1; Yin=v2; Zin=v3; Xout=v4; Yout=v5; Zout=v6;};
76  void PutRpath(Double_t value){Rpath=value;};
77 
79 
80  void PutRadius(Double_t value){Radius=value;};
81  void PutPress(Double_t value){pSTP=value;};
82 
83 
84  // ----------------------------------------------------------------------------
85  // calls at each track for MC applications
86 
87  // define the wire
88  void PutWireXYZ(Double_t w1, Double_t w2, Double_t w3,
89  Double_t w4, Double_t w5, Double_t w6);
90  // straw time
92  Double_t InOut[] );
93  // ADC signal corresponding to the energy loss of StrawCharge
95 
96  // fast reconstructed distance in cm
97  Double_t FastRec(Double_t TrueDcm, Int_t Flag);
98 
99  // ADC signal charge fast simulation
101 
102  // ----------------------------------------------------------------------------
103  // standard calls
104 
105  // once to set constants
106 
107  void TConst(Double_t Radius, Double_t pSTP,Double_t ArP, Double_t CO2P);
108 
109  // to define the track
110  void TInit(Double_t Mass, Double_t Momentum, Double_t InOut[] ); // for each track
111 
112  // other possible calls
113 
114  Double_t StrawCharge(); // total discharge electron calculation
115  // energy loss in GeV
116  Int_t StrawSignal(Int_t nsteps); // oscilloscope signal generation (ns)
117  // Pulse[PulseT] in ns
118  // return number of primary electrons
119  Int_t StrawTime(); // output time of the straw (ns) &
120  // PulseTime[Int_t] in ns
121  Int_t StrawTot(); // time window over threshold of the signal
122  Double_t TimnsToDiscm(Double_t time); // from time (ns) to radius in cm
123 
124  //-----------------------------------------------------------------------------
125  // utility methods
126 
127  void TDirCos(); // track director cosines
128  Double_t TrueDist(Double_t Point[]); // true distance wire-track
129  Double_t DiffLong(Double_t distcm); // longituinal diffusion in microns
130  Double_t DiffTran(Double_t distcm); // transverse diffusion in microns
131  void Polya(Double_t bpar); // Polya cumulative calculation
132  Double_t PolyaSamp(); // sampling from Polya distribution
133  Double_t RRise(Double_t gamma); // relativistic rise calculation
134  Int_t Cluster(); // cluster generation
135  Int_t Eject(); // primary electron generation
136  TVector3 WDistCalc(Double_t d); // distance electron-wire
137  Double_t Signal(Double_t t, Double_t t0);// signal functional form
138  Double_t STEloss(); // Landau energy loss
139  Double_t STUrban(); // Urban energy loss
140  Int_t TimeEle(); // arrivals times of all the electrons
141  Double_t DistEle(Double_t tns); // distance of all the electrons
142  //------------------------------------------------------------------------------
143 
144 private:
145 
146  //-----------------------------------------------------------------
147 
148  // distance, number of electrons (with delta rays),
149  // distance from wire of the cluster
150  std::vector<Double_t> CDist, CDistC, CNele, CNeleT, TeleTime, AmplSig;
151  std::vector<Double_t> Pulse, PulseT;
152  std::vector<TVector3> WDist;
153 
154  // set constants
155  // masses in GeV, energies in GeV, cgs system
156 
157 
158 
159  // Input for the medium
160 
161  // Double_t PClus[20], CO2Clus[20], CumClus[21], CH4Clus[20];
162  Double_t CumClus[21], CH4Clus[20]; // shadows deleted
163 
164 
166  Double_t ArPerc, CO2Perc, CH4Perc; // volume percentages
167  Double_t ArWPerc, CO2WPerc, CH4WPerc; // weight percentages
168  Double_t pSTP; // pressure (STP reference)
169  Double_t Radius; // straw radius
170  Int_t Field; // flag for magnetic field --> if =1, magnetic field on
171  Double_t AAr; // Argon
172  Double_t ZAr; // Argon
173  Double_t RhoAr; // g/cm3 (1.78 mg/cm3)
174  Double_t NclAr; // clusters/cm
175 
180  Double_t IAr; // ionization potential (188 eV)
181  Double_t WiAr; // energy to reate an ion pair in Argon
182  Double_t Ncl; // mean number of cluster in the mixture
183  Double_t Ecl; // electron per cluster
184  Double_t Lcl; // mean free path between clusters
185  Double_t Ntote; // mean total number of eletrons
186  Double_t GasGain; // gain of the gas
187  Double_t Cutoff; // limit the number of primry electrons
188  // CO2
193  Double_t ACO2; // CO2 (39.948)
194  Double_t ZCO2; // CO2 (18)
195  Double_t RhoCO2; // g/cm3 CO2 (1.98 mg/cm3)
196  Double_t ICO2; // ionization potential (GeV) (188 eV)
197  Double_t WiCO2; // energy to create an ion pair
198  Double_t NclCO2; // clusters/cm
199 
200  // Methane CH4 ------------------------------------------------
205  Double_t ACH4; // CO2 (39.948)
206  Double_t ZCH4; // CO2 (18)
207  Double_t RhoCH4; // g/cm3 CO2 (0.71 mg/cm3)
208  Double_t ICH4; // ionization potential (GeV) (188 eV)
209  Double_t WiCH4; // energy to create an ion pair
210  Double_t NclCH4; // clusters/cm
211 
214  //----------------------------------------------------------------------
215  // Input for the particle (Gev, energy loses in Kev
216 
217  Double_t PZeta; // charge
218  Double_t piMass; // particle mass (GeV)
219  Double_t PMass; // incident particle mass
220  Double_t PMom; // particle momentum (GeV)
221  Double_t Dx; // distance travelled in gas (cm)
222  Double_t eMass; // electron mass (GeV) (0.511 MeV)
223  Double_t prMass; // proton mass
224  Double_t Delta; // polarization Sternheimer parameter
225  Int_t CNumb; // current number of clusters
226 
227 
228  // ------------------------------------------------------
229  // quantities for each track
230  // calculated in TInit
231 
232  Double_t PEn; // particle energy GeV
235  Double_t Emed; // GeV
236  Double_t Emin; // GeV/cm (2.7 keV)
239  Double_t Emp; // most probable energy
240  Int_t NNClus; // number of clusters
241 
242  // ---------------------------------------------------------------------
243  // mathematical and statistical parameters
244 
245  Double_t PolyaCum[100], Xs[100];
247  Int_t NPolya;
251  Double_t NUrban; // total number of collision in the Urban model
252  Double_t SigUrb; // std dev of the Urban distribution (routine STUrban)
253  Double_t Eup; // upper limit of the Urban distribution (routine STUrban)
254  Double_t AvUrb; // average of the Urban distribution (routine STUrban)
255 
256  // --------------------------------------------------------------
257  // for the straws
258 
259  Double_t Wx1,Wy1,Wz1, Wx2,Wy2,Wz2; // wire coordinates
260  Double_t Wp,Wq,Wr; // director cosine of the wire
263  Double_t Thresh1; // first threshold
265  Double_t OffT; // time offset
266  Int_t Nchann; // number of channels for the straw signal
267 
268  // ----------------------------------------------------------------------
269  // dummy
270 
272  Int_t Out2, Out3;
273 
274 };
275 
276 #endif
ClassDef(PndSttSingleStraw, 1)
virtual ~PndSttSingleStraw()
Double_t GetTeleTime(Int_t k)
TObjArray * d
void PutWireXYZ(Double_t w1, Double_t w2, Double_t w3, Double_t w4, Double_t w5, Double_t w6)
Double_t GetPulse(Int_t k)
void PutPress(Double_t value)
Double_t PolyaCum[100]
Double_t GetCDist(Int_t k)
std::vector< Double_t > CDist
Double_t par[3]
TVector3 WDistCalc(Double_t d)
Double_t TrueDist(Double_t Point[])
Double_t GetCNele(Int_t k)
double nsteps
Definition: dedx_bands.C:15
std::vector< TVector3 > WDist
TVector3 GetWDist(Int_t k)
Int_t StrawSignal(Int_t nsteps)
std::vector< Double_t > CNeleT
Double_t Signal(Double_t t, Double_t t0)
Double_t DiffLong(Double_t distcm)
void PutRadius(Double_t value)
Int_t t0
Definition: hist-t7.C:106
Double_t
std::vector< Double_t > Pulse
Double_t DistEle(Double_t tns)
void PutPolya(Double_t par)
Double_t DiffTran(Double_t distcm)
Double_t TimnsToDiscm(Double_t time)
std::vector< Double_t > CNele
void TInit(Double_t Mass, Double_t Momentum, Double_t InOut[])
Double_t GetCNeleT(Int_t k)
Double_t GetPulseT(Int_t k)
void Polya(Double_t bpar)
std::vector< Double_t > PulseT
TVector3 v1
Definition: bump_analys.C:40
Double_t FastRec(Double_t TrueDcm, Int_t Flag)
TVector3 v2
Definition: bump_analys.C:40
void TConst(Double_t Radius, Double_t pSTP, Double_t ArP, Double_t CO2P)
TTree * t
Definition: bump_analys.C:13
std::vector< Double_t > TeleTime
Double_t RRise(Double_t gamma)
Double_t PartToTime(Double_t Mass, Double_t Momentum, Double_t InOut[])
std::vector< Double_t > CDistC
void PutTrackXYZ(Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t v5, Double_t v6)
void PutRpath(Double_t value)
std::vector< Double_t > AmplSig