Moving the GRP reco-param object from the reconstruction macros to OCDB.
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 Jul 2009 12:31:45 +0000 (12:31 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 Jul 2009 12:31:45 +0000 (12:31 +0000)
STEER/AliReconstruction.cxx
test/cosmic/rec.C
test/fpprod/rec.C
test/pileup/rec.C

index d9628df3251029bb560cf1fbb16a5b7a65ec10b6..e8b444612569873c431705053055ef4c9cbb4851 100644 (file)
@@ -3228,6 +3228,40 @@ Bool_t AliReconstruction::InitRecoParams()
 
   Bool_t isOK = kTRUE;
 
+  if (fRecoParam.GetDetRecoParamArray(kNDetectors)) {
+    AliInfo("Using custom GRP reconstruction parameters");
+  }
+  else {
+    AliInfo("Loading GRP reconstruction parameter objects");
+
+    AliCDBPath path("GRP","Calib","RecoParam");
+    AliCDBEntry *entry=AliCDBManager::Instance()->Get(path.GetPath());
+    if(!entry){ 
+      AliWarning("Couldn't find GRP RecoParam entry in OCDB");
+      isOK = kFALSE;
+    }
+    else {
+      TObject *recoParamObj = entry->GetObject();
+      if (dynamic_cast<TObjArray*>(recoParamObj)) {
+       // GRP has a normal TobjArray of AliDetectorRecoParam objects
+       // Registering them in AliRecoParam
+       fRecoParam.AddDetRecoParamArray(kNDetectors,dynamic_cast<TObjArray*>(recoParamObj));
+      }
+      else if (dynamic_cast<AliDetectorRecoParam*>(recoParamObj)) {
+       // GRP has only onse set of reco parameters
+       // Registering it in AliRecoParam
+       AliInfo("Single set of GRP reconstruction parameters found");
+       dynamic_cast<AliDetectorRecoParam*>(recoParamObj)->SetAsDefault();
+       fRecoParam.AddDetRecoParam(kNDetectors,dynamic_cast<AliDetectorRecoParam*>(recoParamObj));
+      }
+      else {
+       AliError("No valid GRP RecoParam object found in the OCDB");
+       isOK = kFALSE;
+      }
+      entry->SetOwner(0);
+    }
+  }
+
   TString detStr = fLoadCDB;
   for (Int_t iDet = 0; iDet < kNDetectors; iDet++) {
 
index b2fc5c0e76d3d38650f78175a21115a7ad4ad957..58950cf81c09057922491c4b5d84169189100cbc 100644 (file)
@@ -23,12 +23,6 @@ void rec(const char *filename="raw.root")
   rec.SetRunQA("ALL:ALL") ;\r
   rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;\r
 \r
-  AliGRPRecoParam *grpRecoParam = AliGRPRecoParam::GetLowFluxParam();\r
-  grpRecoParam->SetVertexerTracksConstraintITS(kFALSE);\r
-  grpRecoParam->SetVertexerTracksConstraintTPC(kFALSE);\r
-  grpRecoParam->SetMostProbablePt(3.0);\r
-  rec.SetRecoParam("GRP",grpRecoParam);\r
-\r
   // AliReconstruction settings\r
   rec.SetWriteESDfriend(kTRUE);\r
   rec.SetWriteAlignmentData();\r
index ebed8d3fbee41a3ec819d0a15dac46273986197f..d10ae747622f5ca25a269b59c742e1e277135158 100644 (file)
@@ -14,11 +14,6 @@ void rec() {
   reco.SetSpecificStorage("GRP/GRP/Data",
                          Form("local://%s",gSystem->pwd()));
 
-  AliGRPRecoParam *grpRecoParam = AliGRPRecoParam::GetLowFluxParam();
-  grpRecoParam->SetVertexerTracksConstraintITS(kFALSE);
-  grpRecoParam->SetVertexerTracksConstraintTPC(kFALSE);
-  reco.SetRecoParam("GRP",grpRecoParam);
-
   TStopwatch timer;
   timer.Start();
   reco.Run();
index ebed8d3fbee41a3ec819d0a15dac46273986197f..d10ae747622f5ca25a269b59c742e1e277135158 100644 (file)
@@ -14,11 +14,6 @@ void rec() {
   reco.SetSpecificStorage("GRP/GRP/Data",
                          Form("local://%s",gSystem->pwd()));
 
-  AliGRPRecoParam *grpRecoParam = AliGRPRecoParam::GetLowFluxParam();
-  grpRecoParam->SetVertexerTracksConstraintITS(kFALSE);
-  grpRecoParam->SetVertexerTracksConstraintTPC(kFALSE);
-  reco.SetRecoParam("GRP",grpRecoParam);
-
   TStopwatch timer;
   timer.Start();
   reco.Run();