]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Possibility of fast simulation of decalibration added
authorprsnko <prsnko@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 May 2008 18:57:48 +0000 (18:57 +0000)
committerprsnko <prsnko@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 May 2008 18:57:48 +0000 (18:57 +0000)
PHOS/AliPHOSDigitizer.cxx
PHOS/AliPHOSSimParam.cxx
PHOS/AliPHOSSimParam.h

index 292a09e78f9d7c966d5b15926521936aba29952f..54a14f9be694de54934ffa22d1f4daa314f0aa5a 100644 (file)
@@ -495,6 +495,15 @@ void AliPHOSDigitizer::Digitize(Int_t event)
     } 
   }
 
+  //Apply Fast decalibration if necessary
+  if(AliPHOSSimParam::GetInstance()->GetFastDecalibration()>0.){
+    Float_t res=AliPHOSSimParam::GetInstance()->GetFastDecalibration() ;
+    for(Int_t i = 0 ; i < nEMC ; i++){
+      digit = dynamic_cast<AliPHOSDigit*>( digits->At(i) ) ;
+      digit->SetEnergy(gRandom->Gaus(1.,res)*digit->GetEnergy()) ;
+    }
+  }
   
 //  ticks->Delete() ;
 //  delete ticks ;
index 14ff7afd23bce2906cce9912cf02aef9c360b8d3..fc20fa18eb3b65c20842c520116822240c9d0fb4 100644 (file)
@@ -31,6 +31,7 @@ AliPHOSSimParam::AliPHOSSimParam() :
   fLightFactor(0.),fAPDFactor(0.),         
   fAPDNoise(0.),fEMCDigitThreshold(0.),
   fEMCADCchannel(0.),fTOFa(0.),fTOFb(0.),
+  fFastDecalibration(0.),
   fADCpedestalCpv(0.),fADCchanelCpv(0.),
   fCPVNoise(0.),fCPVDigitThreshold(0.),fNADCcpv(0),
   fDigitizeE(0)
@@ -46,6 +47,7 @@ AliPHOSSimParam::AliPHOSSimParam(Int_t) :
   fLightFactor(0.),fAPDFactor(0.),         
   fAPDNoise(0.),fEMCDigitThreshold(0.),
   fEMCADCchannel(0.),fTOFa(0.),fTOFb(0.),
+  fFastDecalibration(0.),
   fADCpedestalCpv(0.),fADCchanelCpv(0.),
   fCPVNoise(0.),fCPVDigitThreshold(0.),fNADCcpv(0),
   fDigitizeE(0)
@@ -82,6 +84,8 @@ AliPHOSSimParam::AliPHOSSimParam(Int_t) :
   fTOFa               = 0.5e-9 ; // [sec] constant term
   fTOFb               = 1.e-9 ;  // [sec/sqrt(GeV)]] stohastic term
 
+  fFastDecalibration = 0. ; //Relative decalibration. By default there is no decalibration
+
   fADCpedestalCpv     = 0.012 ;  // [aux units]
   fADCchanelCpv       = 0.0012;  // [aux units]    
   fCPVNoise           = 0.01;    // [aux units]
@@ -102,6 +106,7 @@ AliPHOSSimParam::AliPHOSSimParam(const AliPHOSSimParam& ):
   fLightFactor(0.),fAPDFactor(0.),         
   fAPDNoise(0.),fEMCDigitThreshold(0.),
   fEMCADCchannel(0.),fTOFa(0.),fTOFb(0.),
+  fFastDecalibration(0.),
   fADCpedestalCpv(0.),fADCchanelCpv(0.),
   fCPVNoise(0.),fCPVDigitThreshold(0.),fNADCcpv(0),
   fDigitizeE(0)
index 8ed3516cb77fe07aaf02a5fded200f586b911b0c..acb80913cd06406cbc59c7825696b871e13f5330 100644 (file)
@@ -50,6 +50,10 @@ public:
   Float_t GetTOFb()const{return fTOFb ;}  //stohastic term
   void SetTOFparameters(Float_t a=0.5e-9, Float_t b=1.5e-9){fTOFa=a; fTOFb=b; }
 
+  //Parameter to simulate (random) decalibration
+  Float_t GetFastDecalibration(void)const {return fFastDecalibration;}
+  void SetFastDecalibration(Float_t res=0.01) { fFastDecalibration=res;}
+
   //Parameters for CPV noise and digitization  [see AliPHOSDigitizer for details] 
   Float_t GetCPVNoise() const {return fCPVNoise ;}           //RMS of CPV noise in
   void SetCPVNoise(Float_t noise=0.01){ fCPVNoise = noise ;} //CPV popugais
@@ -89,6 +93,7 @@ private:
   Float_t fEMCADCchannel ;      //width of ADC channel in GeV
   Float_t fTOFa  ;              //constant term of TOF resolution 
   Float_t fTOFb  ;              //stohastic term of TOF resolution 
+  Float_t fFastDecalibration;   //Parameter to describe decalibration
 
   //CPV parameters
   Float_t fADCpedestalCpv ;    //Pedestal value