LCOV - code coverage report
Current view: top level - ITS/ITSsim - AliITSSimuParam.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 84 215 39.1 %
Date: 2016-06-14 17:26:59 Functions: 12 28 42.9 %

          Line data    Source code
       1             : /**************************************************************************
       2             :  * Copyright(c) 2007-2009, 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             : //                                                               //
      20             : // Implementation of the class to store the parameters used in   //
      21             : // the simulation of SPD, SDD and SSD detectors                  //
      22             : // Origin: F.Prino, Torino, prino@to.infn.it                     //
      23             : //                                                               //
      24             : ///////////////////////////////////////////////////////////////////
      25             : 
      26             : #include "AliITSSimuParam.h"
      27             : #include <TMath.h>
      28             : 
      29             : const Float_t  AliITSSimuParam::fgkSPDBiasVoltageDefault = 18.182;
      30             : const Double_t AliITSSimuParam::fgkSPDThreshDefault = 3000.;
      31             : const Double_t AliITSSimuParam::fgkSPDSigmaDefault = 250.;
      32         116 : const TString  AliITSSimuParam::fgkSPDCouplingOptDefault = "old";
      33             : const Double_t AliITSSimuParam::fgkSPDCouplColDefault = 0.;
      34             : const Double_t AliITSSimuParam::fgkSPDCouplRowDefault = 0.055;
      35             : const Float_t  AliITSSimuParam::fgkSPDEccDiffDefault = 0.85;
      36             : const Float_t  AliITSSimuParam::fgkSPDLorentzHoleWeightDefault = 1.0;
      37             : const Float_t  AliITSSimuParam::fgkSDDDiffCoeffDefault = 3.23;
      38             : const Float_t  AliITSSimuParam::fgkSDDDiffCoeff1Default = 30.;
      39             : const Float_t  AliITSSimuParam::fgkSDDJitterErrorDefault = 20.; // 20 um from beam test 2001
      40             : const Float_t  AliITSSimuParam::fgkSDDDynamicRangeDefault = 1400./2.5; // mV/MOhm = nA
      41             : const Int_t    AliITSSimuParam::fgkSDDMaxAdcDefault = 1024;
      42             : const Float_t  AliITSSimuParam::fgkSDDChargeLossDefault = 0.;
      43             : const Float_t  AliITSSimuParam::fgkSDDTrigDelayDefault = 54.3;
      44             : const Float_t  AliITSSimuParam::fgkSDDMapPrecDefault = 20.; // 20 um from laser tests
      45             : const Float_t  AliITSSimuParam::fgkSDDkeVtoADCDefault = 3.42;
      46             : const Double_t AliITSSimuParam::fgkSSDCouplingPRDefault = 0.01;
      47             : const Double_t AliITSSimuParam::fgkSSDCouplingPLDefault = 0.01;
      48             : const Double_t AliITSSimuParam::fgkSSDCouplingNRDefault = 0.01;
      49             : const Double_t AliITSSimuParam::fgkSSDCouplingNLDefault = 0.01;
      50             : const Int_t    AliITSSimuParam::fgkSSDZSThresholdDefault = 3;
      51             : 
      52             : const Float_t AliITSSimuParam::fgkNsigmasDefault = 3.;
      53             : const Int_t AliITSSimuParam::fgkNcompsDefault = 121;
      54             : 
      55         116 : ClassImp(AliITSSimuParam)
      56             : 
      57             : //______________________________________________________________________
      58             : AliITSSimuParam::AliITSSimuParam():
      59          14 :   TObject(),
      60          14 :   fGeVcharge(0.),
      61          14 :   fDOverV(0.),
      62             : //fSPDBiasVoltage(fgkSPDBiasVoltageDefault),
      63             : //fSPDThresh(fgkSPDThreshDefault),
      64             : //fSPDSigma(fgkSPDSigmaDefault),
      65          14 :   fSPDCouplOpt(0),
      66          14 :   fSPDCouplCol(fgkSPDCouplColDefault),
      67          14 :   fSPDCouplRow(fgkSPDCouplRowDefault),
      68          14 :   fSPDEccDiff(0.),
      69          14 :   fSPDLorentzDrift(kTRUE),
      70          14 :   fSPDLorentzHoleWeight(fgkSPDLorentzHoleWeightDefault),
      71          14 :   fSPDAddNoisyFlag(kFALSE),
      72          14 :   fSPDRemoveDeadFlag(kFALSE),
      73          14 :   fSDDElectronics(0),
      74          14 :   fSDDDiffCoeff(0.),
      75          14 :   fSDDDiffCoeff1(0.),
      76          14 :   fSDDJitterError(fgkSDDJitterErrorDefault),
      77          14 :   fSDDDynamicRange(fgkSDDDynamicRangeDefault),
      78          14 :   fSDDMaxAdc(0.),
      79          14 :   fSDDChargeLoss(fgkSDDChargeLossDefault),
      80          14 :   fSDDTrigDelay(fgkSDDTrigDelayDefault),
      81          14 :   fSDDMapPrec(fgkSDDMapPrecDefault),
      82          14 :   fSDDkeVtoADC(fgkSDDkeVtoADCDefault),
      83          14 :   fSDDRawFormat(7),
      84          14 :   fSSDLorentzDrift(kTRUE),
      85          14 :   fSSDCouplingPR(0),
      86          14 :   fSSDCouplingPL(0),
      87          14 :   fSSDCouplingNR(0),
      88          14 :   fSSDCouplingNL(0),
      89          14 :   fSSDZSThreshold(fgkSSDZSThresholdDefault),
      90          14 :   fNsigmas(fgkNsigmasDefault),
      91          14 :   fNcomps(fgkNcompsDefault),
      92          14 :   fGaus(),
      93          14 :   fN(0.),
      94          14 :   fT(300.)
      95          70 : {  
      96             :   // default constructor
      97          14 :   SetSPDBiasVoltageAll(fgkSPDBiasVoltageDefault);
      98          14 :   SetSPDThresholdsAll(fgkSPDThreshDefault,fgkSPDSigmaDefault);
      99          14 :   SetSPDNoiseAll(0,0);
     100          14 :   SetGeVToCharge();
     101          14 :   SetDistanceOverVoltage();
     102          28 :   SetSPDCouplingOption(fgkSPDCouplingOptDefault);
     103          14 :   SetSPDSigmaDiffusionAsymmetry(fgkSPDEccDiffDefault);
     104          14 :   SetSDDElectronics();
     105          14 :   SetSDDDiffCoeff(fgkSDDDiffCoeffDefault,fgkSDDDiffCoeff1Default);
     106          14 :   SetSDDMaxAdc((Double_t)fgkSDDMaxAdcDefault);
     107          14 :   SetSSDCouplings(fgkSSDCouplingPRDefault,fgkSSDCouplingPLDefault,fgkSSDCouplingNRDefault,fgkSSDCouplingNLDefault);
     108          14 :   fSPDHitStrobe[0]=-1; // 100 ns before the collision time ( 300 ns readout strobe in total)
     109          14 :   fSPDHitStrobe[1]=2; // 200 ns after the collision time  (300 ns readout strobe in total)
     110          14 :   fSPDFoStrobe[0]=0;  // coincidence with collision time
     111          14 :   fSPDFoStrobe[1]=1;  // 100 ns after the collision time
     112          28 : }
     113             : //______________________________________________________________________
     114             : AliITSSimuParam::AliITSSimuParam(const AliITSSimuParam &simpar):
     115           0 :   TObject(),
     116           0 :   fGeVcharge(simpar.fGeVcharge),
     117           0 :   fDOverV(simpar.fDOverV),
     118             :   //fSPDBiasVoltage(simpar.fSPDBiasVoltage),
     119             :   //fSPDThresh(simpar.fSPDThresh),
     120             :   //fSPDSigma(simpar.fSPDSigma),
     121           0 :   fSPDCouplOpt(simpar.fSPDCouplOpt),
     122           0 :   fSPDCouplCol(simpar.fSPDCouplCol),
     123           0 :   fSPDCouplRow(simpar.fSPDCouplRow),
     124           0 :   fSPDEccDiff(simpar.fSPDEccDiff),
     125           0 :   fSPDLorentzDrift(simpar.fSPDLorentzDrift),
     126           0 :   fSPDLorentzHoleWeight(simpar.fSPDLorentzHoleWeight),
     127           0 :   fSPDAddNoisyFlag(simpar.fSPDAddNoisyFlag),
     128           0 :   fSPDRemoveDeadFlag(simpar.fSPDRemoveDeadFlag),
     129           0 :   fSDDElectronics(simpar.fSDDElectronics),
     130           0 :   fSDDDiffCoeff(simpar.fSDDDiffCoeff),
     131           0 :   fSDDDiffCoeff1(simpar.fSDDDiffCoeff1),
     132           0 :   fSDDJitterError(simpar.fSDDJitterError),
     133           0 :   fSDDDynamicRange(simpar.fSDDDynamicRange),
     134           0 :   fSDDMaxAdc(simpar.fSDDMaxAdc),
     135           0 :   fSDDChargeLoss(simpar.fSDDChargeLoss),
     136           0 :   fSDDTrigDelay(simpar.fSDDTrigDelay),
     137           0 :   fSDDMapPrec(simpar.fSDDMapPrec),
     138           0 :   fSDDkeVtoADC(simpar.fSDDkeVtoADC),
     139           0 :   fSDDRawFormat(simpar.fSDDRawFormat),
     140           0 :   fSSDLorentzDrift(simpar.fSSDLorentzDrift),
     141           0 :   fSSDCouplingPR(simpar.fSSDCouplingPR),
     142           0 :   fSSDCouplingPL(simpar.fSSDCouplingPL),
     143           0 :   fSSDCouplingNR(simpar.fSSDCouplingNR),
     144           0 :   fSSDCouplingNL(simpar.fSSDCouplingNL),
     145           0 :   fSSDZSThreshold(simpar.fSSDZSThreshold),
     146           0 :   fNsigmas(simpar.fNsigmas),
     147           0 :   fNcomps(simpar.fNcomps),
     148           0 :   fGaus(),
     149           0 :   fN(simpar.fN),
     150           0 :   fT(simpar.fT){
     151             :   // copy constructor
     152           0 :   for (Int_t i=0;i<240;i++) {
     153           0 :     fSPDBiasVoltage[i]=simpar.fSPDBiasVoltage[i];
     154           0 :     fSPDThresh[i]=simpar.fSPDThresh[i];
     155           0 :     fSPDSigma[i]=simpar.fSPDSigma[i];
     156           0 :     fSPDNoise[i]=simpar.fSPDNoise[i];
     157           0 :     fSPDBaseline[i]=simpar.fSPDBaseline[i];
     158             :   }
     159           0 :  for (Int_t j=0; j<2; j++){
     160           0 :   fSPDHitStrobe[j]=simpar.fSPDHitStrobe[j]; 
     161           0 :   fSPDFoStrobe[j]=simpar.fSPDFoStrobe[j]; 
     162             :  }
     163           0 : }
     164             : 
     165             : //______________________________________________________________________
     166             : AliITSSimuParam& AliITSSimuParam::operator=(const AliITSSimuParam& source){
     167             :   // Assignment operator. 
     168           0 :   this->~AliITSSimuParam();
     169           0 :   new(this) AliITSSimuParam(source);
     170           0 :   return *this;
     171             :   
     172           0 : }
     173             : 
     174             : 
     175             : //______________________________________________________________________
     176          84 : AliITSSimuParam::~AliITSSimuParam() {
     177             :   // destructor
     178          16 :   if(fGaus) delete fGaus;
     179          42 : }
     180             : //________________________________________________________________________
     181             : void AliITSSimuParam::SetNLookUp(Int_t p1){
     182             :   // Set number of sigmas over which cluster disintegration is performed
     183           2 :   fNcomps=p1;
     184           1 :   if (fGaus) delete fGaus;
     185           2 :   fGaus = new TArrayF(fNcomps+1);
     186         246 :   for(Int_t i=0; i<=fNcomps; i++) {
     187         122 :     Float_t x = -fNsigmas + (2.*i*fNsigmas)/(fNcomps-1);
     188         122 :     (*fGaus)[i] = exp(-((x*x)/2));
     189             :   }
     190           1 : }
     191             : //________________________________________________________________________
     192             : void AliITSSimuParam::PrintParameters() const{
     193             :   // Dump all parameters
     194           0 :   printf("GeVToCharge               = %G\n",fGeVcharge);
     195           0 :   printf("DistanveOverVoltage       = %f \n",fDOverV);
     196           0 :   printf("\n");
     197           0 :   printf("=====  SPD parameters  =====\n");
     198           0 :   printf("Bias Voltage              = %f \n",fSPDBiasVoltage[0]);
     199           0 :   printf("Threshold and sigma       = %f %f\n",fSPDThresh[0],fSPDSigma[0]);
     200           0 :   printf("Coupling Option           = %s\n",fSPDCouplOpt.Data());
     201           0 :   printf("Coupling value (column)   = %f\n",fSPDCouplCol);
     202           0 :   printf("Coupling value (row)      = %f\n",fSPDCouplRow);
     203           0 :   printf("Eccentricity in diffusion = %f\n",fSPDEccDiff);
     204           0 :   printf("Flag to add Lorentz Drift = %d\n",fSPDLorentzDrift);
     205           0 :   printf("Weight of Holes in Lor.Drift = %f\n",fSPDLorentzHoleWeight);
     206           0 :   printf("Flag to add noisy         = %d\n",fSPDAddNoisyFlag);
     207           0 :   printf("Flag to remove dead       = %d\n",fSPDRemoveDeadFlag);
     208           0 :   printf("Hit Strobe params         = %d %d\n",fSPDHitStrobe[0],fSPDHitStrobe[1]);
     209           0 :   printf("FO  Strobe params         = %d %d\n",fSPDFoStrobe[0],fSPDFoStrobe[1]);
     210           0 :   printf("\n");
     211           0 :   printf("=====  SDD parameters  =====\n");
     212           0 :   printf("Electronic chips          = %d\n",fSDDElectronics);
     213           0 :   printf("Diffusion Coefficients    = %f %f\n",fSDDDiffCoeff,fSDDDiffCoeff1);
     214           0 :   printf("Jitter Error              = %f um\n",fSDDJitterError);
     215           0 :   printf("Dynamic Range             = %f\n",fSDDDynamicRange);
     216           0 :   printf("Max. ADC                  = %f\n",fSDDMaxAdc);
     217           0 :   printf("Charge Loss               = %f\n",fSDDChargeLoss);  
     218           0 :   printf("Trigger Delay (ns)        = %f\n",fSDDTrigDelay);  
     219           0 :   printf("Smear from map (um)       = %f\n",fSDDMapPrec);
     220           0 :   printf("keV->ADC conv. fact.        = %f\n",fSDDkeVtoADC);
     221           0 :   printf("Raw Data Format           = %d\n",fSDDRawFormat);  
     222           0 :   printf("\n");
     223           0 :   printf("=====  SSD parameters  =====\n");
     224           0 :   printf("Flag to add Lorentz Drift = %d\n",fSSDLorentzDrift);
     225           0 :   printf("Coupling PR               = %f\n",fSSDCouplingPR);
     226           0 :   printf("Coupling PL               = %f\n",fSSDCouplingPL);
     227           0 :   printf("Coupling NR               = %f\n",fSSDCouplingNR);
     228           0 :   printf("Coupling NL               = %f\n",fSSDCouplingNL);
     229           0 :   printf("Zero Supp threshold       = %d\n",fSSDZSThreshold);
     230           0 : }
     231             : //______________________________________________________________________
     232             : Double_t AliITSSimuParam::MobilityElectronSiEmp() const {
     233             :     // Computes the electron mobility in cm^2/volt-sec. Taken from SILVACO
     234             :     // International ATLAS II, 2D Device Simulation Framework, User Manual
     235             :     // Chapter 5 Equation 5-6. An empirical function for low-field mobiliity
     236             :     // in silicon at different tempeatures.
     237             :     // Inputs:
     238             :     //    none.
     239             :     // Output:
     240             :     //    none.
     241             :     // Return:
     242             :     //    The Mobility of electrons in Si at a give temprature and impurity
     243             :     //    concentration. [cm^2/Volt-sec]
     244             :     const Double_t km0  = 55.24; // cm^2/Volt-sec
     245             :     const Double_t km1  = 7.12E+08; // cm^2 (degree K)^2.3 / Volt-sec
     246             :     const Double_t kN0  = 1.072E17; // #/cm^3
     247             :     const Double_t kT0  = 300.; // degree K.
     248             :     const Double_t keT0 = -2.3; // Power of Temp.
     249             :     const Double_t keT1 = -3.8; // Power of Temp.
     250             :     const Double_t keN  = 0.73; // Power of Dopent Consentrations
     251             :     Double_t m;
     252           0 :     Double_t tT = fT,nN = fN;
     253             : 
     254           0 :     if(nN<=0.0){ // Simple case.
     255           0 :         if(tT==300.) return 1350.0; // From Table 5-1 at consentration 1.0E14.
     256           0 :         m = km1*TMath::Power(tT,keT0);
     257           0 :         return m;
     258             :     } // if nN<=0.0
     259           0 :     m = km1*TMath::Power(tT,keT0) - km0;
     260           0 :     m /= 1.0 + TMath::Power(tT/kT0,keT1)*TMath::Power(nN/kN0,keN);
     261           0 :     m += km0;
     262           0 :     return m;
     263           0 : }
     264             : //______________________________________________________________________
     265             : Double_t AliITSSimuParam::MobilityHoleSiEmp() const {
     266             :     // Computes the Hole mobility in cm^2/volt-sec. Taken from SILVACO
     267             :     // International ATLAS II, 2D Device Simulation Framework, User Manual
     268             :     // Chapter 5 Equation 5-7 An empirical function for low-field mobiliity
     269             :     // in silicon at different tempeatures.
     270             :     // Inputs:
     271             :     //    none.
     272             :     // Output:
     273             :     //    none.
     274             :     // Return:
     275             :     //    The Mobility of Hole in Si at a give temprature and impurity
     276             :     //    concentration. [cm^2/Volt-sec]
     277             :     const Double_t km0a = 49.74; // cm^2/Volt-sec
     278             :     const Double_t km0b = 49.70; // cm^2/Volt-sec
     279             :     const Double_t km1  = 1.35E+08; // cm^2 (degree K)^2.3 / Volt-sec
     280             :     const Double_t kN0  = 1.606E17; // #/cm^3
     281             :     const Double_t kT0  = 300.; // degree K.
     282             :     const Double_t keT0 = -2.2; // Power of Temp.
     283             :     const Double_t keT1 = -3.7; // Power of Temp.
     284             :     const Double_t keN  = 0.70; // Power of Dopent Consentrations
     285             :     Double_t m;
     286           0 :     Double_t tT = fT,nN = fN;
     287             : 
     288           0 :     if(nN<=0.0){ // Simple case.
     289           0 :         if(tT==300.) return 495.0; // From Table 5-1 at consentration 1.0E14.
     290           0 :         m = km1*TMath::Power(tT,keT0) + km0a-km0b;
     291           0 :         return m;
     292             :     } // if nN<=0.0
     293           0 :     m = km1*TMath::Power(tT,keT0) - km0b;
     294           0 :     m /= 1.0 + TMath::Power(tT/kT0,keT1)*TMath::Power(nN/kN0,keN);
     295           0 :     m += km0a;
     296           0 :     return m;
     297           0 : }
     298             : //______________________________________________________________________
     299             : Double_t AliITSSimuParam::DiffusionCoefficientElectron() const {
     300             :     // Computes the Diffusion coefficient for electrons in cm^2/sec. Taken
     301             :     // from SILVACO International ATLAS II, 2D Device Simulation Framework,
     302             :     // User Manual Chapter 5 Equation 5-53. Einstein relations for diffusion
     303             :     // coefficient. Note: 1 cm^2/sec = 10 microns^2/nanosec.
     304             :     // Inputs:
     305             :     //    none.
     306             :     // Output:
     307             :     //    none.
     308             :     // Return:
     309             :     //    The Diffusion Coefficient of electrons in Si at a give temprature
     310             :     //    and impurity concentration. [cm^2/sec]
     311             :     // const Double_t kb = 1.3806503E-23; // Joules/degree K
     312             :     // const Double_t qe = 1.60217646E-19; // Coulumbs.
     313             :     const Double_t kbqe = 8.617342312E-5; // Volt/degree K
     314           0 :     Double_t m = MobilityElectronSiEmp();
     315           0 :     Double_t tT = fT;
     316             : 
     317           0 :     return m*kbqe*tT;  // [cm^2/sec]
     318             : }
     319             : //______________________________________________________________________
     320             : Double_t AliITSSimuParam::DiffusionCoefficientHole() const {
     321             :     // Computes the Diffusion coefficient for Holes in cm^2/sec. Taken
     322             :     // from SILVACO International ATLAS II, 2D Device Simulation Framework,
     323             :     // User Manual Chapter 5 Equation 5-53. Einstein relations for diffusion
     324             :     // coefficient. Note: 1 cm^2/sec = 10 microns^2/nanosec.
     325             :     // Inputs:
     326             :     //    none.
     327             :     // Output:
     328             :     //    none.
     329             :     // Return:
     330             :     //    The Defusion Coefficient of Hole in Si at a give temprature and
     331             :     //    impurity concentration. [cm^2/sec]
     332             :     //    and impurity concentration. [cm^2/sec]
     333             :     // const Double_t kb = 1.3806503E-23; // Joules/degree K
     334             :     // const Double_t qe = 1.60217646E-19; // Coulumbs.
     335             :     const Double_t kbqe = 8.617342312E-5; // Volt/degree K
     336           0 :     Double_t m = MobilityHoleSiEmp();
     337           0 :     Double_t tT = fT;
     338             : 
     339           0 :     return m*kbqe*tT;  // [cm^2/sec]
     340             : }
     341             : //______________________________________________________________________
     342             : Double_t AliITSSimuParam::LorentzAngleHole(Double_t B) const {
     343             :    // Computes the Lorentz angle for electrons in Si
     344             :    // Input: magnetic Field in KGauss
     345             :    // Output: Lorentz angle in radians (positive if Bz is positive)
     346             :    // Main Reference: NIM A 497 (2003) 389–396.
     347             :    // "An algorithm for calculating the Lorentz angle in silicon detectors", V. Bartsch et al.
     348             :    //
     349             :    const Double_t krH=0.70; // Hall scattering factor for Hole
     350             :    const Double_t kT0  = 300.;       // reference Temperature (degree K).
     351             :    const Double_t kmulow0 = 470.5;   // cm^2/Volt-sec
     352             :    const Double_t keT0 = -2.5;       // Power of Temp.
     353             :    const Double_t beta0 = 1.213;     // beta coeff. at T0=300K
     354             :    const Double_t keT1 = 0.17;       // Power of Temp. for beta
     355             :    const Double_t kvsat0 = 8.37E+06; // saturated velocity at T0=300K (cm/sec)
     356             :    const Double_t keT2 = 0.52;       // Power of Temp. for vsat
     357           8 :    Double_t tT = fT;
     358           4 :    Double_t eE= 1./fDOverV;
     359           4 :    Double_t muLow=kmulow0*TMath::Power(tT/kT0,keT0);
     360           4 :    Double_t beta=beta0*TMath::Power(tT/kT0,keT1);
     361           4 :    Double_t vsat=kvsat0*TMath::Power(tT/kT0,keT2);
     362           4 :    Double_t mu=muLow/TMath::Power(1+TMath::Power(muLow*eE/vsat,beta),1/beta);
     363           4 :    Double_t angle=TMath::ATan(krH*mu*B*1.E-05); // Conversion Factor
     364           4 :    return angle;
     365             : }
     366             : //______________________________________________________________________
     367             : Double_t AliITSSimuParam::LorentzAngleElectron(Double_t B) const {
     368             :    // Computes the Lorentz angle for electrons in Si
     369             :    // Input: magnetic Field in KGauss
     370             :    // Output: Lorentz angle in radians (positive if Bz is positive)
     371             :    // Main Reference: NIM A 497 (2003) 389–396.
     372             :    // "An algorithm for calculating the Lorentz angle in silicon detectors", V. Bartsch et al.
     373             :    //
     374             :    const Double_t krH=1.15; // Hall scattering factor for Electron
     375             :    const Double_t kT0  = 300.;       // reference Temperature (degree K).
     376             :    const Double_t kmulow0 = 1417.0;  // cm^2/Volt-sec
     377             :    const Double_t keT0 = -2.2;       // Power of Temp.
     378             :    const Double_t beta0 = 1.109;     // beta coeff. at T0=300K
     379             :    const Double_t keT1 = 0.66;       // Power of Temp. for beta
     380             :    const Double_t kvsat0 = 1.07E+07; // saturated velocity at T0=300K (cm/sec)
     381             :    const Double_t keT2 = 0.87;       // Power of Temp. for vsat
     382           8 :    Double_t tT = fT;
     383           4 :    Double_t eE= 1./fDOverV;
     384           4 :    Double_t muLow=kmulow0*TMath::Power(tT/kT0,keT0);
     385           4 :    Double_t beta=beta0*TMath::Power(tT/kT0,keT1);
     386           4 :    Double_t vsat=kvsat0*TMath::Power(tT/kT0,keT2);
     387           4 :    Double_t mu=muLow/TMath::Power(1+TMath::Power(muLow*eE/vsat,beta),1/beta);
     388           4 :    Double_t angle=TMath::ATan(krH*mu*B*1.E-05);
     389           4 :    return angle;
     390             : }
     391             : //______________________________________________________________________
     392             : Double_t AliITSSimuParam::SpeedElectron() const {
     393             :     // Computes the average speed for electrons in Si under the low-field
     394             :     // approximation. [cm/sec].
     395             :     // Inputs:
     396             :     //    none.
     397             :     // Output:
     398             :     //    none.
     399             :     // Return:
     400             :     //    The speed the holes are traveling at due to the low field applied.
     401             :     //    [cm/sec]
     402           0 :     Double_t m = MobilityElectronSiEmp();
     403             : 
     404           0 :     return m/fDOverV;  // [cm/sec]
     405             : }
     406             : //______________________________________________________________________
     407             : Double_t AliITSSimuParam::SpeedHole() const {
     408             :     // Computes the average speed for Holes in Si under the low-field
     409             :     // approximation.[cm/sec].
     410             :     // Inputs:
     411             :     //    none.
     412             :     // Output:
     413             :     //    none.
     414             :     // Return:
     415             :     //    The speed the holes are traveling at due to the low field applied.
     416             :     //    [cm/sec]
     417           0 :     Double_t m = MobilityHoleSiEmp();
     418             : 
     419           0 :     return m/fDOverV;  // [cm/sec]
     420             : }
     421             : //______________________________________________________________________
     422             : Double_t AliITSSimuParam::SigmaDiffusion3D(Double_t l) const {
     423             :     // Returns the Gaussian sigma^2 == <x^2+y^2+z^2> [cm^2] due to the
     424             :     // defusion of electrons or holes through a distance l [cm] caused
     425             :     // by an applied voltage v [volt] through a distance d [cm] in any
     426             :     //  material at a temperature T [degree K]. The sigma diffusion when
     427             :     //  expressed in terms of the distance over which the diffusion
     428             :     // occures, l=time/speed, is independent of the mobility and therefore
     429             :     //  the properties of the material. The charge distributions is given by
     430             :     // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <r^2> = 6Dt where D=mkT/e
     431             :     // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
     432             :     // charge. and vel=m*v/d. consiquently sigma^2=6kTdl/ev.
     433             :     // Inputs:
     434             :     //    Double_t l   Distance the charge has to travel.
     435             :     // Output:
     436             :     //    none.
     437             :     // Return:
     438             :     //    The Sigma due to the diffution of electrons. [cm]
     439             :     const Double_t kcon = 5.17040258E-04; // == 6k/e [J/col or volts]
     440             : 
     441           0 :     return TMath::Sqrt(kcon*fT*fDOverV*l);  // [cm]
     442             : }
     443             : //______________________________________________________________________
     444             : Double_t AliITSSimuParam::SigmaDiffusion2D(Double_t l) const {
     445             :     // Returns the Gaussian sigma^2 == <x^2+z^2> [cm^2] due to the defusion
     446             :     // of electrons or holes through a distance l [cm] caused by an applied
     447             :     // voltage v [volt] through a distance d [cm] in any material at a
     448             :     // temperature T [degree K]. The sigma diffusion when expressed in terms
     449             :     // of the distance over which the diffusion occures, l=time/speed, is
     450             :     // independent of the mobility and therefore the properties of the
     451             :     // material. The charge distributions is given by
     452             :     // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <x^2+z^2> = 4Dt where D=mkT/e
     453             :     // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
     454             :     // charge. and vel=m*v/d. consiquently sigma^2=4kTdl/ev.
     455             :     // Inputs:
     456             :     //    Double_t l   Distance the charge has to travel.
     457             :     // Output:
     458             :     //    none.
     459             :     // Return:
     460             :     //    The Sigma due to the diffution of electrons. [cm]
     461             :     const Double_t kcon = 3.446935053E-04; // == 4k/e [J/col or volts]
     462             : 
     463           0 :     return TMath::Sqrt(kcon*fT*fDOverV*l);  // [cm]
     464             : }
     465             : //______________________________________________________________________
     466             : Double_t AliITSSimuParam::SigmaDiffusion1D(Double_t l) const {
     467             :     // Returns the Gaussian sigma^2 == <x^2> [cm^2] due to the defusion
     468             :     // of electrons or holes through a distance l [cm] caused by an applied
     469             :     // voltage v [volt] through a distance d [cm] in any material at a
     470             :     // temperature T [degree K]. The sigma diffusion when expressed in terms
     471             :     // of the distance over which the diffusion occures, l=time/speed, is
     472             :     // independent of the mobility and therefore the properties of the
     473             :     // material. The charge distributions is given by
     474             :     // n = exp(-r^2/4Dt)/(4piDt)^1.5. From this <r^2> = 2Dt where D=mkT/e
     475             :     // (m==mobility, k==Boltzman's constant, T==temparature, e==electric
     476             :     // charge. and vel=m*v/d. consiquently sigma^2=2kTdl/ev.
     477             :     // Inputs:
     478             :     //    Double_t l   Distance the charge has to travel.
     479             :     // Output:
     480             :     //    none.
     481             :     // Return:
     482             :     //    The Sigma due to the diffution of electrons. [cm]
     483             :     const Double_t kcon = 1.723467527E-04; // == 2k/e [J/col or volts]
     484             : 
     485        2360 :     return TMath::Sqrt(kcon*fT*fDOverV*l);  // [cm]
     486             : }
     487             : //----------------------------------------------------------------------
     488             : Double_t AliITSSimuParam::DepletedRegionThicknessA(Double_t dopCons,
     489             :                                                  Double_t voltage,
     490             :                                                  Double_t elecCharge,
     491             :                                                  Double_t voltBuiltIn)const{
     492             :     // Computes the thickness of the depleted region in Si due to the
     493             :     // application of an external bias voltage. From the Particle Data
     494             :     // Book, 28.8 Silicon semiconductor detectors equation 28.19 (2004)
     495             :     // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
     496             :     // July 15 2004, ISSN 0370-2693 page 263. First equation.
     497             :     // Inputs:
     498             :     //    Double_t dopCons           "N" doping concentration
     499             :     //    Double_t voltage           "V" external bias voltage
     500             :     //    Double_t elecCharge        "e" electronic charge
     501             :     //    Double_t voltBuiltIn=0.5   "V_bi" "built-in" Voltage (~0.5V for
     502             :     //                               resistivities typically used in detectors)
     503             :     // Output:
     504             :     //    none.
     505             :     // Return:
     506             :     //    The thickness of the depleted region
     507             : 
     508           0 :     return TMath::Sqrt(2.0*(voltage+voltBuiltIn)/(dopCons*elecCharge));
     509             : }
     510             : //----------------------------------------------------------------------
     511             : Double_t AliITSSimuParam::DepletedRegionThicknessB(Double_t resist,
     512             :                                                  Double_t voltage,
     513             :                                                  Double_t mobility,
     514             :                                                  Double_t voltBuiltIn,
     515             :                                                  Double_t dielConst)const{
     516             :     // Computes the thickness of the depleted region in Si due to the
     517             :     // application of an external bias voltage. From the Particle Data
     518             :     // Book, 28.8 Silicon semiconductor detectors equation 28.19 (2004)
     519             :     // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
     520             :     // July 15 2004, ISSN 0370-2693 page 263. Second Equation.
     521             :     // Inputs:
     522             :     //    Double_t resist            "rho" resistivity (typically 1-10 kOhm cm)
     523             :     //    Double_t voltage           "V" external bias voltage
     524             :     //    Double_t mobility          "mu" charge carrier mobility
     525             :     //                                  (electons 1350, holes 450 cm^2/V/s)
     526             :     //    Double_t voltBuiltIn=0.5   "V_bi" "built-in" Voltage (~0.5V for
     527             :     //                               resistivities typically used in detectors)
     528             :     //    Double_t dielConst=1.E-12  "epsilon" dielectric constant = 11.9 *
     529             :     //                                (permittivity of free space) or ~ 1 pF/cm
     530             :     // Output:
     531             :     //    none.
     532             :     // Return:
     533             :     //    The thickness of the depleted region
     534             : 
     535           0 :     return TMath::Sqrt(2.8*resist*mobility*dielConst*(voltage+voltBuiltIn));
     536             : }
     537             : //----------------------------------------------------------------------
     538             : Double_t AliITSSimuParam::ReverseBiasCurrent(Double_t temp,
     539             :                                             Double_t revBiasCurT1,
     540             :                                             Double_t tempT1,
     541             :                                             Double_t energy)const{
     542             :     // Computes the temperature dependance of the reverse bias current
     543             :     // of Si detectors. From the Particle Data
     544             :     // Book, 28.8 Silicon semiconductor detectors equation 28.21 (2004)
     545             :     // Physics Letters B "Review of Particle Physics" Volume 592, Issue 1-4
     546             :     // July 15 2004, ISSN 0370-2693 page 263.
     547             :     // Inputs:
     548             :     //    Double_t temp         The temperature at which the current is wanted
     549             :     //    Double_t revBiasCurT1 The reference bias current at temp T1
     550             :     //    Double_t tempT1       The temperature correstponding to revBiasCurT1
     551             :     //    Double_t energy=1.2   Some energy [eV]
     552             :     // Output:
     553             :     //    none.
     554             :     // Return:
     555             :     //    The reverse bias current at the tempeature temp.
     556             :     const Double_t kBoltz = 8.617343E-5; //[eV/K]
     557             : 
     558           0 :     return revBiasCurT1*(temp*temp/(tempT1*tempT1))*
     559           0 :         TMath::Exp(-0.5*energy*(tempT1-temp)/(kBoltz*tempT1*temp));
     560             : }
     561             : //______________________________________________________________________
     562             :  void   AliITSSimuParam::SPDThresholds(const Int_t mod, Double_t& thresh, Double_t& sigma) const {
     563             :    // Get SPD threshold values
     564    78667818 :     if(mod<0 || mod>239) {
     565           0 :        thresh=0;
     566           0 :        sigma=0; 
     567           0 :        return;
     568             :      } 
     569    39333909 :      thresh=fSPDThresh[mod];
     570    39333909 :      sigma=fSPDSigma[mod];
     571    39333909 :      return;
     572    39333909 : }
     573             : //_______________________________________________________________________
     574             :  void   AliITSSimuParam::SPDNoise(const Int_t mod,Double_t &noise, Double_t &baseline) const {
     575             :    //Get SPD noise and baseline values
     576           0 :      if(mod<0 || mod>239) {
     577           0 :        noise=0;
     578           0 :        baseline=0; 
     579           0 :        return;
     580             :      } 
     581           0 :      noise=fSPDNoise[mod];
     582           0 :      baseline=fSPDBaseline[mod];
     583           0 :      return;
     584           0 : }
     585             : 

Generated by: LCOV version 1.11