]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/MakeMUONRecoParamArray.C
Class AliMUONCDB:
[u/mrichter/AliRoot.git] / MUON / MakeMUONRecoParamArray.C
index 3360c9d66e5d9f27ba7b0b18cc8ba33abce276d7..b8cfd70e04fd102f8b8434830bb01e9d3b9c3803 100644 (file)
 #endif
 
 
+
 //-----------------------------------------------------------------------
 void MakeMUONRecoParamArray(Int_t startRun = 0, Int_t endRun = AliCDBRunRange::Infinity(),
-                      AliRecoParam::EventSpecie_t defaultParam = AliRecoParam::kLowMult)
+                           Int_t settingsForCosmicRun = kFALSE)
 {
-  /// set the reconstruction parameters and store them in the OCDB ($ALICE_ROOT/MUON/Calib/RecoParam/).
+  /// set the reconstruction parameters and store them in the OCDB ($ALICE_ROOT/OCDB/MUON/Calib/RecoParam/).
   /// - make a CDB entry for the run range [startRun, endRun]
-  /// - "defaultParam" specifies the parameters to be used as default
+  /// - the choice between two possible configurations:
+  ///   -  settingsForCosmicRun = kFALSE (default), i.e.
+  ///      LowFlux (default)
+  ///      Calibration
+  ///   - settingsForCosmicRun = kTRUE, i.e.
+  ///      Cosmic (default)
+  ///      Calibration
   
   // init CDB
   AliCDBManager* man = AliCDBManager::Instance();
-  if(!man->IsDefaultStorageSet()) man->SetDefaultStorage("local://$ALICE_ROOT");
+  if(!man->IsDefaultStorageSet()) man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
   man->SetRun(startRun);
   
   // set RecoParams
   AliMUONRecoParam *param;
   TObjArray recoParams;
-  
-  // set parameters for p-p runs
-  param = AliMUONRecoParam::GetLowFluxParam();
+
+  AliRecoParam::EventSpecie_t defaultParam = AliRecoParam::kLowMult;
+
+  if(!settingsForCosmicRun) {
+    // set parameters for p-p runs
+    param = AliMUONRecoParam::GetLowFluxParam();
+    recoParams.AddLast(param);
+  }
+  else {
+    // set parameters for cosmic runs
+    param = AliMUONRecoParam::GetCosmicParam();
+    recoParams.AddLast(param);
+    defaultParam = AliRecoParam::kCosmic;
+  }
+
+  // set (dummy) parameters for calibration runs
+  param = AliMUONRecoParam::GetCalibrationParam();
   recoParams.AddLast(param);
-  
+
   // set parameters for Pb-Pb runs
-  param = AliMUONRecoParam::GetHighFluxParam();
-  recoParams.AddLast(param);
-  
-  // set parameters for cosmic runs
-  param = AliMUONRecoParam::GetCosmicParam();
-  recoParams.AddLast(param);
-  
+  // param = AliMUONRecoParam::GetHighFluxParam();
+  // recoParams.AddLast(param);
+
   // identify default parameters (exit if identification failed)
   Bool_t defaultIsSet = kFALSE;
   TIter next(recoParams.MakeIterator());
@@ -82,8 +99,7 @@ void MakeMUONRecoParamArray(Int_t startRun = 0, Int_t endRun = AliCDBRunRange::I
   }
   
   // save RecoParam in CDB
-  AliMUONCDB cdb;
-  cdb.WriteToCDB(&recoParams, "MUON/Calib/RecoParam", startRun, endRun, "reconstruction parameters for MUON", "Philippe Pillot");
+  AliMUONCDB::WriteToCDB(&recoParams, "MUON/Calib/RecoParam", startRun, endRun, "reconstruction parameters for MUON", "Philippe Pillot");
   
 }