]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSSimuParam.cxx
Fixing coding violations. Method AliITSQADataMakerRec::AreEqual defined static
[u/mrichter/AliRoot.git] / ITS / AliITSSimuParam.cxx
1 /**************************************************************************
2  * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Id$ */
17
18 ///////////////////////////////////////////////////////////////////
19 //                                                               //
20 // Implementation of the class to store the parameters used in   //
21 // the simulation of SPD, SDD and SSD detectors                  //
22 // Origin: F.Prino, Torino, prino@to.infn.it                     //
23 //                                                               //
24 ///////////////////////////////////////////////////////////////////
25
26 #include "AliITSSimuParam.h"
27 #include <TMath.h>
28
29 const Float_t  AliITSSimuParam::fgkSPDBiasVoltageDefault = 18.182;
30 const Double_t AliITSSimuParam::fgkSPDThreshDefault = 3000.;
31 const Double_t AliITSSimuParam::fgkSPDSigmaDefault = 250.;
32 const TString  AliITSSimuParam::fgkSPDCouplingOptDefault = "old";
33 const Double_t AliITSSimuParam::fgkSPDCouplColDefault = 0.;
34 const Double_t AliITSSimuParam::fgkSPDCouplRowDefault = 0.055;
35 const Float_t  AliITSSimuParam::fgkSPDEccDiffDefault = 0.85;
36 const Float_t  AliITSSimuParam::fgkSDDDiffCoeffDefault = 3.23;
37 const Float_t  AliITSSimuParam::fgkSDDDiffCoeff1Default = 30.;
38 const Float_t  AliITSSimuParam::fgkSDDJitterErrorDefault = 20.; // 20 um from beam test 2001
39 const Float_t  AliITSSimuParam::fgkSDDDynamicRangeDefault = 1400./2.5; // mV/MOhm = nA
40 const Int_t    AliITSSimuParam::fgkSDDMaxAdcDefault = 1024;
41 const Float_t  AliITSSimuParam::fgkSDDChargeLossDefault = 0.;
42 const Double_t AliITSSimuParam::fgkSSDCouplingPRDefault = 0.01;
43 const Double_t AliITSSimuParam::fgkSSDCouplingPLDefault = 0.01;
44 const Double_t AliITSSimuParam::fgkSSDCouplingNRDefault = 0.01;
45 const Double_t AliITSSimuParam::fgkSSDCouplingNLDefault = 0.01;
46 const Int_t    AliITSSimuParam::fgkSSDZSThresholdDefault = 3;
47
48 const Float_t AliITSSimuParam::fgkNsigmasDefault = 3.;
49 const Int_t AliITSSimuParam::fgkNcompsDefault = 121;
50
51 ClassImp(AliITSSimuParam)
52
53 //______________________________________________________________________
54 AliITSSimuParam::AliITSSimuParam():
55   TObject(),
56 fGeVcharge(0.),
57 fDOverV(0.),
58 //fSPDBiasVoltage(fgkSPDBiasVoltageDefault),
59 //fSPDThresh(fgkSPDThreshDefault),
60 //fSPDSigma(fgkSPDSigmaDefault),
61 fSPDCouplOpt(0),
62 fSPDCouplCol(fgkSPDCouplColDefault),
63 fSPDCouplRow(fgkSPDCouplRowDefault),
64 fSPDEccDiff(0.),
65 fSPDAddNoisyFlag(kFALSE),
66 fSPDRemoveDeadFlag(kFALSE),
67 fSDDElectronics(0),
68 fSDDDiffCoeff(0.),
69 fSDDDiffCoeff1(0.),
70 fSDDJitterError(fgkSDDJitterErrorDefault),
71 fSDDDynamicRange(fgkSDDDynamicRangeDefault),
72 fSDDMaxAdc(0.),
73 fSDDChargeLoss(fgkSDDChargeLossDefault),
74 fSDDRawFormat(7),
75 fSSDCouplingPR(0),
76 fSSDCouplingPL(0),
77 fSSDCouplingNR(0),
78 fSSDCouplingNL(0),
79 fSSDZSThreshold(fgkSSDZSThresholdDefault),
80 fNsigmas(fgkNsigmasDefault),
81 fNcomps(fgkNcompsDefault),
82 fGaus(),
83 fN(0.),
84 fT(300.)
85 {  
86   // default constructor
87   SetSPDBiasVoltageAll(fgkSPDBiasVoltageDefault);
88   SetSPDThresholdsAll(fgkSPDThreshDefault,fgkSPDSigmaDefault);
89   SetSPDNoiseAll(0,0);
90   SetGeVToCharge();
91   SetDistanceOverVoltage();
92   SetSPDCouplingOption(fgkSPDCouplingOptDefault);
93   SetSPDSigmaDiffusionAsymmetry(fgkSPDEccDiffDefault);
94   SetSDDElectronics();
95   SetSDDDiffCoeff(fgkSDDDiffCoeffDefault,fgkSDDDiffCoeff1Default);
96   SetSDDMaxAdc((Double_t)fgkSDDMaxAdcDefault);
97   SetSSDCouplings(fgkSSDCouplingPRDefault,fgkSSDCouplingPLDefault,fgkSSDCouplingNRDefault,fgkSSDCouplingNLDefault);
98 }
99 //______________________________________________________________________
100 AliITSSimuParam::AliITSSimuParam(const AliITSSimuParam &simpar):
101 TObject(),
102 fGeVcharge(simpar.fGeVcharge),
103 fDOverV(simpar.fDOverV),
104 //fSPDBiasVoltage(simpar.fSPDBiasVoltage),
105 //fSPDThresh(simpar.fSPDThresh),
106 //fSPDSigma(simpar.fSPDSigma),
107 fSPDCouplOpt(simpar.fSPDCouplOpt),
108 fSPDCouplCol(simpar.fSPDCouplCol),
109 fSPDCouplRow(simpar.fSPDCouplRow),
110 fSPDEccDiff(simpar.fSPDEccDiff),
111 fSPDAddNoisyFlag(simpar.fSPDAddNoisyFlag),
112 fSPDRemoveDeadFlag(simpar.fSPDRemoveDeadFlag),
113 fSDDElectronics(simpar.fSDDElectronics),
114 fSDDDiffCoeff(simpar.fSDDDiffCoeff),
115 fSDDDiffCoeff1(simpar.fSDDDiffCoeff1),
116 fSDDJitterError(simpar.fSDDJitterError),
117 fSDDDynamicRange(simpar.fSDDDynamicRange),
118 fSDDMaxAdc(simpar.fSDDMaxAdc),
119 fSDDChargeLoss(simpar.fSDDChargeLoss),
120 fSDDRawFormat(simpar.fSDDRawFormat),
121 fSSDCouplingPR(simpar.fSSDCouplingPR),
122 fSSDCouplingPL(simpar.fSSDCouplingPL),
123 fSSDCouplingNR(simpar.fSSDCouplingNR),
124 fSSDCouplingNL(simpar.fSSDCouplingNL),
125 fSSDZSThreshold(simpar.fSSDZSThreshold),
126 fNsigmas(simpar.fNsigmas),
127 fNcomps(simpar.fNcomps),
128 fGaus(),
129 fN(simpar.fN),
130 fT(simpar.fT){
131   // copy constructor
132   for (Int_t i=0;i<240;i++) {
133     fSPDBiasVoltage[i]=simpar.fSPDBiasVoltage[i];
134     fSPDThresh[i]=simpar.fSPDThresh[i];
135     fSPDSigma[i]=simpar.fSPDSigma[i];
136     fSPDNoise[i]=simpar.fSPDNoise[i];
137     fSPDBaseline[i]=simpar.fSPDBaseline[i];
138   }
139 }
140
141 //______________________________________________________________________
142 AliITSSimuParam& AliITSSimuParam::operator=(const AliITSSimuParam& source){
143     // Assignment operator. 
144     this->~AliITSSimuParam();
145     new(this) AliITSSimuParam(source);
146     return *this;
147
148 }
149
150
151 //______________________________________________________________________
152 AliITSSimuParam::~AliITSSimuParam() {
153   // destructor
154   if(fGaus) delete fGaus;
155 }
156 //________________________________________________________________________
157 void AliITSSimuParam::SetNLookUp(Int_t p1){
158   // Set number of sigmas over which cluster disintegration is performed
159   fNcomps=p1;
160   if (fGaus) delete fGaus;
161   fGaus = new TArrayF(fNcomps+1);
162   for(Int_t i=0; i<=fNcomps; i++) {
163     Float_t x = -fNsigmas + (2.*i*fNsigmas)/(fNcomps-1);
164     (*fGaus)[i] = exp(-((x*x)/2));
165   }
166 }
167 //________________________________________________________________________
168 void AliITSSimuParam::PrintParameters() const{
169   printf("GeVToCharge               = %G\n",fGeVcharge);
170   printf("DistanveOverVoltage       = %f \n",fDOverV);
171   printf("\n");
172   printf("=====  SPD parameters  =====\n");
173   printf("Bias Voltage              = %f \n",fSPDBiasVoltage[0]);
174   printf("Threshold and sigma       = %f %f\n",fSPDThresh[0],fSPDSigma[0]);
175   printf("Coupling Option           = %s\n",fSPDCouplOpt.Data());
176   printf("Coupling value (column)   = %f\n",fSPDCouplCol);
177   printf("Coupling value (row)      = %f\n",fSPDCouplRow);
178   printf("Eccentricity in diffusion = %f\n",fSPDEccDiff);
179   printf("Flag to add noisy         = %d\n",fSPDAddNoisyFlag);
180   printf("Flag to remove dead       = %d\n",fSPDRemoveDeadFlag);
181   printf("\n");
182   printf("=====  SDD parameters  =====\n");
183   printf("Electronic chips          = %d\n",fSDDElectronics);
184   printf("Diffusion Coefficients    = %f %f\n",fSDDDiffCoeff,fSDDDiffCoeff1);
185   printf("Jitter Error              = %f um\n",fSDDJitterError);
186   printf("Dynamic Range             = %f\n",fSDDDynamicRange);
187   printf("Max. ADC                  = %f\n",fSDDMaxAdc);
188   printf("Charge Loss               = %f\n",fSDDChargeLoss);  
189   printf("Raw Data Format           = %d\n",fSDDRawFormat);  
190   printf("\n");
191   printf("=====  SSD parameters  =====\n");
192   printf("Coupling PR               = %f\n",fSSDCouplingPR);
193   printf("Coupling PL               = %f\n",fSSDCouplingPL);
194   printf("Coupling NR               = %f\n",fSSDCouplingNR);
195   printf("Coupling NL               = %f\n",fSSDCouplingNL);
196   printf("Zero Supp threshold       = %d\n",fSSDZSThreshold);
197 }
198 //______________________________________________________________________
199 Double_t AliITSSimuParam::MobilityElectronSiEmp() const {
200     // Computes the electron mobility in cm^2/volt-sec. Taken from SILVACO
201     // International ATLAS II, 2D Device Simulation Framework, User Manual
202     // Chapter 5 Equation 5-6. An empirical function for low-field mobiliity
203     // in silicon at different tempeatures.
204     // Inputs:
205     //    none.
206     // Output:
207     //    none.
208     // Return:
209     //    The Mobility of electrons in Si at a give temprature and impurity
210     //    concentration. [cm^2/Volt-sec]
211     const Double_t km0  = 55.24; // cm^2/Volt-sec
212     const Double_t km1  = 7.12E+08; // cm^2 (degree K)^2.3 / Volt-sec
213     const Double_t kN0  = 1.072E17; // #/cm^3
214     const Double_t kT0  = 300.; // degree K.
215     const Double_t keT0 = -2.3; // Power of Temp.
216     const Double_t keT1 = -3.8; // Power of Temp.
217     const Double_t keN  = 0.73; // Power of Dopent Consentrations
218     Double_t m;
219     Double_t tT = fT,nN = fN;
220
221     if(nN<=0.0){ // Simple case.
222         if(tT==300.) return 1350.0; // From Table 5-1 at consentration 1.0E14.
223         m = km1*TMath::Power(tT,keT0);
224         return m;
225     } // if nN<=0.0
226     m = km1*TMath::Power(tT,keT0) - km0;
227     m /= 1.0 + TMath::Power(tT/kT0,keT1)*TMath::Power(nN/kN0,keN);
228     m += km0;
229     return m;
230 }
231 //______________________________________________________________________
232 Double_t AliITSSimuParam::MobilityHoleSiEmp() const {
233     // Computes the Hole mobility in cm^2/volt-sec. Taken from SILVACO
234     // International ATLAS II, 2D Device Simulation Framework, User Manual
235     // Chapter 5 Equation 5-7 An empirical function for low-field mobiliity
236     // in silicon at different tempeatures.
237     // Inputs:
238     //    none.
239     // Output:
240     //    none.
241     // Return:
242     //    The Mobility of Hole in Si at a give temprature and impurity
243     //    concentration. [cm^2/Volt-sec]
244     const Double_t km0a = 49.74; // cm^2/Volt-sec
245     const Double_t km0b = 49.70; // cm^2/Volt-sec
246     const Double_t km1  = 1.35E+08; // cm^2 (degree K)^2.3 / Volt-sec
247     const Double_t kN0  = 1.606E17; // #/cm^3
248     const Double_t kT0  = 300.; // degree K.
249     const Double_t keT0 = -2.2; // Power of Temp.
250     const Double_t keT1 = -3.7; // Power of Temp.
251     const Double_t keN  = 0.70; // Power of Dopent Consentrations
252     Double_t m;
253     Double_t tT = fT,nN = fN;
254
255     if(nN<=0.0){ // Simple case.
256         if(tT==300.) return 495.0; // From Table 5-1 at consentration 1.0E14.
257         m = km1*TMath::Power(tT,keT0) + km0a-km0b;
258         return m;
259     } // if nN<=0.0
260     m = km1*TMath::Power(tT,keT0) - km0b;
261     m /= 1.0 + TMath::Power(tT/kT0,keT1)*TMath::Power(nN/kN0,keN);
262     m += km0a;
263     return m;
264 }
265 //______________________________________________________________________
266 Double_t AliITSSimuParam::DiffusionCoefficientElectron() const {
267     // Computes the Diffusion coefficient for electrons in cm^2/sec. Taken
268     // from SILVACO International ATLAS II, 2D Device Simulation Framework,
269     // User Manual Chapter 5 Equation 5-53. Einstein relations for diffusion
270     // coefficient. Note: 1 cm^2/sec = 10 microns^2/nanosec.
271     // Inputs:
272     //    none.
273     // Output:
274     //    none.
275     // Return:
276     //    The Diffusion Coefficient of electrons in Si at a give temprature
277     //    and impurity concentration. [cm^2/sec]
278     // const Double_t kb = 1.3806503E-23; // Joules/degree K
279     // const Double_t qe = 1.60217646E-19; // Coulumbs.
280     const Double_t kbqe = 8.617342312E-5; // Volt/degree K
281     Double_t m = MobilityElectronSiEmp();
282     Double_t tT = fT;
283
284     return m*kbqe*tT;  // [cm^2/sec]
285 }
286 //______________________________________________________________________
287 Double_t AliITSSimuParam::DiffusionCoefficientHole() const {
288     // Computes the Diffusion coefficient for Holes in cm^2/sec. Taken
289     // from SILVACO International ATLAS II, 2D Device Simulation Framework,
290     // User Manual Chapter 5 Equation 5-53. Einstein relations for diffusion
291     // coefficient. Note: 1 cm^2/sec = 10 microns^2/nanosec.
292     // Inputs:
293     //    none.
294     // Output:
295     //    none.
296     // Return:
297     //    The Defusion Coefficient of Hole in Si at a give temprature and
298     //    impurity concentration. [cm^2/sec]
299     //    and impurity concentration. [cm^2/sec]
300     // const Double_t kb = 1.3806503E-23; // Joules/degree K
301     // const Double_t qe = 1.60217646E-19; // Coulumbs.
302     const Double_t kbqe = 8.617342312E-5; // Volt/degree K
303     Double_t m = MobilityHoleSiEmp();
304     Double_t tT = fT;
305
306     return m*kbqe*tT;  // [cm^2/sec]
307 }
308 //______________________________________________________________________
309 Double_t AliITSSimuParam::LorentzAngleHole(Double_t B) const {
310    // Computes the Lorentz angle for electrons in Si
311    // Input: magnetic Field in KGauss
312    // Output: Lorentz angle in radians (positive if Bz is positive)
313    // Main Reference: NIM A 497 (2003) 389–396.
314    // "An algorithm for calculating the Lorentz angle in silicon detectors", V. Bartsch et al.
315    //
316    const Double_t krH=0.70; // Hall scattering factor for Hole
317    const Double_t kT0  = 300.;       // reference Temperature (degree K).
318    const Double_t kmulow0 = 470.5;   // cm^2/Volt-sec
319    const Double_t keT0 = -2.5;       // Power of Temp.
320    const Double_t beta0 = 1.213;     // beta coeff. at T0=300K
321    const Double_t keT1 = 0.17;       // Power of Temp. for beta
322    const Double_t kvsat0 = 8.37E+06; // saturated velocity at T0=300K (cm/sec)
323    const Double_t keT2 = 0.52;       // Power of Temp. for vsat
324    Double_t tT = fT;
325    Double_t eE= 1./fDOverV;
326    Double_t muLow=kmulow0*TMath::Power(tT/kT0,keT0);
327    Double_t beta=beta0*TMath::Power(tT/kT0,keT1);
328    Double_t vsat=kvsat0*TMath::Power(tT/kT0,keT2);
329    Double_t mu=muLow/TMath::Power(1+TMath::Power(muLow*eE/vsat,beta),1/beta);
330    Double_t angle=TMath::ATan(krH*mu*B*1.E-05); // Conversion Factor
331    return angle;
332 }
333 //______________________________________________________________________
334 Double_t AliITSSimuParam::LorentzAngleElectron(Double_t B) const {
335    // Computes the Lorentz angle for electrons in Si
336    // Input: magnetic Field in KGauss
337    // Output: Lorentz angle in radians (positive if Bz is positive)
338    // Main Reference: NIM A 497 (2003) 389–396.
339    // "An algorithm for calculating the Lorentz angle in silicon detectors", V. Bartsch et al.
340    //
341    const Double_t krH=1.15; // Hall scattering factor for Electron
342    const Double_t kT0  = 300.;       // reference Temperature (degree K).
343    const Double_t kmulow0 = 1417.0;  // cm^2/Volt-sec
344    const Double_t keT0 = -2.2;       // Power of Temp.
345    const Double_t beta0 = 1.109;     // beta coeff. at T0=300K
346    const Double_t keT1 = 0.66;       // Power of Temp. for beta
347    const Double_t kvsat0 = 1.07E+07; // saturated velocity at T0=300K (cm/sec)
348    const Double_t keT2 = 0.87;       // Power of Temp. for vsat
349    Double_t tT = fT;
350    Double_t eE= 1./fDOverV;
351    Double_t muLow=kmulow0*TMath::Power(tT/kT0,keT0);
352    Double_t beta=beta0*TMath::Power(tT/kT0,keT1);
353    Double_t vsat=kvsat0*TMath::Power(tT/kT0,keT2);
354    Double_t mu=muLow/TMath::Power(1+TMath::Power(muLow*eE/vsat,beta),1/beta);
355    Double_t angle=TMath::ATan(krH*mu*B*1.E-05);
356    return angle;
357 }
358 //______________________________________________________________________
359 Double_t AliITSSimuParam::SpeedElectron() const {
360     // Computes the average speed for electrons in Si under the low-field
361     // approximation. [cm/sec].
362     // Inputs:
363     //    none.
364     // Output:
365     //    none.
366     // Return:
367     //    The speed the holes are traveling at due to the low field applied.
368     //    [cm/sec]
369     Double_t m = MobilityElectronSiEmp();
370
371     return m/fDOverV;  // [cm/sec]
372 }
373 //______________________________________________________________________
374 Double_t AliITSSimuParam::SpeedHole() const {
375     // Computes the average speed for Holes in Si under the low-field
376     // approximation.[cm/sec].
377     // Inputs:
378     //    none.
379     // Output:
380     //    none.
381     // Return:
382     //    The speed the holes are traveling at due to the low field applied.
383     //    [cm/sec]
384     Double_t m = MobilityHoleSiEmp();
385
386     return m/fDOverV;  // [cm/sec]
387 }
388 //______________________________________________________________________
389 Double_t AliITSSimuParam::SigmaDiffusion3D(Double_t l) const {
390     // Returns the Gaussian sigma^2 == <x^2+y^2+z^2> [cm^2] due to the
391     // defusion of electrons or holes through a distance l [cm] caused
392     // by an applied voltage v [volt] through a distance d [cm] in any
393     //  material at a temperature T [degree K]. The sigma diffusion when
394     //  expressed in terms of the distance over which the diffusion
395     // occures, l=time/speed, is independent of the mobility and therefore
396     //  the properties of the material. The charge distributions is given by
397     // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <r^2> = 6Dt where D=mkT/e
398     // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
399     // charge. and vel=m*v/d. consiquently sigma^2=6kTdl/ev.
400     // Inputs:
401     //    Double_t l   Distance the charge has to travel.
402     // Output:
403     //    none.
404     // Return:
405     //    The Sigma due to the diffution of electrons. [cm]
406     const Double_t kcon = 5.17040258E-04; // == 6k/e [J/col or volts]
407
408     return TMath::Sqrt(kcon*fT*fDOverV*l);  // [cm]
409 }
410 //______________________________________________________________________
411 Double_t AliITSSimuParam::SigmaDiffusion2D(Double_t l) const {
412     // Returns the Gaussian sigma^2 == <x^2+z^2> [cm^2] due to the defusion
413     // of electrons or holes through a distance l [cm] caused by an applied
414     // voltage v [volt] through a distance d [cm] in any material at a
415     // temperature T [degree K]. The sigma diffusion when expressed in terms
416     // of the distance over which the diffusion occures, l=time/speed, is
417     // independent of the mobility and therefore the properties of the
418     // material. The charge distributions is given by
419     // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <x^2+z^2> = 4Dt where D=mkT/e
420     // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
421     // charge. and vel=m*v/d. consiquently sigma^2=4kTdl/ev.
422     // Inputs:
423     //    Double_t l   Distance the charge has to travel.
424     // Output:
425     //    none.
426     // Return:
427     //    The Sigma due to the diffution of electrons. [cm]
428     const Double_t kcon = 3.446935053E-04; // == 4k/e [J/col or volts]
429
430     return TMath::Sqrt(kcon*fT*fDOverV*l);  // [cm]
431 }
432 //______________________________________________________________________
433 Double_t AliITSSimuParam::SigmaDiffusion1D(Double_t l) const {
434     // Returns the Gaussian sigma^2 == <x^2> [cm^2] due to the defusion
435     // of electrons or holes through a distance l [cm] caused by an applied
436     // voltage v [volt] through a distance d [cm] in any material at a
437     // temperature T [degree K]. The sigma diffusion when expressed in terms
438     // of the distance over which the diffusion occures, l=time/speed, is
439     // independent of the mobility and therefore the properties of the
440     // material. The charge distributions is given by
441     // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <r^2> = 2Dt where D=mkT/e
442     // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
443     // charge. and vel=m*v/d. consiquently sigma^2=2kTdl/ev.
444     // Inputs:
445     //    Double_t l   Distance the charge has to travel.
446     // Output:
447     //    none.
448     // Return:
449     //    The Sigma due to the diffution of electrons. [cm]
450     const Double_t kcon = 1.723467527E-04; // == 2k/e [J/col or volts]
451
452     return TMath::Sqrt(kcon*fT*fDOverV*l);  // [cm]
453 }
454 //----------------------------------------------------------------------
455 Double_t AliITSSimuParam::DepletedRegionThicknessA(Double_t dopCons,
456                                                  Double_t voltage,
457                                                  Double_t elecCharge,
458                                                  Double_t voltBuiltIn)const{
459     // Computes the thickness of the depleted region in Si due to the
460     // application of an external bias voltage. From the Particle Data
461     // Book, 28.8 Silicon semiconductor detectors equation 28.19 (2004)
462     // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
463     // July 15 2004, ISSN 0370-2693 page 263. First equation.
464     // Inputs:
465     //    Double_t dopCons           "N" doping concentration
466     //    Double_t voltage           "V" external bias voltage
467     //    Double_t elecCharge        "e" electronic charge
468     //    Double_t voltBuiltIn=0.5   "V_bi" "built-in" Voltage (~0.5V for
469     //                               resistivities typically used in detectors)
470     // Output:
471     //    none.
472     // Return:
473     //    The thickness of the depleted region
474
475     return TMath::Sqrt(2.0*(voltage+voltBuiltIn)/(dopCons*elecCharge));
476 }
477 //----------------------------------------------------------------------
478 Double_t AliITSSimuParam::DepletedRegionThicknessB(Double_t resist,
479                                                  Double_t voltage,
480                                                  Double_t mobility,
481                                                  Double_t voltBuiltIn,
482                                                  Double_t dielConst)const{
483     // Computes the thickness of the depleted region in Si due to the
484     // application of an external bias voltage. From the Particle Data
485     // Book, 28.8 Silicon semiconductor detectors equation 28.19 (2004)
486     // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
487     // July 15 2004, ISSN 0370-2693 page 263. Second Equation.
488     // Inputs:
489     //    Double_t resist            "rho" resistivity (typically 1-10 kOhm cm)
490     //    Double_t voltage           "V" external bias voltage
491     //    Double_t mobility          "mu" charge carrier mobility
492     //                                  (electons 1350, holes 450 cm^2/V/s)
493     //    Double_t voltBuiltIn=0.5   "V_bi" "built-in" Voltage (~0.5V for
494     //                               resistivities typically used in detectors)
495     //    Double_t dielConst=1.E-12  "epsilon" dielectric constant = 11.9 *
496     //                                (permittivity of free space) or ~ 1 pF/cm
497     // Output:
498     //    none.
499     // Return:
500     //    The thickness of the depleted region
501
502     return TMath::Sqrt(2.8*resist*mobility*dielConst*(voltage+voltBuiltIn));
503 }
504 //----------------------------------------------------------------------
505 Double_t AliITSSimuParam::ReverseBiasCurrent(Double_t temp,
506                                             Double_t revBiasCurT1,
507                                             Double_t tempT1,
508                                             Double_t energy)const{
509     // Computes the temperature dependance of the reverse bias current
510     // of Si detectors. From the Particle Data
511     // Book, 28.8 Silicon semiconductor detectors equation 28.21 (2004)
512     // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
513     // July 15 2004, ISSN 0370-2693 page 263.
514     // Inputs:
515     //    Double_t temp         The temperature at which the current is wanted
516     //    Double_t revBiasCurT1 The reference bias current at temp T1
517     //    Double_t tempT1       The temperature correstponding to revBiasCurT1
518     //    Double_t energy=1.2   Some energy [eV]
519     // Output:
520     //    none.
521     // Return:
522     //    The reverse bias current at the tempeature temp.
523     const Double_t kBoltz = 8.617343E-5; //[eV/K]
524
525     return revBiasCurT1*(temp*temp/(tempT1*tempT1))*
526         TMath::Exp(-0.5*energy*(tempT1-temp)/(kBoltz*tempT1*temp));
527 }
528 //______________________________________________________________________
529  void   AliITSSimuParam::SPDThresholds(const Int_t mod, Double_t& thresh, Double_t& sigma) const {
530     if(mod<0 || mod>239) {
531        thresh=0;
532        sigma=0; 
533        return;
534      } 
535      thresh=fSPDThresh[mod];
536      sigma=fSPDSigma[mod];
537      return;
538 }
539 //_______________________________________________________________________
540  void   AliITSSimuParam::SPDNoise(const Int_t mod,Double_t &noise, Double_t &baseline) const {
541      if(mod<0 || mod>239) {
542        noise=0;
543        baseline=0; 
544        return;
545      } 
546      noise=fSPDNoise[mod];
547      baseline=fSPDBaseline[mod];
548      return;
549 }
550