From 64c9816573c47d8ad6157b08ddf3ee5ad3a2bd44 Mon Sep 17 00:00:00 2001 From: gconesab Date: Fri, 11 Jun 2010 13:16:02 +0000 Subject: [PATCH] Cleaned usage of TClonesArrays in the loader In the AliEMCALRecParam::Print, cosmetic changes. Macro AliEMCALSetRecParam.C, update with last parameters for real data reconstruction --- EMCAL/AliEMCALLoader.cxx | 331 +++++++++--------- EMCAL/AliEMCALLoader.h | 121 +++---- EMCAL/AliEMCALRecParam.cxx | 17 +- .../RecParamDB/AliEMCALSetRecParamCDB.C | 27 +- 4 files changed, 241 insertions(+), 255 deletions(-) diff --git a/EMCAL/AliEMCALLoader.cxx b/EMCAL/AliEMCALLoader.cxx index f11037522e0..4ebcd6a5796 100644 --- a/EMCAL/AliEMCALLoader.cxx +++ b/EMCAL/AliEMCALLoader.cxx @@ -16,17 +16,10 @@ /* $Id$ */ //_________________________________________________________________________ -// A singleton. This class should be used in the analysis stage to get -// reconstructed objects: Digits, RecPoints, TrackSegments and RecParticles, -// instead of directly reading them from galice.root file. -// -// MvL Feb 2006: -// The AliEMCALLoader now holds the TClonesArray and TObjArray for reading +// The AliEMCALLoader gets the TClonesArray and TObjArray for reading // Hits, Dgits, SDigits and RecPoints. Filling is managed in the GetEvent() // method. -// -// Creation/writing of files is managed by the relevant parts of the -// reconstruction software (AliEMCALDigitiser etx) +// It also provides acces methods to the calibration and simulation OCDB parameters // //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH) //*-- Completely redesigned by Dmitri Peressounko March 2001 @@ -36,13 +29,14 @@ // //*-- Marco van Leeuwen, Jan 2006: complete revision to simplify reading //*-- and fit better in general ALICE scheme +//*-- GCB: Remove TClonesArrays and TObjArrays data members, they are created elsewhere. +//*-- Provide access to OCDB calibration and simulation parameters. // ////////////////////////////////////////////////////////////////////////////// // --- ROOT system --- #include "TMath.h" #include "TTree.h" - // --- Standard library --- // --- AliRoot header files --- @@ -54,50 +48,35 @@ #include "AliCDBEntry.h" #include "AliEMCALHit.h" -ClassImp(AliEMCALLoader) + ClassImp(AliEMCALLoader) const TString AliEMCALLoader::fgkECARecPointsBranchName("EMCALECARP");//Name for branch with ECA Reconstructed Points +const TString AliEMCALLoader::fgkECADigitsBranchName("DIGITS");//Name for branch with ECA Digits +const TString AliEMCALLoader::fgkECASDigitsBranchName("SDIGITS");//Name for branch with ECA SDigits +const TString AliEMCALLoader::fgkECAHitsBranchName("HITS");//Name for branch with ECA Hits + AliEMCALCalibData* AliEMCALLoader::fgCalibData = 0; //calibration data -AliCaloCalibPedestal* AliEMCALLoader::fgCaloPed = 0; //dead map data +//AliCaloCalibPedestal* AliEMCALLoader::fgCaloPed = 0; //dead map data AliEMCALSimParam* AliEMCALLoader::fgSimParam = 0; //simulation parameters //____________________________________________________________________________ AliEMCALLoader::AliEMCALLoader() - : fDebug(0), - fHits(0), - fDigits(0), - fSDigits(0), - fRecPoints(0) + : fDebug(0) { //Default constructor for EMCAL Loader Class - - fDebug = 0; - fHits = new TClonesArray("AliEMCALHit"); - fDigits = new TClonesArray("AliEMCALDigit"); - fSDigits = new TClonesArray("AliEMCALDigit"); - fRecPoints = new TObjArray(); + } //____________________________________________________________________________ AliEMCALLoader::AliEMCALLoader(const Char_t *detname,const Char_t *eventfoldername) - : AliLoader(detname,eventfoldername), - fDebug(0), - fHits(new TClonesArray("AliEMCALHit")), - fDigits(new TClonesArray("AliEMCALDigit")), - fSDigits(new TClonesArray("AliEMCALDigit")), - fRecPoints(new TObjArray()) + : AliLoader(detname,eventfoldername), fDebug(0) { //Specific constructor for EMCAL Loader class } //____________________________________________________________________________ AliEMCALLoader::AliEMCALLoader(const Char_t *name, TFolder *topfolder) - : AliLoader(name,topfolder), - fDebug(0), - fHits(new TClonesArray("AliEMCALHit")), - fDigits(new TClonesArray("AliEMCALDigit")), - fSDigits(new TClonesArray("AliEMCALDigit")), - fRecPoints(new TObjArray()) + : AliLoader(name,topfolder), fDebug(0) { //Specific constructor for EMCAL Loader class } @@ -114,13 +93,6 @@ AliEMCALLoader::~AliEMCALLoader() TreeS()->SetBranchAddress(fDetectorName,0); if (TreeR()) TreeR()->SetBranchAddress(fgkECARecPointsBranchName,0); - if (fHits) { - fHits->Delete(); - delete fHits; - } - delete fDigits; - delete fSDigits; - delete fRecPoints; } //____________________________________________________________________________ @@ -128,7 +100,7 @@ AliEMCALCalibData* AliEMCALLoader::CalibData() { // Check if the instance of AliEMCALCalibData exists, if not, create it if // the OCDB is available, and finally return it. - + if(!fgCalibData && (AliCDBManager::Instance()->IsDefaultStorageSet())) { AliCDBEntry *entry = (AliCDBEntry*) @@ -144,73 +116,44 @@ AliEMCALCalibData* AliEMCALLoader::CalibData() } //____________________________________________________________________________ -AliCaloCalibPedestal* AliEMCALLoader::PedestalData() -{ - // Check if the instance of AliCaloCalibPedestal exists, if not, create it if - // the OCDB is available, and finally return it. - - if(!fgCaloPed && (AliCDBManager::Instance()->IsDefaultStorageSet())) - { - AliCDBEntry *entry = (AliCDBEntry*) - AliCDBManager::Instance()->Get("EMCAL/Calib/Pedestals"); - if (entry) fgCaloPed = (AliCaloCalibPedestal*) entry->GetObject(); - } - - if(!fgCaloPed) - AliFatal("Pedestal info not found in CDB!"); - - return fgCaloPed; - -} +//AliCaloCalibPedestal* AliEMCALLoader::PedestalData() +//{ +// // Check if the instance of AliCaloCalibPedestal exists, if not, create it if +// // the OCDB is available, and finally return it. +// +// if(!fgCaloPed && (AliCDBManager::Instance()->IsDefaultStorageSet())) +// { +// AliCDBEntry *entry = (AliCDBEntry*) +// AliCDBManager::Instance()->Get("EMCAL/Calib/Pedestals"); +// if (entry) fgCaloPed = (AliCaloCalibPedestal*) entry->GetObject(); +// } +// +// if(!fgCaloPed) +// AliFatal("Pedestal info not found in CDB!"); +// +// return fgCaloPed; +// +//} //____________________________________________________________________________ AliEMCALSimParam* AliEMCALLoader::SimulationParameters() { - // Check if the instance of AliEMCALSimParam exists, if not, create it if - // the OCDB is available, and finally return it. - - if(!fgSimParam && (AliCDBManager::Instance()->IsDefaultStorageSet())) + // Check if the instance of AliEMCALSimParam exists, if not, create it if + // the OCDB is available, and finally return it. + + if(!fgSimParam && (AliCDBManager::Instance()->IsDefaultStorageSet())) { - AliCDBEntry *entry = (AliCDBEntry*) - AliCDBManager::Instance()->Get("EMCAL/Calib/SimParam"); - if (entry) fgSimParam = (AliEMCALSimParam*) entry->GetObject(); - + AliCDBEntry *entry = (AliCDBEntry*) + AliCDBManager::Instance()->Get("EMCAL/Calib/SimParam"); + if (entry) fgSimParam = (AliEMCALSimParam*) entry->GetObject(); + } - - if(!fgSimParam) - AliFatal("Simulations parameters not found in CDB!"); - - return fgSimParam; - -} - -//____________________________________________________________________________ -Int_t AliEMCALLoader::CalibrateRaw(Double_t energy, Int_t module, - Int_t column, Int_t row) -{ - // Convert energy into digitized amplitude for a cell relId - // It is a user responsilibity to open CDB and set - // AliEMCALCalibData object by the following operators: - // - // AliCDBLocal *loc = new AliCDBLocal("deCalibDB"); - // AliEMCALCalibData* clb = (AliEMCALCalibData*)AliCDBStorage::Instance() - // ->Get(path_to_calibdata,run_number); - // AliEMCALGetter* gime = AliEMCALGetter::Instance("galice.root"); - // gime->SetCalibData(clb); - - if (CalibData() == 0) - Warning("CalibrateRaw","Calibration DB is not initiated!"); - - Float_t gainFactor = 0.00305;//0.0015; // width of one ADC channel in GeV - Float_t pedestal = 0.009;//0.005; // pedestals - - if(CalibData()) { - gainFactor = CalibData()->GetADCchannel (module,column,row); - pedestal = CalibData()->GetADCpedestal(module,column,row); - } - Int_t amp = static_cast( (energy - pedestal) / gainFactor + 0.5 ) ; - return amp; + if(!fgSimParam) + AliFatal("Simulations parameters not found in CDB!"); + + return fgSimParam; + } //____________________________________________________________________________ @@ -219,75 +162,123 @@ Int_t AliEMCALLoader::GetEvent() //Method to load all of the data //members of the EMCAL for a given //event from the Trees - + AliLoader::GetEvent(); // First call AliLoader to do all the groundwork - // Now connect and fill TClonesArray - - // Hits - TTree *treeH = TreeH(); - - if (treeH) { - Int_t nEnt = treeH->GetEntries(); // TreeH has array of hits for every primary - fHits->Clear(); - Int_t index = 0; - TClonesArray *tempArr = 0x0; - TBranch * branchH = treeH->GetBranch(fDetectorName); - branchH->SetAddress(&tempArr); - for (Int_t iEnt = 0; iEnt < nEnt; iEnt++) { - //treeH->GetEntry(iEnt); - branchH->GetEntry(iEnt); - Int_t nHit = tempArr->GetEntriesFast(); - for (Int_t iHit = 0; iHit < nHit; iHit++) { - new ((*fHits)[index]) AliEMCALHit(*((AliEMCALHit*)tempArr->At(iHit))); - index++; - } - } - branchH->ResetAddress(); - if (tempArr) { - tempArr->Delete(); - delete tempArr; - } - } + // *** Hits *** + // Initialize the Hits TClonesArray, only if it did not existed before + MakeHitsArray(); + + TTree *treeH = TreeH(); + if (treeH) { + Int_t nEnt = treeH->GetEntries(); // TreeH has array of hits for every primary + Int_t index = 0; + TClonesArray *tempArr = 0x0; + TBranch * branchH = treeH->GetBranch(fDetectorName); + branchH->SetAddress(&tempArr); + TClonesArray* hits = const_cast(this)->Hits(); + if (hits) hits->Clear(); + for (Int_t iEnt = 0; iEnt < nEnt; iEnt++) { + branchH->GetEntry(iEnt); + Int_t nHit = tempArr->GetEntriesFast(); + for (Int_t iHit = 0; iHit < nHit; iHit++) { + new ((*hits)[index]) AliEMCALHit(*((AliEMCALHit*)tempArr->At(iHit))); + index++; + } + } + branchH->ResetAddress(); + if (tempArr) { + tempArr->Delete(); + delete tempArr; + } + } + + // *** SDigits *** + // Initialize the SDigits TClonesArray, only if it did not existed before + MakeSDigitsArray(); + + TTree *treeS = TreeS(); + if (treeS) { + TBranch * branchS = treeS->GetBranch(fDetectorName); + + // Reset SDigits array and branch + branchS->ResetAddress(); + TClonesArray* sdigits = const_cast(this)->SDigits(); + if (sdigits) sdigits->Clear(); + + branchS->SetAddress(&sdigits); + branchS->GetEntry(0); + } + + // *** Digits *** + // Initialize the Digits TClonesArray, only if it did not existed before + MakeDigitsArray(); + + TTree *treeD = TreeD(); + if (treeD) { + TBranch * branchD = treeD->GetBranch(fDetectorName); + + // Reset Digits array and branch + branchD->ResetAddress(); + TClonesArray* digits = const_cast(this)->Digits(); + if (digits) digits->Clear(); + + branchD->SetAddress(&digits); + branchD->GetEntry(0); + } + + // *** RecPoints *** + // Initialize the RecPoints TObjArray, only if it did not existed before + MakeRecPointsArray(); - // SDigits - TTree *treeS = TreeS(); - if (treeS) { - TBranch * branchS = treeS->GetBranch(fDetectorName); - branchS->ResetAddress(); - if (fSDigits) { - fSDigits->Clear(); - } - branchS->SetAddress(&fSDigits); - branchS->GetEntry(0); - //treeS->GetEvent(0); - } - - // Digits - TTree *treeD = TreeD(); - if (treeD) { - TBranch * branchD = treeD->GetBranch(fDetectorName); - branchD->ResetAddress(); - if (fDigits) { - fDigits->Clear(); - } - branchD->SetAddress(&fDigits); - branchD->GetEntry(0); - //treeD->GetEvent(0); - } + TTree *treeR = TreeR(); + if (treeR) { + TBranch * branchR = treeR->GetBranch(fgkECARecPointsBranchName); + + // Reset RecPoints array and branch + branchR->ResetAddress(); + TObjArray* rp = const_cast(this)->RecPoints(); + if (rp) rp->Clear(); + + branchR->SetAddress(&rp); + branchR->GetEntry(0); + } + + return 0; +} - // RecPoints - TTree *treeR = TreeR(); - if (treeR) { - TBranch * branchR = treeR->GetBranch(fgkECARecPointsBranchName); - branchR->ResetAddress(); - if (fRecPoints) { - fRecPoints->Clear(); - } - branchR->SetAddress(&fRecPoints); - //treeR->GetEvent(0); - branchR->GetEntry(0); - } - - return 0; +//____________________________________________________________________________ +void AliEMCALLoader::MakeHitsArray(){ + // Add Hits array to the data folder + if (Hits()) return; + TClonesArray* hits = new TClonesArray("AliEMCALHit",0); + hits->SetName(fgkECAHitsBranchName); + GetDetectorDataFolder()->Add(hits); +} + +//____________________________________________________________________________ +void AliEMCALLoader::MakeSDigitsArray(){ + // Add SDigits array to the data folder + if (SDigits()) return; + TClonesArray* sdigits = new TClonesArray("AliEMCALDigit",0); + sdigits->SetName(fgkECASDigitsBranchName); + GetDetectorDataFolder()->Add(sdigits); +} + +//____________________________________________________________________________ +void AliEMCALLoader::MakeDigitsArray(){ + // Add Digits array to the data folder + if (Digits()) return; + TClonesArray* digits = new TClonesArray("AliEMCALDigit",0); + digits->SetName(fgkECADigitsBranchName); + GetDetectorDataFolder()->Add(digits); +} + +//____________________________________________________________________________ +void AliEMCALLoader::MakeRecPointsArray(){ + // Add RecPoints array to the data folder + if (RecPoints()) return; + TObjArray* rp = new TObjArray(0); + rp->SetName(fgkECARecPointsBranchName); + GetDetectorDataFolder()->Add(rp); } diff --git a/EMCAL/AliEMCALLoader.h b/EMCAL/AliEMCALLoader.h index 9f9e0a4254a..9f0ae431027 100644 --- a/EMCAL/AliEMCALLoader.h +++ b/EMCAL/AliEMCALLoader.h @@ -6,12 +6,13 @@ /* $Id$ */ //_________________________________________________________________________ -// A singleton that returns various objects -// Should be used on the analysis stage to avoid confusing between different -// branches of reconstruction tree: e.g. reading RecPoints and TS made from -// another set of RecPoints. -// -// The objects are retrived from folders. +// The AliEMCALLoader gets the TClonesArray and TObjArray for reading +// Hits, Dgits, SDigits and RecPoints. Filling is managed in the GetEvent() +// method. The objects are retrived from the corresponding folders. +// +// It also provides acces methods to the calibration and simulation OCDB parameters +// + //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH) // @@ -27,7 +28,7 @@ class TTask ; // --- AliRoot header files --- #include "AliLoader.h" #include "AliEMCALCalibData.h" -#include "AliCaloCalibPedestal.h" +//#include "AliCaloCalibPedestal.h" #include "AliEMCALSimParam.h" class AliLoader ; @@ -49,93 +50,77 @@ class AliEMCALLoader : public AliLoader { virtual Int_t GetEvent(); // Overload to fill TClonesArray - virtual void CleanHits() const - { if (fHits) fHits->Clear(); AliLoader::CleanHits(); } - virtual void CleanSDigits() const - { if (fSDigits) fSDigits->Clear(); AliLoader::CleanSDigits(); } - virtual void CleanDigits() const - { if (fDigits) fDigits->Clear(); AliLoader::CleanDigits(); } - virtual void CleanRecPoints() const - { if (fRecPoints) fRecPoints->Clear(); AliLoader::CleanRecPoints(); } - - // This does not work due to const - /* - virtual void MakeHitsContainer() const { AliLoader::MakeHitsContainer(); TreeH()->Branch(fDetectorName,"TClonesArray",&fHits); } - virtual void MakeSDigitsContainer() const { AliLoader::MakeSDigitsContainer(); TreeS()->SetBranchAddress(fDetectorName,&fSDigits); } - virtual void MakeDigitsContainer() const { AliLoader::MakeDigitsContainer(); TreeD()->SetBranchAddress(fDetectorName,&fDigits); } - virtual void MakeRecPointsContainer() const { AliLoader::MakeRecPointsContainer(); TreeR()->SetBranchAddress(fgkECARecPointsBranchName,&fRecPoints); } - */ - + //Clean arrays methods + virtual void CleanHits() const {GetHitsDataLoader()->Clean();} + virtual void CleanSDigits() const {GetSDigitsDataLoader()->Clean();} + virtual void CleanDigits() const {GetDigitsDataLoader()->Clean();} + virtual void CleanRecPoints() const {GetRecPointsDataLoader()->Clean();} + + // Initialize arrays methods + void MakeSDigitsArray() ; + void MakeHitsArray() ; + void MakeDigitsArray() ; + void MakeRecPointsArray() ; + // ************ TClonesArrays Access functions - - TClonesArray* Hits(void) const { return fHits;} - + + TClonesArray* Hits(void) {return (TClonesArray*)GetDetectorData(fgkECAHitsBranchName);} //{ return fHits;} const AliEMCALHit* Hit(Int_t index) { - if (fHits) - return (const AliEMCALHit*) fHits->At(index); + if (Hits()) return (const AliEMCALHit*) Hits()->At(index); return 0x0; } - - TClonesArray* SDigits() const { return fSDigits;} + + TClonesArray* SDigits() {return (TClonesArray*)GetDetectorData(fgkECASDigitsBranchName);} //const { return fSDigits;} const AliEMCALDigit* SDigit(Int_t index) { - if (fSDigits) - return (const AliEMCALDigit*) fSDigits->At(index); + if (SDigits())return (const AliEMCALDigit*) SDigits()->At(index); return 0x0; } - - TClonesArray* Digits() const { return fDigits;} + + TClonesArray* Digits() {return (TClonesArray*)GetDetectorData(fgkECADigitsBranchName);}//const { return fDigits;} const AliEMCALDigit * Digit(Int_t index) { - if (fDigits) - return (const AliEMCALDigit*) fDigits->At(index); + if (Digits()) return (const AliEMCALDigit*) Digits()->At(index); return 0x0; } - - TObjArray * RecPoints() const { return fRecPoints;} + + TObjArray * RecPoints() {return (TObjArray*)GetDetectorData(fgkECARecPointsBranchName);}//const { return fRecPoints;} const AliEMCALRecPoint * RecPoint(Int_t index) { - if (fRecPoints) - return (const AliEMCALRecPoint*) fRecPoints->At(index); + if (RecPoints())return (const AliEMCALRecPoint*) RecPoints()->At(index); return 0x0; } - + void SetDebug(Int_t level) {fDebug = level;} // Set debug level - - //Calibration - Int_t CalibrateRaw (Double_t energy, Int_t module, Int_t column, Int_t row);//take real calibration coefficients - + + //OCDB access methods + void SetCalibData(AliEMCALCalibData* calibda) { fgCalibData = calibda; } AliEMCALCalibData * CalibData(); // to get the calibration CDB object - - void SetPedestalData(AliCaloCalibPedestal* caloped) { fgCaloPed = caloped; } - AliCaloCalibPedestal* PedestalData(); // to get the pedestal CDB object - + + // void SetPedestalData(AliCaloCalibPedestal* caloped) { fgCaloPed = caloped; } + // AliCaloCalibPedestal* PedestalData(); // to get the pedestal CDB object + void SetSimParam(AliEMCALSimParam* simparam) { fgSimParam = simparam; } AliEMCALSimParam* SimulationParameters(); // to get the simulation parameter CDB object - - -private: - + + + private: + // assignement operator requested by coding convention, but not needed AliEMCALLoader(const AliEMCALLoader &); //Not implemented const AliEMCALLoader & operator = (const AliEMCALLoader &); //Not implemented - + + static const TString fgkECAHitsBranchName; //! Name of branch with ECA Hits + static const TString fgkECASDigitsBranchName; //! Name of branch with ECA SDigits + static const TString fgkECADigitsBranchName; //! Name of branch with ECA Digits static const TString fgkECARecPointsBranchName; //! Name of branch with ECA Reconstructed Points - + Int_t fDebug ; // Debug level - - // All data are stored in TTrees on file. - // These TCLonesArrays are temporary storage for reading or writing - // (connected to TTrees with SetBranchAddress) - TClonesArray *fHits; //! TClonesArray of hits (for tree reading) - TClonesArray *fDigits; //! TClonesArray of digits (for tree reading) - TClonesArray *fSDigits; //! TClonesArray of sdigits (for tree reading) - TObjArray *fRecPoints; //! TClonesArray of recpoints (for tree reading) static AliEMCALCalibData * fgCalibData; // calibration data - static AliCaloCalibPedestal * fgCaloPed; // dead map + // static AliCaloCalibPedestal * fgCaloPed; // dead map static AliEMCALSimParam * fgSimParam; // sim param - - ClassDef(AliEMCALLoader,4) // Algorithm class that provides methods to retrieve objects from a list knowing the index - + + ClassDef(AliEMCALLoader,5) // Algorithm class that provides methods to retrieve objects from a list knowing the index + }; #endif // AliEMCALLOADER_H diff --git a/EMCAL/AliEMCALRecParam.cxx b/EMCAL/AliEMCALRecParam.cxx index ce632feea40..a758e5aec49 100644 --- a/EMCAL/AliEMCALRecParam.cxx +++ b/EMCAL/AliEMCALRecParam.cxx @@ -151,15 +151,12 @@ AliEMCALRecParam::AliEMCALRecParam() : fHadron[1][3] = -2.368500e-03; fHadron[1][4] = 0.; - fHadron[2][0] = 0.; fHadron[2][1] = -2.463152e-02; fHadron[2][2] = 1.349257e-01; fHadron[2][3] = -1.089440e-03; fHadron[2][4] = 0.; - - fHadron[3][0] = 0.; fHadron[3][1] = 5.101560e-01; fHadron[3][2] = 1.458679e-01; @@ -226,8 +223,6 @@ AliEMCALRecParam::AliEMCALRecParam() : } - - //----------------------------------------------------------------------------- AliEMCALRecParam::AliEMCALRecParam(const AliEMCALRecParam& rp) : AliDetectorRecoParam(), @@ -289,9 +284,9 @@ AliEMCALRecParam& AliEMCALRecParam::operator = (const AliEMCALRecParam& rp) fMinECut = rp.fMinECut; fUnfold = rp.fUnfold; fLocMaxCut = rp.fLocMaxCut; - fTimeCut = rp.fTimeCut; - fTimeMax = rp.fTimeMax; - fTimeMin = rp.fTimeMin;//clustering + fTimeCut = rp.fTimeCut; + fTimeMax = rp.fTimeMax; + fTimeMin = rp.fTimeMin;//clustering fTrkCutX = rp.fTrkCutX; fTrkCutY = rp.fTrkCutY; fTrkCutZ = rp.fTrkCutZ; @@ -309,7 +304,7 @@ AliEMCALRecParam& AliEMCALRecParam::operator = (const AliEMCALRecParam& rp) fRemoveBadChannels = rp.fRemoveBadChannels; fFittingAlgorithm = rp.fFittingAlgorithm; fUseFALTRO = rp.fUseFALTRO; - fFitLEDEvents = rp.fFitLEDEvents;//raw signal + fFitLEDEvents = rp.fFitLEDEvents;//raw signal //PID values Int_t i, j; @@ -600,8 +595,8 @@ void AliEMCALRecParam::Print(Option_t * opt) const if(!strcmp("",opt) || !strcmp("raw",opt)){ AliInfo(Form("Raw signal parameters: \n gain factor=%f, order=%d, tau=%f, noise threshold=%d, nped samples=%d \n", fHighLowGainFactor,fOrderParameter,fTau,fNoiseThreshold,fNPedSamples)); - AliInfo(Form("Raw signal: with bad channels? %d, \n \t with fitting algorithm %d, \n \t Use FALTRO %d \n", - fRemoveBadChannels, fFittingAlgorithm, fUseFALTRO)); + AliInfo(Form("Raw signal: remove bad channels? %d, \n \t with fitting algorithm %d, \n \t Use FALTRO %d, Fit LED events %d \n", + fRemoveBadChannels, fFittingAlgorithm, fUseFALTRO, fFitLEDEvents)); } } diff --git a/EMCAL/macros/RecParamDB/AliEMCALSetRecParamCDB.C b/EMCAL/macros/RecParamDB/AliEMCALSetRecParamCDB.C index 9c3eeeab035..c7145dfb9a4 100644 --- a/EMCAL/macros/RecParamDB/AliEMCALSetRecParamCDB.C +++ b/EMCAL/macros/RecParamDB/AliEMCALSetRecParamCDB.C @@ -139,8 +139,8 @@ AliEMCALRecParam* GetHighMultiplicityParameters() //params->SetTimeMin(5e-9);//100 ns //params->SetTimeMax(50e-9);//100 ns //Real Data - params->SetTimeMin(550e-9);//100 ns - params->SetTimeMax(750e-9);//100 ns + params->SetTimeMin(525e-9);//100 ns + params->SetTimeMax(725e-9);//100 ns //Track matching params->SetTrkCutX(6.0); @@ -294,7 +294,11 @@ AliEMCALRecParam* GetHighMultiplicityParameters() params->SetTau(2.35); params->SetNoiseThreshold(3); params->SetNPedSamples(5); - + params->SetRemoveBadChannels(kTRUE); + params->SetFittingAlgorithm(AliEMCALRawUtils::kStandard); + params->SetFALTROUsage(kTRUE); + params->SetLEDFit(kFALSE); + return params ; } @@ -313,8 +317,8 @@ AliEMCALRecParam* GetLowMultiplicityParameters() //params->SetTimeMin(5e-9);//100 ns //params->SetTimeMax(50e-9);//100 ns //Real Data - params->SetTimeMin(550e-9);//100 ns - params->SetTimeMax(750e-9);//100 ns + params->SetTimeMin(525e-9);//100 ns + params->SetTimeMax(725e-9);//100 ns //PID parameters for pp implemented // as a first step, all array elements are initialized to 0.0 @@ -452,7 +456,18 @@ AliEMCALRecParam* GetLowMultiplicityParameters() params->SetHadronEnergyProb(2, 2.956727e-01); params->SetHadronEnergyProb(3, -3.051022e+01); params->SetHadronEnergyProb(4, -6.036931e-02); - + + // raw signal fitting + params->SetHighLowGainFactor(16.); + params->SetOrderParameter(2); + params->SetTau(2.35); + params->SetNoiseThreshold(3); + params->SetNPedSamples(5); + params->SetRemoveBadChannels(kTRUE); + params->SetFittingAlgorithm(AliEMCALRawUtils::kStandard); + params->SetFALTROUsage(kTRUE); + params->SetLEDFit(kFALSE); + return params; } -- 2.43.0