]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/UPGRADE/testITSU/MakeITSRecoParam.C
Added charge to the clusters tree
[u/mrichter/AliRoot.git] / ITS / UPGRADE / testITSU / MakeITSRecoParam.C
CommitLineData
f8a27611 1void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult, const char* cdbURI="local://") {
2//========================================================================
3//
42c3d4bd 4// Steering macro for ITSU reconstruction parameters
f8a27611 5//
42c3d4bd 6// Contact: ruben.shahoyan@cern.ch
f8a27611 7//
8//========================================================================
f8a27611 9 const char* macroname = "MakeITSRecoParam.C";
10 //
42c3d4bd 11 enum {kBit0=0x1<<0,kBit1=0x1<<1,kBit2=0x1<<2,kBit3=0x1<<3,kBit4=0x1<<4,kBit5=0x1<<5,kBit6=0x1<<6,kBit7=0x7<<2,kBit8=0x1<<8};
12 //
13 //
f8a27611 14 gSystem->Load("libITSUpgradeBase.so");
15 gSystem->Load("libITSUpgradeSim.so");
16 gSystem->Load("libITSUpgradeRec.so");
17 //
18 // Activate CDB storage and load geometry from CDB
19 AliCDBManager* cdb = AliCDBManager::Instance();
20 cdb->SetDefaultStorage(cdbURI);
42c3d4bd 21 AliITSUTrackCond* trcond = 0;
f8a27611 22 int nLr = 7;
14ba4e91 23
f8a27611 24 TObjArray *recoParamArray = new TObjArray();
25 //
26 {
27 AliITSURecoParam * itsRecoParam = AliITSURecoParam::GetCosmicTestParam();
28 //
29 itsRecoParam->SetNLayers(nLr);
30 //
31 //******************************************************************
32 itsRecoParam->SetEventSpecie(AliRecoParam::kCosmic);
33 itsRecoParam->SetTitle("Cosmic");
34 recoParamArray->AddLast(itsRecoParam);
35 }
36 //
70f61d86 37 const Bool_t kAllowDiagCl = kFALSE;
38 //
097e4cdf 39 // long tracks
14ba4e91 40 /*
41 // tuned for 20x20 pixels with x/x0= 0.3,0.3,0.3,0.5,0.5,0.5,0.5% CDR setup
42 //
097e4cdf 43 int c0nBranch[7] = {5,10,15,4,6,6,10}; // max branching for the seed on layer
44 int c0nCands[7] = {10,20,45,20,45,15,10}; // max candidates for the TPC seed
45 float c0tr2clChi2[7] = {20,25,30,40,45,45,70}; // cut on cluster to track chi2
46 float c0gloChi2[7] = {6, 10,20,40,70,70,70}; // cut on seed global norm chi2
47 float c0missPen[7] = {2.,2.,2.,2.,2.,2.,2.}; // missing cluster penalty
5e3587be 48 float c0maxChi2SA[14] = {0.,0.,0.,0.,2.,3.,8., 10.,10.,10.,10.,10.,10.,10.}; // chi2SA vs Nclus
097e4cdf 49 float c0maxChi2Match = 10.;
14ba4e91 50 */
097e4cdf 51 //
14ba4e91 52 // /*
53 // tuned for 20x20 pixels with x/x0= 0.3,0.3,0.3,0.5,0.5,0.5,0.5% TDR5 setup
54 int c0nBranch[7] = {3,9,15,4,5,7,10}; // max branching for the seed on layer
55 int c0nCands[7] = {10,15,45,20,60,20,10}; // max candidates for the TPC seed
56 float c0tr2clChi2[7] = {20,25,30,40,45,45,70}; // cut on cluster to track chi2
57 float c0gloChi2[7] = {6,10,20,30,60,60,70}; // cut on seed global norm chi2
58 float c0missPen[7] = {2.,2.,2.,2.,2.,2.,2.}; // missing cluster penalty
59 float c0maxChi2SA[14] = {0.,0.,0.,0.,2.5,5.,10., 20.,20.,20.,20.,20.,20.,20.}; // chi2SA vs Nclus
60 float c0maxChi2Match = 10.;
61 // */
62
63
097e4cdf 64 // short tracks from decays
14ba4e91 65 /*
66 // tuned for 20x20 pixels with x/x0= 0.3,0.3,0.3,0.5,0.5,0.5,0.5% CDR setup
097e4cdf 67 int c1nBranch[7] = {0,0,0,4,6,6,10}; // max branching for the seed on layer
68 int c1nCands[7] = {0,0,0,20,45,15,10}; // max candidates for the TPC seed
69 float c1tr2clChi2[7] = {0,0,0,20,20,20,30}; // cut on cluster to track chi2
70 float c1gloChi2[7] = {0,0,0,16,40,30,30}; // cut on seed global norm chi2
71 float c1missPen[7] = {0.,0.,0.,2.,2.,2.,2.}; // missing cluster penalty
5e3587be 72 float c1maxChi2SA[14] = {0.,0.,0.,7.,8.,8.,8., 10.,10.,10.,10.,10.,10.,10.}; // chi2SA vs Nclus
097e4cdf 73 float c1maxChi2Match = 8.;
14ba4e91 74 */
75
76 // short tracks from decays
77 int c1nBranch[7] = {0,0,0,4,6,6,10}; // max branching for the seed on layer
78 int c1nCands[7] = {0,0,0,5,5,5,8}; // max candidates for the TPC seed
79 float c1tr2clChi2[7] = {0,0,0,20,20,20,30}; // cut on cluster to track chi2
80 float c1gloChi2[7] = {0,0,0,16,40,35,30}; // cut on seed global norm chi2
81 float c1missPen[7] = {0.,0.,0.,2.,2.,2.,2.}; // missing cluster penalty
82 float c1maxChi2SA[14] = {0.,0.,0.,5.,13.,13.,18., 10.,10.,10.,10.,10.,10.,10.}; // chi2SA vs Nclus
83 float c1maxChi2Match = 10.;
097e4cdf 84
70f61d86 85 //
86 /*
87 // tuned for 20x33 pixels
097e4cdf 88 int c0nBranch[7] = {5,10,15,4,6,6,10}; // max branching for the seed on layer
89 int c0nCands[7] = {10,20,25,20,30,15,20}; // max candidates for the TPC seed
90 float c0tr2clChi2[7] = {20,20,25,25,25,30,40}; // cut on cluster to track chi2
91 float c0gloChi2[7] = {9, 10,15,20,30,30,30}; // cut on seed global norm chi2
92 float c0missPen[7] = {2.,2.,2.,2.,2.,2.,2.}; // missing cluster penalty
5e3587be 93 float c0maxChi2SA[14] = {0.,0.,0.,0.,12.,13.,18., 20.,20.,20.,20.,20.,20.,20.}; // chi2SA vs Nclus
097e4cdf 94 float c0maxChi2Match = 10.;
70f61d86 95 */
96
ee58ce21 97 //
f8a27611 98 {
99 AliITSURecoParam * itsRecoParam = AliITSURecoParam::GetLowFluxParam();
100 //
101 itsRecoParam->SetNLayers(nLr);
102 //
103 //******************************************************************
104 itsRecoParam->SetEventSpecie(AliRecoParam::kLowMult);
105 itsRecoParam->SetTitle("LowMult");
106 recoParamArray->AddLast(itsRecoParam);
42c3d4bd 107 //******************************************************************
70f61d86 108 for (int i=0;i<nLr;i++) itsRecoParam->SetAllowDiagonalClusterization(i,kAllowDiagCl);
ee58ce21 109 //
42c3d4bd 110 // Add tracking conditions >>>
111 trCond = new AliITSUTrackCond();
112 trCond->SetNLayers(nLr);
097e4cdf 113 trCond->SetMaxITSTPCMatchChi2(c0maxChi2Match);
ee54014a 114 //
d99994b2 115 // to exclude some layer use trCon->ExcludeLayer(lrID);
116 //
ee54014a 117 for (int i=0;i<nLr;i++) {
097e4cdf 118 trCond->SetMaxBranches(i,c0nBranch[i]); // each seed propagated to given layer can produce max nBranch branches
119 trCond->SetMaxCandidates(i,c0nCands[i]); // each tpc track may have at most nCands prolongations
120 trCond->SetMaxTr2ClChi2(i,c0tr2clChi2[i]); // cut on cluster to track chi2
121 trCond->SetMaxChi2GloNrm(i,c0gloChi2[i]); // cut on cluster to track global chi2
122 trCond->SetMissPenalty(i,c0missPen[i]); // missing cluster penalty
ee54014a 123 }
5e3587be 124 for (int i=1;i<=2*nLr;i++) trCond->SetMaxITSSAChi2(i,c0maxChi2SA[i-1]);
38997c3c 125 //
42c3d4bd 126 trCond->AddNewCondition(5); // min hits
70f61d86 127 trCond->AddGroupPattern( kBit0|kBit1|kBit2, 2); // at least 2 hits in 3 inner layers
128 trCond->AddGroupPattern( kBit3|kBit4 , 1); // at least 1 hit in 2 middle layers
129 trCond->AddGroupPattern( kBit5|kBit6 , 1); // at least 1 hit in 2 outer layers
ee54014a 130 //
131 trCond->Init();
132 //
42c3d4bd 133 itsRecoParam->AddTrackingCondition(trCond);
097e4cdf 134 //-----------------------------------------------------------
135 // short tracks
136 trCond = new AliITSUTrackCond();
137 trCond->SetNLayers(nLr);
138 //
139 trCond->ExcludeLayer(0);
140 trCond->ExcludeLayer(1);
141 trCond->ExcludeLayer(2);
142 //
143 trCond->SetMaxITSTPCMatchChi2(c1maxChi2Match);
097e4cdf 144 //
145 // to exclude some layer use trCon->ExcludeLayer(lrID);
146 //
147 for (int i=0;i<nLr;i++) {
148 trCond->SetMaxBranches(i,c1nBranch[i]); // each seed propagated to given layer can produce max nBranch branches
149 trCond->SetMaxCandidates(i,c1nCands[i]); // each tpc track may have at most nCands prolongations
150 trCond->SetMaxTr2ClChi2(i,c1tr2clChi2[i]); // cut on cluster to track chi2
151 trCond->SetMaxChi2GloNrm(i,c1gloChi2[i]); // cut on cluster to track global chi2
152 trCond->SetMissPenalty(i,c1missPen[i]); // missing cluster penalty
097e4cdf 153 }
5e3587be 154 for (int i=1;i<=2*nLr;i++) trCond->SetMaxITSSAChi2(i,c1maxChi2SA[i-1]);
097e4cdf 155 //
156 trCond->AddNewCondition(4); // min hits
157 trCond->AddGroupPattern( kBit3|kBit4|kBit5|kBit6, 4); // at least 1 hit in 2 outer layers
158 //
159 trCond->Init();
160 //
161 itsRecoParam->AddTrackingCondition(trCond);
162
ee58ce21 163 // Add tracking conditions <<<
f8a27611 164 }
165 {
166 AliITSURecoParam * itsRecoParam = AliITSURecoParam::GetHighFluxParam();
167 //
168 itsRecoParam->SetNLayers(nLr);
169 //
170 //******************************************************************
171 itsRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
172 itsRecoParam->SetTitle("HighMult");
173 recoParamArray->AddLast(itsRecoParam);
42c3d4bd 174 //******************************************************************
70f61d86 175 for (int i=0;i<nLr;i++) itsRecoParam->SetAllowDiagonalClusterization(i,kAllowDiagCl);
ee54014a 176 //
42c3d4bd 177 // Add tracking conditions >>>
178 trCond = new AliITSUTrackCond();
179 trCond->SetNLayers(nLr);
097e4cdf 180 trCond->SetMaxITSTPCMatchChi2(c0maxChi2Match);
ee54014a 181 //
182 for (int i=0;i<nLr;i++) {
097e4cdf 183 trCond->SetMaxBranches(i,c0nBranch[i]); // each seed propagated to given layer can produce max nBranch branches
184 trCond->SetMaxCandidates(i,c0nCands[i]); // each tpc track may have at most nCands prolongations
185 trCond->SetMaxTr2ClChi2(i,c0tr2clChi2[i]); // cut on cluster to track chi2
186 trCond->SetMaxChi2GloNrm(i,c0gloChi2[i]); // cut on cluster to track global chi2
187 trCond->SetMissPenalty(i,c0missPen[i]); // missing cluster penalty
ee54014a 188 }
5e3587be 189 for (int i=1;i<=2*nLr;i++) trCond->SetMaxITSSAChi2(i,c0maxChi2SA[i-1]);
ee54014a 190 //
42c3d4bd 191 trCond->AddNewCondition(5); // min hits
70f61d86 192 trCond->AddGroupPattern( kBit0|kBit1|kBit2, 2); // at least 2 hits in 3 inner layers
193 trCond->AddGroupPattern( kBit3|kBit4 , 1); // at least 1 hit in 2 middle layers
194 trCond->AddGroupPattern( kBit5|kBit6 , 1); // at least 1 hit in 2 outer layers
ee54014a 195 //
196 trCond->Init();
197 //
42c3d4bd 198 itsRecoParam->AddTrackingCondition(trCond);
097e4cdf 199 //-----------------------------------------------------------
200 // short tracks
201 trCond = new AliITSUTrackCond();
202 trCond->SetNLayers(nLr);
203 //
204 trCond->ExcludeLayer(0);
205 trCond->ExcludeLayer(1);
206 trCond->ExcludeLayer(2);
207 //
208 trCond->SetMaxITSTPCMatchChi2(c1maxChi2Match);
097e4cdf 209 //
210 // to exclude some layer use trCon->ExcludeLayer(lrID);
211 //
212 for (int i=0;i<nLr;i++) {
213 trCond->SetMaxBranches(i,c1nBranch[i]); // each seed propagated to given layer can produce max nBranch branches
214 trCond->SetMaxCandidates(i,c1nCands[i]); // each tpc track may have at most nCands prolongations
215 trCond->SetMaxTr2ClChi2(i,c1tr2clChi2[i]); // cut on cluster to track chi2
216 trCond->SetMaxChi2GloNrm(i,c1gloChi2[i]); // cut on cluster to track global chi2
217 trCond->SetMissPenalty(i,c1missPen[i]); // missing cluster penalty
097e4cdf 218 }
5e3587be 219 for (int i=1;i<=2*nLr;i++) trCond->SetMaxITSSAChi2(i,c1maxChi2SA[i-1]);
097e4cdf 220 //
221 trCond->AddNewCondition(4); // min hits
222 trCond->AddGroupPattern( kBit3|kBit4|kBit5|kBit6, 4);
223 //
224 trCond->Init();
225 //
226 itsRecoParam->AddTrackingCondition(trCond);
ee58ce21 227 // Add tracking conditions <<<
42c3d4bd 228 //
f8a27611 229 }
230 //
231 // Set the default
232 Bool_t defaultIsSet = kFALSE;
233 for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
234 AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
235 if (!param) continue;
236 if (default & param->GetEventSpecie()) {
237 param->SetAsDefault();
238 defaultIsSet = kTRUE;
239 }
240 }
241
242 if (!defaultIsSet) {
243 Error(macroname,"The default reconstruction parameters are not set! Exiting...");
244 return;
245 }
246
247 // save in CDB storage
248 AliCDBMetaData *md= new AliCDBMetaData();
249 md->SetResponsible("Andrea Dainese");
250 md->SetComment("Reconstruction parameters ITS.");
251 md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
252 md->SetBeamPeriod(0);
253 AliCDBId id("ITS/Calib/RecoParam",0,AliCDBRunRange::Infinity());
254 cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
255 //
256 return;
257}
258