]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding possibility to get the Reconstruction parameters from OCDB (Marian)
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 15 Dec 2007 16:32:23 +0000 (16:32 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 15 Dec 2007 16:32:23 +0000 (16:32 +0000)
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
TPC/AliTPCReconstructor.cxx
TPC/AliTPCcalibDB.cxx
TPC/AliTPCcalibDB.h

index c466931f85ff5b7c7effb03fc7ec215adaa21f37..568ef1f8f8a1f5c4eba661bb17492fb562f2df21 100644 (file)
 //                                                                           //
 // 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 
+
+*/
+                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
 
index 7add769d1225318246ae6b996ac6765363024936..6d2df08e834055e218afb5db31b7a80ec9a9803e 100644 (file)
@@ -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();
index eef7cb91f897fb6bfc43fcf5ef2d65514a59e131..da96eb34ce67327c73812d50f4cf1641232a34a9 100644 (file)
@@ -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;
+
+}
index c960e0e83e98122766ebac0ea14df334e1bbb78b..4d0aae695f58120ab7e8b0427e93e1903396d8af 100644 (file)
@@ -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