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