]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSRecoParam.cxx
Calibration files for SSD built according to real detector status (Panos)
[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 fTracker(0),
66 fITSonly(kFALSE),
67 fVertexer(0),
68 fClusterFinder(0),
69 fPID(0),
70 fVtxr3DZCutWide(0.),
71 fVtxr3DRCutWide(0.),
72 fVtxr3DZCutNarrow(0.),
73 fVtxr3DRCutNarrow(0.),
74 fVtxr3DPhiCutLoose(0.),
75 fVtxr3DPhiCutTight(0.),
76 fVtxr3DDCACut(0.),
77 fMaxSnp(1.),
78 fNSigmaYLayerForRoadY(0),
79 fNSigmaRoadY(0),
80 fNSigmaZLayerForRoadZ(0),
81 fNSigmaRoadZ(0),
82 fNSigma2RoadZC(0),
83 fNSigma2RoadYC(0),
84 fNSigma2RoadZNonC(0),
85 fNSigma2RoadYNonC(0),
86 fRoadMisal(0),
87 fMaxNormChi2NonCForHypothesis(0),
88 fMaxChi2(0),
89 fMaxRoad(0),
90 fMaxChi2In(0),
91 fChi2PerCluster(0),
92 fXV(0), 
93 fYV(0),
94 fZV(0),
95 fSigmaXV(0),
96 fSigmaYV(0),
97 fSigmaZV(0),
98 fVertexCut(0),
99 fMaxDZforPrimTrk(0),
100 fMaxDZToUseConstraint(0), 
101 fMaxDforV0dghtrForProlongation(0),
102 fMaxDForProlongation(0),
103 fMaxDZForProlongation(0),
104 fMinPtForProlongation(0),
105 fAddVirtualClustersInDeadZone(kFALSE),
106 fZWindowDeadZone(0),
107 fSigmaXDeadZoneHit2(0),
108 fSigmaZDeadZoneHit2(0),
109 fXPassDeadZoneHits(0),
110 fUseTGeoInTracker(3),
111 fAllowSharedClusters(kTRUE),
112 fClusterErrorsParam(1),
113 fComputePlaneEff(kFALSE),
114 fHistoPlaneEff(kFALSE),
115 fIPlanePlaneEff(0),
116 fReadPlaneEffFromOCDB(kFALSE),
117 fMinPtPlaneEff(0),
118 fMaxMissingClustersPlaneEff(0),
119 fRequireClusterInOuterLayerPlaneEff(kFALSE),
120 fRequireClusterInInnerLayerPlaneEff(kFALSE),
121 fOnlyConstraintPlaneEff(kFALSE),
122 fExtendedEtaAcceptance(kFALSE),
123 fUseBadZonesFromOCDB(kFALSE),
124 fUseSingleBadChannelsFromOCDB(kFALSE),
125 fMinFractionOfBadInRoad(0),
126 fAllowProlongationWithEmptyRoad(kFALSE),
127 fOuterStartLayerSA(0),
128 fFactorSAWindowSizes(1.),
129 fNLoopsSA(33),
130 fMinPhiSA(0.002),
131 fMaxPhiSA(0.0145),
132 fMinLambdaSA(0.003),
133 fMaxLambdaSA(0.008),
134 fSAOnePointTracks(kFALSE),
135 fSAUseAllClusters(kFALSE),
136 fFindV0s(kTRUE),
137 fUseUnfoldingInClusterFinderSPD(kFALSE),
138 fUseUnfoldingInClusterFinderSDD(kTRUE),
139 fUseUnfoldingInClusterFinderSSD(kTRUE),
140 fUseChargeMatchingInClusterFinderSSD(kTRUE)
141 {
142   //
143   // constructor
144   //
145   SetName("ITS");
146   SetTitle("ITS");
147
148   SetLayersParameters();
149   for(Int_t i=0; i<AliITSgeomTGeo::kNLayers; i++) fLayersToSkip[i]=0;
150   SetUseTGeoInTracker(3);
151   SetAllowSharedClusters(kTRUE);
152   SetFindV0s(kTRUE);
153   SetAddVirtualClustersInDeadZone(kFALSE);
154   SetUseAmplitudeInfo(kTRUE);
155   SetClusterErrorsParam(1);
156   SetClusterMisalError(0.);
157   SetVertexer3DDefaults();
158 }
159 //_____________________________________________________________________________
160 AliITSRecoParam::~AliITSRecoParam() 
161 {
162   //
163   // destructor
164   //  
165 }
166 //_____________________________________________________________________________
167 AliITSRecoParam *AliITSRecoParam::GetHighFluxParam() 
168 {
169   //
170   // make default reconstruction  parameters for hig  flux env.
171   //
172   AliITSRecoParam *param = new AliITSRecoParam();
173   param->SetVertexer3DDefaults();
174
175   param->fMaxSnp = 0.95;
176
177   param->fNSigmaYLayerForRoadY = 4.;
178   param->fNSigmaRoadY = 7.5;
179   param->fNSigmaZLayerForRoadZ = 4.;
180   param->fNSigmaRoadZ = 7.5;
181
182   param->fNSigma2RoadZC = 60.; //7.75^2
183   param->fNSigma2RoadYC = 60.; //7.75^2
184   param->fNSigma2RoadZNonC = 50.; //7.07^2
185   param->fNSigma2RoadYNonC = 50.; //7.07^2
186
187   param->fMaxChi2PerCluster[0] = 11.; //7
188   param->fMaxChi2PerCluster[1] = 12.; //5
189   param->fMaxChi2PerCluster[2] = 12.; //8
190   param->fMaxChi2PerCluster[3] = 5.;  //8
191   param->fMaxChi2PerCluster[4] = 12.; //6.5
192
193   param->fMaxNormChi2NonC[0] = 7.;
194   param->fMaxNormChi2NonC[1] = 8.;
195   param->fMaxNormChi2NonC[2] = 8.;
196   param->fMaxNormChi2NonC[3] = 11.;
197   param->fMaxNormChi2NonC[4] = 14.;
198   param->fMaxNormChi2NonC[5] = 25.;
199
200   param->fMaxNormChi2C[0] = 11.;
201   param->fMaxNormChi2C[1] = 13.;
202   param->fMaxNormChi2C[2] = 15.;
203   param->fMaxNormChi2C[3] = 18.;
204   param->fMaxNormChi2C[4] = 30.;
205   param->fMaxNormChi2C[5] = 35.;
206
207   param->fMaxNormChi2NonCForHypothesis = 7.;
208   
209   param->fMaxChi2 = 35.;
210
211   param->fMaxChi2s[0] = 25.; //40   
212   param->fMaxChi2s[1] = 25.; //40   
213   param->fMaxChi2s[2] = 25.; //40   
214   param->fMaxChi2s[3] = 25.; //40   
215   param->fMaxChi2s[4] = 40.; //40   
216   param->fMaxChi2s[5] = 50.; //40
217
218   param->fMaxRoad = 6.;
219
220   // not used
221   param->fMaxChi2In = 16.;
222    
223   param->fMaxChi2sR[0] = 10.;   
224   param->fMaxChi2sR[1] = 10.;   
225   param->fMaxChi2sR[2] = 10.;   
226   param->fMaxChi2sR[3] = 10.;   
227   param->fMaxChi2sR[4] = 30.;   
228   param->fMaxChi2sR[5] = 40.;   
229
230   param->fChi2PerCluster = 9.;
231   // not used
232
233   param->fXV = 0.;
234   param->fYV = 0.;
235   param->fZV = 0.;
236   param->fSigmaXV = 0.0050;
237   param->fSigmaYV = 0.0050;
238   param->fSigmaZV = 0.0100;
239
240   param->fVertexCut = 25.;
241
242   param->fMaxDZforPrimTrk = 0.4;
243   param->fMaxDZToUseConstraint = 3.;
244
245   param->fMaxDforV0dghtrForProlongation = 30.;
246   param->fMaxDForProlongation = 40.;//10.;
247   param->fMaxDZForProlongation = 60.;//20.;
248   param->fMinPtForProlongation = 0.120;
249
250   param->fZWindowDeadZone = 2.0;
251   param->fSigmaXDeadZoneHit2 = 0.004/12.;
252   param->fSigmaZDeadZoneHit2 = 0.001/12.;
253   param->fXPassDeadZoneHits = 0.018;
254   
255   return param;
256 }
257 //_____________________________________________________________________________
258 AliITSRecoParam *AliITSRecoParam::GetLowFluxParam() 
259 {
260   //
261   // make default reconstruction  parameters for low  flux env.
262   //
263   AliITSRecoParam *param = new AliITSRecoParam();
264   param->SetVertexer3DDefaults();
265
266   param->fMaxSnp = 0.95;
267
268   param->fNSigmaYLayerForRoadY = 4.;
269   param->fNSigmaRoadY = 7.5;
270   param->fNSigmaZLayerForRoadZ = 4.;
271   param->fNSigmaRoadZ = 7.5;
272
273   param->fNSigma2RoadZC = 60.; //7.75^2
274   param->fNSigma2RoadYC = 60.; //7.75^2
275   param->fNSigma2RoadZNonC = 50.; //7.07^2
276   param->fNSigma2RoadYNonC = 50.; //7.07^2
277
278   param->fMaxChi2PerCluster[0] = 11.; //7
279   param->fMaxChi2PerCluster[1] = 12.; //5
280   param->fMaxChi2PerCluster[2] = 12.; //8
281   param->fMaxChi2PerCluster[3] = 5.;  //8
282   param->fMaxChi2PerCluster[4] = 12.; //6.5
283
284   param->fMaxNormChi2NonC[0] = 7.;
285   param->fMaxNormChi2NonC[1] = 8.;
286   param->fMaxNormChi2NonC[2] = 8.;
287   param->fMaxNormChi2NonC[3] = 11.;
288   param->fMaxNormChi2NonC[4] = 14.;
289   param->fMaxNormChi2NonC[5] = 25.;
290
291   param->fMaxNormChi2C[0] = 11.;
292   param->fMaxNormChi2C[1] = 13.;
293   param->fMaxNormChi2C[2] = 15.;
294   param->fMaxNormChi2C[3] = 18.;
295   param->fMaxNormChi2C[4] = 30.;
296   param->fMaxNormChi2C[5] = 35.;
297
298   param->fMaxNormChi2NonCForHypothesis = 7.;
299   
300   param->fMaxChi2 = 35.;
301
302   param->fMaxChi2s[0] = 25.; //40   
303   param->fMaxChi2s[1] = 25.; //40   
304   param->fMaxChi2s[2] = 25.; //40   
305   param->fMaxChi2s[3] = 25.; //40   
306   param->fMaxChi2s[4] = 40.; //40   
307   param->fMaxChi2s[5] = 50.; //40
308
309   param->fMaxRoad = 6.;
310
311   // not used
312   param->fMaxChi2In = 16.;
313    
314   param->fMaxChi2sR[0] = 10.;   
315   param->fMaxChi2sR[1] = 10.;   
316   param->fMaxChi2sR[2] = 10.;   
317   param->fMaxChi2sR[3] = 10.;   
318   param->fMaxChi2sR[4] = 30.;   
319   param->fMaxChi2sR[5] = 40.;   
320
321   param->fChi2PerCluster = 9.;
322   // not used
323
324   param->fXV = 0.;
325   param->fYV = 0.;
326   param->fZV = 0.;
327   param->fSigmaXV = 0.0050;
328   param->fSigmaYV = 0.0050;
329   param->fSigmaZV = 0.0100;
330
331   param->fVertexCut = 25.;
332
333   param->fMaxDZforPrimTrk = 0.4;
334   param->fMaxDZToUseConstraint = 3.;
335
336   param->fMaxDforV0dghtrForProlongation = 30.;
337   param->fMaxDForProlongation = 40.;//10.;
338   param->fMaxDZForProlongation = 60.;//20.;
339   param->fMinPtForProlongation = 0.120;
340
341   param->fZWindowDeadZone = 2.0;
342   param->fSigmaXDeadZoneHit2 = 0.004/12.;
343   param->fSigmaZDeadZoneHit2 = 0.001/12.;
344   param->fXPassDeadZoneHits = 0.018;
345   param->SetNLoopsSA(10);
346
347   return param;
348 }
349 //_____________________________________________________________________________
350 AliITSRecoParam *AliITSRecoParam::GetCosmicTestParam() 
351 {
352   //
353   // make default reconstruction  parameters for cosmics
354   //
355   AliITSRecoParam *param = new AliITSRecoParam();
356
357   // vertexer for cosmics
358   param->SetVertexer(2);
359
360   // find independently ITS SA tracks 
361   param->SetSAUseAllClusters();
362   param->SetOuterStartLayerSA(AliITSgeomTGeo::GetNLayers()-2);
363
364   // larger seach windows for SA (in case of large misalignments)
365   param->SetFactorSAWindowSizes(3.); 
366
367   param->fMaxSnp = 0.95;
368
369   param->fNSigmaYLayerForRoadY = 4.;
370   param->fNSigmaRoadY = 7.5;
371   param->fNSigmaZLayerForRoadZ = 4.;
372   param->fNSigmaRoadZ = 7.5;
373
374   param->fNSigma2RoadZC = 60.; //7.75^2
375   param->fNSigma2RoadYC = 60.; //7.75^2
376   param->fNSigma2RoadZNonC = 50.; //7.07^2
377   param->fNSigma2RoadYNonC = 50.; //7.07^2
378
379   param->fMaxChi2PerCluster[0] = 11.; //7
380   param->fMaxChi2PerCluster[1] = 12.; //5
381   param->fMaxChi2PerCluster[2] = 12.; //8
382   param->fMaxChi2PerCluster[3] = 5.;  //8
383   param->fMaxChi2PerCluster[4] = 12.; //6.5
384
385   param->fMaxNormChi2NonC[0] = 7.;
386   param->fMaxNormChi2NonC[1] = 8.;
387   param->fMaxNormChi2NonC[2] = 8.;
388   param->fMaxNormChi2NonC[3] = 11.;
389   param->fMaxNormChi2NonC[4] = 14.;
390   param->fMaxNormChi2NonC[5] = 25.;
391
392   param->fMaxNormChi2C[0] = 11.;
393   param->fMaxNormChi2C[1] = 13.;
394   param->fMaxNormChi2C[2] = 15.;
395   param->fMaxNormChi2C[3] = 18.;
396   param->fMaxNormChi2C[4] = 30.;
397   param->fMaxNormChi2C[5] = 35.;
398
399   param->fMaxNormChi2NonCForHypothesis = 7.;
400   
401   param->fMaxChi2 = 35.;
402
403   param->fMaxChi2s[0] = 25.; //40   
404   param->fMaxChi2s[1] = 25.; //40   
405   param->fMaxChi2s[2] = 25.; //40   
406   param->fMaxChi2s[3] = 25.; //40   
407   param->fMaxChi2s[4] = 40.; //40   
408   param->fMaxChi2s[5] = 50.; //40
409
410   param->fMaxRoad = 6.;
411
412   // not used
413   param->fMaxChi2In = 16.;
414    
415   param->fMaxChi2sR[0] = 10.;   
416   param->fMaxChi2sR[1] = 10.;   
417   param->fMaxChi2sR[2] = 10.;   
418   param->fMaxChi2sR[3] = 10.;   
419   param->fMaxChi2sR[4] = 30.;   
420   param->fMaxChi2sR[5] = 40.;   
421
422   param->fChi2PerCluster = 9.;
423   // not used
424
425   param->fXV = 0.;
426   param->fYV = 0.;
427   param->fZV = 0.;
428   param->fSigmaXV = 0.0050;
429   param->fSigmaYV = 0.0050;
430   param->fSigmaZV = 0.0100;
431
432   param->fVertexCut = 25.;
433
434   param->fMaxDZforPrimTrk = 0.4;
435   param->fMaxDZToUseConstraint = 3.;
436
437   param->fMaxDforV0dghtrForProlongation = 30.;
438   param->fMaxDForProlongation = 10.;
439   param->fMaxDZForProlongation = 20.;
440   param->fMinPtForProlongation = 0.120;
441
442   param->fZWindowDeadZone = 2.0;
443   param->fSigmaXDeadZoneHit2 = 0.004/12.;
444   param->fSigmaZDeadZoneHit2 = 0.001/12.;
445   param->fXPassDeadZoneHits = 0.018;
446
447   
448   return param;
449 }
450 //_____________________________________________________________________________
451 AliITSRecoParam *AliITSRecoParam::GetPlaneEffParam(Int_t i)
452 {
453   //
454   // make special reconstruction parameters for Plane Efficiency study on layer i
455   //
456   if (i<0 || i>=AliITSgeomTGeo::kNLayers) {
457     printf("AliITSRecoParam::GetPlaneEffParam: index of ITS Plane not in the range [0,5]\n");
458     printf("returning null pointer");
459     return NULL;
460   }
461   AliITSRecoParam *param;
462   param = GetHighFluxParam();
463   param->SetComputePlaneEff();
464   param->SetLayerToSkip(i);
465   param->SetIPlanePlaneEff(i);
466   // optimized setting for SPD0 (i==0)
467   if (i==0 || i==1) {
468     param->fMinPtPlaneEff = 0.200; // high pt particles
469     param->fMaxMissingClustersPlaneEff = 1; // at most 1 layer out of 5 without cluster
470     param->fRequireClusterInOuterLayerPlaneEff = kTRUE; // cluster on SPD1 must be
471     //param->fOnlyConstraintPlaneEff = kTRUE;
472   }
473   if (i==2 || i==3) {
474     param->fMinPtPlaneEff = 0.200; // high pt particles
475     param->fMaxMissingClustersPlaneEff = 1; // at most 1 layer out of 5 without cluster
476     param->fRequireClusterInOuterLayerPlaneEff = kTRUE;
477     //param->fOnlyConstraintPlaneEff = kTRUE;
478   }
479   if (i==4) {
480     param->fMinPtPlaneEff = 0.200; // high pt particles
481     param->fMaxMissingClustersPlaneEff = 0; // at most 1 layer out of 5 without cluster
482     param->fRequireClusterInOuterLayerPlaneEff = kTRUE;
483     //param->fOnlyConstraintPlaneEff = kTRUE;
484   }
485   if (i==5) {
486     param->fMinPtPlaneEff = 0.200; // high pt particles
487   }
488   //
489   return param;
490 }
491 //_____________________________________________________________________________
492 void AliITSRecoParam::SetLayersParameters() 
493 {
494   //
495   // number of layers and layers spatial resolutions
496   //
497
498   // spatial resolutions of the detectors
499   // y: 12 12 38 38 20 20 micron
500   fSigmaY2[0]=1.44e-6;
501   fSigmaY2[1]=1.44e-6;
502   fSigmaY2[2]=1.444e-5;
503   fSigmaY2[3]=1.444e-5;
504   fSigmaY2[4]=4.0e-6;
505   fSigmaY2[5]=4.0e-6;
506   // z: 120 120 28 28 830 830 micron
507   fSigmaZ2[0]=1.44e-4;
508   fSigmaZ2[1]=1.44e-4;
509   fSigmaZ2[2]=7.84e-6;
510   fSigmaZ2[3]=7.84e-6;
511   fSigmaZ2[4]=6.889e-3;
512   fSigmaZ2[5]=6.889e-3;
513
514   return;
515 }
516 //_____________________________________________________________________________
517 void AliITSRecoParam::PrintParameters() const 
518 {
519   //
520   // print parameters
521   //
522
523   printf("=============================  AliITSRecoParam::PrintParameters ");
524   printf("============================= \n\n");
525   for(Int_t i=0; i<AliITSgeomTGeo::kNLayers; i++) {
526     if(!fLayersToSkip[i]) {
527       printf("ITS Traking: using layer %d\n",i);
528     } else {
529       printf("ITS Traking: skipping layer %d\n",i);
530     }
531   }
532   for(Int_t i=0; i<AliITSgeomTGeo::kNLayers; i++) {
533     if(fUseAmplitudeInfo[i]) {
534       printf("ITS Traking: use amplitude info for layer %d\n",i);
535     } else {
536       printf("ITS Traking: don't use amplitude info for layer %d\n",i);
537     }
538   }
539   for(Int_t i=0; i<AliITSgeomTGeo::kNLayers; i++)
540     printf("Layer %d:\n  sigmaY2 %f, sigmaZ2 %f\n  sigmaMisalY %f, sigmaMisalZ %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],fClusterMisalErrorY[i],fClusterMisalErrorZ[i],fMaxNormChi2NonC[i],fMaxNormChi2C[i],fMaxChi2s[i]);
541
542
543   Dump();
544
545   return;
546 }