First commit of macro and OCDB object for the PHOS reconstruction parameters
authorkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Aug 2008 15:38:28 +0000 (15:38 +0000)
committerkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Aug 2008 15:38:28 +0000 (15:38 +0000)
PHOS/Calib/RecoParam/Run0_999999999_v0_s0.root [new file with mode: 0644]
PHOS/MakePHOSRecoParam.C [new file with mode: 0644]

diff --git a/PHOS/Calib/RecoParam/Run0_999999999_v0_s0.root b/PHOS/Calib/RecoParam/Run0_999999999_v0_s0.root
new file mode 100644 (file)
index 0000000..aac6195
Binary files /dev/null and b/PHOS/Calib/RecoParam/Run0_999999999_v0_s0.root differ
diff --git a/PHOS/MakePHOSRecoParam.C b/PHOS/MakePHOSRecoParam.C
new file mode 100644 (file)
index 0000000..1a554a2
--- /dev/null
@@ -0,0 +1,62 @@
+void MakePHOSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kDefault)
+{
+  //========================================================================
+  //
+  // Steering macro for PHOS reconstruction parameters
+  //
+  // Author: Yuri Kharlov
+  // 13.08.2008
+  //========================================================================
+
+
+  const char* macroname = "MakePHOSRecoParam.C";
+
+  // Activate CDB storage and load geometry from CDB
+  AliCDBManager* cdb = AliCDBManager::Instance();
+  if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://OCDB");
+  
+  TObjArray *recoParamArray = new TObjArray();
+
+  {
+    AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters();
+    phosRecoParam->SetEventSpecie(AliRecoParam::kCosmic);
+    phosRecoParam->SetEMCSubtractPedestals(kTRUE);
+    phosRecoParam->SetEMCMinE(0.01);
+    phosRecoParam->SetEMCClusteringThreshold(0.02);
+    phosRecoParam->SetEMCDecoderVersion("v1");
+    recoParamArray->AddLast(phosRecoParam);
+  }
+  {
+    AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters();
+    recoParamArray->AddLast(phosRecoParam);
+    phosRecoParam->SetEventSpecie(AliRecoParam::kDefault);
+  }
+
+  // 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;
+    }
+  }
+
+  if (!defaultIsSet) {
+    Error(macroname,"The default reconstruction parameters are not set! Exiting...");
+    return;
+  }
+
+  // save in CDB storage
+  AliCDBMetaData *md= new AliCDBMetaData();
+  md->SetResponsible("Yuri Kharlov");
+  md->SetComment("Reconstruction parameters PHOS");
+  md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
+  md->SetBeamPeriod(0);
+  AliCDBId id("PHOS/Calib/RecoParam",0,AliCDBRunRange::Infinity());
+  cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
+
+  return;
+}
+