]>
Commit | Line | Data |
---|---|---|
cd2a0045 | 1 | #ifndef ALIITSSIMUPARAM_H |
2 | #define ALIITSSIMUPARAM_H | |
3 | /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
2ae37d58 | 6 | /* $Id$ */ |
cd2a0045 | 7 | |
8 | /////////////////////////////////////////////////////////////////// | |
9 | // // | |
10 | // Class to store the parameters used in the simulation of // | |
11 | // SPD, SDD and SSD detectors // | |
12 | // Origin: F.Prino, Torino, prino@to.infn.it // | |
13 | // // | |
14 | /////////////////////////////////////////////////////////////////// | |
2ae37d58 | 15 | #include <TRandom.h> |
cd2a0045 | 16 | #include<TObject.h> |
17 | #include <TString.h> | |
18 | #include <TArrayF.h> | |
19 | ||
20 | class AliITSSimuParam : public TObject { | |
21 | ||
22 | public: | |
23 | AliITSSimuParam(); | |
24 | AliITSSimuParam(const AliITSSimuParam& simpar); | |
25 | // assignment operator | |
26 | AliITSSimuParam& operator=(const AliITSSimuParam& source); | |
27 | ~AliITSSimuParam(); | |
28 | ||
29 | ||
30 | void SetGeVToCharge(Double_t gc=3.6e-9){fGeVcharge = gc;} | |
31 | Double_t GetGeVToCharge() const {return fGeVcharge;} | |
32 | Double_t GeVToCharge(Double_t gev) const {return gev/fGeVcharge;} | |
33 | ||
34 | void SetDistanceOverVoltage(Double_t d,Double_t v){fDOverV = d/v;} | |
35 | void SetDistanceOverVoltage(Double_t dv=0.000375){fDOverV = dv;} | |
36 | Double_t GetDistanceOverVoltage() const {return fDOverV;} | |
37 | ||
38 | ||
39 | ||
2ae37d58 | 40 | void SetSPDBiasVoltageAll(Double_t bias=18.182) {for(Int_t i=0;i<240;i++) fSPDBiasVoltage[i]=bias;} |
41 | void SetSPDBiasVoltage(Int_t mod, Double_t bias=18.182) {if(mod<0 || mod>239) return; fSPDBiasVoltage[mod]=bias;} | |
42 | Double_t GetSPDBiasVoltage(Int_t mod=0) const {if(mod<0 || mod>239) return 0; return fSPDBiasVoltage[mod];} | |
43 | ||
44 | void SetSPDThresholdsAll(Double_t thresh, Double_t sigma) | |
45 | {for(Int_t i=0;i<240;i++) {fSPDThresh[i]=thresh; fSPDSigma[i]=sigma;}} | |
46 | void SetSPDThresholds(Int_t mod,Double_t thresh, Double_t sigma) | |
47 | {if(mod<0 || mod>239) return; fSPDThresh[mod]=thresh; fSPDSigma[mod]=sigma; } | |
48 | void SPDThresholds(const Int_t mod, Double_t& thresh, Double_t& sigma) const; | |
49 | void SetSPDNoiseAll(Double_t noise, Double_t baseline) | |
50 | {for(Int_t i=0;i<240;i++) {fSPDNoise[i]=noise; fSPDBaseline[i]=baseline;}} | |
51 | void SetSPDNoise(Int_t mod,Double_t noise, Double_t baseline) | |
52 | {if(mod<0 || mod>239) return; fSPDNoise[mod]=noise; fSPDBaseline[mod]=baseline; } | |
53 | void SPDNoise(const Int_t mod,Double_t &noise, Double_t &baseline) const; | |
54 | // Applies a random noise and addes the baseline | |
55 | Double_t ApplySPDBaselineAndNoise(Int_t mod=0) const | |
56 | {if (mod<0 || mod>239) mod=0; return fSPDBaseline[mod]+fSPDNoise[mod]*gRandom->Gaus();} | |
cd2a0045 | 57 | |
cd2a0045 | 58 | |
59 | void SetSPDCouplingOption(const char *opt) {fSPDCouplOpt=opt;} | |
60 | void GetSPDCouplingOption(char *opt) const {strcpy(opt,fSPDCouplOpt.Data());} | |
61 | ||
62 | void SetSPDCouplingParam(Double_t col, Double_t row) | |
63 | {fSPDCouplCol = col; fSPDCouplRow = row;} | |
64 | void GetSPDCouplingParam(Double_t &col, Double_t &row) const | |
65 | {col = fSPDCouplCol; row = fSPDCouplRow;} | |
66 | ||
67 | void SetSPDSigmaDiffusionAsymmetry(Double_t ecc) {fSPDEccDiff=ecc;} | |
68 | void GetSPDSigmaDiffusionAsymmetry(Double_t &ecc) const {ecc=fSPDEccDiff;} | |
69 | ||
ad7f2bfa | 70 | |
71 | void SetSPDAddNoisyFlag(Bool_t value) {fSPDAddNoisyFlag = value;} | |
72 | Bool_t GetSPDAddNoisyFlag() {return fSPDAddNoisyFlag;} | |
73 | void SetSPDRemoveDeadFlag(Bool_t value) {fSPDRemoveDeadFlag = value;} | |
74 | Bool_t GetSPDRemoveDeadFlag() {return fSPDRemoveDeadFlag;} | |
75 | ||
cd2a0045 | 76 | void SetSDDElectronics(Int_t p1=1) {fSDDElectronics=p1; } |
77 | Int_t GetSDDElectronics() const {return fSDDElectronics;} | |
78 | ||
79 | void SetSDDDiffCoeff(Float_t p1, Float_t p2) { | |
80 | fSDDDiffCoeff=p1; fSDDDiffCoeff1=p2;} | |
81 | void GetSDDDiffCoeff(Float_t &diff,Float_t &diff1) const { | |
82 | diff=fSDDDiffCoeff; diff1=fSDDDiffCoeff1;} | |
83 | ||
84 | void SetSDDJitterError(Float_t jitter) {fSDDJitterError=jitter;} | |
85 | Float_t GetSDDJitterError() const {return fSDDJitterError;} | |
86 | ||
87 | void SetSDDDynamicRange(Double_t p1) {fSDDDynamicRange = p1;} | |
88 | Float_t GetSDDDynamicRange() const {return fSDDDynamicRange;} | |
89 | ||
90 | void SetSDDMaxAdc(Double_t p1) {fSDDMaxAdc=p1;} | |
91 | Float_t GetSDDMaxAdc() const {return fSDDMaxAdc;} | |
92 | ||
93 | void SetSDDChargeLoss(Double_t p1) {fSDDChargeLoss=p1;} | |
94 | Float_t GetSDDChargeLoss() const {return fSDDChargeLoss;} | |
95 | ||
d9ed1779 | 96 | void SetSDDRawDataFormatCarlos() {fSDDRawFormat=7;} |
97 | void SetSDDRawDataFormatFixLen8bitEncoded() {fSDDRawFormat=0;} | |
98 | Char_t GetSDDRawDataFormat() const {return fSDDRawFormat;} | |
8be4e1b1 | 99 | Int_t GetSSDZSThreshold() const { // ZS threshold |
100 | return fSSDZSThreshold; } | |
101 | virtual void SetSSDZSThreshold(Int_t zsth) { fSSDZSThreshold = zsth; } | |
102 | ||
cd2a0045 | 103 | void SetSSDCouplings(Double_t pr, Double_t pl, Double_t nr, Double_t nl) { |
104 | fSSDCouplingPR=pr; fSSDCouplingPL=pl; fSSDCouplingNR=nr; fSSDCouplingNL=nl; } | |
105 | Double_t GetSSDCouplingPR() const {return fSSDCouplingPR;} | |
106 | Double_t GetSSDCouplingPL() const {return fSSDCouplingPL;} | |
107 | Double_t GetSSDCouplingNR() const {return fSSDCouplingNR;} | |
108 | Double_t GetSSDCouplingNL() const {return fSSDCouplingNL;} | |
109 | ||
110 | void SetNSigmaIntegration(Double_t p1) {fNsigmas=p1;} | |
111 | Float_t GetNSigmaIntegration() const {return fNsigmas;} | |
112 | void SetNLookUp(Int_t p1); | |
113 | Int_t GetGausNLookUp() const {return fNcomps;} | |
114 | Float_t GetGausLookUp(Int_t i) { | |
115 | if (!fGaus) SetNLookUp(fgkNcompsDefault); | |
116 | if(i<0 || i>=fNcomps) return 0.;return fGaus->At(i); | |
117 | } | |
118 | ||
2ae37d58 | 119 | // Set the impurity concentrations in [#/cm^3] |
120 | void SetImpurity(Double_t n=0.0){fN = n;} | |
121 | // Returns the impurity consentration in [#/cm^3] | |
122 | Double_t Impurity() const {return fN;} | |
123 | ||
124 | // Electron mobility in Si. [cm^2/(Volt Sec)]. T in degree K, N in #/cm^3 | |
125 | Double_t MobilityElectronSiEmp() const ; | |
126 | // Hole mobility in Si. [cm^2/(Volt Sec)] T in degree K, N in #/cm^3 | |
127 | Double_t MobilityHoleSiEmp() const ; | |
128 | // Einstein relation for Diffusion Coefficient of Electrons. [cm^2/sec] | |
129 | // T in degree K, N in #/cm^3 | |
130 | Double_t DiffusionCoefficientElectron() const ; | |
131 | // Einstein relation for Diffusion Coefficient of Holes. [cm^2/sec] | |
132 | // T in [degree K], N in [#/cm^3] | |
133 | Double_t DiffusionCoefficientHole() const ; | |
134 | // Electron <speed> under an applied electric field E=Volts/cm. [cm/sec] | |
135 | // d distance-thickness in [cm], v in [volts], T in [degree K], | |
136 | // N in [#/cm^3] | |
137 | Double_t SpeedElectron() const ; | |
138 | // Holes <speed> under an applied electric field E=Volts/cm. [cm/sec] | |
139 | // d distance-thickness in [cm], v in [volts], T in [degree K], | |
140 | // N in [#/cm^3] | |
141 | Double_t SpeedHole() const ; | |
142 | // Returns the Gaussian sigma == <x^2+z^2> [cm^2] due to the defusion of | |
143 | // electrons or holes through a distance l [cm] caused by an applied | |
144 | // voltage v [volt] through a distance d [cm] in any material at a | |
145 | // temperature T [degree K]. | |
146 | Double_t SigmaDiffusion3D(Double_t l) const; | |
147 | // Returns the Gaussian sigma == <x^2 +y^2+z^2> [cm^2] due to the | |
148 | // defusion of electrons or holes through a distance l [cm] caused by an | |
149 | // applied voltage v [volt] through a distance d [cm] in any material at a | |
150 | // temperature T [degree K]. | |
151 | Double_t SigmaDiffusion2D(Double_t l) const; | |
152 | // Returns the Gaussian sigma == <x^2+z^2> [cm^2] due to the defusion of | |
153 | // electrons or holes through a distance l [cm] caused by an applied | |
154 | // voltage v [volt] through a distance d [cm] in any material at a | |
155 | // temperature T [degree K]. | |
156 | Double_t SigmaDiffusion1D(Double_t l) const; | |
157 | // Computes the Lorentz angle for Electron and Hole, under the Magnetic field bz (in kGauss) | |
158 | Double_t LorentzAngleElectron(Double_t bz) const; | |
159 | Double_t LorentzAngleHole(Double_t bz) const; | |
160 | // Compute the thickness of the depleted region in a Si detector, version A | |
161 | Double_t DepletedRegionThicknessA(Double_t dopCons, | |
162 | Double_t voltage, | |
163 | Double_t elecCharge, | |
164 | Double_t voltBuiltIn=0.5)const; | |
165 | // Compute the thickness of the depleted region in a Si detector, version B | |
166 | Double_t DepletedRegionThicknessB(Double_t resist,Double_t voltage, | |
167 | Double_t mobility, | |
168 | Double_t voltBuiltIn=0.5, | |
169 | Double_t dielConst=1.E-12)const; | |
170 | // Computes the temperature dependance of the reverse bias current | |
171 | Double_t ReverseBiasCurrent(Double_t temp,Double_t revBiasCurT1, | |
172 | Double_t tempT1,Double_t energy=1.2)const; | |
173 | ||
174 | ||
cd2a0045 | 175 | void PrintParameters() const; |
176 | ||
177 | protected: | |
178 | ||
179 | static const Float_t fgkSPDBiasVoltageDefault;//default for fSPDBiasVoltage | |
180 | static const Double_t fgkSPDThreshDefault; //default for fThresh | |
181 | static const Double_t fgkSPDSigmaDefault; //default for fSigma | |
182 | static const TString fgkSPDCouplingOptDefault; // type of pixel Coupling (old or new) | |
183 | static const Double_t fgkSPDCouplColDefault; //default for fSPDCouplCol | |
184 | static const Double_t fgkSPDCouplRowDefault; //default for fSPDCouplRow | |
185 | static const Float_t fgkSPDEccDiffDefault;//default for fSPDEccDiff | |
186 | static const Float_t fgkSDDDiffCoeffDefault; // default for fSDDDiffCoeff | |
187 | static const Float_t fgkSDDDiffCoeff1Default; // default for fSDDDiffCoeff1 | |
188 | static const Float_t fgkSDDJitterErrorDefault; // default for fSDDJitterError | |
189 | static const Float_t fgkSDDDynamicRangeDefault; // default for fSDDDynamicRange | |
190 | static const Int_t fgkSDDMaxAdcDefault; // default for fSDDMaxAdc | |
191 | static const Float_t fgkSDDChargeLossDefault; // default for fSDDChargeLoss | |
192 | ||
193 | static const Double_t fgkSSDCouplingPRDefault; // default values | |
194 | static const Double_t fgkSSDCouplingPLDefault; // for the | |
195 | static const Double_t fgkSSDCouplingNRDefault; // various SSD | |
196 | static const Double_t fgkSSDCouplingNLDefault; // couplings | |
197 | static const Int_t fgkSSDZSThresholdDefault; // default for fSSDZSThreshold | |
198 | ||
199 | static const Float_t fgkNsigmasDefault; //default for fNsigmas | |
200 | static const Int_t fgkNcompsDefault; //default for fNcomps | |
201 | ||
202 | private: | |
203 | Double_t fGeVcharge; // Energy to ionize (free an electron) in GeV | |
204 | Double_t fDOverV; // The parameter d/v where d is the disance over which the | |
2ae37d58 | 205 | // the potential v is applied d/v [cm/volts] |
cd2a0045 | 206 | |
207 | ||
2ae37d58 | 208 | Double_t fSPDBiasVoltage[240]; // Bias Voltage for the SPD |
209 | Double_t fSPDThresh[240]; // SPD Threshold value | |
210 | Double_t fSPDSigma[240]; // SPD threshold fluctuations spread | |
211 | Double_t fSPDNoise[240]; // SPD electronic noise: sigma | |
212 | Double_t fSPDBaseline[240]; // SPD electronic noise: baseline | |
cd2a0045 | 213 | TString fSPDCouplOpt; // SPD Coupling Option |
214 | Double_t fSPDCouplCol; // SPD Coupling parameter along the cols | |
215 | Double_t fSPDCouplRow; // SPD Coupling parameter along the rows | |
216 | Float_t fSPDEccDiff; // Eccentricity (i.e. asymmetry parameter) in the | |
ad7f2bfa | 217 | // Gaussian diffusion for SPD |
218 | Bool_t fSPDAddNoisyFlag; // Flag saying whether noisy pixels should be added to digits | |
219 | Bool_t fSPDRemoveDeadFlag; // Flag saying whether dead pixels should be removed from digits | |
cd2a0045 | 220 | |
221 | Int_t fSDDElectronics; // SDD Electronics Pascal (1) or OLA (2) | |
222 | Float_t fSDDDiffCoeff; // SDD Diffusion Coefficient (scaling the time) | |
223 | Float_t fSDDDiffCoeff1; // SDD Diffusion Coefficient (constant term) | |
224 | Float_t fSDDJitterError; // SDD jitter error | |
225 | Float_t fSDDDynamicRange; // SDD Dynamic Range | |
226 | Float_t fSDDMaxAdc; // SDD ADC saturation value | |
227 | Float_t fSDDChargeLoss; // Set Linear Coefficient for Charge Loss | |
d9ed1779 | 228 | Char_t fSDDRawFormat; // Index for SDD RawFormat |
cd2a0045 | 229 | |
cd2a0045 | 230 | Double_t fSSDCouplingPR; // SSD couplings |
231 | Double_t fSSDCouplingPL; // SSD couplings | |
232 | Double_t fSSDCouplingNR; // SSD couplings | |
233 | Double_t fSSDCouplingNL; // SSD couplings | |
234 | Int_t fSSDZSThreshold; // SSD threshold for the zero suppresion | |
235 | ||
236 | Float_t fNsigmas; // Number of sigmas over which charge disintegration | |
237 | // is performed | |
238 | Int_t fNcomps; // Number of samplings along the gaussian | |
239 | TArrayF *fGaus; // Gaussian lookup table for signal generation | |
240 | ||
2ae37d58 | 241 | Double_t fN; // the impurity concentration of the material in #/cm^3 (NOT USED!) |
242 | Float_t fT; // The temperature of the Si in Degree K. | |
243 | ||
d9ed1779 | 244 | ClassDef(AliITSSimuParam,4); |
cd2a0045 | 245 | }; |
246 | #endif |