1 /**************************************************************************
2 * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 #include "AliITSURecoParam.h"
18 #include "AliITSUTrackCond.h"
20 ///////////////////////////////////////////////////////////////////////////////
22 // Class with ITS reconstruction parameters //
24 ///////////////////////////////////////////////////////////////////////////////
26 ClassImp(AliITSURecoParam)
29 const Double_t AliITSURecoParam::fgkMaxDforV0dghtrForProlongation = 30;
30 const Double_t AliITSURecoParam::fgkMaxDForProlongation = 40;
31 const Double_t AliITSURecoParam::fgkMaxDZForProlongation = 60;
32 const Double_t AliITSURecoParam::fgkMinPtForProlongation = 0.0;
33 const Double_t AliITSURecoParam::fgkSigmaRoadY = 20.E-4;//1000e-4;
34 const Double_t AliITSURecoParam::fgkSigmaRoadZ = 20.E-4;//1000e-4;
35 const Double_t AliITSURecoParam::fgkTanLorentzAngle = 0;
36 const Bool_t AliITSURecoParam::fgkAllowDiagonalClusterization = kFALSE;
38 // hardwired params for TPC-ITS border layer
39 const Double_t AliITSURecoParam::fgkTPCITSWallRMin = 50.;
40 const Double_t AliITSURecoParam::fgkTPCITSWallRMax = 80.;
41 const Double_t AliITSURecoParam::fgkTPCITSWallZSpanH = 250.;
42 const Double_t AliITSURecoParam::fgkTPCITSWallMaxStep = 6.;
44 const Bool_t AliITSURecoParam::fgkUseMatLUT[kNTrackingPhases] = {kFALSE,kFALSE,kFALSE};
47 //_____________________________________________________________________________
48 AliITSURecoParam::AliITSURecoParam()
50 ,fMaxDforV0dghtrForProlongation(fgkMaxDforV0dghtrForProlongation)
51 ,fMaxDForProlongation(fgkMaxDForProlongation)
52 ,fMaxDZForProlongation(fgkMaxDZForProlongation)
53 ,fMinPtForProlongation(fgkMinPtForProlongation)
55 ,fTPCITSWallRMin(fgkTPCITSWallRMin)
56 ,fTPCITSWallRMax(fgkTPCITSWallRMax)
57 ,fTPCITSWallZSpanH(fgkTPCITSWallZSpanH)
58 ,fTPCITSWallMaxStep(fgkTPCITSWallMaxStep)
60 ,fAllowDiagonalClusterization(0)
64 ,fTrackingConditions(0)
67 ,fMaxROCycle(126) // like in AliITSUSimulation::kMaxROCycleAccept
72 for (int i=kNTrackingPhases;i--;) fUseMatLUT[i] = fgkUseMatLUT[i];
75 //_____________________________________________________________________________
76 AliITSURecoParam::AliITSURecoParam(Int_t nLr)
78 ,fMaxDforV0dghtrForProlongation(fgkMaxDforV0dghtrForProlongation)
79 ,fMaxDForProlongation(fgkMaxDForProlongation)
80 ,fMaxDZForProlongation(fgkMaxDZForProlongation)
81 ,fMinPtForProlongation(fgkMinPtForProlongation)
83 ,fTPCITSWallRMin(fgkTPCITSWallRMin)
84 ,fTPCITSWallRMax(fgkTPCITSWallRMax)
85 ,fTPCITSWallZSpanH(fgkTPCITSWallZSpanH)
86 ,fTPCITSWallMaxStep(fgkTPCITSWallMaxStep)
88 ,fAllowDiagonalClusterization(0)
92 ,fTrackingConditions(0)
95 ,fMaxROCycle(126) // like in AliITSUSimulation::kMaxROCycleAccept
103 //_____________________________________________________________________________
104 AliITSURecoParam::~AliITSURecoParam()
107 delete[] fTanLorentzAngle;
110 delete[] fAllowDiagonalClusterization;
111 fTrackingConditions.Delete();
114 //_____________________________________________________________________________
115 AliITSURecoParam *AliITSURecoParam::GetHighFluxParam()
117 // make default reconstruction parameters for hig flux env.
119 // The settings below are taken from Ruben's MakeITSRecoParam.C
121 kBit0=0x1<<0, kBit1=0x1<<1, kBit2=0x1<<2, kBit3=0x1<<3,
122 kBit4=0x1<<4, kBit5=0x1<<5, kBit6=0x1<<6, kBit7=0x7<<2, kBit8=0x1<<8
124 const Bool_t kAllowDiagCl = kFALSE;
125 const Bool_t kUseLUT[3]={kTRUE,kTRUE,kFALSE};
126 //Use TGeo mat.queries only for RefitInward
130 AliITSURecoParam * itsRecoParam = new AliITSURecoParam();
132 itsRecoParam->SetNLayers(nLr);
134 //******************************************************************
135 itsRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
136 itsRecoParam->SetTitle("HighMult");
137 //******************************************************************
138 for (int i=0; i<nLr; i++)
139 itsRecoParam->SetAllowDiagonalClusterization(i,kAllowDiagCl);
140 for (int i=AliITSURecoParam::kNTrackingPhases; i--;)
141 itsRecoParam->SetUseMatLUT(i,kUseLUT[i]);
143 // Add tracking conditions >>>
144 AliITSUTrackCond *trCond=0;
146 int c0nBranch[7] = {3,9,15,4,5,7,10}; // max branching for the seed on layer
147 int c0nCands[7] = {10,15,45,20,60,20,10};// max candidates for the TPC seed
148 float c0tr2clChi2[7] ={20,25,30,40,45,45,70};//cut on cluster to track chi2
149 float c0gloChi2[7] = {6,10,20,30,60,60,70}; //cut on seed global norm chi2
150 float c0missPen[7] = {2.,2.,2.,2.,2.,2.,2.}; // missing cluster penalty
151 float c0maxChi2SA[14]={0.,0.,0.,0.,2.5,5.,10.,20.,20.,20.,20.,20.,20.,20.};
153 float c0maxChi2Match = 10.;
155 trCond = new AliITSUTrackCond();
156 trCond->SetNLayers(nLr);
157 trCond->SetMaxITSTPCMatchChi2(c0maxChi2Match);
159 for (int i=0; i<nLr; i++) {
160 trCond->SetMaxBranches(i,c0nBranch[i]); // each seed propagated to given layer can produce max nBranch branches
161 trCond->SetMaxCandidates(i,c0nCands[i]); // each tpc track may have at most nCands prolongations
162 trCond->SetMaxTr2ClChi2(i,c0tr2clChi2[i]); // cut on cluster to track chi2
163 trCond->SetMaxChi2GloNrm(i,c0gloChi2[i]); // cut on cluster to track global chi2
164 trCond->SetMissPenalty(i,c0missPen[i]); // missing cluster penalty
167 for (int i=1; i<=2*nLr; i++) trCond->SetMaxITSSAChi2(i,c0maxChi2SA[i-1]);
169 trCond->AddNewCondition(5); // min hits
170 trCond->AddGroupPattern( kBit0|kBit1|kBit2, 2); // at least 2 hits in 3 inner layers
171 trCond->AddGroupPattern( kBit3|kBit4 , 1); // at least 1 hit in 2 middle layers
172 trCond->AddGroupPattern( kBit5|kBit6 , 1); // at least 1 hit in 2 outer layers
176 itsRecoParam->AddTrackingCondition(trCond);
179 //-----------------------------------------------------------
182 int c1nBranch[7] = {0,0,0,4,6,6,10}; // max branching for the seed on layer
183 int c1nCands[7] = {0,0,0,5,5,5,8}; // max candidates for the TPC seed
184 float c1tr2clChi2[7]= {0,0,0,20,20,20,30}; // cut on cluster to track chi2
185 float c1gloChi2[7] = {0,0,0,16,40,35,30}; // cut on seed global norm chi2
186 float c1missPen[7] = {0.,0.,0.,2.,2.,2.,2.}; // missing cluster penalty
187 float c1maxChi2SA[14]={0.,0.,0.,5.,13.,13.,18.,10.,10.,10.,10.,10.,10.,10.};
189 float c1maxChi2Match = 10.;
191 trCond = new AliITSUTrackCond();
192 trCond->SetNLayers(nLr);
194 trCond->ExcludeLayer(0);
195 trCond->ExcludeLayer(1);
196 trCond->ExcludeLayer(2);
198 trCond->SetMaxITSTPCMatchChi2(c1maxChi2Match);
200 // to exclude some layer use trCon->ExcludeLayer(lrID);
202 for (int i=0; i<nLr; i++) {
203 trCond->SetMaxBranches(i,c1nBranch[i]); // each seed propagated to given layer can produce max nBranch branches
204 trCond->SetMaxCandidates(i,c1nCands[i]); // each tpc track may have at most nCands prolongations
205 trCond->SetMaxTr2ClChi2(i,c1tr2clChi2[i]); // cut on cluster to track chi2
206 trCond->SetMaxChi2GloNrm(i,c1gloChi2[i]); // cut on cluster to track global chi2
207 trCond->SetMissPenalty(i,c1missPen[i]); // missing cluster penalty
210 for (int i=1; i<=2*nLr; i++) trCond->SetMaxITSSAChi2(i,c1maxChi2SA[i-1]);
212 trCond->AddNewCondition(4); // min hits
213 trCond->AddGroupPattern( kBit3|kBit4|kBit5|kBit6, 4);
217 itsRecoParam->AddTrackingCondition(trCond);
220 //-----------------------------------------------------------
223 int c2nBranch[7] = {0,0,0,0,0,6,10}; // max branching for the seed on layer
224 int c2nCands[7] = {0,0,0,0,0,5,8}; // max candidates for the TPC seed
225 float c2tr2clChi2[7]= {0,0,0,0,0,15,20}; // cut on cluster to track chi2
226 float c2gloChi2[7] = {0,0,0,0,0,15,20}; // cut on seed global norm chi2
227 float c2missPen[7] = {0.,0.,0.,0.,0.,2.,2.}; // missing cluster penalty
228 float c2maxChi2SA[14]={0.,5.,5.,5.,13.,13.,18.,10.,10.,10.,10.,10.,10.,10.};
229 // chi2SA vs Nclus, meaningless for 2 point tracks
230 float c2maxChi2Match = 6.;
232 trCond = new AliITSUTrackCond();
233 trCond->SetNLayers(nLr);
235 trCond->ExcludeLayer(0);
236 trCond->ExcludeLayer(1);
237 trCond->ExcludeLayer(2);
238 trCond->ExcludeLayer(3);
239 trCond->ExcludeLayer(4);
241 trCond->SetMaxITSTPCMatchChi2(c2maxChi2Match);
243 // to exclude some layer use trCon->ExcludeLayer(lrID);
245 for (int i=0; i<nLr; i++) {
246 trCond->SetMaxBranches(i,c2nBranch[i]); // each seed propagated to given layer can produce max nBranch branches
247 trCond->SetMaxCandidates(i,c2nCands[i]); // each tpc track may have at most nCands prolongations
248 trCond->SetMaxTr2ClChi2(i,c2tr2clChi2[i]); // cut on cluster to track chi2
249 trCond->SetMaxChi2GloNrm(i,c2gloChi2[i]); // cut on cluster to track global chi2
250 trCond->SetMissPenalty(i,c2missPen[i]); // missing cluster penalty
253 for (int i=1;i<=2*nLr;i++) trCond->SetMaxITSSAChi2(i,c2maxChi2SA[i-1]);
255 trCond->AddNewCondition(2); // min hits
256 trCond->AddGroupPattern( kBit5|kBit6, 2);
260 itsRecoParam->AddTrackingCondition(trCond);
265 //_____________________________________________________________________________
266 AliITSURecoParam *AliITSURecoParam::GetLowFluxParam()
268 // make default reconstruction parameters for low flux env.
269 AliITSURecoParam *param = new AliITSURecoParam();
274 //_____________________________________________________________________________
275 AliITSURecoParam *AliITSURecoParam::GetCosmicTestParam()
277 // make default reconstruction parameters for cosmics
278 AliITSURecoParam *param = new AliITSURecoParam();
283 //_____________________________________________________________________________
284 void AliITSURecoParam::SetNLayers(Int_t n)
286 // set n layers and init all layer dependent arrays
287 if (fNLayers>0) AliFatal(Form("Number of layers was already set to %d",fNLayers));
288 if (n<1) n = 1; // in case we want to have dummy params
290 fTanLorentzAngle = new Double_t[n];
291 fSigmaY2 = new Double_t[n];
292 fSigmaZ2 = new Double_t[n];
293 fAllowDiagonalClusterization = new Bool_t[n];
296 fAllowDiagonalClusterization[i] = fgkAllowDiagonalClusterization;
297 fTanLorentzAngle[i] = fgkTanLorentzAngle;
298 fSigmaY2[i] = fgkSigmaRoadY*fgkSigmaRoadY;
299 fSigmaZ2[i] = fgkSigmaRoadZ*fgkSigmaRoadZ;
304 //_____________________________________________________________________________
305 void AliITSURecoParam::SetTanLorentzAngle(Int_t lr, Double_t v)
307 // set Lorentz angle value
308 if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
309 fTanLorentzAngle[lr] = v;
312 //_____________________________________________________________________________
313 void AliITSURecoParam::SetSigmaY2(Int_t lr, Double_t v)
315 // set Lorentz angle value
316 if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
320 //_____________________________________________________________________________
321 void AliITSURecoParam::SetSigmaZ2(Int_t lr, Double_t v)
323 // set Lorentz angle value
324 if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
328 //_____________________________________________________________________________
329 void AliITSURecoParam::SetAllowDiagonalClusterization(Int_t lr, Bool_t v)
331 // set Lorentz angle value
332 if (lr>=fNLayers) AliFatal(Form("Number of defined layers is %d",fNLayers));
333 fAllowDiagonalClusterization[lr] = v;
336 //========================================================================
337 //_____________________________________________________________________________
338 void AliITSURecoParam::Print(Option_t *) const
341 printf("%s: %s %s\n",ClassName(),GetName(),GetTitle());
342 printf("%-30s\t%f\n","fMaxDforV0dghtrForProlongation",fMaxDforV0dghtrForProlongation);
343 printf("%-30s\t%f\n","fMaxDForProlongation",fMaxDForProlongation);
344 printf("%-30s\t%f\n","fMaxDZForProlongation",fMaxDZForProlongation);
345 printf("%-30s\t%f\n","fMinPtForProlongation",fMinPtForProlongation);
347 printf("Use material LUT at steps: ");
348 for (int i=0;i<kNTrackingPhases;i++) printf("%d : %s |",i,GetUseMatLUT(i) ? "ON":"OFF"); printf("\n");
349 printf("TPC-ITS wall: %.3f<R<%.3f DZ/2=%.3f MaxStep=%.3f\n",
350 fTPCITSWallRMin,fTPCITSWallRMax,fTPCITSWallZSpanH,fTPCITSWallMaxStep);
352 printf("N.Layers: %d\n",fNLayers);
354 printf("Layer-wise data:\n");
355 printf("%-30s\t:","fTanLorentzAngle"); for (int i=0;i<fNLayers;i++) printf(" %+.2e",fTanLorentzAngle[i]); printf("\n");
356 printf("%-30s\t:","fSigmaY2"); for (int i=0;i<fNLayers;i++) printf(" %+.2e",fSigmaY2[i]); printf("\n");
357 printf("%-30s\t:","fSigmaZ2"); for (int i=0;i<fNLayers;i++) printf(" %+.2e",fSigmaZ2[i]); printf("\n");
360 int nTrCond = GetNTrackingConditions();
361 printf("%d tracking conditions defined\n",nTrCond);
362 for (int itc=0;itc<nTrCond;itc++) {
363 printf("Tracking condition %d\n",itc);
364 GetTrackingCondition(itc)->Print();
368 //__________________________________________________
369 void AliITSURecoParam::AddTrackingCondition(AliITSUTrackCond* cond)
371 // Add new tracking condition
372 fTrackingConditions.AddLast(cond);