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