From 7a9e557b6fc7e854bdc36e5b55f6a15a12d22b02 Mon Sep 17 00:00:00 2001 From: marian Date: Sat, 15 Dec 2007 16:32:23 +0000 Subject: [PATCH] Adding possibility to get the Reconstruction parameters from OCDB (Marian) Just temporary fix The reconstruction parameters are used in the AliTPCclustererMI and AliTPCtrackerMI They are retrieved: 0. User speciefied it in reconstruction macro 1. if (not 0) from OCDB - AliTPCcalibDB::GetRecoParam(eventtype) 2. if (not 0 or 1) default parameter - High flux enevironment used FIXME: In the future reconstruction parameters should be changed on event basis But for the moment, event types are still not defined --- TPC/AliTPCRecoParam.cxx | 16 +++++++++++++++- TPC/AliTPCReconstructor.cxx | 16 ++++++++++++++-- TPC/AliTPCcalibDB.cxx | 22 ++++++++++++++++++++++ TPC/AliTPCcalibDB.h | 3 +++ 4 files changed, 54 insertions(+), 3 deletions(-) diff --git a/TPC/AliTPCRecoParam.cxx b/TPC/AliTPCRecoParam.cxx index c466931f85f..568ef1f8f8a 100644 --- a/TPC/AliTPCRecoParam.cxx +++ b/TPC/AliTPCRecoParam.cxx @@ -18,7 +18,21 @@ // // // Class with TPC reconstruction parameters // // // -// // +// +/* + The reconstruction parameters are used in the AliTPCclustererMI and AliTPCtrackerMI + + They are retrieved: + 0. User speciefied it in reconstruction macro + 1. if (not 0) from OCDB - AliTPCcalibDB::GetRecoParam(eventtype) + 2. if (not 0 or 1) default parameter - High flux enevironment used + + FIXME: + In the future reconstruction parameters should be changed on event basis + But for the moment, event types are still not defined + +*/ + // /////////////////////////////////////////////////////////////////////////////// diff --git a/TPC/AliTPCReconstructor.cxx b/TPC/AliTPCReconstructor.cxx index 7add769d122..6d2df08e834 100644 --- a/TPC/AliTPCReconstructor.cxx +++ b/TPC/AliTPCReconstructor.cxx @@ -47,9 +47,21 @@ fClusterer(NULL) // // default constructor // + // + // if (!fgkRecoParam) { - AliError("The Reconstruction parameters nonitialized - Used default one"); - fgkRecoParam = AliTPCRecoParam::GetHighFluxParam(); + // + // 1. try to get reco parameters from OCDB + // + fgkRecoParam = AliTPCcalibDB::Instance()->GetRecoParam(0); + AliInfo("Reconstruction parameters from OCDB used"); + // + // 2. If not initialized take default + // + if (!fgkRecoParam){ + fgkRecoParam = AliTPCRecoParam::GetHighFluxParam(); + AliError("Default reconstruction parameters used"); + } } AliTPCParam* param = GetTPCParam(); diff --git a/TPC/AliTPCcalibDB.cxx b/TPC/AliTPCcalibDB.cxx index eef7cb91f89..da96eb34ce6 100644 --- a/TPC/AliTPCcalibDB.cxx +++ b/TPC/AliTPCcalibDB.cxx @@ -164,6 +164,7 @@ AliTPCcalibDB::AliTPCcalibDB(): fPedestals(0), fTemperature(0), fMapping(0), + fRecoParamArray(0), fParam(0), fClusterParam(0) { @@ -265,6 +266,14 @@ void AliTPCcalibDB::Update(){ fTemperature = (AliTPCSensorTempArray*)entry->GetObject(); } + + entry = GetCDBEntry("TPC/Calib/RecoParam"); + if (entry){ + entry->SetOwner(kTRUE); + fRecoParamArray = (TObjArray*)(entry->GetObject()); + } + + entry = GetCDBEntry("TPC/Calib/Parameters"); if (entry){ //if (fPadNoise) delete fPadNoise; @@ -629,3 +638,16 @@ void AliTPCcalibDB::MakeTree(const char * fileName, TObjArray * array, const cha } } + +AliTPCRecoParam * AliTPCcalibDB::GetRecoParam(Int_t */*eventtype*/){ + // + // + // + if (!fRecoParamArray){ + return 0; // back compatible sollution + }; + + AliTPCRecoParam * param = (AliTPCRecoParam*)fRecoParamArray->At(0); + return param; + +} diff --git a/TPC/AliTPCcalibDB.h b/TPC/AliTPCcalibDB.h index c960e0e83e9..4d0aae695f5 100644 --- a/TPC/AliTPCcalibDB.h +++ b/TPC/AliTPCcalibDB.h @@ -20,6 +20,7 @@ class AliCDBEntry; class AliTPCParam; class AliTPCAltroMapping; class AliTPCClusterParam; +class AliTPCRecoParam; //class AliCDBStorage; class AliTPCcalibDB : public TObject @@ -41,6 +42,7 @@ class AliTPCcalibDB : public TObject AliTPCParam* GetParameters(){return fParam;} AliTPCAltroMapping ** GetMapping(){ return fMapping;} AliTPCClusterParam *GetClusterParam(){ return fClusterParam;} + AliTPCRecoParam * GetRecoParam(Int_t *eventtype); // static void CreateObjectList(const Char_t *filename, TObjArray *calibObjects); static void MakeTree(const char * fileName, TObjArray * array, const char * mapFileName = 0, AliTPCCalPad* outlierPad = 0, Float_t ltmFraction = 0.9); @@ -62,6 +64,7 @@ protected: AliTPCCalPad* fPedestals; // Pedestal calibration entry AliTPCSensorTempArray* fTemperature; // Temperature calibration entry AliTPCAltroMapping **fMapping; // Altro mapping + TObjArray * fRecoParamArray; // reconstruction parameters // // AliTPCParam * fParam; // TPC parameters -- 2.43.0