]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSresponse.cxx
Reducing dependencies (F.Carminati)
[u/mrichter/AliRoot.git] / ITS / AliITSresponse.cxx
CommitLineData
ac8cbb66 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/* $Id$ */
17
e8189707 18////////////////////////////////////////////////
19// Response class for set:ITS //
20////////////////////////////////////////////////
ac8cbb66 21#include <Riostream.h>
4efc56c1 22#include <TMath.h>
1ca7869b 23#include <TF1.h>
24#include <TString.h>
e8189707 25#include "AliITSresponse.h"
26
27ClassImp(AliITSresponse)
4efc56c1 28
29//______________________________________________________________________
30AliITSresponse::AliITSresponse(){
31 // Default Constructor
32
33 fdv = 0.000375; // 300 microns and 80 volts.
34 fN = 0.0;
35 fT = 300.0;
ac8cbb66 36 SetGeVToCharge();
4efc56c1 37}
38//______________________________________________________________________
39AliITSresponse::AliITSresponse(Double_t thickness){
40 // Default Constructor
41
42 fdv = thickness/80.0; // 80 volts.
43 fN = 0.0;
44 fT = 300.0;
ac8cbb66 45 SetGeVToCharge();
4efc56c1 46}
47//______________________________________________________________________
ac8cbb66 48Double_t AliITSresponse::MobilityElectronSiEmp() const {
4efc56c1 49 // Computes the electron mobility in cm^2/volt-sec. Taken from SILVACO
50 // International ATLAS II, 2D Device Simulation Framework, User Manual
51 // Chapter 5 Equation 5-6. An empirical function for low-field mobiliity
52 // in silicon at different tempeatures.
53 // Inputs:
54 // none.
55 // Output:
56 // none.
57 // Return:
58 // The Mobility of electrons in Si at a give temprature and impurity
59 // concentration. [cm^2/Volt-sec]
60 const Double_t m0 = 55.24; // cm^2/Volt-sec
61 const Double_t m1 = 7.12E+08; // cm^2 (degree K)^2.3 / Volt-sec
62 const Double_t N0 = 1.072E17; // #/cm^3
63 const Double_t T0 = 300.; // degree K.
64 const Double_t eT0 = -2.3; // Power of Temp.
65 const Double_t eT1 = -3.8; // Power of Temp.
66 const Double_t eN = 0.73; // Power of Dopent Consentrations
67 Double_t m;
68 Double_t T = fT,N = fN;
69
70 if(N<=0.0){ // Simple case.
71 if(T==300.) return 1350.0; // From Table 5-1 at consentration 1.0E14.
72 m = m1*TMath::Power(T,eT0);
73 return m;
74 } // if N<=0.0
75 m = m1*TMath::Power(T,eT0) - m0;
76 m /= 1.0 + TMath::Power(T/T0,eT1)*TMath::Power(N/N0,eN);
77 m += m0;
78 return m;
79}
80//______________________________________________________________________
ac8cbb66 81Double_t AliITSresponse::MobilityHoleSiEmp() const {
4efc56c1 82 // Computes the Hole mobility in cm^2/volt-sec. Taken from SILVACO
83 // International ATLAS II, 2D Device Simulation Framework, User Manual
84 // Chapter 5 Equation 5-7 An empirical function for low-field mobiliity
85 // in silicon at different tempeatures.
86 // Inputs:
87 // none.
88 // Output:
89 // none.
90 // Return:
91 // The Mobility of Hole in Si at a give temprature and impurity
92 // concentration. [cm^2/Volt-sec]
93 const Double_t m0a = 49.74; // cm^2/Volt-sec
94 const Double_t m0b = 49.70; // cm^2/Volt-sec
95 const Double_t m1 = 1.35E+08; // cm^2 (degree K)^2.3 / Volt-sec
96 const Double_t N0 = 1.606E17; // #/cm^3
97 const Double_t T0 = 300.; // degree K.
98 const Double_t eT0 = -2.2; // Power of Temp.
99 const Double_t eT1 = -3.7; // Power of Temp.
100 const Double_t eN = 0.70; // Power of Dopent Consentrations
101 Double_t m;
102 Double_t T = fT,N = fN;
103
104 if(N<=0.0){ // Simple case.
105 if(T==300.) return 495.0; // From Table 5-1 at consentration 1.0E14.
106 m = m1*TMath::Power(T,eT0) + m0a-m0b;
107 return m;
108 } // if N<=0.0
109 m = m1*TMath::Power(T,eT0) - m0b;
110 m /= 1.0 + TMath::Power(T/T0,eT1)*TMath::Power(N/N0,eN);
111 m += m0a;
112 return m;
113}
114//______________________________________________________________________
ac8cbb66 115Double_t AliITSresponse::DiffusionCoefficientElectron() const {
4efc56c1 116 // Computes the Diffusion coefficient for electrons in cm^2/sec. Taken
117 // from SILVACO International ATLAS II, 2D Device Simulation Framework,
118 // User Manual Chapter 5 Equation 5-53. Einstein relations for diffusion
119 // coefficient. Note: 1 cm^2/sec = 10 microns^2/nanosec.
120 // Inputs:
121 // none.
122 // Output:
123 // none.
124 // Return:
125 // The Diffusion Coefficient of electrons in Si at a give temprature
126 // and impurity concentration. [cm^2/sec]
127 // const Double_t kb = 1.3806503E-23; // Joules/degree K
128 // const Double_t qe = 1.60217646E-19; // Coulumbs.
129 const Double_t kbqe = 8.617342312E-5; // Volt/degree K
130 Double_t m = MobilityElectronSiEmp();
131 Double_t T = fT;
132
133 return m*kbqe*T; // [cm^2/sec]
134}
135//______________________________________________________________________
ac8cbb66 136Double_t AliITSresponse::DiffusionCoefficientHole() const {
4efc56c1 137 // Computes the Diffusion coefficient for Holes in cm^2/sec. Taken
138 // from SILVACO International ATLAS II, 2D Device Simulation Framework,
139 // User Manual Chapter 5 Equation 5-53. Einstein relations for diffusion
140 // coefficient. Note: 1 cm^2/sec = 10 microns^2/nanosec.
141 // Inputs:
142 // none.
143 // Output:
144 // none.
145 // Return:
146 // The Defusion Coefficient of Hole in Si at a give temprature and
147 // impurity concentration. [cm^2/sec]
148 // and impurity concentration. [cm^2/sec]
149 // const Double_t kb = 1.3806503E-23; // Joules/degree K
150 // const Double_t qe = 1.60217646E-19; // Coulumbs.
151 const Double_t kbqe = 8.617342312E-5; // Volt/degree K
152 Double_t m = MobilityHoleSiEmp();
153 Double_t T = fT;
154
155 return m*kbqe*T; // [cm^2/sec]
156}
157//______________________________________________________________________
ac8cbb66 158Double_t AliITSresponse::SpeedElectron() const {
4efc56c1 159 // Computes the average speed for electrons in Si under the low-field
160 // approximation. [cm/sec].
161 // Inputs:
162 // none.
163 // Output:
164 // none.
165 // Return:
166 // The speed the holes are traveling at due to the low field applied.
167 // [cm/sec]
168 Double_t m = MobilityElectronSiEmp();
169
170 return m/fdv; // [cm/sec]
171}
172//______________________________________________________________________
ac8cbb66 173Double_t AliITSresponse::SpeedHole() const {
4efc56c1 174 // Computes the average speed for Holes in Si under the low-field
175 // approximation.[cm/sec].
176 // Inputs:
177 // none.
178 // Output:
179 // none.
180 // Return:
181 // The speed the holes are traveling at due to the low field applied.
182 // [cm/sec]
183 Double_t m = MobilityHoleSiEmp();
184
185 return m/fdv; // [cm/sec]
186}
187//______________________________________________________________________
ac8cbb66 188Double_t AliITSresponse::SigmaDiffusion3D(Double_t l) const {
189 // Returns the Gaussian sigma^2 == <x^2+y^2+z^2> [cm^2] due to the
190 // defusion of electrons or holes through a distance l [cm] caused
191 // by an applied voltage v [volt] through a distance d [cm] in any
192 // material at a temperature T [degree K]. The sigma diffusion when
193 // expressed in terms of the distance over which the diffusion
194 // occures, l=time/speed, is independent of the mobility and therefore
195 // the properties of the material. The charge distributions is given by
4efc56c1 196 // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <r^2> = 6Dt where D=mkT/e
197 // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
198 // charge. and vel=m*v/d. consiquently sigma^2=6kTdl/ev.
199 // Inputs:
200 // Double_t l Distance the charge has to travel.
201 // Output:
202 // none.
203 // Return:
204 // The Sigma due to the diffution of electrons. [cm]
205 const Double_t con = 5.17040258E-04; // == 6k/e [J/col or volts]
206
207 return TMath::Sqrt(con*fT*fdv*l); // [cm]
208}
209//______________________________________________________________________
ac8cbb66 210Double_t AliITSresponse::SigmaDiffusion2D(Double_t l) const {
4efc56c1 211 // Returns the Gaussian sigma^2 == <x^2+z^2> [cm^2] due to the defusion
212 // of electrons or holes through a distance l [cm] caused by an applied
213 // voltage v [volt] through a distance d [cm] in any material at a
214 // temperature T [degree K]. The sigma diffusion when expressed in terms
215 // of the distance over which the diffusion occures, l=time/speed, is
216 // independent of the mobility and therefore the properties of the
217 // material. The charge distributions is given by
218 // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <x^2+z^2> = 4Dt where D=mkT/e
219 // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
220 // charge. and vel=m*v/d. consiquently sigma^2=4kTdl/ev.
221 // Inputs:
222 // Double_t l Distance the charge has to travel.
223 // Output:
224 // none.
225 // Return:
226 // The Sigma due to the diffution of electrons. [cm]
227 const Double_t con = 3.446935053E-04; // == 4k/e [J/col or volts]
228
229 return TMath::Sqrt(con*fT*fdv*l); // [cm]
230}
231//______________________________________________________________________
ac8cbb66 232Double_t AliITSresponse::SigmaDiffusion1D(Double_t l) const {
4efc56c1 233 // Returns the Gaussian sigma^2 == <x^2> [cm^2] due to the defusion
234 // of electrons or holes through a distance l [cm] caused by an applied
235 // voltage v [volt] through a distance d [cm] in any material at a
236 // temperature T [degree K]. The sigma diffusion when expressed in terms
237 // of the distance over which the diffusion occures, l=time/speed, is
238 // independent of the mobility and therefore the properties of the
239 // material. The charge distributions is given by
240 // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <r^2> = 2Dt where D=mkT/e
241 // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
242 // charge. and vel=m*v/d. consiquently sigma^2=2kTdl/ev.
243 // Inputs:
244 // Double_t l Distance the charge has to travel.
245 // Output:
246 // none.
247 // Return:
248 // The Sigma due to the diffution of electrons. [cm]
249 const Double_t con = 1.723467527E-04; // == 2k/e [J/col or volts]
250
251 return TMath::Sqrt(con*fT*fdv*l); // [cm]
252}
ac8cbb66 253//----------------------------------------------------------------------
254void AliITSresponse::Print(ostream *os){
255 // Standard output format for this class.
256 // Inputs:
257 // ostream *os Pointer to the output stream
258 // Outputs:
259 // none:
260 // Return:
261 // none.
262#if defined __GNUC__
263#if __GNUC__ > 2
264 ios::fmtflags fmt;
265#else
266 Int_t fmt;
267#endif
268#else
269#if defined __ICC || defined __ECC
270 ios::fmtflags fmt;
271#else
272 Int_t fmt;
273#endif
274#endif
275
276 fmt = os->setf(ios::scientific); // set scientific floating point output
277 *os << fdv << " " << fN << " " << fT << " ";
278 *os << fGeVcharge;
279// *os << " " << endl;
280 os->flags(fmt); // reset back to old formating.
281 return;
282}
283//----------------------------------------------------------------------
284void AliITSresponse::Read(istream *is){
285 // Standard input format for this class.
286 // Inputs:
287 // ostream *os Pointer to the output stream
288 // Outputs:
289 // none:
290 // Return:
291 // none.
292
293 *is >> fdv >> fN >> fT >> fGeVcharge;
294 return;
295}
296//----------------------------------------------------------------------
297ostream &operator<<(ostream &os,AliITSresponse &p){
298 // Standard output streaming function.
299 // Inputs:
300 // ostream *os Pointer to the output stream
301 // Outputs:
302 // none:
303 // Return:
304 // none.
305
306 p.Print(&os);
307 return os;
308}
309//----------------------------------------------------------------------
310istream &operator>>(istream &is,AliITSresponse &r){
311 // Standard input streaming function.
312 // Inputs:
313 // ostream *os Pointer to the output stream
314 // Outputs:
315 // none:
316 // Return:
317 // none.
318
319 r.Read(&is);
320 return is;
321}
322//----------------------------------------------------------------------