]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSRecoParam.cxx
In Open() and GotoEvent() try the ESD operations first, fallback to run-loader.
[u/mrichter/AliRoot.git] / ITS / AliITSRecoParam.cxx
1 /**************************************************************************
2  * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
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  **************************************************************************/
15
16 #include "AliITSRecoParam.h"
17
18 /* $Id$ */
19
20 ///////////////////////////////////////////////////////////////////////////////
21 //                                                                           //
22 // Class with ITS reconstruction parameters                                  //
23 // Origin: andrea.dainese@lnl.infn.it                                        //
24 //                                                                           //
25 ///////////////////////////////////////////////////////////////////////////////
26
27
28
29 ClassImp(AliITSRecoParam)
30
31 const Int_t AliITSRecoParam::fgkLayersNotToSkip[AliITSgeomTGeo::kNLayers]={0,0,0,0,0,0};
32 const Int_t AliITSRecoParam::fgkLastLayerToTrackTo=0;
33 const Int_t AliITSRecoParam::fgkMaxDetectorPerLayer=1000;
34 const Double_t AliITSRecoParam::fgkriw=80.0;
35 const Double_t AliITSRecoParam::fgkdiw=0.0053;
36 const Double_t AliITSRecoParam::fgkX0iw=30.0;
37 const Double_t AliITSRecoParam::fgkrcd=61.0;
38 const Double_t AliITSRecoParam::fgkdcd=0.0053;
39 const Double_t AliITSRecoParam::fgkX0cd=30.0;
40 const Double_t AliITSRecoParam::fgkyr=12.8;
41 const Double_t AliITSRecoParam::fgkdr=0.03;
42 const Double_t AliITSRecoParam::fgkzm=0.2;
43 const Double_t AliITSRecoParam::fgkdm=0.40;
44 const Double_t AliITSRecoParam::fgkrs=50.0;
45 const Double_t AliITSRecoParam::fgkds=0.001;
46 const Double_t AliITSRecoParam::fgkrInsideITSscreen=49.0;
47 const Double_t AliITSRecoParam::fgkrInsideSPD1=3.7;
48 const Double_t AliITSRecoParam::fgkrPipe=3.;
49 const Double_t AliITSRecoParam::fgkrInsidePipe=2.7;
50 const Double_t AliITSRecoParam::fgkrOutsidePipe=3.3;
51 const Double_t AliITSRecoParam::fgkdPipe=0.0028;
52 const Double_t AliITSRecoParam::fgkrInsideShield[2]={7.5,25.0};
53 const Double_t AliITSRecoParam::fgkrOutsideShield[2]={10.5,30.0};
54 const Double_t AliITSRecoParam::fgkdshield[2]={0.0097,0.0034};
55 const Double_t AliITSRecoParam::fgkX0shield[2]={38.6,42.0};
56 const Double_t AliITSRecoParam::fgkX0Air=21.82;
57 const Double_t AliITSRecoParam::fgkX0Be=65.19;
58 const Double_t AliITSRecoParam::fgkBoundaryWidth=0.2;
59 const Double_t AliITSRecoParam::fgkDeltaXNeighbDets=0.5;
60 const Double_t AliITSRecoParam::fgkSPDdetzlength=6.960; // 7.072-2*0.056
61 const Double_t AliITSRecoParam::fgkSPDdetxlength=1.298; // 1.410-2*0.056
62
63 //_____________________________________________________________________________
64 AliITSRecoParam::AliITSRecoParam() : AliDetectorRecoParam(),
65 fMaxSnp(1.),
66 fNSigmaYLayerForRoadY(0),
67 fNSigmaRoadY(0),
68 fNSigmaZLayerForRoadZ(0),
69 fNSigmaRoadZ(0),
70 fNSigma2RoadZC(0),
71 fNSigma2RoadYC(0),
72 fNSigma2RoadZNonC(0),
73 fNSigma2RoadYNonC(0),
74 fRoadMisal(0),
75 fMaxNormChi2NonCForHypothesis(0),
76 fMaxChi2(0),
77 fMaxRoad(0),
78 fMaxChi2In(0),
79 fChi2PerCluster(0),
80 fXV(0), 
81 fYV(0),
82 fZV(0),
83 fSigmaXV(0),
84 fSigmaYV(0),
85 fSigmaZV(0),
86 fVertexCut(0),
87 fMaxDZforPrimTrk(0),
88 fMaxDZToUseConstraint(0), 
89 fMaxDforV0dghtrForProlongation(0),
90 fMaxDForProlongation(0),
91 fMaxDZForProlongation(0),
92 fMinPtForProlongation(0),
93 fAddVirtualClustersInDeadZone(kFALSE),
94 fZWindowDeadZone(0),
95 fSigmaXDeadZoneHit2(0),
96 fSigmaZDeadZoneHit2(0),
97 fXPassDeadZoneHits(0),
98 fUseTGeoInTracker(3),
99 fAllowSharedClusters(kTRUE),
100 fClusterErrorsParam(1),
101 fClusterMisalError(0.0),
102 fComputePlaneEff(kFALSE),
103 fHistoPlaneEff(kFALSE),
104 fIPlanePlaneEff(0),
105 fReadPlaneEffFromOCDB(kFALSE),
106 fMinPtPlaneEff(0),
107 fMaxMissingClustersPlaneEff(0),
108 fRequireClusterInOuterLayerPlaneEff(kFALSE),
109 fRequireClusterInInnerLayerPlaneEff(kFALSE),
110 fOnlyConstraintPlaneEff(kFALSE),
111 fExtendedEtaAcceptance(kFALSE),
112 fUseBadZonesFromOCDB(kFALSE),
113 fUseSingleBadChannelsFromOCDB(kFALSE),
114 fMinFractionOfBadInRoad(0),
115 fAllowProlongationWithEmptyRoad(kFALSE),
116 fFactorSAWindowSizes(1.),
117 fNLoopsSA(33),
118 fMinPhiSA(0.002),
119 fMaxPhiSA(0.0145),
120 fMinLambdaSA(0.003),
121 fMaxLambdaSA(0.008),
122 fSAOnePointTracks(kFALSE),
123 fSAUseAllClusters(kFALSE),
124 fFindV0s(kTRUE),
125 fUseUnfoldingInClusterFinderSPD(kFALSE),
126 fUseUnfoldingInClusterFinderSDD(kTRUE),
127 fUseUnfoldingInClusterFinderSSD(kTRUE),
128 fUseChargeMatchingInClusterFinderSSD(kTRUE)
129 {
130   //
131   // constructor
132   //
133   SetName("ITS");
134   SetTitle("ITS");
135
136   SetLayersParameters();
137   for(Int_t i=0; i<AliITSgeomTGeo::kNLayers; i++) fLayersToSkip[i]=0;
138   SetUseTGeoInTracker(3);
139   SetAllowSharedClusters(kTRUE);
140   SetFindV0s(kTRUE);
141   SetAddVirtualClustersInDeadZone(kFALSE);
142   SetUseAmplitudeInfo(kTRUE);
143   SetClusterErrorsParam(1);
144 }
145 //_____________________________________________________________________________
146 AliITSRecoParam::~AliITSRecoParam() 
147 {
148   //
149   // destructor
150   //  
151 }
152 //_____________________________________________________________________________
153 AliITSRecoParam *AliITSRecoParam::GetHighFluxParam() 
154 {
155   //
156   // make default reconstruction  parameters for hig  flux env.
157   //
158   AliITSRecoParam *param = new AliITSRecoParam();
159
160   param->fMaxSnp = 0.95;
161
162   param->fNSigmaYLayerForRoadY = 4.;
163   param->fNSigmaRoadY = 7.5;
164   param->fNSigmaZLayerForRoadZ = 4.;
165   param->fNSigmaRoadZ = 7.5;
166
167   param->fNSigma2RoadZC = 60.; //7.75^2
168   param->fNSigma2RoadYC = 60.; //7.75^2
169   param->fNSigma2RoadZNonC = 50.; //7.07^2
170   param->fNSigma2RoadYNonC = 50.; //7.07^2
171
172   param->fMaxChi2PerCluster[0] = 11.; //7
173   param->fMaxChi2PerCluster[1] = 12.; //5
174   param->fMaxChi2PerCluster[2] = 12.; //8
175   param->fMaxChi2PerCluster[3] = 5.;  //8
176   param->fMaxChi2PerCluster[4] = 12.; //6.5
177
178   param->fMaxNormChi2NonC[0] = 7.;
179   param->fMaxNormChi2NonC[1] = 8.;
180   param->fMaxNormChi2NonC[2] = 8.;
181   param->fMaxNormChi2NonC[3] = 11.;
182   param->fMaxNormChi2NonC[4] = 14.;
183   param->fMaxNormChi2NonC[5] = 25.;
184
185   param->fMaxNormChi2C[0] = 11.;
186   param->fMaxNormChi2C[1] = 13.;
187   param->fMaxNormChi2C[2] = 15.;
188   param->fMaxNormChi2C[3] = 18.;
189   param->fMaxNormChi2C[4] = 30.;
190   param->fMaxNormChi2C[5] = 35.;
191
192   param->fMaxNormChi2NonCForHypothesis = 7.;
193   
194   param->fMaxChi2 = 35.;
195
196   param->fMaxChi2s[0] = 25.; //40   
197   param->fMaxChi2s[1] = 25.; //40   
198   param->fMaxChi2s[2] = 25.; //40   
199   param->fMaxChi2s[3] = 25.; //40   
200   param->fMaxChi2s[4] = 40.; //40   
201   param->fMaxChi2s[5] = 50.; //40
202
203   param->fMaxRoad = 6.;
204
205   // not used
206   param->fMaxChi2In = 16.;
207    
208   param->fMaxChi2sR[0] = 10.;   
209   param->fMaxChi2sR[1] = 10.;   
210   param->fMaxChi2sR[2] = 10.;   
211   param->fMaxChi2sR[3] = 10.;   
212   param->fMaxChi2sR[4] = 30.;   
213   param->fMaxChi2sR[5] = 40.;   
214
215   param->fChi2PerCluster = 9.;
216   // not used
217
218   param->fXV = 0.;
219   param->fYV = 0.;
220   param->fZV = 0.;
221   param->fSigmaXV = 0.0050;
222   param->fSigmaYV = 0.0050;
223   param->fSigmaZV = 0.0100;
224
225   param->fVertexCut = 25.;
226
227   param->fMaxDZforPrimTrk = 0.4;
228   param->fMaxDZToUseConstraint = 3.;
229
230   param->fMaxDforV0dghtrForProlongation = 30.;
231   param->fMaxDForProlongation = 40.;//10.;
232   param->fMaxDZForProlongation = 60.;//20.;
233   param->fMinPtForProlongation = 0.120;
234
235   param->fZWindowDeadZone = 2.0;
236   param->fSigmaXDeadZoneHit2 = 0.004/12.;
237   param->fSigmaZDeadZoneHit2 = 0.001/12.;
238   param->fXPassDeadZoneHits = 0.018;
239   
240   return param;
241 }
242 //_____________________________________________________________________________
243 AliITSRecoParam *AliITSRecoParam::GetLowFluxParam() 
244 {
245   //
246   // make default reconstruction  parameters for low  flux env.
247   //
248   AliITSRecoParam *param = new AliITSRecoParam();
249
250   param->fMaxSnp = 0.95;
251
252   param->fNSigmaYLayerForRoadY = 4.;
253   param->fNSigmaRoadY = 7.5;
254   param->fNSigmaZLayerForRoadZ = 4.;
255   param->fNSigmaRoadZ = 7.5;
256
257   param->fNSigma2RoadZC = 60.; //7.75^2
258   param->fNSigma2RoadYC = 60.; //7.75^2
259   param->fNSigma2RoadZNonC = 50.; //7.07^2
260   param->fNSigma2RoadYNonC = 50.; //7.07^2
261
262   param->fMaxChi2PerCluster[0] = 11.; //7
263   param->fMaxChi2PerCluster[1] = 12.; //5
264   param->fMaxChi2PerCluster[2] = 12.; //8
265   param->fMaxChi2PerCluster[3] = 5.;  //8
266   param->fMaxChi2PerCluster[4] = 12.; //6.5
267
268   param->fMaxNormChi2NonC[0] = 7.;
269   param->fMaxNormChi2NonC[1] = 8.;
270   param->fMaxNormChi2NonC[2] = 8.;
271   param->fMaxNormChi2NonC[3] = 11.;
272   param->fMaxNormChi2NonC[4] = 14.;
273   param->fMaxNormChi2NonC[5] = 25.;
274
275   param->fMaxNormChi2C[0] = 11.;
276   param->fMaxNormChi2C[1] = 13.;
277   param->fMaxNormChi2C[2] = 15.;
278   param->fMaxNormChi2C[3] = 18.;
279   param->fMaxNormChi2C[4] = 30.;
280   param->fMaxNormChi2C[5] = 35.;
281
282   param->fMaxNormChi2NonCForHypothesis = 7.;
283   
284   param->fMaxChi2 = 35.;
285
286   param->fMaxChi2s[0] = 25.; //40   
287   param->fMaxChi2s[1] = 25.; //40   
288   param->fMaxChi2s[2] = 25.; //40   
289   param->fMaxChi2s[3] = 25.; //40   
290   param->fMaxChi2s[4] = 40.; //40   
291   param->fMaxChi2s[5] = 50.; //40
292
293   param->fMaxRoad = 6.;
294
295   // not used
296   param->fMaxChi2In = 16.;
297    
298   param->fMaxChi2sR[0] = 10.;   
299   param->fMaxChi2sR[1] = 10.;   
300   param->fMaxChi2sR[2] = 10.;   
301   param->fMaxChi2sR[3] = 10.;   
302   param->fMaxChi2sR[4] = 30.;   
303   param->fMaxChi2sR[5] = 40.;   
304
305   param->fChi2PerCluster = 9.;
306   // not used
307
308   param->fXV = 0.;
309   param->fYV = 0.;
310   param->fZV = 0.;
311   param->fSigmaXV = 0.0050;
312   param->fSigmaYV = 0.0050;
313   param->fSigmaZV = 0.0100;
314
315   param->fVertexCut = 25.;
316
317   param->fMaxDZforPrimTrk = 0.4;
318   param->fMaxDZToUseConstraint = 3.;
319
320   param->fMaxDforV0dghtrForProlongation = 30.;
321   param->fMaxDForProlongation = 40.;//10.;
322   param->fMaxDZForProlongation = 60.;//20.;
323   param->fMinPtForProlongation = 0.120;
324
325   param->fZWindowDeadZone = 2.0;
326   param->fSigmaXDeadZoneHit2 = 0.004/12.;
327   param->fSigmaZDeadZoneHit2 = 0.001/12.;
328   param->fXPassDeadZoneHits = 0.018;
329   param->SetNLoopsSA(10);
330   
331   return param;
332 }
333 //_____________________________________________________________________________
334 AliITSRecoParam *AliITSRecoParam::GetCosmicTestParam() 
335 {
336   //
337   // make default reconstruction  parameters for cosmics
338   //
339   AliITSRecoParam *param = new AliITSRecoParam();
340
341   // larger seach windows for SA (in case of large misalignments)
342   param->SetFactorSAWindowSizes(3.); 
343
344   param->fMaxSnp = 0.95;
345
346   param->fNSigmaYLayerForRoadY = 4.;
347   param->fNSigmaRoadY = 7.5;
348   param->fNSigmaZLayerForRoadZ = 4.;
349   param->fNSigmaRoadZ = 7.5;
350
351   param->fNSigma2RoadZC = 60.; //7.75^2
352   param->fNSigma2RoadYC = 60.; //7.75^2
353   param->fNSigma2RoadZNonC = 50.; //7.07^2
354   param->fNSigma2RoadYNonC = 50.; //7.07^2
355
356   param->fMaxChi2PerCluster[0] = 11.; //7
357   param->fMaxChi2PerCluster[1] = 12.; //5
358   param->fMaxChi2PerCluster[2] = 12.; //8
359   param->fMaxChi2PerCluster[3] = 5.;  //8
360   param->fMaxChi2PerCluster[4] = 12.; //6.5
361
362   param->fMaxNormChi2NonC[0] = 7.;
363   param->fMaxNormChi2NonC[1] = 8.;
364   param->fMaxNormChi2NonC[2] = 8.;
365   param->fMaxNormChi2NonC[3] = 11.;
366   param->fMaxNormChi2NonC[4] = 14.;
367   param->fMaxNormChi2NonC[5] = 25.;
368
369   param->fMaxNormChi2C[0] = 11.;
370   param->fMaxNormChi2C[1] = 13.;
371   param->fMaxNormChi2C[2] = 15.;
372   param->fMaxNormChi2C[3] = 18.;
373   param->fMaxNormChi2C[4] = 30.;
374   param->fMaxNormChi2C[5] = 35.;
375
376   param->fMaxNormChi2NonCForHypothesis = 7.;
377   
378   param->fMaxChi2 = 35.;
379
380   param->fMaxChi2s[0] = 25.; //40   
381   param->fMaxChi2s[1] = 25.; //40   
382   param->fMaxChi2s[2] = 25.; //40   
383   param->fMaxChi2s[3] = 25.; //40   
384   param->fMaxChi2s[4] = 40.; //40   
385   param->fMaxChi2s[5] = 50.; //40
386
387   param->fMaxRoad = 6.;
388
389   // not used
390   param->fMaxChi2In = 16.;
391    
392   param->fMaxChi2sR[0] = 10.;   
393   param->fMaxChi2sR[1] = 10.;   
394   param->fMaxChi2sR[2] = 10.;   
395   param->fMaxChi2sR[3] = 10.;   
396   param->fMaxChi2sR[4] = 30.;   
397   param->fMaxChi2sR[5] = 40.;   
398
399   param->fChi2PerCluster = 9.;
400   // not used
401
402   param->fXV = 0.;
403   param->fYV = 0.;
404   param->fZV = 0.;
405   param->fSigmaXV = 0.0050;
406   param->fSigmaYV = 0.0050;
407   param->fSigmaZV = 0.0100;
408
409   param->fVertexCut = 25.;
410
411   param->fMaxDZforPrimTrk = 0.4;
412   param->fMaxDZToUseConstraint = 3.;
413
414   param->fMaxDforV0dghtrForProlongation = 30.;
415   param->fMaxDForProlongation = 10.;
416   param->fMaxDZForProlongation = 20.;
417   param->fMinPtForProlongation = 0.120;
418
419   param->fZWindowDeadZone = 2.0;
420   param->fSigmaXDeadZoneHit2 = 0.004/12.;
421   param->fSigmaZDeadZoneHit2 = 0.001/12.;
422   param->fXPassDeadZoneHits = 0.018;
423
424   
425   return param;
426 }
427 //_____________________________________________________________________________
428 AliITSRecoParam *AliITSRecoParam::GetPlaneEffParam(Int_t i)
429 {
430   //
431   // make special reconstruction parameters for Plane Efficiency study on layer i
432   //
433   if (i<0 || i>=AliITSgeomTGeo::kNLayers) {
434     printf("AliITSRecoParam::GetPlaneEffParam: index of ITS Plane not in the range [0,5]\n");
435     printf("returning null pointer");
436     return NULL;
437   }
438   AliITSRecoParam *param;
439   param = GetHighFluxParam();
440   param->SetComputePlaneEff();
441   param->SetLayerToSkip(i);
442   param->SetIPlanePlaneEff(i);
443   // optimized setting for SPD0 (i==0)
444   if (i==0 || i==1) {
445     param->fMinPtPlaneEff = 0.200; // high pt particles
446     param->fMaxMissingClustersPlaneEff = 1; // at most 1 layer out of 5 without cluster
447     param->fRequireClusterInOuterLayerPlaneEff = kTRUE; // cluster on SPD1 must be
448     //param->fOnlyConstraintPlaneEff = kTRUE;
449   }
450   if (i==2 || i==3) {
451     param->fMinPtPlaneEff = 0.200; // high pt particles
452     param->fMaxMissingClustersPlaneEff = 1; // at most 1 layer out of 5 without cluster
453     param->fRequireClusterInOuterLayerPlaneEff = kTRUE;
454     //param->fOnlyConstraintPlaneEff = kTRUE;
455   }
456   if (i==4) {
457     param->fMinPtPlaneEff = 0.200; // high pt particles
458     param->fMaxMissingClustersPlaneEff = 0; // at most 1 layer out of 5 without cluster
459     param->fRequireClusterInOuterLayerPlaneEff = kTRUE;
460     //param->fOnlyConstraintPlaneEff = kTRUE;
461   }
462   if (i==5) {
463     param->fMinPtPlaneEff = 0.200; // high pt particles
464   }
465   //
466   return param;
467 }
468 //_____________________________________________________________________________
469 void AliITSRecoParam::SetLayersParameters() 
470 {
471   //
472   // number of layers and layers spatial resolutions
473   //
474
475   // spatial resolutions of the detectors
476   // y: 12 12 38 38 20 20 micron
477   fSigmaY2[0]=1.44e-6;
478   fSigmaY2[1]=1.44e-6;
479   fSigmaY2[2]=1.444e-5;
480   fSigmaY2[3]=1.444e-5;
481   fSigmaY2[4]=4.0e-6;
482   fSigmaY2[5]=4.0e-6;
483   // z: 120 120 28 28 830 830 micron
484   fSigmaZ2[0]=1.44e-4;
485   fSigmaZ2[1]=1.44e-4;
486   fSigmaZ2[2]=7.84e-6;
487   fSigmaZ2[3]=7.84e-6;
488   fSigmaZ2[4]=6.889e-3;
489   fSigmaZ2[5]=6.889e-3;
490
491   return;
492 }
493 //_____________________________________________________________________________
494 void AliITSRecoParam::PrintParameters() const 
495 {
496   //
497   // print parameters
498   //
499
500   printf("=============================  AliITSRecoParam::PrintParameters ");
501   printf("============================= \n \n");
502   for(Int_t i=0; i<AliITSgeomTGeo::kNLayers; i++) {
503     if(!fLayersToSkip[i]) {
504       printf("ITS Traking: using layer %d\n",i);
505     } else {
506       printf("ITS Traking: skipping layer %d\n",i);
507     }
508   }
509   for(Int_t i=0; i<AliITSgeomTGeo::kNLayers; i++) {
510     if(fUseAmplitudeInfo[i]) {
511       printf("ITS Traking: use amplitude info for layer %d\n",i);
512     } else {
513       printf("ITS Traking: don't use amplitude info for layer %d\n",i);
514     }
515   }
516   for(Int_t i=0; i<AliITSgeomTGeo::kNLayers; i++)
517     printf("Layer %d:\n  sigmaY2 %f, sigma Z2 %f\n  max norm chi2 for non constrained tracks %f\n  max norm chi2 for constrained tracks %f\n  max predicted chi2 (cluster & track prol.) %f\n",i,fSigmaY2[i],fSigmaZ2[i],fMaxNormChi2NonC[i],fMaxNormChi2C[i],fMaxChi2s[i]);
518
519
520   Dump();
521
522   return;
523 }