]>
Commit | Line | Data |
---|---|---|
0607bddf | 1 | void MakeT0RecoParam(Int_t startRun = 0, Int_t endRun = AliCDBRunRange::Infinity(), AliRecoParam::EventSpecie_t defaultParam = AliRecoParam::kHighMult) |
593a6aab | 2 | //void MakeT0RecoParam(Int_t startRun = 122000, Int_t endRun = 126437, AliRecoParam::EventSpecie_t defaultParam = AliRecoParam::kHighMult) |
0607bddf | 3 | { |
4 | // Create T0 Calibration Object for Ideal calibration and | |
5 | // write it on CDB | |
6 | AliCDBManager *man = AliCDBManager::Instance(); | |
593a6aab | 7 | // man->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); |
e5835843 | 8 | man->SetDefaultStorage("local:///scratch/alla/alice/Oct11/TestCDBf"); |
0607bddf | 9 | man->SetRun(startRun); |
593a6aab | 10 | |
0607bddf | 11 | TObjArray *recoParamArray = new TObjArray(); |
12 | AliT0RecoParam* t0RecoParam; | |
13 | ||
14 | t0RecoParam = AliT0RecoParam::GetHighFluxParam(); | |
15 | t0RecoParam->SetEventSpecie(AliRecoParam::kHighMult); | |
593a6aab | 16 | Float_t low[500] , high[500] ; |
17 | Float_t pos[24] = {2472, 2492, 2501, 2540, 2526, 2525, 2501, 2461, 2556, 2544, 2533, 2487, | |
18 | 2485, 2502, 2453, 2470, 2520, 2486, 2512, 2523, 2505, 2562, 2533, 2481}; | |
19 | for (Int_t i=0; i<107; i++) | |
20 | { | |
21 | low[i] = 500; | |
22 | high[i]=50000; | |
23 | if(i>0 && i<13) { low[i] = pos[i-1] - 200; high[i] = pos[i-1] + 200;} | |
24 | if(i>56 && i<69) { low[i] = pos[i-57] - 200.; high[i]=pos[i-57] + 200;} | |
25 | // if(i<13) { low[i]=pos[i]-500.;high[i]=pos[i]+500.;} | |
26 | // if(i>56 && i<69) { low[i]=pos[i+13-57]-500.;high[i]=pos[i-57+13]+500.;} | |
27 | } | |
28 | ||
29 | // bad PMT | |
30 | t0RecoParam->SetRefPoint(-1); | |
31 | // amplitude range for recontruction | |
e5835843 | 32 | low[200]=0.8; |
593a6aab | 33 | high[200]=80; |
34 | for (Int_t i=0; i<24; i++) t0RecoParam-> SetBadChannels(i,0); | |
35 | ||
36 | for (Int_t i=0; i<500; i++) { | |
37 | t0RecoParam->SetLow(i,low[i]); | |
38 | t0RecoParam->SetHigh(i,high[i]); | |
39 | } | |
e5835843 | 40 | t0RecoParam->SetEq(1); |
41 | t0RecoParam->SetSatelliteThresholds(-15, -1.7); | |
42 | ||
dbe5f5f8 | 43 | t0RecoParam->PrintParameters(); |
0607bddf | 44 | recoParamArray->AddLast(t0RecoParam); |
593a6aab | 45 | |
46 | //----------------------------------------- | |
0607bddf | 47 | |
48 | t0RecoParam = AliT0RecoParam::GetLowFluxParam(); | |
49 | t0RecoParam->SetEventSpecie(AliRecoParam::kLowMult); | |
593a6aab | 50 | Float_t low[500], high[500] ; |
51 | for (Int_t i=0; i<500; i++) | |
52 | { | |
53 | low[i] = 500; | |
54 | high[i]=50000; | |
55 | if(i>0 && i<13) { low[i] = pos[i-1] - 200; high[i] = pos[i-1] + 200;} | |
56 | if(i>56 && i<69) { low[i] = pos[i-57] - 200.; high[i]=pos[i-57] + 200;} | |
57 | // if(i<13) { low[i]=pos[i]-500.;high[i]=pos[i]+500.;} | |
58 | // if(i>56 && i<69) { low[i]=pos[i+13-57]-500.;high[i]=pos[i-57+13]+500.;} | |
59 | } | |
60 | ||
61 | // bad PMT | |
62 | // t0RecoParam->SetRefPoint(-1); | |
63 | for (Int_t i=0; i<24; i++) t0RecoParam->SetBadChannels(i,0); | |
64 | t0RecoParam->SetRefPoint(-1); | |
65 | // amplitude range for recontruction | |
e5835843 | 66 | t0RecoParam->SetEq(1); |
67 | low[200]=0.8; | |
593a6aab | 68 | high[200]=80; |
69 | for (Int_t i=0; i<500; i++) { | |
70 | t0RecoParam->SetLow(i,low[i]); | |
71 | t0RecoParam->SetHigh(i,high[i]); | |
72 | } | |
e5835843 | 73 | // t0RecoParam->PrintParameters(); |
0607bddf | 74 | recoParamArray->AddLast(t0RecoParam); |
593a6aab | 75 | //-------------------------------------- |
0607bddf | 76 | t0RecoParam = AliT0RecoParam::GetLaserTestParam(); |
77 | t0RecoParam->SetEventSpecie(AliRecoParam::kCalib); | |
78 | // t0RecoParam->Dump(); | |
79 | cout<<" t0RecoParam->GetEventSpecie "<< t0RecoParam->GetEventSpecie()<<endl; | |
593a6aab | 80 | for (Int_t i=0; i<107; i++) { |
81 | t0RecoParam->SetLow(i, 0); | |
82 | t0RecoParam->SetHigh(i, 50000); | |
dbe5f5f8 | 83 | } |
e5835843 | 84 | t0RecoParam->SetEq(1); |
85 | t0RecoParam->SetSatelliteThresholds(-15, -1.7); | |
0607bddf | 86 | // t0RecoParam->Dump(); |
dbe5f5f8 | 87 | t0RecoParam->SetRefPoint(1); |
e5835843 | 88 | // t0RecoParam->PrintParameters(); |
0607bddf | 89 | recoParamArray->AddLast(t0RecoParam); |
90 | ||
dbe5f5f8 | 91 | |
0607bddf | 92 | // Set the default |
93 | Bool_t defaultIsSet = kFALSE; | |
dbe5f5f8 | 94 | // cout<<"recoParamArray->GetEntriesFast() "<<recoParamArray.GetEntriesFast()<<endl; |
95 | TIter next(recoParamArray->MakeIterator()); | |
0607bddf | 96 | while ( (param = static_cast<AliT0RecoParam*>(next())) ) { |
97 | if (!param) continue; | |
98 | if (defaultParam == param->GetEventSpecie()) { | |
99 | cout<<" Specie "<<param->GetEventSpecie()<<endl; | |
100 | param->SetEventSpecie(param->GetEventSpecie()); | |
101 | param->SetAsDefault(); | |
102 | defaultIsSet = kTRUE; | |
103 | } | |
104 | param->Print("FULL"); | |
105 | } | |
106 | ||
107 | ||
108 | AliCDBMetaData *md= new AliCDBMetaData(); | |
109 | md->SetResponsible("Alla"); | |
110 | md->SetComment("Reconstruction parameters T0"); | |
111 | md->SetAliRootVersion(gSystem->Getenv("ARVERSION")); | |
112 | md->SetBeamPeriod(0); | |
113 | AliCDBId id("T0/Calib/RecoParam",startRun,endRun); | |
114 | man->GetDefaultStorage()->Put(recoParamArray,id, md); | |
115 | ||
116 | } | |
117 | ||
118 |