* provided "as is" without express or implied warranty. *
**************************************************************************/
-/* $Id:$ */
+/* $Id$ */
//////////////////////////////////////////////////////
// Calibration class for set:ITS //
AliITSCalibration::AliITSCalibration():
TObject(),
fDataType(),
-fdv(0.000375),
-fN(0.),
fT(300.),
-fGeVcharge(0.),
fResponse(){
// Default Constructor (300 microns and 80 volts)
-
- SetGeVToCharge();
- fResponse = 0;
-}
-//______________________________________________________________________
-AliITSCalibration::AliITSCalibration(Double_t thickness):
-TObject(),
-fDataType(),
-fdv(0.),
-fN(0.),
-fT(300.),
-fGeVcharge(0.),
-fResponse(){
- // Default Constructor
-
- fdv = thickness/80.0; // 80 volts.
- SetGeVToCharge();
fResponse = 0;
}
AliITSCalibration::AliITSCalibration(const AliITSCalibration &ob):
TObject(ob),
fDataType(ob.fDataType),
-fdv(ob.fdv),
-fN(ob.fN),
fT(ob.fT),
-fGeVcharge(ob.fGeVcharge),
fResponse(ob.fResponse)
{
// Copy constructor
}
-/*
-//______________________________________________________________________________
-AliITSCalibration& AliITSCalibration::operator= (const AliITSCalibration& source)
-{
- // Asignment operator
-
- this->~AliITSCalibration();
- new(this) AliITSCalibration(source);
- return *this;
-
-
-}
-*/
-//______________________________________________________________________
-Double_t AliITSCalibration::MobilityElectronSiEmp() const {
- // Computes the electron mobility in cm^2/volt-sec. Taken from SILVACO
- // International ATLAS II, 2D Device Simulation Framework, User Manual
- // Chapter 5 Equation 5-6. An empirical function for low-field mobiliity
- // in silicon at different tempeatures.
- // Inputs:
- // none.
- // Output:
- // none.
- // Return:
- // The Mobility of electrons in Si at a give temprature and impurity
- // concentration. [cm^2/Volt-sec]
- const Double_t km0 = 55.24; // cm^2/Volt-sec
- const Double_t km1 = 7.12E+08; // cm^2 (degree K)^2.3 / Volt-sec
- const Double_t kN0 = 1.072E17; // #/cm^3
- const Double_t kT0 = 300.; // degree K.
- const Double_t keT0 = -2.3; // Power of Temp.
- const Double_t keT1 = -3.8; // Power of Temp.
- const Double_t keN = 0.73; // Power of Dopent Consentrations
- Double_t m;
- Double_t tT = fT,nN = fN;
-
- if(nN<=0.0){ // Simple case.
- if(tT==300.) return 1350.0; // From Table 5-1 at consentration 1.0E14.
- m = km1*TMath::Power(tT,keT0);
- return m;
- } // if nN<=0.0
- m = km1*TMath::Power(tT,keT0) - km0;
- m /= 1.0 + TMath::Power(tT/kT0,keT1)*TMath::Power(nN/kN0,keN);
- m += km0;
- return m;
-}
-//______________________________________________________________________
-Double_t AliITSCalibration::MobilityHoleSiEmp() const {
- // Computes the Hole mobility in cm^2/volt-sec. Taken from SILVACO
- // International ATLAS II, 2D Device Simulation Framework, User Manual
- // Chapter 5 Equation 5-7 An empirical function for low-field mobiliity
- // in silicon at different tempeatures.
- // Inputs:
- // none.
- // Output:
- // none.
- // Return:
- // The Mobility of Hole in Si at a give temprature and impurity
- // concentration. [cm^2/Volt-sec]
- const Double_t km0a = 49.74; // cm^2/Volt-sec
- const Double_t km0b = 49.70; // cm^2/Volt-sec
- const Double_t km1 = 1.35E+08; // cm^2 (degree K)^2.3 / Volt-sec
- const Double_t kN0 = 1.606E17; // #/cm^3
- const Double_t kT0 = 300.; // degree K.
- const Double_t keT0 = -2.2; // Power of Temp.
- const Double_t keT1 = -3.7; // Power of Temp.
- const Double_t keN = 0.70; // Power of Dopent Consentrations
- Double_t m;
- Double_t tT = fT,nN = fN;
-
- if(nN<=0.0){ // Simple case.
- if(tT==300.) return 495.0; // From Table 5-1 at consentration 1.0E14.
- m = km1*TMath::Power(tT,keT0) + km0a-km0b;
- return m;
- } // if nN<=0.0
- m = km1*TMath::Power(tT,keT0) - km0b;
- m /= 1.0 + TMath::Power(tT/kT0,keT1)*TMath::Power(nN/kN0,keN);
- m += km0a;
- return m;
-}
-//______________________________________________________________________
-Double_t AliITSCalibration::DiffusionCoefficientElectron() const {
- // Computes the Diffusion coefficient for electrons in cm^2/sec. Taken
- // from SILVACO International ATLAS II, 2D Device Simulation Framework,
- // User Manual Chapter 5 Equation 5-53. Einstein relations for diffusion
- // coefficient. Note: 1 cm^2/sec = 10 microns^2/nanosec.
- // Inputs:
- // none.
- // Output:
- // none.
- // Return:
- // The Diffusion Coefficient of electrons in Si at a give temprature
- // and impurity concentration. [cm^2/sec]
- // const Double_t kb = 1.3806503E-23; // Joules/degree K
- // const Double_t qe = 1.60217646E-19; // Coulumbs.
- const Double_t kbqe = 8.617342312E-5; // Volt/degree K
- Double_t m = MobilityElectronSiEmp();
- Double_t tT = fT;
-
- return m*kbqe*tT; // [cm^2/sec]
-}
-//______________________________________________________________________
-Double_t AliITSCalibration::DiffusionCoefficientHole() const {
- // Computes the Diffusion coefficient for Holes in cm^2/sec. Taken
- // from SILVACO International ATLAS II, 2D Device Simulation Framework,
- // User Manual Chapter 5 Equation 5-53. Einstein relations for diffusion
- // coefficient. Note: 1 cm^2/sec = 10 microns^2/nanosec.
- // Inputs:
- // none.
- // Output:
- // none.
- // Return:
- // The Defusion Coefficient of Hole in Si at a give temprature and
- // impurity concentration. [cm^2/sec]
- // and impurity concentration. [cm^2/sec]
- // const Double_t kb = 1.3806503E-23; // Joules/degree K
- // const Double_t qe = 1.60217646E-19; // Coulumbs.
- const Double_t kbqe = 8.617342312E-5; // Volt/degree K
- Double_t m = MobilityHoleSiEmp();
- Double_t tT = fT;
-
- return m*kbqe*tT; // [cm^2/sec]
-}
-//______________________________________________________________________
-Double_t AliITSCalibration::LorentzAngleHole(Double_t B) const {
- // Computes the Lorentz angle for electrons in Si
- // Input: magnetic Field in KGauss
- // Output: Lorentz angle in radians (positive if Bz is positive)
- // Main Reference: NIM A 497 (2003) 389–396.
- // "An algorithm for calculating the Lorentz angle in silicon detectors", V. Bartsch et al.
- //
- const Double_t krH=0.70; // Hall scattering factor for Hole
- const Double_t kT0 = 300.; // reference Temperature (degree K).
- const Double_t kmulow0 = 470.5; // cm^2/Volt-sec
- const Double_t keT0 = -2.5; // Power of Temp.
- const Double_t beta0 = 1.213; // beta coeff. at T0=300K
- const Double_t keT1 = 0.17; // Power of Temp. for beta
- const Double_t kvsat0 = 8.37E+06; // saturated velocity at T0=300K (cm/sec)
- const Double_t keT2 = 0.52; // Power of Temp. for vsat
- Double_t tT = fT;
- Double_t eE= 1./fdv;
- Double_t muLow=kmulow0*TMath::Power(tT/kT0,keT0);
- Double_t beta=beta0*TMath::Power(tT/kT0,keT1);
- Double_t vsat=kvsat0*TMath::Power(tT/kT0,keT2);
- Double_t mu=muLow/TMath::Power(1+TMath::Power(muLow*eE/vsat,beta),1/beta);
- Double_t angle=TMath::ATan(krH*mu*B*1.E-05); // Conversion Factor
- return angle;
-}
-//______________________________________________________________________
-Double_t AliITSCalibration::LorentzAngleElectron(Double_t B) const {
- // Computes the Lorentz angle for electrons in Si
- // Input: magnetic Field in KGauss
- // Output: Lorentz angle in radians (positive if Bz is positive)
- // Main Reference: NIM A 497 (2003) 389–396.
- // "An algorithm for calculating the Lorentz angle in silicon detectors", V. Bartsch et al.
- //
- const Double_t krH=1.15; // Hall scattering factor for Electron
- const Double_t kT0 = 300.; // reference Temperature (degree K).
- const Double_t kmulow0 = 1417.0; // cm^2/Volt-sec
- const Double_t keT0 = -2.2; // Power of Temp.
- const Double_t beta0 = 1.109; // beta coeff. at T0=300K
- const Double_t keT1 = 0.66; // Power of Temp. for beta
- const Double_t kvsat0 = 1.07E+07; // saturated velocity at T0=300K (cm/sec)
- const Double_t keT2 = 0.87; // Power of Temp. for vsat
- Double_t tT = fT;
- Double_t eE= 1./fdv;
- Double_t muLow=kmulow0*TMath::Power(tT/kT0,keT0);
- Double_t beta=beta0*TMath::Power(tT/kT0,keT1);
- Double_t vsat=kvsat0*TMath::Power(tT/kT0,keT2);
- Double_t mu=muLow/TMath::Power(1+TMath::Power(muLow*eE/vsat,beta),1/beta);
- Double_t angle=TMath::ATan(krH*mu*B*1.E-05);
- return angle;
-}
-//______________________________________________________________________
-Double_t AliITSCalibration::SpeedElectron() const {
- // Computes the average speed for electrons in Si under the low-field
- // approximation. [cm/sec].
- // Inputs:
- // none.
- // Output:
- // none.
- // Return:
- // The speed the holes are traveling at due to the low field applied.
- // [cm/sec]
- Double_t m = MobilityElectronSiEmp();
-
- return m/fdv; // [cm/sec]
-}
-//______________________________________________________________________
-Double_t AliITSCalibration::SpeedHole() const {
- // Computes the average speed for Holes in Si under the low-field
- // approximation.[cm/sec].
- // Inputs:
- // none.
- // Output:
- // none.
- // Return:
- // The speed the holes are traveling at due to the low field applied.
- // [cm/sec]
- Double_t m = MobilityHoleSiEmp();
-
- return m/fdv; // [cm/sec]
-}
-//______________________________________________________________________
-Double_t AliITSCalibration::SigmaDiffusion3D(Double_t l) const {
- // Returns the Gaussian sigma^2 == <x^2+y^2+z^2> [cm^2] due to the
- // defusion of electrons or holes through a distance l [cm] caused
- // by an applied voltage v [volt] through a distance d [cm] in any
- // material at a temperature T [degree K]. The sigma diffusion when
- // expressed in terms of the distance over which the diffusion
- // occures, l=time/speed, is independent of the mobility and therefore
- // the properties of the material. The charge distributions is given by
- // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <r^2> = 6Dt where D=mkT/e
- // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
- // charge. and vel=m*v/d. consiquently sigma^2=6kTdl/ev.
- // Inputs:
- // Double_t l Distance the charge has to travel.
- // Output:
- // none.
- // Return:
- // The Sigma due to the diffution of electrons. [cm]
- const Double_t kcon = 5.17040258E-04; // == 6k/e [J/col or volts]
-
- return TMath::Sqrt(kcon*fT*fdv*l); // [cm]
-}
-//______________________________________________________________________
-Double_t AliITSCalibration::SigmaDiffusion2D(Double_t l) const {
- // Returns the Gaussian sigma^2 == <x^2+z^2> [cm^2] due to the defusion
- // of electrons or holes through a distance l [cm] caused by an applied
- // voltage v [volt] through a distance d [cm] in any material at a
- // temperature T [degree K]. The sigma diffusion when expressed in terms
- // of the distance over which the diffusion occures, l=time/speed, is
- // independent of the mobility and therefore the properties of the
- // material. The charge distributions is given by
- // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <x^2+z^2> = 4Dt where D=mkT/e
- // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
- // charge. and vel=m*v/d. consiquently sigma^2=4kTdl/ev.
- // Inputs:
- // Double_t l Distance the charge has to travel.
- // Output:
- // none.
- // Return:
- // The Sigma due to the diffution of electrons. [cm]
- const Double_t kcon = 3.446935053E-04; // == 4k/e [J/col or volts]
-
- return TMath::Sqrt(kcon*fT*fdv*l); // [cm]
-}
-//______________________________________________________________________
-Double_t AliITSCalibration::SigmaDiffusion1D(Double_t l) const {
- // Returns the Gaussian sigma^2 == <x^2> [cm^2] due to the defusion
- // of electrons or holes through a distance l [cm] caused by an applied
- // voltage v [volt] through a distance d [cm] in any material at a
- // temperature T [degree K]. The sigma diffusion when expressed in terms
- // of the distance over which the diffusion occures, l=time/speed, is
- // independent of the mobility and therefore the properties of the
- // material. The charge distributions is given by
- // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <r^2> = 2Dt where D=mkT/e
- // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
- // charge. and vel=m*v/d. consiquently sigma^2=2kTdl/ev.
- // Inputs:
- // Double_t l Distance the charge has to travel.
- // Output:
- // none.
- // Return:
- // The Sigma due to the diffution of electrons. [cm]
- const Double_t kcon = 1.723467527E-04; // == 2k/e [J/col or volts]
-
- return TMath::Sqrt(kcon*fT*fdv*l); // [cm]
-}
-//----------------------------------------------------------------------
-Double_t AliITSCalibration::DepletedRegionThicknessA(Double_t dopCons,
- Double_t voltage,
- Double_t elecCharge,
- Double_t voltBuiltIn)const{
- // Computes the thickness of the depleted region in Si due to the
- // application of an external bias voltage. From the Particle Data
- // Book, 28.8 Silicon semiconductor detectors equation 28.19 (2004)
- // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
- // July 15 2004, ISSN 0370-2693 page 263. First equation.
- // Inputs:
- // Double_t dopCons "N" doping concentration
- // Double_t voltage "V" external bias voltage
- // Double_t elecCharge "e" electronic charge
- // Double_t voltBuiltIn=0.5 "V_bi" "built-in" Voltage (~0.5V for
- // resistivities typically used in detectors)
- // Output:
- // none.
- // Return:
- // The thickness of the depleted region
-
- return TMath::Sqrt(2.0*(voltage+voltBuiltIn)/(dopCons*elecCharge));
-}
-//----------------------------------------------------------------------
-Double_t AliITSCalibration::DepletedRegionThicknessB(Double_t resist,
- Double_t voltage,
- Double_t mobility,
- Double_t voltBuiltIn,
- Double_t dielConst)const{
- // Computes the thickness of the depleted region in Si due to the
- // application of an external bias voltage. From the Particle Data
- // Book, 28.8 Silicon semiconductor detectors equation 28.19 (2004)
- // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
- // July 15 2004, ISSN 0370-2693 page 263. Second Equation.
- // Inputs:
- // Double_t resist "rho" resistivity (typically 1-10 kOhm cm)
- // Double_t voltage "V" external bias voltage
- // Double_t mobility "mu" charge carrier mobility
- // (electons 1350, holes 450 cm^2/V/s)
- // Double_t voltBuiltIn=0.5 "V_bi" "built-in" Voltage (~0.5V for
- // resistivities typically used in detectors)
- // Double_t dielConst=1.E-12 "epsilon" dielectric constant = 11.9 *
- // (permittivity of free space) or ~ 1 pF/cm
- // Output:
- // none.
- // Return:
- // The thickness of the depleted region
-
- return TMath::Sqrt(2.8*resist*mobility*dielConst*(voltage+voltBuiltIn));
-}
-//----------------------------------------------------------------------
-Double_t AliITSCalibration::ReverseBiasCurrent(Double_t temp,
- Double_t revBiasCurT1,
- Double_t tempT1,
- Double_t energy)const{
- // Computes the temperature dependance of the reverse bias current
- // of Si detectors. From the Particle Data
- // Book, 28.8 Silicon semiconductor detectors equation 28.21 (2004)
- // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
- // July 15 2004, ISSN 0370-2693 page 263.
- // Inputs:
- // Double_t temp The temperature at which the current is wanted
- // Double_t revBiasCurT1 The reference bias current at temp T1
- // Double_t tempT1 The temperature correstponding to revBiasCurT1
- // Double_t energy=1.2 Some energy [eV]
- // Output:
- // none.
- // Return:
- // The reverse bias current at the tempeature temp.
- const Double_t kBoltz = 8.617343E-5; //[eV/K]
-
- return revBiasCurT1*(temp*temp/(tempT1*tempT1))*
- TMath::Exp(-0.5*energy*(tempT1-temp)/(kBoltz*tempT1*temp));
-}
//----------------------------------------------------------------------
void AliITSCalibration::Print(ostream *os) const {
// Standard output format for this class.
// Inputs:
- *os << fdv << " " << fN << " " << fT << " ";
- *os << fGeVcharge;
+ *os << fT << " ";
// printf("%-10.6e %-10.6e %-10.6e %-10.6e \n",fdv,fN,fT,fGeVcharge);
return;
}
// Return:
// none.
- *is >> fdv >> fN >> fT >> fGeVcharge;
+ *is >> fT;
return;
}
//----------------------------------------------------------------------
public:
// Default Constructor
AliITSCalibration();
- // Standard Constructor
- AliITSCalibration(Double_t Thickness);
// Destructor.
virtual ~AliITSCalibration() {;}
//
// Configuration methods
//
- // fGeVcharge is set by default 3.6e-9 GeV See for ex. PDG 2004.
- virtual void SetGeVToCharge(Double_t gc=3.6e-9){fGeVcharge = gc;}
- // Returns the value fGeVcharge
- virtual Double_t GetGeVToCharge() const {return fGeVcharge;}
- // Converts deposited energy to number of electrons liberated
- virtual Double_t GeVToCharge(Double_t gev) const {return gev/fGeVcharge;}
// Temperature in [degree K]
virtual void SetTemperature(Double_t t=300.0) {fT = t;}
// Get temperature [degree K]
virtual Double_t Temperature() const {return fT;}
- // Set the impurity concentrations in [#/cm^3]
- virtual void SetImpurity(Double_t n=0.0){fN = n;}
- // Returns the impurity consentration in [#/cm^3]
- virtual Double_t Impurity() const {return fN;}
- // Sets the applied ratio distance/voltage [cm/volt]
- virtual void SetDistanceOverVoltage(Double_t d,Double_t v){fdv = d/v;}
- // Sets the applied ration distance/voltage [cm/volt]. Default value
- // is 300E-4cm/80 volts = 0.000375 cm/volts
- virtual void SetDistanceOverVoltage(Double_t dv=0.000375){fdv = dv;}
- // Returns the ration distance/voltage
- virtual Double_t DistanceOverVoltage() const {return fdv;}
// Get data type
virtual const char *DataType() const {return fDataType.Data();}
virtual void SetMapA(Int_t, AliITSMapSDD*) {AliError("This method must be implemented in a derived class");}
virtual void SetMapT(Int_t, AliITSMapSDD*) {AliError("This method must be implemented in a derived class");}
virtual void SetDriftSpeed(Int_t, AliITSDriftSpeedArraySDD*) {AliError("This method must be implemented in a derived class");}
- virtual Double_t DriftSpeed() const {return SpeedElectron();};
// Set sigmas of the charge spread function
virtual void SetSigmaSpread(Double_t, Double_t) = 0;
// Get sigmas for the charge spread
virtual void SigmaSpread(Double_t &,Double_t &) const = 0;
- // Pulse height from scored quantity (eloss)
- virtual Double_t IntPH(Double_t) const {return 0.;}
- // Charge disintegration
- virtual Double_t IntXZ(AliITSsegmentation *) const {return 0.;}
- // Electron mobility in Si. [cm^2/(Volt Sec)]. T in degree K, N in #/cm^3
- virtual Double_t MobilityElectronSiEmp() const ;
- // Hole mobility in Si. [cm^2/(Volt Sec)] T in degree K, N in #/cm^3
- virtual Double_t MobilityHoleSiEmp() const ;
- // Einstein relation for Diffusion Coefficient of Electrons. [cm^2/sec]
- // T in degree K, N in #/cm^3
- virtual Double_t DiffusionCoefficientElectron() const ;
- // Einstein relation for Diffusion Coefficient of Holes. [cm^2/sec]
- // T in [degree K], N in [#/cm^3]
- virtual Double_t DiffusionCoefficientHole() const ;
- // Electron <speed> under an applied electric field E=Volts/cm. [cm/sec]
- // d distance-thickness in [cm], v in [volts], T in [degree K],
- // N in [#/cm^3]
- virtual Double_t SpeedElectron() const ;
- // Holes <speed> under an applied electric field E=Volts/cm. [cm/sec]
- // d distance-thickness in [cm], v in [volts], T in [degree K],
- // N in [#/cm^3]
- virtual Double_t SpeedHole() const ;
- // Returns the Gaussian sigma == <x^2+z^2> [cm^2] due to the defusion of
- // electrons or holes through a distance l [cm] caused by an applied
- // voltage v [volt] through a distance d [cm] in any material at a
- // temperature T [degree K].
- virtual Double_t SigmaDiffusion3D(Double_t l) const;
- // Returns the Gaussian sigma == <x^2 +y^2+z^2> [cm^2] due to the
- // defusion of electrons or holes through a distance l [cm] caused by an
- // applied voltage v [volt] through a distance d [cm] in any material at a
- // temperature T [degree K].
- virtual Double_t SigmaDiffusion2D(Double_t l) const;
- // Returns the Gaussian sigma == <x^2+z^2> [cm^2] due to the defusion of
- // electrons or holes through a distance l [cm] caused by an applied
- // voltage v [volt] through a distance d [cm] in any material at a
- // temperature T [degree K].
- virtual Double_t SigmaDiffusion1D(Double_t l) const;
- // Computes the Lorentz angle for Electron and Hole, under the Magnetic field bz (in kGauss)
- virtual Double_t LorentzAngleElectron(Double_t bz) const;
- virtual Double_t LorentzAngleHole(Double_t bz) const;
- // Compute the thickness of the depleted region in a Si detector, version A
- virtual Double_t DepletedRegionThicknessA(Double_t dopCons,
- Double_t voltage,
- Double_t elecCharge,
- Double_t voltBuiltIn=0.5)const;
- // Compute the thickness of the depleted region in a Si detector, version B
- virtual Double_t DepletedRegionThicknessB(Double_t resist,Double_t voltage,
- Double_t mobility,
- Double_t voltBuiltIn=0.5,
- Double_t dielConst=1.E-12)const;
- // Computes the temperature dependance of the reverse bias current
- virtual Double_t ReverseBiasCurrent(Double_t temp,Double_t revBiasCurT1,
- Double_t tempT1,Double_t energy=1.2)const;
+
+
+
// Prints out the content of this class in ASCII format.
virtual void Print(ostream *os) const;
// Reads in the content of this class in the format of Print
TString fDataType; // data type - real or simulated
- Double_t fdv; // The parameter d/v where d is the disance over which the
- // the potential v is applied d/v [cm/volts]
- Double_t fN; // the impurity consentration of the material in #/cm^3
Float_t fT; // The temperature of the Si in Degree K.
- Double_t fGeVcharge; // Energy to ionize (free an electron) in GeV
AliITSresponse* fResponse; //! ptr to base response obj. It is not
// deleted here but in AliITSDetTypeSim and AliITSDetTypeRec
- ClassDef(AliITSCalibration,1) // Detector type response virtual base class
+ ClassDef(AliITSCalibration,2) // Detector type response virtual base class
};
// Input and output function for standard C++ input/output.
ostream& operator<<(ostream &os,AliITSCalibration &source);
* provided "as is" without express or implied warranty. *
**************************************************************************/
-/* $Id:$ */
+/* $Id$ */
///////////////////////////////////////////////////////////////////
// //
TObject(),
fGeVcharge(0.),
fDOverV(0.),
-fSPDBiasVoltage(fgkSPDBiasVoltageDefault),
-fSPDThresh(fgkSPDThreshDefault),
-fSPDSigma(fgkSPDSigmaDefault),
+//fSPDBiasVoltage(fgkSPDBiasVoltageDefault),
+//fSPDThresh(fgkSPDThreshDefault),
+//fSPDSigma(fgkSPDSigmaDefault),
fSPDCouplOpt(0),
fSPDCouplCol(fgkSPDCouplColDefault),
fSPDCouplRow(fgkSPDCouplRowDefault),
fSSDZSThreshold(fgkSSDZSThresholdDefault),
fNsigmas(fgkNsigmasDefault),
fNcomps(fgkNcompsDefault),
-fGaus()
+fGaus(),
+fN(0.),
+fT(300.)
{
// default constructor
+ SetSPDBiasVoltageAll(fgkSPDBiasVoltageDefault);
+ SetSPDThresholdsAll(fgkSPDThreshDefault,fgkSPDSigmaDefault);
+ SetSPDNoiseAll(0,0);
SetGeVToCharge();
SetDistanceOverVoltage();
SetSPDCouplingOption(fgkSPDCouplingOptDefault);
TObject(),
fGeVcharge(simpar.fGeVcharge),
fDOverV(simpar.fDOverV),
-fSPDBiasVoltage(simpar.fSPDBiasVoltage),
-fSPDThresh(simpar.fSPDThresh),
-fSPDSigma(simpar.fSPDSigma),
+//fSPDBiasVoltage(simpar.fSPDBiasVoltage),
+//fSPDThresh(simpar.fSPDThresh),
+//fSPDSigma(simpar.fSPDSigma),
fSPDCouplOpt(simpar.fSPDCouplOpt),
fSPDCouplCol(simpar.fSPDCouplCol),
fSPDCouplRow(simpar.fSPDCouplRow),
fSSDZSThreshold(simpar.fSSDZSThreshold),
fNsigmas(simpar.fNsigmas),
fNcomps(simpar.fNcomps),
-fGaus(){
+fGaus(),
+fN(simpar.fN),
+fT(simpar.fT){
// copy constructor
+ for (Int_t i=0;i<240;i++) {
+ fSPDBiasVoltage[i]=simpar.fSPDBiasVoltage[i];
+ fSPDThresh[i]=simpar.fSPDThresh[i];
+ fSPDSigma[i]=simpar.fSPDSigma[i];
+ fSPDNoise[i]=simpar.fSPDNoise[i];
+ fSPDBaseline[i]=simpar.fSPDBaseline[i];
+ }
}
//______________________________________________________________________
printf("DistanveOverVoltage = %f \n",fDOverV);
printf("\n");
printf("===== SPD parameters =====\n");
- printf("Bias Voltage = %f \n",fSPDBiasVoltage);
- printf("Threshold and sigma = %f %f\n",fSPDThresh,fSPDSigma);
+ printf("Bias Voltage = %f \n",fSPDBiasVoltage[0]);
+ printf("Threshold and sigma = %f %f\n",fSPDThresh[0],fSPDSigma[0]);
printf("Coupling Option = %s\n",fSPDCouplOpt.Data());
printf("Coupling value (column) = %f\n",fSPDCouplCol);
printf("Coupling value (row) = %f\n",fSPDCouplRow);
printf("Coupling NL = %f\n",fSSDCouplingNL);
printf("Zero Supp threshold = %d\n",fSSDZSThreshold);
}
+//______________________________________________________________________
+Double_t AliITSSimuParam::MobilityElectronSiEmp() const {
+ // Computes the electron mobility in cm^2/volt-sec. Taken from SILVACO
+ // International ATLAS II, 2D Device Simulation Framework, User Manual
+ // Chapter 5 Equation 5-6. An empirical function for low-field mobiliity
+ // in silicon at different tempeatures.
+ // Inputs:
+ // none.
+ // Output:
+ // none.
+ // Return:
+ // The Mobility of electrons in Si at a give temprature and impurity
+ // concentration. [cm^2/Volt-sec]
+ const Double_t km0 = 55.24; // cm^2/Volt-sec
+ const Double_t km1 = 7.12E+08; // cm^2 (degree K)^2.3 / Volt-sec
+ const Double_t kN0 = 1.072E17; // #/cm^3
+ const Double_t kT0 = 300.; // degree K.
+ const Double_t keT0 = -2.3; // Power of Temp.
+ const Double_t keT1 = -3.8; // Power of Temp.
+ const Double_t keN = 0.73; // Power of Dopent Consentrations
+ Double_t m;
+ Double_t tT = fT,nN = fN;
+
+ if(nN<=0.0){ // Simple case.
+ if(tT==300.) return 1350.0; // From Table 5-1 at consentration 1.0E14.
+ m = km1*TMath::Power(tT,keT0);
+ return m;
+ } // if nN<=0.0
+ m = km1*TMath::Power(tT,keT0) - km0;
+ m /= 1.0 + TMath::Power(tT/kT0,keT1)*TMath::Power(nN/kN0,keN);
+ m += km0;
+ return m;
+}
+//______________________________________________________________________
+Double_t AliITSSimuParam::MobilityHoleSiEmp() const {
+ // Computes the Hole mobility in cm^2/volt-sec. Taken from SILVACO
+ // International ATLAS II, 2D Device Simulation Framework, User Manual
+ // Chapter 5 Equation 5-7 An empirical function for low-field mobiliity
+ // in silicon at different tempeatures.
+ // Inputs:
+ // none.
+ // Output:
+ // none.
+ // Return:
+ // The Mobility of Hole in Si at a give temprature and impurity
+ // concentration. [cm^2/Volt-sec]
+ const Double_t km0a = 49.74; // cm^2/Volt-sec
+ const Double_t km0b = 49.70; // cm^2/Volt-sec
+ const Double_t km1 = 1.35E+08; // cm^2 (degree K)^2.3 / Volt-sec
+ const Double_t kN0 = 1.606E17; // #/cm^3
+ const Double_t kT0 = 300.; // degree K.
+ const Double_t keT0 = -2.2; // Power of Temp.
+ const Double_t keT1 = -3.7; // Power of Temp.
+ const Double_t keN = 0.70; // Power of Dopent Consentrations
+ Double_t m;
+ Double_t tT = fT,nN = fN;
+
+ if(nN<=0.0){ // Simple case.
+ if(tT==300.) return 495.0; // From Table 5-1 at consentration 1.0E14.
+ m = km1*TMath::Power(tT,keT0) + km0a-km0b;
+ return m;
+ } // if nN<=0.0
+ m = km1*TMath::Power(tT,keT0) - km0b;
+ m /= 1.0 + TMath::Power(tT/kT0,keT1)*TMath::Power(nN/kN0,keN);
+ m += km0a;
+ return m;
+}
+//______________________________________________________________________
+Double_t AliITSSimuParam::DiffusionCoefficientElectron() const {
+ // Computes the Diffusion coefficient for electrons in cm^2/sec. Taken
+ // from SILVACO International ATLAS II, 2D Device Simulation Framework,
+ // User Manual Chapter 5 Equation 5-53. Einstein relations for diffusion
+ // coefficient. Note: 1 cm^2/sec = 10 microns^2/nanosec.
+ // Inputs:
+ // none.
+ // Output:
+ // none.
+ // Return:
+ // The Diffusion Coefficient of electrons in Si at a give temprature
+ // and impurity concentration. [cm^2/sec]
+ // const Double_t kb = 1.3806503E-23; // Joules/degree K
+ // const Double_t qe = 1.60217646E-19; // Coulumbs.
+ const Double_t kbqe = 8.617342312E-5; // Volt/degree K
+ Double_t m = MobilityElectronSiEmp();
+ Double_t tT = fT;
+
+ return m*kbqe*tT; // [cm^2/sec]
+}
+//______________________________________________________________________
+Double_t AliITSSimuParam::DiffusionCoefficientHole() const {
+ // Computes the Diffusion coefficient for Holes in cm^2/sec. Taken
+ // from SILVACO International ATLAS II, 2D Device Simulation Framework,
+ // User Manual Chapter 5 Equation 5-53. Einstein relations for diffusion
+ // coefficient. Note: 1 cm^2/sec = 10 microns^2/nanosec.
+ // Inputs:
+ // none.
+ // Output:
+ // none.
+ // Return:
+ // The Defusion Coefficient of Hole in Si at a give temprature and
+ // impurity concentration. [cm^2/sec]
+ // and impurity concentration. [cm^2/sec]
+ // const Double_t kb = 1.3806503E-23; // Joules/degree K
+ // const Double_t qe = 1.60217646E-19; // Coulumbs.
+ const Double_t kbqe = 8.617342312E-5; // Volt/degree K
+ Double_t m = MobilityHoleSiEmp();
+ Double_t tT = fT;
+
+ return m*kbqe*tT; // [cm^2/sec]
+}
+//______________________________________________________________________
+Double_t AliITSSimuParam::LorentzAngleHole(Double_t B) const {
+ // Computes the Lorentz angle for electrons in Si
+ // Input: magnetic Field in KGauss
+ // Output: Lorentz angle in radians (positive if Bz is positive)
+ // Main Reference: NIM A 497 (2003) 389–396.
+ // "An algorithm for calculating the Lorentz angle in silicon detectors", V. Bartsch et al.
+ //
+ const Double_t krH=0.70; // Hall scattering factor for Hole
+ const Double_t kT0 = 300.; // reference Temperature (degree K).
+ const Double_t kmulow0 = 470.5; // cm^2/Volt-sec
+ const Double_t keT0 = -2.5; // Power of Temp.
+ const Double_t beta0 = 1.213; // beta coeff. at T0=300K
+ const Double_t keT1 = 0.17; // Power of Temp. for beta
+ const Double_t kvsat0 = 8.37E+06; // saturated velocity at T0=300K (cm/sec)
+ const Double_t keT2 = 0.52; // Power of Temp. for vsat
+ Double_t tT = fT;
+ Double_t eE= 1./fDOverV;
+ Double_t muLow=kmulow0*TMath::Power(tT/kT0,keT0);
+ Double_t beta=beta0*TMath::Power(tT/kT0,keT1);
+ Double_t vsat=kvsat0*TMath::Power(tT/kT0,keT2);
+ Double_t mu=muLow/TMath::Power(1+TMath::Power(muLow*eE/vsat,beta),1/beta);
+ Double_t angle=TMath::ATan(krH*mu*B*1.E-05); // Conversion Factor
+ return angle;
+}
+//______________________________________________________________________
+Double_t AliITSSimuParam::LorentzAngleElectron(Double_t B) const {
+ // Computes the Lorentz angle for electrons in Si
+ // Input: magnetic Field in KGauss
+ // Output: Lorentz angle in radians (positive if Bz is positive)
+ // Main Reference: NIM A 497 (2003) 389–396.
+ // "An algorithm for calculating the Lorentz angle in silicon detectors", V. Bartsch et al.
+ //
+ const Double_t krH=1.15; // Hall scattering factor for Electron
+ const Double_t kT0 = 300.; // reference Temperature (degree K).
+ const Double_t kmulow0 = 1417.0; // cm^2/Volt-sec
+ const Double_t keT0 = -2.2; // Power of Temp.
+ const Double_t beta0 = 1.109; // beta coeff. at T0=300K
+ const Double_t keT1 = 0.66; // Power of Temp. for beta
+ const Double_t kvsat0 = 1.07E+07; // saturated velocity at T0=300K (cm/sec)
+ const Double_t keT2 = 0.87; // Power of Temp. for vsat
+ Double_t tT = fT;
+ Double_t eE= 1./fDOverV;
+ Double_t muLow=kmulow0*TMath::Power(tT/kT0,keT0);
+ Double_t beta=beta0*TMath::Power(tT/kT0,keT1);
+ Double_t vsat=kvsat0*TMath::Power(tT/kT0,keT2);
+ Double_t mu=muLow/TMath::Power(1+TMath::Power(muLow*eE/vsat,beta),1/beta);
+ Double_t angle=TMath::ATan(krH*mu*B*1.E-05);
+ return angle;
+}
+//______________________________________________________________________
+Double_t AliITSSimuParam::SpeedElectron() const {
+ // Computes the average speed for electrons in Si under the low-field
+ // approximation. [cm/sec].
+ // Inputs:
+ // none.
+ // Output:
+ // none.
+ // Return:
+ // The speed the holes are traveling at due to the low field applied.
+ // [cm/sec]
+ Double_t m = MobilityElectronSiEmp();
+
+ return m/fDOverV; // [cm/sec]
+}
+//______________________________________________________________________
+Double_t AliITSSimuParam::SpeedHole() const {
+ // Computes the average speed for Holes in Si under the low-field
+ // approximation.[cm/sec].
+ // Inputs:
+ // none.
+ // Output:
+ // none.
+ // Return:
+ // The speed the holes are traveling at due to the low field applied.
+ // [cm/sec]
+ Double_t m = MobilityHoleSiEmp();
+
+ return m/fDOverV; // [cm/sec]
+}
+//______________________________________________________________________
+Double_t AliITSSimuParam::SigmaDiffusion3D(Double_t l) const {
+ // Returns the Gaussian sigma^2 == <x^2+y^2+z^2> [cm^2] due to the
+ // defusion of electrons or holes through a distance l [cm] caused
+ // by an applied voltage v [volt] through a distance d [cm] in any
+ // material at a temperature T [degree K]. The sigma diffusion when
+ // expressed in terms of the distance over which the diffusion
+ // occures, l=time/speed, is independent of the mobility and therefore
+ // the properties of the material. The charge distributions is given by
+ // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <r^2> = 6Dt where D=mkT/e
+ // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
+ // charge. and vel=m*v/d. consiquently sigma^2=6kTdl/ev.
+ // Inputs:
+ // Double_t l Distance the charge has to travel.
+ // Output:
+ // none.
+ // Return:
+ // The Sigma due to the diffution of electrons. [cm]
+ const Double_t kcon = 5.17040258E-04; // == 6k/e [J/col or volts]
+
+ return TMath::Sqrt(kcon*fT*fDOverV*l); // [cm]
+}
+//______________________________________________________________________
+Double_t AliITSSimuParam::SigmaDiffusion2D(Double_t l) const {
+ // Returns the Gaussian sigma^2 == <x^2+z^2> [cm^2] due to the defusion
+ // of electrons or holes through a distance l [cm] caused by an applied
+ // voltage v [volt] through a distance d [cm] in any material at a
+ // temperature T [degree K]. The sigma diffusion when expressed in terms
+ // of the distance over which the diffusion occures, l=time/speed, is
+ // independent of the mobility and therefore the properties of the
+ // material. The charge distributions is given by
+ // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <x^2+z^2> = 4Dt where D=mkT/e
+ // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
+ // charge. and vel=m*v/d. consiquently sigma^2=4kTdl/ev.
+ // Inputs:
+ // Double_t l Distance the charge has to travel.
+ // Output:
+ // none.
+ // Return:
+ // The Sigma due to the diffution of electrons. [cm]
+ const Double_t kcon = 3.446935053E-04; // == 4k/e [J/col or volts]
+
+ return TMath::Sqrt(kcon*fT*fDOverV*l); // [cm]
+}
+//______________________________________________________________________
+Double_t AliITSSimuParam::SigmaDiffusion1D(Double_t l) const {
+ // Returns the Gaussian sigma^2 == <x^2> [cm^2] due to the defusion
+ // of electrons or holes through a distance l [cm] caused by an applied
+ // voltage v [volt] through a distance d [cm] in any material at a
+ // temperature T [degree K]. The sigma diffusion when expressed in terms
+ // of the distance over which the diffusion occures, l=time/speed, is
+ // independent of the mobility and therefore the properties of the
+ // material. The charge distributions is given by
+ // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <r^2> = 2Dt where D=mkT/e
+ // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
+ // charge. and vel=m*v/d. consiquently sigma^2=2kTdl/ev.
+ // Inputs:
+ // Double_t l Distance the charge has to travel.
+ // Output:
+ // none.
+ // Return:
+ // The Sigma due to the diffution of electrons. [cm]
+ const Double_t kcon = 1.723467527E-04; // == 2k/e [J/col or volts]
+
+ return TMath::Sqrt(kcon*fT*fDOverV*l); // [cm]
+}
+//----------------------------------------------------------------------
+Double_t AliITSSimuParam::DepletedRegionThicknessA(Double_t dopCons,
+ Double_t voltage,
+ Double_t elecCharge,
+ Double_t voltBuiltIn)const{
+ // Computes the thickness of the depleted region in Si due to the
+ // application of an external bias voltage. From the Particle Data
+ // Book, 28.8 Silicon semiconductor detectors equation 28.19 (2004)
+ // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
+ // July 15 2004, ISSN 0370-2693 page 263. First equation.
+ // Inputs:
+ // Double_t dopCons "N" doping concentration
+ // Double_t voltage "V" external bias voltage
+ // Double_t elecCharge "e" electronic charge
+ // Double_t voltBuiltIn=0.5 "V_bi" "built-in" Voltage (~0.5V for
+ // resistivities typically used in detectors)
+ // Output:
+ // none.
+ // Return:
+ // The thickness of the depleted region
+
+ return TMath::Sqrt(2.0*(voltage+voltBuiltIn)/(dopCons*elecCharge));
+}
+//----------------------------------------------------------------------
+Double_t AliITSSimuParam::DepletedRegionThicknessB(Double_t resist,
+ Double_t voltage,
+ Double_t mobility,
+ Double_t voltBuiltIn,
+ Double_t dielConst)const{
+ // Computes the thickness of the depleted region in Si due to the
+ // application of an external bias voltage. From the Particle Data
+ // Book, 28.8 Silicon semiconductor detectors equation 28.19 (2004)
+ // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
+ // July 15 2004, ISSN 0370-2693 page 263. Second Equation.
+ // Inputs:
+ // Double_t resist "rho" resistivity (typically 1-10 kOhm cm)
+ // Double_t voltage "V" external bias voltage
+ // Double_t mobility "mu" charge carrier mobility
+ // (electons 1350, holes 450 cm^2/V/s)
+ // Double_t voltBuiltIn=0.5 "V_bi" "built-in" Voltage (~0.5V for
+ // resistivities typically used in detectors)
+ // Double_t dielConst=1.E-12 "epsilon" dielectric constant = 11.9 *
+ // (permittivity of free space) or ~ 1 pF/cm
+ // Output:
+ // none.
+ // Return:
+ // The thickness of the depleted region
+
+ return TMath::Sqrt(2.8*resist*mobility*dielConst*(voltage+voltBuiltIn));
+}
+//----------------------------------------------------------------------
+Double_t AliITSSimuParam::ReverseBiasCurrent(Double_t temp,
+ Double_t revBiasCurT1,
+ Double_t tempT1,
+ Double_t energy)const{
+ // Computes the temperature dependance of the reverse bias current
+ // of Si detectors. From the Particle Data
+ // Book, 28.8 Silicon semiconductor detectors equation 28.21 (2004)
+ // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
+ // July 15 2004, ISSN 0370-2693 page 263.
+ // Inputs:
+ // Double_t temp The temperature at which the current is wanted
+ // Double_t revBiasCurT1 The reference bias current at temp T1
+ // Double_t tempT1 The temperature correstponding to revBiasCurT1
+ // Double_t energy=1.2 Some energy [eV]
+ // Output:
+ // none.
+ // Return:
+ // The reverse bias current at the tempeature temp.
+ const Double_t kBoltz = 8.617343E-5; //[eV/K]
+
+ return revBiasCurT1*(temp*temp/(tempT1*tempT1))*
+ TMath::Exp(-0.5*energy*(tempT1-temp)/(kBoltz*tempT1*temp));
+}
+//______________________________________________________________________
+ void AliITSSimuParam::SPDThresholds(const Int_t mod, Double_t& thresh, Double_t& sigma) const {
+ if(mod<0 || mod>239) {
+ thresh=0;
+ sigma=0;
+ return;
+ }
+ thresh=fSPDThresh[mod];
+ sigma=fSPDSigma[mod];
+ return;
+}
+//_______________________________________________________________________
+ void AliITSSimuParam::SPDNoise(const Int_t mod,Double_t &noise, Double_t &baseline) const {
+ if(mod<0 || mod>239) {
+ noise=0;
+ baseline=0;
+ return;
+ }
+ noise=fSPDNoise[mod];
+ baseline=fSPDBaseline[mod];
+ return;
+}
+
/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-/* $Id:$ */
+/* $Id$ */
///////////////////////////////////////////////////////////////////
// //
// Origin: F.Prino, Torino, prino@to.infn.it //
// //
///////////////////////////////////////////////////////////////////
-
+#include <TRandom.h>
#include<TObject.h>
#include <TString.h>
#include <TArrayF.h>
- void SetSPDBiasVoltage(Double_t bias=18.182) {fSPDBiasVoltage=bias;}
- Double_t GetSPDBiasVoltage() const {return fSPDBiasVoltage;}
+ void SetSPDBiasVoltageAll(Double_t bias=18.182) {for(Int_t i=0;i<240;i++) fSPDBiasVoltage[i]=bias;}
+ void SetSPDBiasVoltage(Int_t mod, Double_t bias=18.182) {if(mod<0 || mod>239) return; fSPDBiasVoltage[mod]=bias;}
+ Double_t GetSPDBiasVoltage(Int_t mod=0) const {if(mod<0 || mod>239) return 0; return fSPDBiasVoltage[mod];}
+
+ void SetSPDThresholdsAll(Double_t thresh, Double_t sigma)
+ {for(Int_t i=0;i<240;i++) {fSPDThresh[i]=thresh; fSPDSigma[i]=sigma;}}
+ void SetSPDThresholds(Int_t mod,Double_t thresh, Double_t sigma)
+ {if(mod<0 || mod>239) return; fSPDThresh[mod]=thresh; fSPDSigma[mod]=sigma; }
+ void SPDThresholds(const Int_t mod, Double_t& thresh, Double_t& sigma) const;
+ void SetSPDNoiseAll(Double_t noise, Double_t baseline)
+ {for(Int_t i=0;i<240;i++) {fSPDNoise[i]=noise; fSPDBaseline[i]=baseline;}}
+ void SetSPDNoise(Int_t mod,Double_t noise, Double_t baseline)
+ {if(mod<0 || mod>239) return; fSPDNoise[mod]=noise; fSPDBaseline[mod]=baseline; }
+ void SPDNoise(const Int_t mod,Double_t &noise, Double_t &baseline) const;
+ // Applies a random noise and addes the baseline
+ Double_t ApplySPDBaselineAndNoise(Int_t mod=0) const
+ {if (mod<0 || mod>239) mod=0; return fSPDBaseline[mod]+fSPDNoise[mod]*gRandom->Gaus();}
- void SetSPDThresholds(Double_t thresh, Double_t sigma)
- {fSPDThresh=thresh; fSPDSigma=sigma;}
- void Thresholds(Double_t &thresh, Double_t &sigma) const
- {thresh=fSPDThresh; sigma=fSPDSigma;}
void SetSPDCouplingOption(const char *opt) {fSPDCouplOpt=opt;}
void GetSPDCouplingOption(char *opt) const {strcpy(opt,fSPDCouplOpt.Data());}
if(i<0 || i>=fNcomps) return 0.;return fGaus->At(i);
}
+ // Set the impurity concentrations in [#/cm^3]
+ void SetImpurity(Double_t n=0.0){fN = n;}
+ // Returns the impurity consentration in [#/cm^3]
+ Double_t Impurity() const {return fN;}
+
+ // Electron mobility in Si. [cm^2/(Volt Sec)]. T in degree K, N in #/cm^3
+ Double_t MobilityElectronSiEmp() const ;
+ // Hole mobility in Si. [cm^2/(Volt Sec)] T in degree K, N in #/cm^3
+ Double_t MobilityHoleSiEmp() const ;
+ // Einstein relation for Diffusion Coefficient of Electrons. [cm^2/sec]
+ // T in degree K, N in #/cm^3
+ Double_t DiffusionCoefficientElectron() const ;
+ // Einstein relation for Diffusion Coefficient of Holes. [cm^2/sec]
+ // T in [degree K], N in [#/cm^3]
+ Double_t DiffusionCoefficientHole() const ;
+ // Electron <speed> under an applied electric field E=Volts/cm. [cm/sec]
+ // d distance-thickness in [cm], v in [volts], T in [degree K],
+ // N in [#/cm^3]
+ Double_t SpeedElectron() const ;
+ // Holes <speed> under an applied electric field E=Volts/cm. [cm/sec]
+ // d distance-thickness in [cm], v in [volts], T in [degree K],
+ // N in [#/cm^3]
+ Double_t SpeedHole() const ;
+ // Returns the Gaussian sigma == <x^2+z^2> [cm^2] due to the defusion of
+ // electrons or holes through a distance l [cm] caused by an applied
+ // voltage v [volt] through a distance d [cm] in any material at a
+ // temperature T [degree K].
+ Double_t SigmaDiffusion3D(Double_t l) const;
+ // Returns the Gaussian sigma == <x^2 +y^2+z^2> [cm^2] due to the
+ // defusion of electrons or holes through a distance l [cm] caused by an
+ // applied voltage v [volt] through a distance d [cm] in any material at a
+ // temperature T [degree K].
+ Double_t SigmaDiffusion2D(Double_t l) const;
+ // Returns the Gaussian sigma == <x^2+z^2> [cm^2] due to the defusion of
+ // electrons or holes through a distance l [cm] caused by an applied
+ // voltage v [volt] through a distance d [cm] in any material at a
+ // temperature T [degree K].
+ Double_t SigmaDiffusion1D(Double_t l) const;
+ // Computes the Lorentz angle for Electron and Hole, under the Magnetic field bz (in kGauss)
+ Double_t LorentzAngleElectron(Double_t bz) const;
+ Double_t LorentzAngleHole(Double_t bz) const;
+ // Compute the thickness of the depleted region in a Si detector, version A
+ Double_t DepletedRegionThicknessA(Double_t dopCons,
+ Double_t voltage,
+ Double_t elecCharge,
+ Double_t voltBuiltIn=0.5)const;
+ // Compute the thickness of the depleted region in a Si detector, version B
+ Double_t DepletedRegionThicknessB(Double_t resist,Double_t voltage,
+ Double_t mobility,
+ Double_t voltBuiltIn=0.5,
+ Double_t dielConst=1.E-12)const;
+ // Computes the temperature dependance of the reverse bias current
+ Double_t ReverseBiasCurrent(Double_t temp,Double_t revBiasCurT1,
+ Double_t tempT1,Double_t energy=1.2)const;
+
+
void PrintParameters() const;
protected:
private:
Double_t fGeVcharge; // Energy to ionize (free an electron) in GeV
Double_t fDOverV; // The parameter d/v where d is the disance over which the
- // the potential v is applied d/v [cm/volts]
+ // the potential v is applied d/v [cm/volts]
- Double_t fSPDBiasVoltage; // Bias Voltage for the SPD
- Double_t fSPDThresh; // SPD Threshold value
- Double_t fSPDSigma; // SPD Noise + threshold fluctuations value
+ Double_t fSPDBiasVoltage[240]; // Bias Voltage for the SPD
+ Double_t fSPDThresh[240]; // SPD Threshold value
+ Double_t fSPDSigma[240]; // SPD threshold fluctuations spread
+ Double_t fSPDNoise[240]; // SPD electronic noise: sigma
+ Double_t fSPDBaseline[240]; // SPD electronic noise: baseline
TString fSPDCouplOpt; // SPD Coupling Option
Double_t fSPDCouplCol; // SPD Coupling parameter along the cols
Double_t fSPDCouplRow; // SPD Coupling parameter along the rows
Int_t fNcomps; // Number of samplings along the gaussian
TArrayF *fGaus; // Gaussian lookup table for signal generation
- ClassDef(AliITSSimuParam,1);
+ Double_t fN; // the impurity concentration of the material in #/cm^3 (NOT USED!)
+ Float_t fT; // The temperature of the Si in Degree K.
+
+ ClassDef(AliITSSimuParam,2);
};
#endif
// A default constructed AliITSsimulationSPD class.
AliDebug(1,Form("Calling standard constructor "));
-// AliITSCalibrationSPD* res = (AliITSCalibrationSPD*)GetCalibrationModel(fDetType->GetITSgeom()->GetStartSPD());
-// res->SetTemperature(0.0);
-// res->SetDistanceOverVoltage(0.0);
Init();
}
//______________________________________________________________________
SetModuleNumber(0);
SetEventNumber(0);
SetMap(new AliITSpList(GetNPixelsZ(),GetNPixelsX()));
- AliITSCalibrationSPD* res = (AliITSCalibrationSPD*)GetCalibrationModel(fDetType->GetITSgeom()->GetStartSPD());
+ AliITSSimuParam* simpar = fDetType->GetSimuParam();
AliITSsegmentationSPD* seg = (AliITSsegmentationSPD*)GetSegmentationModel(0);
- Double_t bias = res->GetBiasVoltage();
+ Double_t bias = simpar->GetSPDBiasVoltage();
// cout << "Bias Voltage --> " << bias << endl; // dom
- res->SetDistanceOverVoltage(kmictocm*seg->Dy(),bias);
+ simpar->SetDistanceOverVoltage(kmictocm*seg->Dy(),bias);
// set kind of coupling ("old" or "new")
char opt[20];
- res->GetCouplingOption(opt);
+ simpar->GetSPDCouplingOption(opt);
char *old = strstr(opt,"old");
if (old) {
fCoupling=2;
AliWarning("AliITSsimulationSPD::SetTanLorAngle: I'm going to use only holes");
}
Double_t WeightEle=1.-WeightHole;
- AliITSCalibrationSPD* res = (AliITSCalibrationSPD*)GetCalibrationModel(fDetType->GetITSgeom()->GetStartSPD());
+ AliITSSimuParam* simpar = fDetType->GetSimuParam();
AliMagF *mf = gAlice->Field();
Float_t pos[3]={0.,0.,0.};
Float_t B[3]={0.,0.,0.};
mf->Field(pos,B);
- fTanLorAng = TMath::Tan(WeightHole*res->LorentzAngleHole(B[2]) +
- WeightEle*res->LorentzAngleElectron(B[2]));
+ fTanLorAng = TMath::Tan(WeightHole*simpar->LorentzAngleHole(B[2]) +
+ WeightEle*simpar->LorentzAngleElectron(B[2]));
fTanLorAng*=-1.; // this only for the old geometry
// comment the upper line for the new geometry
return kTRUE;
// none
AliDebug(1,Form("(module=%d,event=%d)",module,event));
+ const Double_t kmictocm = 1.0e-4; // convert microns to cm.
+ AliITSSimuParam* simpar = fDetType->GetSimuParam();
+ AliITSsegmentationSPD* seg = (AliITSsegmentationSPD*)GetSegmentationModel(0);
SetModuleNumber(module);
SetEventNumber(event);
+ simpar->SetDistanceOverVoltage(kmictocm*seg->Dy(),simpar->GetSPDBiasVoltage(module));
ClearMap();
}
//_____________________________________________________________________
} // end if
SetModuleNumber(mod->GetIndex());
SetEventNumber(event);
+ InitSimulationModule( GetModuleNumber() , event );
// HitToSDigit(mod);
HitToSDigitFast(mod);
RemoveDeadPixels(mod);
}
//______________________________________________________________________
void AliITSsimulationSPD::DigitiseModule(AliITSmodule *mod,Int_t,
- Int_t){
+ Int_t event){
// This function creates Digits straight from the hits and then adds
// electronic noise to the digits before adding them to pList
// Each of the input variables is passed along to HitToSDigit
AliDebug(1,Form("(mod=%p,,)",mod));
// HitToSDigit(mod);
+ InitSimulationModule( mod->GetIndex(), event );
HitToSDigitFast(mod);
RemoveDeadPixels(mod);
// cout << "After Remove in DigitiseModule in module " << mod->GetIndex() << endl; // dom
Double_t x0=0.0,x1=0.0,y0=0.0,y1=0.0,z0=0.0,z1=0.0,de=0.0,ld=0.0;
Double_t x,y,z,t,tp,st,dt=0.2,el,sig,sigx,sigz,fda;
AliITSsegmentationSPD* seg = (AliITSsegmentationSPD*)GetSegmentationModel(0);
- AliITSCalibrationSPD* res = (AliITSCalibrationSPD*)GetCalibrationModel(fDetType->GetITSgeom()->GetStartSPD());
+ AliITSSimuParam *simpar = fDetType->GetSimuParam();
Double_t thick = 0.5*kmictocm*seg->Dy(); // Half Thickness
- res->GetSigmaDiffusionAsymmetry(fda);
+ simpar->GetSPDSigmaDiffusionAsymmetry(fda); //
AliDebug(1,Form("(mod=%p) fCoupling=%d",mod,fCoupling));
if(nhits<=0) return;
y = y0+y1*tp;
z = z0+z1*tp;
if(!(seg->LocalToDet(x,z,ix,iz))) continue; // outside
- el = res->GeVToCharge((Double_t)(dt*de));
+ //el = res->GeVToCharge((Double_t)(dt*de));
+ el = dt * de / simpar->GetGeVToCharge();
if(GetDebug(1)){
if(el<=0.0) cout<<"el="<<el<<" dt="<<dt
<<" de="<<de<<endl;
} // end if GetDebug
- sig = res->SigmaDiffusion1D(TMath::Abs(thick + y));
+ sig = simpar->SigmaDiffusion1D(TMath::Abs(thick + y));
sigx=sig;
sigz=sig*fda;
if (fLorentz) ld=(y+thick)*fTanLorAng;
y = y0;
z = z0;
if(!(seg->LocalToDet(x,z,ix,iz))) continue; // outside
- el = res->GeVToCharge((Double_t)de);
- sig = res->SigmaDiffusion1D(TMath::Abs(thick + y));
+ //el = res->GeVToCharge((Double_t)de);
+ el = de / simpar->GetGeVToCharge();
+ sig = simpar->SigmaDiffusion1D(TMath::Abs(thick + y));
sigx=sig;
sigz=sig*fda;
if (fLorentz) ld=(y+thick)*fTanLorAng;
Double_t x0=0.0,x1=0.0,y0=0.0,y1=0.0,z0=0.0,z1=0.0,de=0.0,ld=0.0;
Double_t x,y,z,t,st,el,sig,sigx,sigz,fda;
AliITSsegmentationSPD* seg = (AliITSsegmentationSPD*)GetSegmentationModel(0);
- AliITSCalibrationSPD* res = (AliITSCalibrationSPD*)GetCalibrationModel(fDetType->GetITSgeom()->GetStartSPD());
+ AliITSSimuParam* simpar = fDetType->GetSimuParam();
Double_t thick = 0.5*kmictocm*seg->Dy(); // Half thickness
- res->GetSigmaDiffusionAsymmetry(fda);
+ simpar->GetSPDSigmaDiffusionAsymmetry(fda);
// cout << "Half Thickness " << thick << endl; // dom
// cout << "Diffusion asymm " << fda << endl; // dom
y = y0+y1*t;
z = z0+z1*t;
if(!(seg->LocalToDet(x,z,ix,iz))) continue; // outside
- // el = res->GeVToCharge((Double_t)(dt*de));
- // el = 1./kn10*res->GeVToCharge((Double_t)de);
- el = kwi[i]*res->GeVToCharge((Double_t)de);
+ el = kwi[i]*de/simpar->GetGeVToCharge();
if(GetDebug(1)){
if(el<=0.0) cout<<"el="<<el<<" kwi["<<i<<"]="<<kwi[i]
<<" de="<<de<<endl;
} // end if GetDebug
- sig = res->SigmaDiffusion1D(TMath::Abs(thick + y));
+ sig = simpar->SigmaDiffusion1D(TMath::Abs(thick + y));
sigx=sig;
sigz=sig*fda;
if (fLorentz) ld=(y+thick)*fTanLorAng;
y = y0;
z = z0;
if(!(seg->LocalToDet(x,z,ix,iz))) continue; // outside
- el = res->GeVToCharge((Double_t)de);
- sig = res->SigmaDiffusion1D(TMath::Abs(thick + y));
+ el = de / simpar->GetGeVToCharge();
+ sig = simpar->SigmaDiffusion1D(TMath::Abs(thick + y));
sigx=sig;
sigz=sig*fda;
if (fLorentz) ld=(y+thick)*fTanLorAng;
Double_t sig;
const Int_t knmaxtrk=AliITSdigit::GetNTracks();
static AliITSdigitSPD dig;
- AliITSCalibrationSPD* res = (AliITSCalibrationSPD*)GetCalibrationModel(fDetType->GetITSgeom()->GetStartSPD());
+ AliITSSimuParam *simpar = fDetType->GetSimuParam();
if(GetDebug(1)) Info("FrompListToDigits","()");
for(iz=0; iz<GetNPixelsZ(); iz++) for(ix=0; ix<GetNPixelsX(); ix++){
// NEW (for the moment plugged by hand, in the future possibly read from Data Base)
// eff=1.-p1*exp(-p2*x);
// if (gRandom->Rndm() >= eff) continue;
// } // end if
- // END parametrize the efficiency
- //
- electronics = res->ApplyBaselineAndNoise();
+// END parametrize the efficiency
+//
+ electronics = simpar->ApplySPDBaselineAndNoise();
UpdateMapNoise(ix,iz,electronics);
//
// Apply Threshold and write Digits.
class TH1F;
class AliITSmodule;
-class AliITSresponseSPD;
+//class AliITSresponseSPD;
//-------------------------------------------------------------------