From fe93d36585e5e2a8cfad24ee50a15fb6b2b156f7 Mon Sep 17 00:00:00 2001 From: jklay Date: Mon, 14 Apr 2008 19:59:30 +0000 Subject: [PATCH] updating apd and fee parameters --- EMCAL/AliEMCALDigitizer.cxx | 23 ++++++++++------------- EMCAL/AliEMCALRawUtils.cxx | 11 +++++++++-- EMCAL/AliEMCALRawUtils.h | 4 +++- EMCAL/AliEMCALSDigitizer.cxx | 3 +++ 4 files changed, 25 insertions(+), 16 deletions(-) diff --git a/EMCAL/AliEMCALDigitizer.cxx b/EMCAL/AliEMCALDigitizer.cxx index dfe5ea13287..ff290568d56 100644 --- a/EMCAL/AliEMCALDigitizer.cxx +++ b/EMCAL/AliEMCALDigitizer.cxx @@ -241,7 +241,6 @@ void AliEMCALDigitizer::Digitize(Int_t event) // after that adds contributions from SDigits. This design // helps to avoid scanning over the list of digits to add // contribution of any new SDigit. - static int isTrd1Geom = -1; // -1 - mean undefined static int nEMC=0; //max number of digits possible AliRunLoader *rl = AliRunLoader::GetRunLoader(); @@ -266,16 +265,9 @@ void AliEMCALDigitizer::Digitize(Int_t event) else AliFatal("Could not get AliRun from runLoader"); - if(isTrd1Geom < 0) { - AliDebug(1, Form(" get Geometry %s : %s ", geom->GetName(),geom->GetTitle())); - TString ng(geom->GetName()); - isTrd1Geom = 0; - if(ng.Contains("SHISH") && ng.Contains("TRD1")) isTrd1Geom = 1; - - if(isTrd1Geom == 0) nEMC = geom->GetNPhi()*geom->GetNZ(); - else nEMC = geom->GetNCells(); - AliDebug(1,Form("nEMC %i (number cells in EMCAL) | %s | isTrd1Geom %i\n", nEMC, geom->GetName(), isTrd1Geom)); - } + nEMC = geom->GetNCells(); + AliDebug(1,Form("nEMC %i (number cells in EMCAL) | %s \n", nEMC, geom->GetName())); + Int_t absID ; digits->Expand(nEMC) ; @@ -617,9 +609,10 @@ void AliEMCALDigitizer::InitParameters() { // Parameter initialization for digitizer // Tune parameters - 24-nov-04; Apr 29, 2007 + // New parameters JLK 14-Apr-2008 - fMeanPhotonElectron = 3300; // electrons per GeV - fPinNoise = 0.010; // pin noise in GEV from analysis test beam data + fMeanPhotonElectron = 4400; // electrons per GeV + fPinNoise = 0.037; // pin noise in GEV from analysis test beam data if (fPinNoise == 0. ) Warning("InitParameters", "No noise added\n") ; fDigitThreshold = fPinNoise * 3; // 3 * sigma @@ -691,6 +684,7 @@ void AliEMCALDigitizer::MixWith(TString alirunFileName, TString eventFolderName) fInput++ ; } +//__________________________________________________________________ void AliEMCALDigitizer::Print1(Option_t * option) { // 19-nov-04 - just for convinience Print(); @@ -837,12 +831,14 @@ void AliEMCALDigitizer::WriteDigits() } +//__________________________________________________________________ void AliEMCALDigitizer::Browse(TBrowser* b) { if(fHists) b->Add(fHists); TTask::Browse(b); } +//__________________________________________________________________ TList *AliEMCALDigitizer::BookControlHists(int var) { // 22-nov-04 @@ -866,6 +862,7 @@ TList *AliEMCALDigitizer::BookControlHists(int var) return fHists; } +//__________________________________________________________________ void AliEMCALDigitizer::SaveHists(const char* name, Bool_t kSingleKey, const char* opt) { AliEMCALHistoUtilities::SaveListOfHists(fHists, name, kSingleKey, opt); diff --git a/EMCAL/AliEMCALRawUtils.cxx b/EMCAL/AliEMCALRawUtils.cxx index de2633d2ba1..3e19eb56e94 100644 --- a/EMCAL/AliEMCALRawUtils.cxx +++ b/EMCAL/AliEMCALRawUtils.cxx @@ -80,6 +80,8 @@ Double_t AliEMCALRawUtils::fgTimeTrigger = 1.5E-6 ; // 15 time bins ~ 1.5 muse // some digitization constants Int_t AliEMCALRawUtils::fgThreshold = 1; Int_t AliEMCALRawUtils::fgDDLPerSuperModule = 2; // 2 ddls per SuperModule +Int_t AliEMCALRawUtils::fgPedestalValue = 32; // pedestal value for digits2raw +Double_t AliEMCALRawUtils::fgFEENoise = 3.; // 3 ADC channels of noise (sampled) AliEMCALRawUtils::AliEMCALRawUtils() : fHighLowGainFactor(0.), fOrder(0), fTau(0.), fNoiseThreshold(0), @@ -523,7 +525,6 @@ const Double_t dtime, const Double_t damp, Int_t * adcH, Int_t * adcL) const // for a start time dtime and an amplitude damp given by digit, // calculates the raw sampled response AliEMCAL::RawResponseFunction - const Int_t pedVal = 32; Bool_t lowGain = kFALSE ; // A: par[0] // Amplitude = peak value @@ -537,11 +538,17 @@ const Double_t dtime, const Double_t damp, Int_t * adcH, Int_t * adcL) const signalF.SetParameter(1, dtime + fgTimeTrigger) ; signalF.SetParameter(2, fTau) ; signalF.SetParameter(3, fOrder); - signalF.SetParameter(4, pedVal); + signalF.SetParameter(4, fgPedestalValue); for (Int_t iTime = 0; iTime < GetRawFormatTimeBins(); iTime++) { Double_t time = iTime * GetRawFormatTimeBinWidth() ; Double_t signal = signalF.Eval(time) ; + + //According to Terry Awes, 13-Apr-2008 + //add gaussian noise in quadrature to each sample + //Double_t noise = gRandom->Gaus(0.,fgFEENoise); + //signal = sqrt(signal*signal + noise*noise); + adcH[iTime] = static_cast(signal + 0.5) ; if ( adcH[iTime] > fgkRawSignalOverflow ){ // larger than 10 bits adcH[iTime] = fgkRawSignalOverflow ; diff --git a/EMCAL/AliEMCALRawUtils.h b/EMCAL/AliEMCALRawUtils.h index cdca0d0d5b7..156c0a22eef 100644 --- a/EMCAL/AliEMCALRawUtils.h +++ b/EMCAL/AliEMCALRawUtils.h @@ -96,13 +96,15 @@ class AliEMCALRawUtils : public TObject { static Double_t fgTimeBinWidth; // maximum sampled time of the raw RO signal static Int_t fgThreshold; // threshold static Int_t fgDDLPerSuperModule; // number of DDL per SuperModule + static Int_t fgPedestalValue; // pedestal value for Digits2Raw + static Double_t fgFEENoise; // electronics noise in ADC units AliEMCALGeometry* fGeom; //geometry AliAltroMapping* fMapping[2]; //only two for now TString fOption; //! option passed from Reconstructor - ClassDef(AliEMCALRawUtils,2) // utilities for raw signal fitting + ClassDef(AliEMCALRawUtils,3) // utilities for raw signal fitting }; #endif diff --git a/EMCAL/AliEMCALSDigitizer.cxx b/EMCAL/AliEMCALSDigitizer.cxx index 476610b447e..c7b0c17f94f 100644 --- a/EMCAL/AliEMCALSDigitizer.cxx +++ b/EMCAL/AliEMCALSDigitizer.cxx @@ -446,12 +446,14 @@ void AliEMCALSDigitizer::Unload() const rl->UnloadSDigits() ; } +//____________________________________________________________________________ void AliEMCALSDigitizer::Browse(TBrowser* b) { if(fHists) b->Add(fHists); TTask::Browse(b); } +//____________________________________________________________________________ TList *AliEMCALSDigitizer::BookControlHists(int var) { //book histograms for monitoring sdigitization @@ -474,6 +476,7 @@ TList *AliEMCALSDigitizer::BookControlHists(int var) return fHists; } +//____________________________________________________________________________ void AliEMCALSDigitizer::SaveHists(const char* name, Bool_t kSingleKey, const char* opt) { AliEMCALHistoUtilities::SaveListOfHists(fHists, name, kSingleKey, opt); -- 2.39.3