]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSCalibration.cxx
Added option TGeo in the constructor in order to initialize some parameters directly...
[u/mrichter/AliRoot.git] / ITS / AliITSCalibration.cxx
CommitLineData
fcf95fc7 1/**************************************************************************
2 * Copyright(c) 1998-1999, 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
a4005be7 16/* $Id:$ */
fcf95fc7 17
18//////////////////////////////////////////////////////
19// Calibration class for set:ITS //
20// Specific subdetector implementation is done in //
21// AliITSCalibrationSPD //
22// AliITSCalibrationSDD //
23// AliITSCalibrationSSD //
24//////////////////////////////////////////////////////
25
090026bf 26#include <Riostream.h>
27#include <TMath.h>
28
fcf95fc7 29#include "AliITSCalibration.h"
154bfd38 30#include "AliLog.h"
fcf95fc7 31
32ClassImp(AliITSCalibration)
33
34//______________________________________________________________________
4bfbde86 35AliITSCalibration::AliITSCalibration():
36TObject(),
37fDataType(),
38fdv(0.000375),
39fN(0.),
40fT(300.),
41fGeVcharge(0.),
42fResponse(){
43 // Default Constructor (300 microns and 80 volts)
fcf95fc7 44
fcf95fc7 45 SetGeVToCharge();
46 fResponse = 0;
47}
48//______________________________________________________________________
4bfbde86 49AliITSCalibration::AliITSCalibration(Double_t thickness):
50TObject(),
51fDataType(),
52fdv(0.),
53fN(0.),
54fT(300.),
55fGeVcharge(0.),
56fResponse(){
fcf95fc7 57 // Default Constructor
58
59 fdv = thickness/80.0; // 80 volts.
fcf95fc7 60 SetGeVToCharge();
61 fResponse = 0;
62}
fcf95fc7 63
64//______________________________________________________________________
154bfd38 65AliITSCalibration::AliITSCalibration(const AliITSCalibration &ob):
e56160b8 66TObject(ob),
67fDataType(ob.fDataType),
68fdv(ob.fdv),
69fN(ob.fN),
70fT(ob.fT),
71fGeVcharge(ob.fGeVcharge),
72fResponse(ob.fResponse)
154bfd38 73{
74 // Copy constructor
154bfd38 75
e56160b8 76}
77/*
154bfd38 78//______________________________________________________________________________
79AliITSCalibration& AliITSCalibration::operator= (const AliITSCalibration& source)
80{
81 // Asignment operator
154bfd38 82
e56160b8 83 this->~AliITSCalibration();
84 new(this) AliITSCalibration(source);
85 return *this;
154bfd38 86
154bfd38 87
154bfd38 88}
e56160b8 89*/
154bfd38 90//______________________________________________________________________
fcf95fc7 91Double_t AliITSCalibration::MobilityElectronSiEmp() const {
92 // Computes the electron mobility in cm^2/volt-sec. Taken from SILVACO
93 // International ATLAS II, 2D Device Simulation Framework, User Manual
94 // Chapter 5 Equation 5-6. An empirical function for low-field mobiliity
95 // in silicon at different tempeatures.
96 // Inputs:
97 // none.
98 // Output:
99 // none.
100 // Return:
101 // The Mobility of electrons in Si at a give temprature and impurity
102 // concentration. [cm^2/Volt-sec]
103 const Double_t km0 = 55.24; // cm^2/Volt-sec
104 const Double_t km1 = 7.12E+08; // cm^2 (degree K)^2.3 / Volt-sec
105 const Double_t kN0 = 1.072E17; // #/cm^3
106 const Double_t kT0 = 300.; // degree K.
107 const Double_t keT0 = -2.3; // Power of Temp.
108 const Double_t keT1 = -3.8; // Power of Temp.
109 const Double_t keN = 0.73; // Power of Dopent Consentrations
110 Double_t m;
111 Double_t tT = fT,nN = fN;
112
113 if(nN<=0.0){ // Simple case.
114 if(tT==300.) return 1350.0; // From Table 5-1 at consentration 1.0E14.
115 m = km1*TMath::Power(tT,keT0);
116 return m;
117 } // if nN<=0.0
118 m = km1*TMath::Power(tT,keT0) - km0;
119 m /= 1.0 + TMath::Power(tT/kT0,keT1)*TMath::Power(nN/kN0,keN);
120 m += km0;
121 return m;
122}
123//______________________________________________________________________
124Double_t AliITSCalibration::MobilityHoleSiEmp() const {
125 // Computes the Hole mobility in cm^2/volt-sec. Taken from SILVACO
126 // International ATLAS II, 2D Device Simulation Framework, User Manual
127 // Chapter 5 Equation 5-7 An empirical function for low-field mobiliity
128 // in silicon at different tempeatures.
129 // Inputs:
130 // none.
131 // Output:
132 // none.
133 // Return:
134 // The Mobility of Hole in Si at a give temprature and impurity
135 // concentration. [cm^2/Volt-sec]
136 const Double_t km0a = 49.74; // cm^2/Volt-sec
137 const Double_t km0b = 49.70; // cm^2/Volt-sec
138 const Double_t km1 = 1.35E+08; // cm^2 (degree K)^2.3 / Volt-sec
139 const Double_t kN0 = 1.606E17; // #/cm^3
140 const Double_t kT0 = 300.; // degree K.
141 const Double_t keT0 = -2.2; // Power of Temp.
142 const Double_t keT1 = -3.7; // Power of Temp.
143 const Double_t keN = 0.70; // Power of Dopent Consentrations
144 Double_t m;
145 Double_t tT = fT,nN = fN;
146
147 if(nN<=0.0){ // Simple case.
148 if(tT==300.) return 495.0; // From Table 5-1 at consentration 1.0E14.
149 m = km1*TMath::Power(tT,keT0) + km0a-km0b;
150 return m;
151 } // if nN<=0.0
152 m = km1*TMath::Power(tT,keT0) - km0b;
153 m /= 1.0 + TMath::Power(tT/kT0,keT1)*TMath::Power(nN/kN0,keN);
154 m += km0a;
155 return m;
156}
157//______________________________________________________________________
158Double_t AliITSCalibration::DiffusionCoefficientElectron() const {
159 // Computes the Diffusion coefficient for electrons in cm^2/sec. Taken
160 // from SILVACO International ATLAS II, 2D Device Simulation Framework,
161 // User Manual Chapter 5 Equation 5-53. Einstein relations for diffusion
162 // coefficient. Note: 1 cm^2/sec = 10 microns^2/nanosec.
163 // Inputs:
164 // none.
165 // Output:
166 // none.
167 // Return:
168 // The Diffusion Coefficient of electrons in Si at a give temprature
169 // and impurity concentration. [cm^2/sec]
170 // const Double_t kb = 1.3806503E-23; // Joules/degree K
171 // const Double_t qe = 1.60217646E-19; // Coulumbs.
172 const Double_t kbqe = 8.617342312E-5; // Volt/degree K
173 Double_t m = MobilityElectronSiEmp();
174 Double_t tT = fT;
175
176 return m*kbqe*tT; // [cm^2/sec]
177}
178//______________________________________________________________________
179Double_t AliITSCalibration::DiffusionCoefficientHole() const {
180 // Computes the Diffusion coefficient for Holes in cm^2/sec. Taken
181 // from SILVACO International ATLAS II, 2D Device Simulation Framework,
182 // User Manual Chapter 5 Equation 5-53. Einstein relations for diffusion
183 // coefficient. Note: 1 cm^2/sec = 10 microns^2/nanosec.
184 // Inputs:
185 // none.
186 // Output:
187 // none.
188 // Return:
189 // The Defusion Coefficient of Hole in Si at a give temprature and
190 // impurity concentration. [cm^2/sec]
191 // and impurity concentration. [cm^2/sec]
192 // const Double_t kb = 1.3806503E-23; // Joules/degree K
193 // const Double_t qe = 1.60217646E-19; // Coulumbs.
194 const Double_t kbqe = 8.617342312E-5; // Volt/degree K
195 Double_t m = MobilityHoleSiEmp();
196 Double_t tT = fT;
197
198 return m*kbqe*tT; // [cm^2/sec]
199}
200//______________________________________________________________________
a4005be7 201Double_t AliITSCalibration::LorentzAngleHole(Double_t B) const {
202 // Computes the Lorentz angle for electrons in Si
203 // Input: magnetic Field in KGauss
204 // Output: Lorentz angle in radians (positive if Bz is positive)
205 // Main Reference: NIM A 497 (2003) 389–396.
206 // "An algorithm for calculating the Lorentz angle in silicon detectors", V. Bartsch et al.
207 //
208 const Double_t krH=0.70; // Hall scattering factor for Hole
209 const Double_t kT0 = 300.; // reference Temperature (degree K).
210 const Double_t kmulow0 = 470.5; // cm^2/Volt-sec
211 const Double_t keT0 = -2.5; // Power of Temp.
212 const Double_t beta0 = 1.213; // beta coeff. at T0=300K
213 const Double_t keT1 = 0.17; // Power of Temp. for beta
214 const Double_t kvsat0 = 8.37E+06; // saturated velocity at T0=300K (cm/sec)
215 const Double_t keT2 = 0.52; // Power of Temp. for vsat
216 Double_t tT = fT;
217 Double_t eE= 1./fdv;
218 Double_t muLow=kmulow0*TMath::Power(tT/kT0,keT0);
219 Double_t beta=beta0*TMath::Power(tT/kT0,keT1);
220 Double_t vsat=kvsat0*TMath::Power(tT/kT0,keT2);
221 Double_t mu=muLow/TMath::Power(1+TMath::Power(muLow*eE/vsat,beta),1/beta);
222 Double_t angle=TMath::ATan(krH*mu*B*1.E-05); // Conversion Factor
223 return angle;
224}
225//______________________________________________________________________
226Double_t AliITSCalibration::LorentzAngleElectron(Double_t B) const {
227 // Computes the Lorentz angle for electrons in Si
228 // Input: magnetic Field in KGauss
229 // Output: Lorentz angle in radians (positive if Bz is positive)
230 // Main Reference: NIM A 497 (2003) 389–396.
231 // "An algorithm for calculating the Lorentz angle in silicon detectors", V. Bartsch et al.
232 //
233 const Double_t krH=1.15; // Hall scattering factor for Electron
234 const Double_t kT0 = 300.; // reference Temperature (degree K).
235 const Double_t kmulow0 = 1417.0; // cm^2/Volt-sec
236 const Double_t keT0 = -2.2; // Power of Temp.
237 const Double_t beta0 = 1.109; // beta coeff. at T0=300K
238 const Double_t keT1 = 0.66; // Power of Temp. for beta
239 const Double_t kvsat0 = 1.07E+07; // saturated velocity at T0=300K (cm/sec)
240 const Double_t keT2 = 0.87; // Power of Temp. for vsat
241 Double_t tT = fT;
242 Double_t eE= 1./fdv;
243 Double_t muLow=kmulow0*TMath::Power(tT/kT0,keT0);
244 Double_t beta=beta0*TMath::Power(tT/kT0,keT1);
245 Double_t vsat=kvsat0*TMath::Power(tT/kT0,keT2);
246 Double_t mu=muLow/TMath::Power(1+TMath::Power(muLow*eE/vsat,beta),1/beta);
247 Double_t angle=TMath::ATan(krH*mu*B*1.E-05);
248 return angle;
249}
250//______________________________________________________________________
fcf95fc7 251Double_t AliITSCalibration::SpeedElectron() const {
252 // Computes the average speed for electrons in Si under the low-field
253 // approximation. [cm/sec].
254 // Inputs:
255 // none.
256 // Output:
257 // none.
258 // Return:
259 // The speed the holes are traveling at due to the low field applied.
260 // [cm/sec]
261 Double_t m = MobilityElectronSiEmp();
262
263 return m/fdv; // [cm/sec]
264}
265//______________________________________________________________________
266Double_t AliITSCalibration::SpeedHole() const {
267 // Computes the average speed for Holes in Si under the low-field
268 // approximation.[cm/sec].
269 // Inputs:
270 // none.
271 // Output:
272 // none.
273 // Return:
274 // The speed the holes are traveling at due to the low field applied.
275 // [cm/sec]
276 Double_t m = MobilityHoleSiEmp();
277
278 return m/fdv; // [cm/sec]
279}
280//______________________________________________________________________
281Double_t AliITSCalibration::SigmaDiffusion3D(Double_t l) const {
282 // Returns the Gaussian sigma^2 == <x^2+y^2+z^2> [cm^2] due to the
283 // defusion of electrons or holes through a distance l [cm] caused
284 // by an applied voltage v [volt] through a distance d [cm] in any
285 // material at a temperature T [degree K]. The sigma diffusion when
286 // expressed in terms of the distance over which the diffusion
287 // occures, l=time/speed, is independent of the mobility and therefore
288 // the properties of the material. The charge distributions is given by
289 // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <r^2> = 6Dt where D=mkT/e
290 // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
291 // charge. and vel=m*v/d. consiquently sigma^2=6kTdl/ev.
292 // Inputs:
293 // Double_t l Distance the charge has to travel.
294 // Output:
295 // none.
296 // Return:
297 // The Sigma due to the diffution of electrons. [cm]
298 const Double_t kcon = 5.17040258E-04; // == 6k/e [J/col or volts]
299
300 return TMath::Sqrt(kcon*fT*fdv*l); // [cm]
301}
302//______________________________________________________________________
303Double_t AliITSCalibration::SigmaDiffusion2D(Double_t l) const {
304 // Returns the Gaussian sigma^2 == <x^2+z^2> [cm^2] due to the defusion
305 // of electrons or holes through a distance l [cm] caused by an applied
306 // voltage v [volt] through a distance d [cm] in any material at a
307 // temperature T [degree K]. The sigma diffusion when expressed in terms
308 // of the distance over which the diffusion occures, l=time/speed, is
309 // independent of the mobility and therefore the properties of the
310 // material. The charge distributions is given by
311 // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <x^2+z^2> = 4Dt where D=mkT/e
312 // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
313 // charge. and vel=m*v/d. consiquently sigma^2=4kTdl/ev.
314 // Inputs:
315 // Double_t l Distance the charge has to travel.
316 // Output:
317 // none.
318 // Return:
319 // The Sigma due to the diffution of electrons. [cm]
320 const Double_t kcon = 3.446935053E-04; // == 4k/e [J/col or volts]
321
322 return TMath::Sqrt(kcon*fT*fdv*l); // [cm]
323}
324//______________________________________________________________________
325Double_t AliITSCalibration::SigmaDiffusion1D(Double_t l) const {
326 // Returns the Gaussian sigma^2 == <x^2> [cm^2] due to the defusion
327 // of electrons or holes through a distance l [cm] caused by an applied
328 // voltage v [volt] through a distance d [cm] in any material at a
329 // temperature T [degree K]. The sigma diffusion when expressed in terms
330 // of the distance over which the diffusion occures, l=time/speed, is
331 // independent of the mobility and therefore the properties of the
332 // material. The charge distributions is given by
333 // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <r^2> = 2Dt where D=mkT/e
334 // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
335 // charge. and vel=m*v/d. consiquently sigma^2=2kTdl/ev.
336 // Inputs:
337 // Double_t l Distance the charge has to travel.
338 // Output:
339 // none.
340 // Return:
341 // The Sigma due to the diffution of electrons. [cm]
342 const Double_t kcon = 1.723467527E-04; // == 2k/e [J/col or volts]
343
344 return TMath::Sqrt(kcon*fT*fdv*l); // [cm]
345}
346//----------------------------------------------------------------------
347Double_t AliITSCalibration::DepletedRegionThicknessA(Double_t dopCons,
348 Double_t voltage,
349 Double_t elecCharge,
350 Double_t voltBuiltIn)const{
351 // Computes the thickness of the depleted region in Si due to the
352 // application of an external bias voltage. From the Particle Data
353 // Book, 28.8 Silicon semiconductor detectors equation 28.19 (2004)
354 // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
355 // July 15 2004, ISSN 0370-2693 page 263. First equation.
356 // Inputs:
357 // Double_t dopCons "N" doping concentration
358 // Double_t voltage "V" external bias voltage
359 // Double_t elecCharge "e" electronic charge
360 // Double_t voltBuiltIn=0.5 "V_bi" "built-in" Voltage (~0.5V for
361 // resistivities typically used in detectors)
362 // Output:
363 // none.
364 // Return:
365 // The thickness of the depleted region
366
367 return TMath::Sqrt(2.0*(voltage+voltBuiltIn)/(dopCons*elecCharge));
368}
369//----------------------------------------------------------------------
370Double_t AliITSCalibration::DepletedRegionThicknessB(Double_t resist,
371 Double_t voltage,
372 Double_t mobility,
373 Double_t voltBuiltIn,
374 Double_t dielConst)const{
375 // Computes the thickness of the depleted region in Si due to the
376 // application of an external bias voltage. From the Particle Data
377 // Book, 28.8 Silicon semiconductor detectors equation 28.19 (2004)
378 // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
379 // July 15 2004, ISSN 0370-2693 page 263. Second Equation.
380 // Inputs:
381 // Double_t resist "rho" resistivity (typically 1-10 kOhm cm)
382 // Double_t voltage "V" external bias voltage
383 // Double_t mobility "mu" charge carrier mobility
384 // (electons 1350, holes 450 cm^2/V/s)
385 // Double_t voltBuiltIn=0.5 "V_bi" "built-in" Voltage (~0.5V for
386 // resistivities typically used in detectors)
387 // Double_t dielConst=1.E-12 "epsilon" dielectric constant = 11.9 *
388 // (permittivity of free space) or ~ 1 pF/cm
389 // Output:
390 // none.
391 // Return:
392 // The thickness of the depleted region
393
394 return TMath::Sqrt(2.8*resist*mobility*dielConst*(voltage+voltBuiltIn));
395}
396//----------------------------------------------------------------------
397Double_t AliITSCalibration::ReverseBiasCurrent(Double_t temp,
398 Double_t revBiasCurT1,
399 Double_t tempT1,
400 Double_t energy)const{
401 // Computes the temperature dependance of the reverse bias current
402 // of Si detectors. From the Particle Data
403 // Book, 28.8 Silicon semiconductor detectors equation 28.21 (2004)
404 // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
405 // July 15 2004, ISSN 0370-2693 page 263.
406 // Inputs:
407 // Double_t temp The temperature at which the current is wanted
408 // Double_t revBiasCurT1 The reference bias current at temp T1
409 // Double_t tempT1 The temperature correstponding to revBiasCurT1
410 // Double_t energy=1.2 Some energy [eV]
411 // Output:
412 // none.
413 // Return:
414 // The reverse bias current at the tempeature temp.
415 const Double_t kBoltz = 8.617343E-5; //[eV/K]
416
417 return revBiasCurT1*(temp*temp/(tempT1*tempT1))*
418 TMath::Exp(-0.5*energy*(tempT1-temp)/(kBoltz*tempT1*temp));
419}
420//----------------------------------------------------------------------
421void AliITSCalibration::Print(ostream *os) const {
422 // Standard output format for this class.
423 // Inputs:
424 *os << fdv << " " << fN << " " << fT << " ";
425 *os << fGeVcharge;
426 // printf("%-10.6e %-10.6e %-10.6e %-10.6e \n",fdv,fN,fT,fGeVcharge);
427 return;
428}
429//----------------------------------------------------------------------
430void AliITSCalibration::Read(istream *is) {
431 // Standard input format for this class.
432 // Inputs:
433 // ostream *is Pointer to the output stream
434 // Outputs:
435 // none:
436 // Return:
437 // none.
438
439 *is >> fdv >> fN >> fT >> fGeVcharge;
440 return;
441}
442//----------------------------------------------------------------------
443
444ostream &operator<<(ostream &os,AliITSCalibration &p){
445 // Standard output streaming function.
446 // Inputs:
447 // ostream *os Pointer to the output stream
448 // Outputs:
449 // none:
450 // Return:
451 // none.
452
453 p.Print(&os);
454 return os;
455}
456
457//----------------------------------------------------------------------
458istream &operator>>(istream &is,AliITSCalibration &r){
459 // Standard input streaming function.
460 // Inputs:
461 // ostream *os Pointer to the output stream
462 // Outputs:
463 // none:
464 // Return:
465 // none.
466
467 r.Read(&is);
468 return is;
469}
470//----------------------------------------------------------------------