From: prsnko Date: Wed, 7 May 2008 18:57:48 +0000 (+0000) Subject: Possibility of fast simulation of decalibration added X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=167d27809a5f20d1244caaeb57509b5beccb6631;p=u%2Fmrichter%2FAliRoot.git Possibility of fast simulation of decalibration added --- diff --git a/PHOS/AliPHOSDigitizer.cxx b/PHOS/AliPHOSDigitizer.cxx index 292a09e78f9..54a14f9be69 100644 --- a/PHOS/AliPHOSDigitizer.cxx +++ b/PHOS/AliPHOSDigitizer.cxx @@ -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( digits->At(i) ) ; + digit->SetEnergy(gRandom->Gaus(1.,res)*digit->GetEnergy()) ; + } + } + // ticks->Delete() ; // delete ticks ; diff --git a/PHOS/AliPHOSSimParam.cxx b/PHOS/AliPHOSSimParam.cxx index 14ff7afd23b..fc20fa18eb3 100644 --- a/PHOS/AliPHOSSimParam.cxx +++ b/PHOS/AliPHOSSimParam.cxx @@ -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) diff --git a/PHOS/AliPHOSSimParam.h b/PHOS/AliPHOSSimParam.h index 8ed3516cb77..acb80913cd0 100644 --- a/PHOS/AliPHOSSimParam.h +++ b/PHOS/AliPHOSSimParam.h @@ -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