Clean up in PMD folder: sjena
[u/mrichter/AliRoot.git] / PMD / macro / MakePMDRecoParam.C
CommitLineData
b3d178a4 1void MakePMDRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult){
2 // Create PMD Calibration Object for Ideal calibration and
3 // write it on CDB
4 AliCDBManager *man = AliCDBManager::Instance();
5 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
6
7 TObjArray *recoParamArray = new TObjArray();
8
9 {
10 AliPMDRecoParam* pmdRecoParam = AliPMDRecoParam::GetPbPbParam();
11 pmdRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
12 recoParamArray->AddLast(pmdRecoParam);
13 }
14
15 {
16 AliPMDRecoParam* pmdRecoParam = AliPMDRecoParam::GetPPParam();
17 pmdRecoParam->SetEventSpecie(AliRecoParam::kLowMult);
18 recoParamArray->AddLast(pmdRecoParam);
19 }
20
21 // Set the default
22 Bool_t defaultIsSet = kFALSE;
23 for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
24 AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
25 if (!param) continue;
26 if (default & param->GetEventSpecie()) {
27 param->SetAsDefault();
28 defaultIsSet = kTRUE;
29 }
30 }
31
32
33 AliCDBMetaData *md= new AliCDBMetaData();
34 md->SetResponsible("Basanta Nandi");
35 md->SetComment("Reconstruction parameters PMD");
36 md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
37 md->SetBeamPeriod(0);
38 AliCDBId id("PMD/Calib/RecoParam",0,AliCDBRunRange::Infinity());
39 man->GetDefaultStorage()->Put(recoParamArray,id, md);
40}
41
42