Test CDB and macro to generate recoparam is added
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 15 Nov 2012 03:04:07 +0000 (03:04 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 15 Nov 2012 03:04:07 +0000 (03:04 +0000)
ITS/UPGRADE/testITSU/MakeITSRecoParam.C [new file with mode: 0644]
ITS/UPGRADE/testITSU/itsupcdb.tar.gz [new file with mode: 0644]

diff --git a/ITS/UPGRADE/testITSU/MakeITSRecoParam.C b/ITS/UPGRADE/testITSU/MakeITSRecoParam.C
new file mode 100644 (file)
index 0000000..c5b94ed
--- /dev/null
@@ -0,0 +1,84 @@
+void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult, const char* cdbURI="local://") {
+//========================================================================
+//
+// Steering macro for ITS reconstruction parameters
+//
+// Author: A.Dainese
+// Contact: andrea.dainese@lnl.infn.it
+//
+//========================================================================
+
+  const char* macroname = "MakeITSRecoParam.C";
+  //
+  gSystem->Load("libITSUpgradeBase.so");
+  gSystem->Load("libITSUpgradeSim.so");
+  gSystem->Load("libITSUpgradeRec.so");
+  //
+  // Activate CDB storage and load geometry from CDB
+  AliCDBManager* cdb = AliCDBManager::Instance();
+  cdb->SetDefaultStorage(cdbURI);
+
+  int nLr = 7;
+  
+  TObjArray *recoParamArray = new TObjArray();
+  //
+  {
+    AliITSURecoParam * itsRecoParam = AliITSURecoParam::GetCosmicTestParam();
+    //
+    itsRecoParam->SetNLayers(nLr);
+    //
+    //******************************************************************
+    itsRecoParam->SetEventSpecie(AliRecoParam::kCosmic);
+    itsRecoParam->SetTitle("Cosmic");
+    recoParamArray->AddLast(itsRecoParam);
+  }
+  //
+  {
+    AliITSURecoParam * itsRecoParam = AliITSURecoParam::GetLowFluxParam();
+    //
+    itsRecoParam->SetNLayers(nLr);
+    //
+    //******************************************************************
+    itsRecoParam->SetEventSpecie(AliRecoParam::kLowMult);
+    itsRecoParam->SetTitle("LowMult");
+    recoParamArray->AddLast(itsRecoParam);
+  }
+  {
+    AliITSURecoParam * itsRecoParam = AliITSURecoParam::GetHighFluxParam();
+    //
+    itsRecoParam->SetNLayers(nLr);
+    //
+    //******************************************************************
+    itsRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
+    itsRecoParam->SetTitle("HighMult");
+    recoParamArray->AddLast(itsRecoParam);
+  }
+  //
+  // 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("Andrea Dainese");
+  md->SetComment("Reconstruction parameters ITS.");
+  md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
+  md->SetBeamPeriod(0);
+  AliCDBId id("ITS/Calib/RecoParam",0,AliCDBRunRange::Infinity());
+  cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
+  //
+  return;
+}
+
diff --git a/ITS/UPGRADE/testITSU/itsupcdb.tar.gz b/ITS/UPGRADE/testITSU/itsupcdb.tar.gz
new file mode 100644 (file)
index 0000000..f54f776
Binary files /dev/null and b/ITS/UPGRADE/testITSU/itsupcdb.tar.gz differ