New TOF Reco Param object.
authorzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Aug 2008 15:26:56 +0000 (15:26 +0000)
committerzampolli <zampolli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Aug 2008 15:26:56 +0000 (15:26 +0000)
Macro to create it included.

TOF/Calib/RecoParam/Run0_999999999_v0_s0.root [new file with mode: 0644]
TOF/MakeTOFRecoParam.C [new file with mode: 0644]

diff --git a/TOF/Calib/RecoParam/Run0_999999999_v0_s0.root b/TOF/Calib/RecoParam/Run0_999999999_v0_s0.root
new file mode 100644 (file)
index 0000000..ef39c30
Binary files /dev/null and b/TOF/Calib/RecoParam/Run0_999999999_v0_s0.root differ
diff --git a/TOF/MakeTOFRecoParam.C b/TOF/MakeTOFRecoParam.C
new file mode 100644 (file)
index 0000000..17b56a8
--- /dev/null
@@ -0,0 +1,42 @@
+void MakeTOFRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult){
+  // Create TOF Calibration Object for Ideal calibration and 
+  // write it on CDB
+  AliCDBManager *man = AliCDBManager::Instance();
+  man->SetDefaultStorage("local://$ALICE_ROOT");
+
+  TObjArray *recoParamArray = new TObjArray();
+
+  {
+         AliTOFRecoParam* tofRecoParam = AliTOFRecoParam::GetPbPbparam();
+         tofRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
+         recoParamArray->AddLast(tofRecoParam);
+  }
+
+  {
+                 AliTOFRecoParam* tofRecoParam = AliTOFRecoParam::GetPPparam();
+         tofRecoParam->SetEventSpecie(AliRecoParam::kLowMult);
+         recoParamArray->AddLast(tofRecoParam);
+  }
+
+  // Set the default
+  Bool_t defaultIsSet = kFALSE;
+  for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
+    AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
+    if (!param) continue;
+    if (default & param->GetEventSpecie()) {
+      param->SetAsDefault();
+      defaultIsSet = kTRUE;
+    }
+  }
+
+
+  AliCDBMetaData *md= new AliCDBMetaData();
+  md->SetResponsible("Chiara Zampolli");
+  md->SetComment("Reconstruction parameters TOF");
+  md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
+  md->SetBeamPeriod(0);
+  AliCDBId id("TOF/Calib/RecoParam",0,AliCDBRunRange::Infinity());
+  man->GetDefaultStorage()->Put(recoParamArray,id, md);
+}
+
+