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