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