FairRoot/PandaRoot
PndFtsSingleStraw.h
Go to the documentation of this file.
1 #ifndef __PNDFTSSINGLESTRAW__
2 #define __PNDFTSSINGLESTRAW__
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 PndFtsSingleStraw : public TNamed {
19 
20  // --------------------------------------------------------------------
21  public:
22 
24  virtual ~PndFtsSingleStraw() {};
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 
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 
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 over threshold time of the straw (ns) not implemented
122 
123  Double_t TimnsToDiscm(Double_t time); // from time (ns) to radius in cm
124 
125  //-----------------------------------------------------------------------------
126  // utility methods
127 
128  void TDirCos(); // track director cosines
129  Double_t TrueDist(Double_t Point[]); // true distance wire-track
130  Double_t DiffLong(Double_t distcm); // longituinal diffusion in microns
131  Double_t DiffTran(Double_t distcm); // transverse diffusion in microns
132  void Polya(Double_t bpar); // Polya cumulative calculation
133  Double_t PolyaSamp(); // sampling from Polya distribution
134  Double_t RRise(Double_t gamma); // relativistic rise calculation
135  Int_t Cluster(); // cluster generation
136  Int_t Eject(); // primary electron generation
137  TVector3 WDistCalc(Double_t d); // distance electron-wire
138  Double_t Signal(Double_t t, Double_t t0);// signal functional form
139  Double_t STEloss(); // Landau energy loss
140  Double_t STUrban(); // Urban energy loss
141  Int_t TimeEle(); // arrivals times of all the electrons
142  Double_t DistEle(Double_t tns); // distance of all the electrons
143 
144  //------------------------------------------------------------------------------
145 
146 private:
147 
148  //-----------------------------------------------------------------
149 
150  // distance, number of electrons (with delta rays),
151  // distance from wire of the cluster
152  std::vector<Double_t> CDist, CDistC, CNele, CNeleT, TeleTime, AmplSig;
153  std::vector<Double_t> Pulse, PulseT;
154  std::vector<TVector3> WDist;
155 
156  // set constants
157  // masses in GeV, energies in GeV, cgs system
158 
159 
160 
161  // Input for the medium
162 
163  // Double_t PClus[20], CO2Clus[20], CumClus[21], CH4Clus[20];
164  Double_t CumClus[21], CH4Clus[20]; // shadows deleted
165 
166 
168  Double_t ArPerc, CO2Perc, CH4Perc; // volume percentages
169  Double_t ArWPerc, CO2WPerc, CH4WPerc; // weight percentages
170  Double_t pSTP; // pressure (STP reference)
171  Double_t Radius; // straw radius
172  Double_t AAr; // Argon
173  Double_t ZAr; // Argon
174  Double_t RhoAr; // g/cm3 (1.78 mg/cm3)
175  Double_t NclAr; // clusters/cm
176 
181  Double_t IAr; // ionization potential (188 eV)
182  Double_t WiAr; // energy to reate an ion pair in Argon
183  Double_t Ncl; // mean number of cluster in the mixture
184  Double_t Ecl; // electron per cluster
185  Double_t Lcl; // mean free path between clusters
186  Double_t Ntote; // mean total number of eletrons
187  Double_t GasGain; // gain of the gas
188  Double_t Cutoff; // limit the number of primry electrons
189  // CO2
194  Double_t ACO2; // CO2 (39.948)
195  Double_t ZCO2; // CO2 (18)
196  Double_t RhoCO2; // g/cm3 CO2 (1.98 mg/cm3)
197  Double_t ICO2; // ionization potential (GeV) (188 eV)
198  Double_t WiCO2; // energy to create an ion pair
199  Double_t NclCO2; // clusters/cm
200 
201  // Methane CH4 ------------------------------------------------
206  Double_t ACH4; // CO2 (39.948)
207  Double_t ZCH4; // CO2 (18)
208  Double_t RhoCH4; // g/cm3 CO2 (0.71 mg/cm3)
209  Double_t ICH4; // ionization potential (GeV) (188 eV)
210  Double_t WiCH4; // energy to create an ion pair
211  Double_t NclCH4; // clusters/cm
212 
215  //----------------------------------------------------------------------
216  // Input for the particle (Gev, energy loses in Kev
217 
218  Double_t PZeta; // charge
219  Double_t piMass; // particle mass (GeV)
220  Double_t PMass; // incident particle mass
221  Double_t PMom; // particle momentum (GeV)
222  Double_t Dx; // distance travelled in gas (cm)
223  Double_t eMass; // electron mass (GeV) (0.511 MeV)
224  Double_t prMass; // proton mass
225  Double_t Delta; // polarization Sternheimer parameter
226  Int_t CNumb; // current number of clusters
227 
228 
229  // ------------------------------------------------------
230  // quantities for each track
231  // calculated in TInit
232 
233  Double_t PEn; // particle energy GeV
236  Double_t Emed; // GeV
237  Double_t Emin; // GeV/cm (2.7 keV)
240  Double_t Emp; // most probable energy
241  Int_t NNClus; // number of clusters
242 
243  // ---------------------------------------------------------------------
244  // mathematical and statistical parameters
245 
246  Double_t PolyaCum[100], Xs[100];
248  Int_t NPolya;
252  Double_t NUrban; // total number of collision in the Urban model
253  Double_t SigUrb; // std dev of the Urban distribution (routine STUrban)
254  Double_t Eup; // upper limit of the Urban distribution (routine STUrban)
255  Double_t AvUrb; // average of the Urban distribution (routine STUrban)
256 
257  // --------------------------------------------------------------
258  // for the straws
259 
260  Double_t Wx1,Wy1,Wz1, Wx2,Wy2,Wz2; // wire coordinates
261  Double_t Wp,Wq,Wr; // director cosine of the wire
264  Double_t Thresh1; // first threshold
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
std::vector< Double_t > TeleTime
Double_t DiffTran(Double_t distcm)
TObjArray * d
void PutRadius(Double_t value)
Double_t GetTeleTime(Int_t k)
void PutPolya(Double_t par)
std::vector< Double_t > AmplSig
Double_t GetPulseT(Int_t k)
std::vector< Double_t > CDist
TVector3 GetWDist(Int_t k)
Double_t GetCNeleT(Int_t k)
std::vector< Double_t > Pulse
std::vector< TVector3 > WDist
Double_t par[3]
void TInit(Double_t Mass, Double_t Momentum, Double_t InOut[])
std::vector< Double_t > PulseT
double nsteps
Definition: dedx_bands.C:15
Double_t TimnsToDiscm(Double_t time)
Double_t RRise(Double_t gamma)
void TConst(Double_t Radius, Double_t pSTP, Double_t ArP, Double_t CO2P)
Double_t TrueDist(Double_t Point[])
Int_t t0
Definition: hist-t7.C:106
Double_t
ClassDef(PndFtsSingleStraw, 1)
Double_t Signal(Double_t t, Double_t t0)
Double_t DistEle(Double_t tns)
TVector3 WDistCalc(Double_t d)
Double_t PartToTime(Double_t Mass, Double_t Momentum, Double_t InOut[])
Double_t GetCDist(Int_t k)
void PutWireXYZ(Double_t w1, Double_t w2, Double_t w3, Double_t w4, Double_t w5, Double_t w6)
Double_t GetCNele(Int_t k)
std::vector< Double_t > CNele
Int_t StrawSignal(Int_t nsteps)
Double_t FastRec(Double_t TrueDcm, Int_t Flag)
TVector3 v1
Definition: bump_analys.C:40
TVector3 v2
Definition: bump_analys.C:40
Double_t DiffLong(Double_t distcm)
void PutTrackXYZ(Double_t v1, Double_t v2, Double_t v3, Double_t v4, Double_t v5, Double_t v6)
TTree * t
Definition: bump_analys.C:13
void Polya(Double_t bpar)
std::vector< Double_t > CDistC
Double_t PolyaCum[100]
void PutRpath(Double_t value)
Double_t GetPulse(Int_t k)
std::vector< Double_t > CNeleT
void PutPress(Double_t value)
virtual ~PndFtsSingleStraw()