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