]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSCalibration.cxx
New QA classes (Yves)
[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
090026bf 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//______________________________________________________________________
201Double_t AliITSCalibration::SpeedElectron() const {
202 // Computes the average speed for electrons in Si under the low-field
203 // approximation. [cm/sec].
204 // Inputs:
205 // none.
206 // Output:
207 // none.
208 // Return:
209 // The speed the holes are traveling at due to the low field applied.
210 // [cm/sec]
211 Double_t m = MobilityElectronSiEmp();
212
213 return m/fdv; // [cm/sec]
214}
215//______________________________________________________________________
216Double_t AliITSCalibration::SpeedHole() const {
217 // Computes the average speed for Holes in Si under the low-field
218 // approximation.[cm/sec].
219 // Inputs:
220 // none.
221 // Output:
222 // none.
223 // Return:
224 // The speed the holes are traveling at due to the low field applied.
225 // [cm/sec]
226 Double_t m = MobilityHoleSiEmp();
227
228 return m/fdv; // [cm/sec]
229}
230//______________________________________________________________________
231Double_t AliITSCalibration::SigmaDiffusion3D(Double_t l) const {
232 // Returns the Gaussian sigma^2 == <x^2+y^2+z^2> [cm^2] due to the
233 // defusion of electrons or holes through a distance l [cm] caused
234 // by an applied voltage v [volt] through a distance d [cm] in any
235 // material at a temperature T [degree K]. The sigma diffusion when
236 // expressed in terms of the distance over which the diffusion
237 // occures, l=time/speed, is independent of the mobility and therefore
238 // the properties of the material. The charge distributions is given by
239 // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <r^2> = 6Dt where D=mkT/e
240 // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
241 // charge. and vel=m*v/d. consiquently sigma^2=6kTdl/ev.
242 // Inputs:
243 // Double_t l Distance the charge has to travel.
244 // Output:
245 // none.
246 // Return:
247 // The Sigma due to the diffution of electrons. [cm]
248 const Double_t kcon = 5.17040258E-04; // == 6k/e [J/col or volts]
249
250 return TMath::Sqrt(kcon*fT*fdv*l); // [cm]
251}
252//______________________________________________________________________
253Double_t AliITSCalibration::SigmaDiffusion2D(Double_t l) const {
254 // Returns the Gaussian sigma^2 == <x^2+z^2> [cm^2] due to the defusion
255 // of electrons or holes through a distance l [cm] caused by an applied
256 // voltage v [volt] through a distance d [cm] in any material at a
257 // temperature T [degree K]. The sigma diffusion when expressed in terms
258 // of the distance over which the diffusion occures, l=time/speed, is
259 // independent of the mobility and therefore the properties of the
260 // material. The charge distributions is given by
261 // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <x^2+z^2> = 4Dt where D=mkT/e
262 // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
263 // charge. and vel=m*v/d. consiquently sigma^2=4kTdl/ev.
264 // Inputs:
265 // Double_t l Distance the charge has to travel.
266 // Output:
267 // none.
268 // Return:
269 // The Sigma due to the diffution of electrons. [cm]
270 const Double_t kcon = 3.446935053E-04; // == 4k/e [J/col or volts]
271
272 return TMath::Sqrt(kcon*fT*fdv*l); // [cm]
273}
274//______________________________________________________________________
275Double_t AliITSCalibration::SigmaDiffusion1D(Double_t l) const {
276 // Returns the Gaussian sigma^2 == <x^2> [cm^2] due to the defusion
277 // of electrons or holes through a distance l [cm] caused by an applied
278 // voltage v [volt] through a distance d [cm] in any material at a
279 // temperature T [degree K]. The sigma diffusion when expressed in terms
280 // of the distance over which the diffusion occures, l=time/speed, is
281 // independent of the mobility and therefore the properties of the
282 // material. The charge distributions is given by
283 // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <r^2> = 2Dt where D=mkT/e
284 // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
285 // charge. and vel=m*v/d. consiquently sigma^2=2kTdl/ev.
286 // Inputs:
287 // Double_t l Distance the charge has to travel.
288 // Output:
289 // none.
290 // Return:
291 // The Sigma due to the diffution of electrons. [cm]
292 const Double_t kcon = 1.723467527E-04; // == 2k/e [J/col or volts]
293
294 return TMath::Sqrt(kcon*fT*fdv*l); // [cm]
295}
296//----------------------------------------------------------------------
297Double_t AliITSCalibration::DepletedRegionThicknessA(Double_t dopCons,
298 Double_t voltage,
299 Double_t elecCharge,
300 Double_t voltBuiltIn)const{
301 // Computes the thickness of the depleted region in Si due to the
302 // application of an external bias voltage. From the Particle Data
303 // Book, 28.8 Silicon semiconductor detectors equation 28.19 (2004)
304 // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
305 // July 15 2004, ISSN 0370-2693 page 263. First equation.
306 // Inputs:
307 // Double_t dopCons "N" doping concentration
308 // Double_t voltage "V" external bias voltage
309 // Double_t elecCharge "e" electronic charge
310 // Double_t voltBuiltIn=0.5 "V_bi" "built-in" Voltage (~0.5V for
311 // resistivities typically used in detectors)
312 // Output:
313 // none.
314 // Return:
315 // The thickness of the depleted region
316
317 return TMath::Sqrt(2.0*(voltage+voltBuiltIn)/(dopCons*elecCharge));
318}
319//----------------------------------------------------------------------
320Double_t AliITSCalibration::DepletedRegionThicknessB(Double_t resist,
321 Double_t voltage,
322 Double_t mobility,
323 Double_t voltBuiltIn,
324 Double_t dielConst)const{
325 // Computes the thickness of the depleted region in Si due to the
326 // application of an external bias voltage. From the Particle Data
327 // Book, 28.8 Silicon semiconductor detectors equation 28.19 (2004)
328 // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
329 // July 15 2004, ISSN 0370-2693 page 263. Second Equation.
330 // Inputs:
331 // Double_t resist "rho" resistivity (typically 1-10 kOhm cm)
332 // Double_t voltage "V" external bias voltage
333 // Double_t mobility "mu" charge carrier mobility
334 // (electons 1350, holes 450 cm^2/V/s)
335 // Double_t voltBuiltIn=0.5 "V_bi" "built-in" Voltage (~0.5V for
336 // resistivities typically used in detectors)
337 // Double_t dielConst=1.E-12 "epsilon" dielectric constant = 11.9 *
338 // (permittivity of free space) or ~ 1 pF/cm
339 // Output:
340 // none.
341 // Return:
342 // The thickness of the depleted region
343
344 return TMath::Sqrt(2.8*resist*mobility*dielConst*(voltage+voltBuiltIn));
345}
346//----------------------------------------------------------------------
347Double_t AliITSCalibration::ReverseBiasCurrent(Double_t temp,
348 Double_t revBiasCurT1,
349 Double_t tempT1,
350 Double_t energy)const{
351 // Computes the temperature dependance of the reverse bias current
352 // of Si detectors. From the Particle Data
353 // Book, 28.8 Silicon semiconductor detectors equation 28.21 (2004)
354 // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
355 // July 15 2004, ISSN 0370-2693 page 263.
356 // Inputs:
357 // Double_t temp The temperature at which the current is wanted
358 // Double_t revBiasCurT1 The reference bias current at temp T1
359 // Double_t tempT1 The temperature correstponding to revBiasCurT1
360 // Double_t energy=1.2 Some energy [eV]
361 // Output:
362 // none.
363 // Return:
364 // The reverse bias current at the tempeature temp.
365 const Double_t kBoltz = 8.617343E-5; //[eV/K]
366
367 return revBiasCurT1*(temp*temp/(tempT1*tempT1))*
368 TMath::Exp(-0.5*energy*(tempT1-temp)/(kBoltz*tempT1*temp));
369}
370//----------------------------------------------------------------------
371void AliITSCalibration::Print(ostream *os) const {
372 // Standard output format for this class.
373 // Inputs:
374 *os << fdv << " " << fN << " " << fT << " ";
375 *os << fGeVcharge;
376 // printf("%-10.6e %-10.6e %-10.6e %-10.6e \n",fdv,fN,fT,fGeVcharge);
377 return;
378}
379//----------------------------------------------------------------------
380void AliITSCalibration::Read(istream *is) {
381 // Standard input format for this class.
382 // Inputs:
383 // ostream *is Pointer to the output stream
384 // Outputs:
385 // none:
386 // Return:
387 // none.
388
389 *is >> fdv >> fN >> fT >> fGeVcharge;
390 return;
391}
392//----------------------------------------------------------------------
393
394ostream &operator<<(ostream &os,AliITSCalibration &p){
395 // Standard output streaming function.
396 // Inputs:
397 // ostream *os Pointer to the output stream
398 // Outputs:
399 // none:
400 // Return:
401 // none.
402
403 p.Print(&os);
404 return os;
405}
406
407//----------------------------------------------------------------------
408istream &operator>>(istream &is,AliITSCalibration &r){
409 // Standard input streaming function.
410 // Inputs:
411 // ostream *os Pointer to the output stream
412 // Outputs:
413 // none:
414 // Return:
415 // none.
416
417 r.Read(&is);
418 return is;
419}
420//----------------------------------------------------------------------