From 7d74eaca1dc9e82865701c94892f5c99bcc60ae2 Mon Sep 17 00:00:00 2001 From: mhorner Date: Thu, 29 Jan 2004 23:45:24 +0000 Subject: [PATCH] putting sampling fraction inside the hit making and updating digitization parameters --- EMCAL/AliEMCALDigitizer.cxx | 11 +++++------ EMCAL/AliEMCALSDigitizer.cxx | 2 +- EMCAL/AliEMCALv1.cxx | 3 +++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/EMCAL/AliEMCALDigitizer.cxx b/EMCAL/AliEMCALDigitizer.cxx index ef3a2bf8cca..88d0e215d3a 100644 --- a/EMCAL/AliEMCALDigitizer.cxx +++ b/EMCAL/AliEMCALDigitizer.cxx @@ -174,7 +174,6 @@ void AliEMCALDigitizer::Digitize(const Int_t event) const AliEMCALGeometry *geom = gime->EMCALGeometry() ; - //Making digits from noise first Int_t nEMC = 0 ; nEMC = geom->GetNPhi()*geom->GetNZ(); //max number of digits possible @@ -331,7 +330,7 @@ Int_t AliEMCALDigitizer::DigitizeEnergy(Float_t energy) Int_t channel = -999; channel = static_cast (TMath::Ceil( (energy + fADCpedestalEC)/fADCchannelEC )) ; if(channel > fNADCEC ) - channel = fNADCEC ; + channel = fNADCEC ; return channel ; } @@ -451,15 +450,15 @@ Bool_t AliEMCALDigitizer::Init() //____________________________________________________________________________ void AliEMCALDigitizer::InitParameters() { - fMeanPhotonElectron = 1250 ; // electrons per GeV - fPinNoise = 0.001 ; // noise equivalent GeV (random choice) + fMeanPhotonElectron = 18200 ; // electrons per GeV + fPinNoise = 0.1 ; // noise equivalent GeV (random choice) if (fPinNoise == 0. ) Warning("InitParameters", "No noise added\n") ; fDigitThreshold = fPinNoise * 3; //2 sigma - fTimeResolution = 0.5e-9 ; + fTimeResolution = 1.0e-9 ; fTimeSignalLength = 1.0e-9 ; - fADCchannelEC = 0.000220; // width of one ADC channel in GeV + fADCchannelEC = 0.00050; // width of one ADC channel in GeV fADCpedestalEC = 0.005 ; // GeV fNADCEC = (Int_t) TMath::Power(2,16) ; // number of channels in Tower ADC diff --git a/EMCAL/AliEMCALSDigitizer.cxx b/EMCAL/AliEMCALSDigitizer.cxx index 2eada312618..d9826e24808 100644 --- a/EMCAL/AliEMCALSDigitizer.cxx +++ b/EMCAL/AliEMCALSDigitizer.cxx @@ -150,7 +150,7 @@ void AliEMCALSDigitizer::InitParameters() printf("InitParameters: Sampling factor set to %f\n", geom->GetSampling()) ; // this threshold corresponds approximately to 100 MeV - fECPrimThreshold = 100E-3 / ( geom->GetSampling() * geom->GetNECLayers()) * geom->GetNECLayers() ; + fECPrimThreshold = 100E-3; } //____________________________________________________________________________ diff --git a/EMCAL/AliEMCALv1.cxx b/EMCAL/AliEMCALv1.cxx index d0fd8e2c4f9..5a9f82b699d 100644 --- a/EMCAL/AliEMCALv1.cxx +++ b/EMCAL/AliEMCALv1.cxx @@ -149,6 +149,9 @@ void AliEMCALv1::StepManager(void){ if( (depositedEnergy = gMC->Edep()) > 0.){// Track is inside a scintillator and deposits some energy + // use sampling fraction to get original energy --HG + depositedEnergy = depositedEnergy * geom->GetSampling(); + gMC->TrackPosition(pos); xyzte[0] = pos[0]; xyzte[1] = pos[1]; -- 2.39.3