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