Bug fix in the order of the Ds cuts (Sadhana, Francesco)
[u/mrichter/AliRoot.git] / T0 / MakeT0RecoParam.C
CommitLineData
0607bddf 1void MakeT0RecoParam(Int_t startRun = 0, Int_t endRun = AliCDBRunRange::Infinity(), AliRecoParam::EventSpecie_t defaultParam = AliRecoParam::kHighMult)
2{
3 // Create T0 Calibration Object for Ideal calibration and
4 // write it on CDB
5 AliCDBManager *man = AliCDBManager::Instance();
6 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
7 man->SetRun(startRun);
8
9 TObjArray *recoParamArray = new TObjArray();
10 AliT0RecoParam* t0RecoParam;
11
12 t0RecoParam = AliT0RecoParam::GetHighFluxParam();
13 t0RecoParam->SetEventSpecie(AliRecoParam::kHighMult);
14 // t0RecoParam->Dump();
15 cout<<" t0RecoParam->GetEventSpecie "<< t0RecoParam->GetEventSpecie()<<endl;
16 // t0RecoParam->Dump();
dbe5f5f8 17 t0RecoParam->PrintParameters();
0607bddf 18 recoParamArray->AddLast(t0RecoParam);
19
20
21
22 t0RecoParam = AliT0RecoParam::GetLowFluxParam();
23 t0RecoParam->SetEventSpecie(AliRecoParam::kLowMult);
24 cout<<" t0RecoParam->GetEventSpecie "<< t0RecoParam->GetEventSpecie()<<endl;
dbe5f5f8 25 t0RecoParam->SetLow(10,-1000);
26 t0RecoParam->PrintParameters();
0607bddf 27 recoParamArray->AddLast(t0RecoParam);
28
29 t0RecoParam = AliT0RecoParam::GetLaserTestParam();
30 t0RecoParam->SetEventSpecie(AliRecoParam::kCalib);
31 // t0RecoParam->Dump();
32 cout<<" t0RecoParam->GetEventSpecie "<< t0RecoParam->GetEventSpecie()<<endl;
dbe5f5f8 33 for (Int_t i=98; i<149; i++) {
34 t0RecoParam->SetLow(i,-1000);
35 t0RecoParam->SetHigh(i,1000);
36 }
0607bddf 37 // t0RecoParam->Dump();
dbe5f5f8 38 t0RecoParam->SetRefPoint(1);
39 t0RecoParam->PrintParameters();
0607bddf 40 recoParamArray->AddLast(t0RecoParam);
41
dbe5f5f8 42
0607bddf 43 // Set the default
44 Bool_t defaultIsSet = kFALSE;
dbe5f5f8 45 // cout<<"recoParamArray->GetEntriesFast() "<<recoParamArray.GetEntriesFast()<<endl;
46 TIter next(recoParamArray->MakeIterator());
0607bddf 47 while ( (param = static_cast<AliT0RecoParam*>(next())) ) {
48 if (!param) continue;
49 if (defaultParam == param->GetEventSpecie()) {
50 cout<<" Specie "<<param->GetEventSpecie()<<endl;
51 param->SetEventSpecie(param->GetEventSpecie());
52 param->SetAsDefault();
53 defaultIsSet = kTRUE;
54 }
55 param->Print("FULL");
56 }
57
58
59 AliCDBMetaData *md= new AliCDBMetaData();
60 md->SetResponsible("Alla");
61 md->SetComment("Reconstruction parameters T0");
62 md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
63 md->SetBeamPeriod(0);
64 AliCDBId id("T0/Calib/RecoParam",startRun,endRun);
65 man->GetDefaultStorage()->Put(recoParamArray,id, md);
66
67}
68
69