79574b97fd58668bc9319923ba221054fd769581
[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 #include "AliLog.h"
18
19 /* $Id$ */
20
21 ///////////////////////////////////////////////////////////////////////////////
22 //                                                                           //
23 // Class with ITS reconstruction parameters                                  //
24 // Origin: andrea.dainese@lnl.infn.it                                        //
25 //                                                                           //
26 ///////////////////////////////////////////////////////////////////////////////
27
28
29
30 ClassImp(AliITSRecoParam)
31
32 const Int_t AliITSRecoParam::fgkLayersNotToSkip[AliITSgeomTGeo::kNLayers]={0,0,0,0,0,0};
33 const Int_t AliITSRecoParam::fgkLastLayerToTrackTo=0;
34 const Int_t AliITSRecoParam::fgkMaxDetectorPerLayer=1000;
35 const Double_t AliITSRecoParam::fgkriw=80.0;
36 const Double_t AliITSRecoParam::fgkdiw=0.0053;
37 const Double_t AliITSRecoParam::fgkX0iw=30.0;
38 const Double_t AliITSRecoParam::fgkrcd=61.0;
39 const Double_t AliITSRecoParam::fgkdcd=0.0053;
40 const Double_t AliITSRecoParam::fgkX0cd=30.0;
41 const Double_t AliITSRecoParam::fgkyr=12.8;
42 const Double_t AliITSRecoParam::fgkdr=0.03;
43 const Double_t AliITSRecoParam::fgkzm=0.2;
44 const Double_t AliITSRecoParam::fgkdm=0.40;
45 const Double_t AliITSRecoParam::fgkrs=50.0;
46 const Double_t AliITSRecoParam::fgkds=0.001;
47 const Double_t AliITSRecoParam::fgkrInsideITSscreen=49.0;
48 const Double_t AliITSRecoParam::fgkrInsideSPD1=3.5;
49 const Double_t AliITSRecoParam::fgkrPipe=3.;
50 const Double_t AliITSRecoParam::fgkrInsidePipe=2.7;
51 const Double_t AliITSRecoParam::fgkrOutsidePipe=3.3;
52 const Double_t AliITSRecoParam::fgkdPipe=0.0028;
53 const Double_t AliITSRecoParam::fgkrInsideShield[2]={7.5,25.0};
54 const Double_t AliITSRecoParam::fgkrOutsideShield[2]={10.5,30.0};
55 const Double_t AliITSRecoParam::fgkdshield[2]={0.0097,0.0034};
56 const Double_t AliITSRecoParam::fgkX0shield[2]={38.6,42.0};
57 const Double_t AliITSRecoParam::fgkX0Air=21.82;
58 const Double_t AliITSRecoParam::fgkX0Be=65.19;
59 const Double_t AliITSRecoParam::fgkBoundaryWidth=0.2;
60 const Double_t AliITSRecoParam::fgkDeltaXNeighbDets=0.5;
61 const Double_t AliITSRecoParam::fgkSPDdetzlength=6.960; // 7.072-2*0.056
62 const Double_t AliITSRecoParam::fgkSPDdetxlength=1.298; // 1.410-2*0.056
63
64 //_____________________________________________________________________________
65 AliITSRecoParam::AliITSRecoParam() : AliDetectorRecoParam(),
66 fTracker(0),
67 fITSonly(kFALSE),
68 fVertexer(0),
69 fClusterFinder(0),
70 fPID(0),
71 fVtxr3DZCutWide(0.),
72 fVtxr3DRCutWide(0.),
73 fVtxr3DZCutNarrow(0.),
74 fVtxr3DRCutNarrow(0.),
75 fVtxr3DPhiCutLoose(0.),
76 fVtxr3DPhiCutTight(0.),
77 fVtxr3DDCACut(0.),
78 fVtxr3DPileupAlgo(1),
79 fMaxSnp(1.),
80 fNSigmaYLayerForRoadY(0),
81 fNSigmaRoadY(0),
82 fNSigmaZLayerForRoadZ(0),
83 fNSigmaRoadZ(0),
84 fNSigma2RoadZC(0),
85 fNSigma2RoadYC(0),
86 fNSigma2RoadZNonC(0),
87 fNSigma2RoadYNonC(0),
88 fRoadMisal(0),
89 fMaxNormChi2NonCForHypothesis(0),
90 fMaxChi2(0),
91 fMaxRoad(0),
92 fMaxChi2In(0),
93 fChi2PerCluster(0),
94 fXV(0), 
95 fYV(0),
96 fZV(0),
97 fSigmaXV(0),
98 fSigmaYV(0),
99 fSigmaZV(0),
100 fVertexCut(0),
101 fMaxDZforPrimTrk(0),
102 fMaxDZToUseConstraint(0), 
103 fMaxDforV0dghtrForProlongation(0),
104 fMaxDForProlongation(0),
105 fMaxDZForProlongation(0),
106 fMinPtForProlongation(0),
107 fAddVirtualClustersInDeadZone(kFALSE),
108 fZWindowDeadZone(0),
109 fSigmaXDeadZoneHit2(0),
110 fSigmaZDeadZoneHit2(0),
111 fXPassDeadZoneHits(0),
112 fSkipSubdetsNotInTriggerCluster(kTRUE),
113 fUseTGeoInTracker(3),
114 fStepSizeTGeo(5.),
115 fAllowSharedClusters(kTRUE),
116 fClusterErrorsParam(1),
117 fComputePlaneEff(kFALSE),
118 fHistoPlaneEff(kFALSE),
119 fUseTrackletsPlaneEff(kFALSE),
120 fMCTrackletsPlaneEff(kFALSE),
121 fBkgTrackletsPlaneEff(kFALSE),
122 fTrackleterPhiWindowL1(0.10),
123 fTrackleterPhiWindowL2(0.07),
124 fTrackleterZetaWindowL1(0.6),
125 fTrackleterZetaWindowL2(0.4),
126 fUpdateOncePerEventPlaneEff(kTRUE),
127 fMinContVtxPlaneEff(3),
128 fIPlanePlaneEff(0),
129 fReadPlaneEffFromOCDB(kFALSE),
130 fMinPtPlaneEff(0),
131 fMaxMissingClustersPlaneEff(5),
132 fMaxMissingClustersOutPlaneEff(5),
133 fRequireClusterInOuterLayerPlaneEff(kFALSE),
134 fRequireClusterInInnerLayerPlaneEff(kFALSE),
135 fOnlyConstraintPlaneEff(kFALSE),
136 fNSigXFromBoundaryPlaneEff(1.),
137 fNSigZFromBoundaryPlaneEff(1.),
138 fExtendedEtaAcceptance(kFALSE),
139 fUseBadZonesFromOCDB(kTRUE),
140 fUseSingleBadChannelsFromOCDB(kFALSE),
141 fMinFractionOfBadInRoad(0),
142 fAllowProlongationWithEmptyRoad(kFALSE),
143 fInwardFlagSA(kFALSE),
144 fOuterStartLayerSA(2),
145 fInnerStartLayerSA(3),
146 fMinNPointsSA(3),
147 fFactorSAWindowSizes(1.),
148 fNLoopsSA(33),
149 fMinPhiSA(0.002),
150 fMaxPhiSA(0.0145),
151 fMinLambdaSA(0.003),
152 fMaxLambdaSA(0.008),
153 fMinClusterChargeSA(0.),
154 fSAOnePointTracks(kFALSE),
155 fSAUseAllClusters(kFALSE),
156 fFindV0s(kTRUE),
157 fStoreLikeSignV0s(kFALSE),
158 fUseUnfoldingInClusterFinderSPD(kFALSE),
159 fUseUnfoldingInClusterFinderSDD(kTRUE),
160 fUseUnfoldingInClusterFinderSSD(kFALSE),
161 fUseBadChannelsInClusterFinderSSD(kFALSE),
162 fUseSDDCorrectionMaps(kTRUE),
163 fUseSDDClusterSizeSelection(kFALSE),
164 fMinClusterChargeSDD(0.),
165 fUseChargeMatchingInClusterFinderSSD(kTRUE),
166 fTrackleterPhiWindow(0.08),
167 fTrackleterThetaWindow(0.025),
168 fTrackleterPhiShift(0.0045),
169 fTrackleterRemoveClustersFromOverlaps(kFALSE),
170 fTrackleterPhiOverlapCut(0.005),
171 fTrackleterZetaOverlapCut(0.05),
172 fUseCosmicRunShiftsSSD(kFALSE),
173 fSPDRemoveNoisyFlag(kTRUE),
174 fSPDRemoveDeadFlag(kTRUE),
175 fVertexerFastSmearX(0.005),
176 fVertexerFastSmearY(0.005),
177 fVertexerFastSmearZ(0.01),
178 fAlignFilterCosmics(kFALSE),
179 fAlignFilterCosmicMergeTracks(kTRUE),
180 fAlignFilterMinITSPoints(4),
181 fAlignFilterMinITSPointsMerged(4),
182 fAlignFilterOnlyITSSATracks(kTRUE),
183 fAlignFilterOnlyITSTPCTracks(kFALSE),
184 fAlignFilterSkipExtra(kFALSE),
185 fAlignFilterMaxMatchingAngle(0.085),
186 fAlignFilterMinAngleWrtModulePlanes(0.52),
187 fAlignFilterMinPt(0.),
188 fAlignFilterMaxPt(1.e10),
189 fAlignFilterFillQANtuples(kTRUE),
190 //
191 fMultCutPxDrSPDin(0.1),
192 fMultCutPxDrSPDout(0.15),
193 fMultCutPxDz(0.2),
194 fMultCutDCArz(0.5),
195 fMultCutMinElectronProbTPC(0.5),
196 fMultCutMinElectronProbESD(0.1),
197 fMultCutMinP(0.05),
198 fMultCutMinRGamma(2.),
199 fMultCutMinRK0(1.),
200 fMultCutMinPointAngle(0.98),
201 fMultCutMaxDCADauther(0.5),
202 fMultCutMassGamma(0.03),
203 fMultCutMassGammaNSigma(5.),
204 fMultCutMassK0(0.03),
205 fMultCutMassK0NSigma(5.),
206 fMultCutChi2cGamma(2.),
207 fMultCutChi2cK0(2.),
208 fMultCutGammaSFromDecay(-10.),
209 fMultCutK0SFromDecay(-10.),
210 fMultCutMaxDCA(1.),
211 //
212 fESDV0Params(NULL)
213 {
214   //
215   // constructor
216   //
217   SetName("ITS");
218   SetTitle("ITS");
219
220   SetLayersParameters();
221   for(Int_t i=0; i<AliITSgeomTGeo::kNLayers; i++) fLayersToSkip[i]=0;
222   SetUseTGeoInTracker(3);
223   SetStepSizeTGeo(5.);
224   SetAllowSharedClusters(kTRUE);
225   SetFindV0s(kTRUE);
226   SetAddVirtualClustersInDeadZone(kFALSE);
227   SetUseAmplitudeInfo(kTRUE);
228   SetClusterErrorsParam(1);
229   SetClusterMisalError(0.);
230   SetClusterMisalErrorBOn(0.);
231   SetVertexer3DDefaults();
232
233   for(Int_t i=0; i<AliITSgeomTGeo::kNLayers; i++) fAlignFilterUseLayer[i]=kTRUE;
234   fESDV0Params = new AliESDV0Params();
235   
236   fESDV0Params->SetMaxDist0(0.1);
237   fESDV0Params->SetMaxDist1(0.1);
238   fESDV0Params->SetMaxDist(1.);
239   fESDV0Params->SetMinPointAngle(0.85);
240   fESDV0Params->SetMinPointAngle2(0.99);
241   fESDV0Params->SetMinR(0.5);
242   fESDV0Params->SetMaxR(220.);
243   fESDV0Params->SetMinPABestConst(0.9999);
244   fESDV0Params->SetMaxRBestConst(10.);
245   fESDV0Params->SetCausality0Cut(0.19);
246   fESDV0Params->SetLikelihood01Cut(0.45);
247   fESDV0Params->SetLikelihood1Cut(0.5);  
248   fESDV0Params->SetCombinedCut(0.55);
249   fESDV0Params->SetMinClFullTrk(5.0);
250   fESDV0Params->SetMinTgl0(1.05);
251   fESDV0Params->SetMinRTgl0(40.0);
252
253   fESDV0Params->SetMinNormDistForbTgl0(3.0);
254   fESDV0Params->SetMinClForb0(4.5);
255   fESDV0Params->SetMinNormDistForb1(3.0);
256   fESDV0Params->SetMinNormDistForb2(2.0);
257   fESDV0Params->SetMinNormDistForb3(1.0);
258   fESDV0Params->SetMinNormDistForb4(4.0);
259   fESDV0Params->SetMinNormDistForb5(5.0);
260   fESDV0Params->SetMinNormDistForbProt(2.0);
261   fESDV0Params->SetMaxPidProbPionForb(0.5);
262
263   fESDV0Params->SetMinRTPCdensity(40.);
264   fESDV0Params->SetMaxRTPCdensity0(110.);
265   fESDV0Params->SetMaxRTPCdensity10(120.);
266   fESDV0Params->SetMaxRTPCdensity20(130.);
267   fESDV0Params->SetMaxRTPCdensity30(140.);
268
269   fESDV0Params->SetMinTPCdensity(0.6);
270   fESDV0Params->SetMinTgl1(1.1);
271   fESDV0Params->SetMinTgl2(1.0);
272   fESDV0Params->SetMinchi2before0(16.);
273   fESDV0Params->SetMinchi2before1(16.);
274   fESDV0Params->SetMinchi2after0(16.);
275   fESDV0Params->SetMinchi2after1(16.);
276   fESDV0Params->SetAddchi2SharedCl(18.);
277   fESDV0Params->SetAddchi2NegCl0(25.);
278   fESDV0Params->SetAddchi2NegCl1(30.);
279   fESDV0Params->SetSigp0Par0(0.0001);
280   fESDV0Params->SetSigp0Par1(0.001);
281   fESDV0Params->SetSigp0Par2(0.1);
282   fESDV0Params->SetSigpPar0(0.5);
283   fESDV0Params->SetSigpPar1(0.6);
284   fESDV0Params->SetSigpPar2(0.4);
285   fESDV0Params->SetMaxDcaLh0(0.5);
286   fESDV0Params->SetStreamLevel(0);
287   fESDV0Params->SetChi2KF(100);
288   fESDV0Params->SetRobustChi2KF(100);
289   
290 }
291 //_____________________________________________________________________________
292 AliITSRecoParam::~AliITSRecoParam() 
293 {
294   //
295   // destructor
296   //  
297   if(fESDV0Params){
298     delete fESDV0Params;
299     fESDV0Params=NULL;
300   }
301 }
302 //_____________________________________________________________________________
303 AliITSRecoParam *AliITSRecoParam::GetHighFluxParam() 
304 {
305   //
306   // make default reconstruction  parameters for hig  flux env.
307   //
308   AliITSRecoParam *param = new AliITSRecoParam();
309   param->SetVertexerZ();
310
311   // use of bads from OCDB
312   param->SetUseBadZonesFromOCDB(kTRUE);
313   param->SetUseSingleBadChannelsFromOCDB(kFALSE);
314   // extended eta acceptance
315   param->SetExtendedEtaAcceptance(kFALSE);
316   // allow to skip layer if no cluster and no bad
317   param->SetAllowProlongationWithEmptyRoad(kFALSE);
318   // set event specie
319   param->SetEventSpecie(AliRecoParam::kHighMult);
320
321   param->fMaxSnp = 0.95;
322
323   param->fNSigmaYLayerForRoadY = 4.;
324   param->fNSigmaRoadY = 7.5;
325   param->fNSigmaZLayerForRoadZ = 4.;
326   param->fNSigmaRoadZ = 7.5;
327
328   param->fNSigma2RoadZC = 60.; //7.75^2
329   param->fNSigma2RoadYC = 60.; //7.75^2
330   param->fNSigma2RoadZNonC = 50.; //7.07^2
331   param->fNSigma2RoadYNonC = 50.; //7.07^2
332
333   param->fMaxChi2PerCluster[0] = 11.; //7
334   param->fMaxChi2PerCluster[1] = 12.; //5
335   param->fMaxChi2PerCluster[2] = 12.; //8
336   param->fMaxChi2PerCluster[3] = 5.;  //8
337   param->fMaxChi2PerCluster[4] = 12.; //6.5
338
339   param->fMaxNormChi2NonC[0] = 7.;
340   param->fMaxNormChi2NonC[1] = 8.;
341   param->fMaxNormChi2NonC[2] = 8.;
342   param->fMaxNormChi2NonC[3] = 11.;
343   param->fMaxNormChi2NonC[4] = 14.;
344   param->fMaxNormChi2NonC[5] = 25.;
345
346   param->fMaxNormChi2C[0] = 11.;
347   param->fMaxNormChi2C[1] = 13.;
348   param->fMaxNormChi2C[2] = 15.;
349   param->fMaxNormChi2C[3] = 18.;
350   param->fMaxNormChi2C[4] = 30.;
351   param->fMaxNormChi2C[5] = 35.;
352
353   param->fMaxNormChi2NonCForHypothesis = 7.;
354   
355   param->fMaxChi2 = 35.;
356
357   param->fMaxChi2s[0] = 25.; //40   
358   param->fMaxChi2s[1] = 25.; //40   
359   param->fMaxChi2s[2] = 25.; //40   
360   param->fMaxChi2s[3] = 25.; //40   
361   param->fMaxChi2s[4] = 40.; //40   
362   param->fMaxChi2s[5] = 50.; //40
363
364   param->fMaxRoad = 6.;
365
366   // not used
367   param->fMaxChi2In = 16.;
368    
369   param->fMaxChi2sR[0] = 10.;   
370   param->fMaxChi2sR[1] = 10.;   
371   param->fMaxChi2sR[2] = 10.;   
372   param->fMaxChi2sR[3] = 10.;   
373   param->fMaxChi2sR[4] = 30.;   
374   param->fMaxChi2sR[5] = 40.;   
375
376   param->fChi2PerCluster = 9.;
377   // not used
378
379   param->fXV = 0.;
380   param->fYV = 0.;
381   param->fZV = 0.;
382   param->fSigmaXV = 0.0050;
383   param->fSigmaYV = 0.0050;
384   param->fSigmaZV = 0.0100;
385
386   param->fVertexCut = 25.;
387
388   param->fMaxDZforPrimTrk = 0.4;
389   param->fMaxDZToUseConstraint = 3.;
390
391   param->fMaxDforV0dghtrForProlongation = 30.;
392   param->fMaxDForProlongation = 40.;//10.;
393   param->fMaxDZForProlongation = 60.;//20.;
394   param->fMinPtForProlongation = 0.120;
395
396   param->fZWindowDeadZone = 2.0;
397   param->fSigmaXDeadZoneHit2 = 0.004/12.;
398   param->fSigmaZDeadZoneHit2 = 0.001/12.;
399   param->fXPassDeadZoneHits = 0.018;
400   //
401   // mult reco
402   param->fMultCutPxDrSPDin = 0.1;
403   param->fMultCutPxDrSPDout = 0.15;
404   param->fMultCutPxDz = 0.2;
405   param->fMultCutDCArz = 0.5;
406   param->fMultCutMinElectronProbTPC = 0.5;
407   param->fMultCutMinElectronProbESD = 0.1;
408   param->fMultCutMinP = 0.05;
409   param->fMultCutMinRGamma = 2.;
410   param->fMultCutMinRK0 = 1.;
411   param->fMultCutMinPointAngle = 0.98;
412   param->fMultCutMaxDCADauther = 0.5;
413   param->fMultCutMassGamma = 0.03;
414   param->fMultCutMassGammaNSigma = 5.;
415   param->fMultCutMassK0 = 0.03;
416   param->fMultCutMassK0NSigma = 5.;
417   param->fMultCutChi2cGamma = 2.;
418   param->fMultCutChi2cK0 = 2.;
419   param->fMultCutGammaSFromDecay = -10.;
420   param->fMultCutK0SFromDecay = -10.;
421   param->fMultCutMaxDCA = 1.;  
422   //
423   return param;
424 }
425 //_____________________________________________________________________________
426 AliITSRecoParam *AliITSRecoParam::GetLowFluxParam() 
427 {
428   //
429   // make default reconstruction  parameters for low  flux env.
430   //
431   AliITSRecoParam *param = new AliITSRecoParam();
432   param->SetVertexer3DDefaults();
433
434   // full use of bads from OCDB
435   param->SetUseBadZonesFromOCDB(kTRUE);
436   param->SetUseSingleBadChannelsFromOCDB(kTRUE);
437   // extended eta acceptance
438   param->SetExtendedEtaAcceptance(kTRUE);
439   // allow to skip layer if no cluster and no bad
440   param->SetAllowProlongationWithEmptyRoad(kTRUE);
441   // set event specie
442   param->SetEventSpecie(AliRecoParam::kLowMult);
443
444   param->fMaxSnp = 0.95;
445
446   param->fNSigmaYLayerForRoadY = 4.;
447   param->fNSigmaRoadY = 7.5;
448   param->fNSigmaZLayerForRoadZ = 4.;
449   param->fNSigmaRoadZ = 7.5;
450
451   param->fNSigma2RoadZC = 60.; //7.75^2
452   param->fNSigma2RoadYC = 60.; //7.75^2
453   param->fNSigma2RoadZNonC = 50.; //7.07^2
454   param->fNSigma2RoadYNonC = 50.; //7.07^2
455
456   param->fMaxChi2PerCluster[0] = 11.; //7
457   param->fMaxChi2PerCluster[1] = 12.; //5
458   param->fMaxChi2PerCluster[2] = 12.; //8
459   param->fMaxChi2PerCluster[3] = 5.;  //8
460   param->fMaxChi2PerCluster[4] = 12.; //6.5
461
462   param->fMaxNormChi2NonC[0] = 7.;
463   param->fMaxNormChi2NonC[1] = 8.;
464   param->fMaxNormChi2NonC[2] = 8.;
465   param->fMaxNormChi2NonC[3] = 11.;
466   param->fMaxNormChi2NonC[4] = 14.;
467   param->fMaxNormChi2NonC[5] = 25.;
468
469   param->fMaxNormChi2C[0] = 11.;
470   param->fMaxNormChi2C[1] = 13.;
471   param->fMaxNormChi2C[2] = 15.;
472   param->fMaxNormChi2C[3] = 18.;
473   param->fMaxNormChi2C[4] = 30.;
474   param->fMaxNormChi2C[5] = 35.;
475
476   param->fMaxNormChi2NonCForHypothesis = 7.;
477   
478   param->fMaxChi2 = 35.;
479
480   param->fMaxChi2s[0] = 25.; //40   
481   param->fMaxChi2s[1] = 25.; //40   
482   param->fMaxChi2s[2] = 25.; //40   
483   param->fMaxChi2s[3] = 25.; //40   
484   param->fMaxChi2s[4] = 40.; //40   
485   param->fMaxChi2s[5] = 50.; //40
486
487   param->fMaxRoad = 6.;
488
489   // not used
490   param->fMaxChi2In = 16.;
491    
492   param->fMaxChi2sR[0] = 10.;   
493   param->fMaxChi2sR[1] = 10.;   
494   param->fMaxChi2sR[2] = 10.;   
495   param->fMaxChi2sR[3] = 10.;   
496   param->fMaxChi2sR[4] = 30.;   
497   param->fMaxChi2sR[5] = 40.;   
498
499   param->fChi2PerCluster = 9.;
500   // not used
501
502   param->fXV = 0.;
503   param->fYV = 0.;
504   param->fZV = 0.;
505   param->fSigmaXV = 0.0050;
506   param->fSigmaYV = 0.0050;
507   param->fSigmaZV = 0.0100;
508
509   param->fVertexCut = 25.;
510
511   param->fMaxDZforPrimTrk = 0.4;
512   param->fMaxDZToUseConstraint = 3.;
513
514   param->fMaxDforV0dghtrForProlongation = 30.;
515   param->fMaxDForProlongation = 40.;//10.;
516   param->fMaxDZForProlongation = 60.;//20.;
517   param->fMinPtForProlongation = 0.120;
518
519   param->fZWindowDeadZone = 2.0;
520   param->fSigmaXDeadZoneHit2 = 0.004/12.;
521   param->fSigmaZDeadZoneHit2 = 0.001/12.;
522   param->fXPassDeadZoneHits = 0.018;
523   param->SetNLoopsSA(20);
524   param->fMaxPhiSA = 0.07;
525   param->fMaxLambdaSA = 0.04;
526
527  
528   param->GetESDV0Params()->SetMinRTgl0(0.5);
529   param->GetESDV0Params()->SetMaxDist(1.5);
530   param->GetESDV0Params()->SetMaxDcaLh0(1.5);
531   param->GetESDV0Params()->SetMaxRBestConst(80);
532   param->GetESDV0Params()->SetMinPABestConst(0.99);
533   param->GetESDV0Params()->SetMinNormDistForbTgl0(1.);
534   param->GetESDV0Params()->SetMinNormDistForb1(2.);
535   param->GetESDV0Params()->SetMinNormDistForbProt(1.);
536   param->GetESDV0Params()->SetMaxPidProbPionForb(0.7);
537   param->GetESDV0Params()->SetLikelihood01Cut(0.3);
538   param->GetESDV0Params()->SetLikelihood1Cut(0.35);
539   param->GetESDV0Params()->SetCombinedCut(0.4);
540
541   // mult reco
542   param->fMultCutPxDrSPDin = 0.1;
543   param->fMultCutPxDrSPDout = 0.15;
544   param->fMultCutPxDz = 0.2;
545   param->fMultCutDCArz = 0.5;
546   param->fMultCutMinElectronProbTPC = 0.5;
547   param->fMultCutMinElectronProbESD = 0.1;
548   param->fMultCutMinP = 0.05;
549   param->fMultCutMinRGamma = 2.;
550   param->fMultCutMinRK0 = 1.;
551   param->fMultCutMinPointAngle = 0.98;
552   param->fMultCutMaxDCADauther = 0.5;
553   param->fMultCutMassGamma = 0.03;
554   param->fMultCutMassGammaNSigma = 5.;
555   param->fMultCutMassK0 = 0.03;
556   param->fMultCutMassK0NSigma = 5.;
557   param->fMultCutChi2cGamma = 2.;
558   param->fMultCutChi2cK0 = 2.;
559   param->fMultCutGammaSFromDecay = -10.;
560   param->fMultCutK0SFromDecay = -10.;
561   param->fMultCutMaxDCA = 1.;  
562   //
563
564   return param;
565 }
566 //_____________________________________________________________________________
567 AliITSRecoParam *AliITSRecoParam::GetCosmicTestParam() 
568 {
569   //
570   // make default reconstruction  parameters for cosmics
571   //
572   AliITSRecoParam *param = new AliITSRecoParam();
573
574   // vertexer for cosmics
575   param->SetVertexer(2);
576
577   param->SetClusterErrorsParam(2);
578   param->SetFindV0s(kFALSE);
579   param->SetAddVirtualClustersInDeadZone(kFALSE);
580   param->SetUseAmplitudeInfo(kFALSE);
581
582   // set event specie
583   param->SetEventSpecie(AliRecoParam::kCosmic);
584
585   // full use of bads from OCDB
586   param->SetUseBadZonesFromOCDB(kTRUE);
587   param->SetUseSingleBadChannelsFromOCDB(kTRUE);
588
589   // find independently ITS SA tracks 
590   param->SetSAUseAllClusters();
591   param->SetOuterStartLayerSA(AliITSgeomTGeo::GetNLayers()-2);
592
593   //****** COSMICS 2009 (same as COSMICS 2008) *********************
594
595   // to maximize efficiency
596   param->SetAllowProlongationWithEmptyRoad();
597   param->SetMinNPointsSA(2);
598
599   // larger seach windows for SA (in case of large misalignments)
600   param->SetNLoopsSA(33);
601   param->SetFactorSAWindowSizes(20);
602
603   // additional error due to misal (B off)
604   param->SetClusterMisalErrorY(1.0,1.0,1.0,1.0,1.0,1.0); // [cm]
605   param->SetClusterMisalErrorZ(1.0,1.0,1.0,1.0,1.0,1.0); // [cm]
606   // additional error due to misal (B on)
607   param->SetClusterMisalErrorYBOn(0.0,0.0,0.1,0.1,0.1,0.1); // [cm]
608   param->SetClusterMisalErrorZBOn(0.1,0.1,0.1,0.1,0.1,0.1); // [cm]
609
610
611   // SDD configuration 
612   param->fUseSDDCorrectionMaps = kFALSE;
613   param->fUseSDDClusterSizeSelection=kTRUE;
614   param->fMinClusterChargeSDD=30.;
615   
616
617   // alignment data filter
618   param->SetAlignFilterCosmics(kTRUE);
619   param->SetAlignFilterCosmicMergeTracks(kTRUE); 
620   param->SetAlignFilterMinITSPoints(1);
621   param->SetAlignFilterMinITSPointsMerged(3);
622   param->SetAlignFilterOnlyITSSATracks(kTRUE);
623   param->SetAlignFilterOnlyITSTPCTracks(kFALSE);
624   param->SetAlignFilterSkipExtra(kFALSE);
625   param->SetAlignFilterMaxMatchingAngle(0.085/*5deg*/);
626   param->SetAlignFilterMinPt(0.2);          
627   param->SetAlignFilterMaxPt(1.e10);          
628   param->SetAlignFilterFillQANtuples(kTRUE);    
629
630   //******************************************************************
631
632   param->fMaxSnp = 0.95;
633
634   param->fNSigmaYLayerForRoadY = 4.;
635   param->fNSigmaRoadY = 7.5;
636   param->fNSigmaZLayerForRoadZ = 4.;
637   param->fNSigmaRoadZ = 7.5;
638
639   param->fNSigma2RoadZC = 60.; //7.75^2
640   param->fNSigma2RoadYC = 60.; //7.75^2
641   param->fNSigma2RoadZNonC = 50.; //7.07^2
642   param->fNSigma2RoadYNonC = 50.; //7.07^2
643
644   param->fMaxChi2PerCluster[0] = 11.; //7
645   param->fMaxChi2PerCluster[1] = 12.; //5
646   param->fMaxChi2PerCluster[2] = 12.; //8
647   param->fMaxChi2PerCluster[3] = 5.;  //8
648   param->fMaxChi2PerCluster[4] = 12.; //6.5
649
650   param->fMaxNormChi2NonC[0] = 7.;
651   param->fMaxNormChi2NonC[1] = 8.;
652   param->fMaxNormChi2NonC[2] = 8.;
653   param->fMaxNormChi2NonC[3] = 11.;
654   param->fMaxNormChi2NonC[4] = 14.;
655   param->fMaxNormChi2NonC[5] = 25.;
656
657   param->fMaxNormChi2C[0] = 11.;
658   param->fMaxNormChi2C[1] = 13.;
659   param->fMaxNormChi2C[2] = 15.;
660   param->fMaxNormChi2C[3] = 18.;
661   param->fMaxNormChi2C[4] = 30.;
662   param->fMaxNormChi2C[5] = 35.;
663
664   param->fMaxNormChi2NonCForHypothesis = 7.;
665   
666   param->fMaxChi2 = 35.;
667
668   param->fMaxChi2s[0] = 25.; //40   
669   param->fMaxChi2s[1] = 25.; //40   
670   param->fMaxChi2s[2] = 25.; //40   
671   param->fMaxChi2s[3] = 25.; //40   
672   param->fMaxChi2s[4] = 40.; //40   
673   param->fMaxChi2s[5] = 50.; //40
674
675   param->fMaxRoad = 6.;
676
677   // not used
678   param->fMaxChi2In = 16.;
679    
680   param->fMaxChi2sR[0] = 10.;   
681   param->fMaxChi2sR[1] = 10.;   
682   param->fMaxChi2sR[2] = 10.;   
683   param->fMaxChi2sR[3] = 10.;   
684   param->fMaxChi2sR[4] = 30.;   
685   param->fMaxChi2sR[5] = 40.;   
686
687   param->fChi2PerCluster = 9.;
688   // not used
689
690   param->fXV = 0.;
691   param->fYV = 0.;
692   param->fZV = 0.;
693   param->fSigmaXV = 0.0050;
694   param->fSigmaYV = 0.0050;
695   param->fSigmaZV = 0.0100;
696
697   param->fVertexCut = 25.;
698
699   param->fMaxDZforPrimTrk = 0.4;
700   param->fMaxDZToUseConstraint = 3.;
701
702   param->fMaxDforV0dghtrForProlongation = 30.;
703   param->fMaxDForProlongation = 10.;
704   param->fMaxDZForProlongation = 20.;
705   param->fMinPtForProlongation = 0.120;
706
707   param->fZWindowDeadZone = 2.0;
708   param->fSigmaXDeadZoneHit2 = 0.004/12.;
709   param->fSigmaZDeadZoneHit2 = 0.001/12.;
710   param->fXPassDeadZoneHits = 0.018;
711
712   return param;
713 }
714 //_____________________________________________________________________________
715 AliITSRecoParam *AliITSRecoParam::GetPlaneEffParam(Int_t i)
716 {
717   //
718   // make special reconstruction parameters for Plane Efficiency study on layer i (0,5)
719   // 
720   // if i=-1, then the evaluation for both pixel layers is tried with the tracklet method
721   //
722  if (i<-1 || i>=AliITSgeomTGeo::kNLayers) {
723     printf("AliITSRecoParam::GetPlaneEffParam: index of ITS Plane nor in the range [0,5] neither =-1\n");
724     printf("returning null pointer");
725     return NULL;
726   }
727   if(i>=0) {  // Method using tracks (remove given plane from tracking)
728     AliITSRecoParam *param;
729     param = GetLowFluxParam();
730     param->SetClusterErrorsParam(2);
731     // find independently ITS SA tracks 
732     param->SetSAUseAllClusters();
733     param->SetOuterStartLayerSA(2);
734     param->SetAllowProlongationWithEmptyRoad(kTRUE);
735     // larger seach windows for SA (in case of large misalignments)
736     param->SetFactorSAWindowSizes(2);
737
738     // Misalignment syst errors decided at ITS meeting 25.03.2010
739     // additional error due to misal (B off)
740     param->SetClusterMisalErrorY(0.0010,0.0010,0.0300,0.0300,0.0020,0.0020); // [cm]
741     param->SetClusterMisalErrorZ(0.0100,0.0100,0.0100,0.0100,0.0500,0.0500); // [cm]
742     // additional error due to misal (B on)
743     param->SetClusterMisalErrorYBOn(0.0010,0.0030,0.0500,0.0500,0.0020,0.0020); // [cm]
744     param->SetClusterMisalErrorZBOn(0.0100,0.0100,0.0100,0.0100,0.0500,0.0500); // [cm]
745     //----
746
747     // SDD configuration 
748     param->SetUseSDDCorrectionMaps(kTRUE); // changed 30.04.2010
749     param->SetUseSDDClusterSizeSelection(kTRUE);
750     param->SetMinClusterChargeSDD(30.);
751     param->SetUseUnfoldingInClusterFinderSDD(kFALSE);
752     //
753     param->SetComputePlaneEff();
754     param->SetLayerToSkip(i);
755     param->SetIPlanePlaneEff(i);
756     param->fNSigXFromBoundaryPlaneEff= 1.;
757     param->fNSigZFromBoundaryPlaneEff= 1.;
758     // optimized setting for SPD0 (i==0)
759     if (i==0) {
760       param->fMinPtPlaneEff = 0.200; // high pt particles
761       param->fMaxMissingClustersPlaneEff = 2; // at most 2 layers out of 5 without cluster
762       param->fMaxMissingClustersOutPlaneEff = 2; // at most 2 layers out of 5 external ones without cluster
763       param->fRequireClusterInOuterLayerPlaneEff = kTRUE; // cluster on SPD1 must be
764       //param->fOnlyConstraintPlaneEff = kTRUE;
765     }
766     if (i==1 ) {
767       param->fMinPtPlaneEff = 0.200; // high pt particles
768       param->fMaxMissingClustersPlaneEff = 2; // at most 2 layer out of 5 without cluster
769       param->fMaxMissingClustersOutPlaneEff = 2; // at most 2 layer out of 4 external ones without cluster
770       //param->fRequireClusterInOuterLayerPlaneEff = kTRUE; // cluster on SSD1 must be
771     }
772     if (i==2) {
773       param->fMinPtPlaneEff = 0.200; // high pt particles
774       param->fMaxMissingClustersPlaneEff = 2; // at most 2 layer out of 5 without cluster
775       param->fMaxMissingClustersOutPlaneEff = 2; // at most 2 layer out of 3 external ones without cluster
776       //param->fRequireClusterInOuterLayerPlaneEff = kTRUE;
777       //param->fOnlyConstraintPlaneEff = kTRUE;
778     }
779     if (i==3) {
780       param->fMinPtPlaneEff = 0.200; // high pt particles
781       param->fMaxMissingClustersPlaneEff = 2; // at most 2 layer out of 5 without cluster
782       param->fMaxMissingClustersOutPlaneEff = 1; // at most 1 layer out of 2 external ones without cluster
783     }
784     if (i==4) {
785       param->fMinPtPlaneEff = 0.200; // high pt particles
786       param->fMaxMissingClustersPlaneEff = 2; // at most 2 layer out of 5 without cluster
787       param->fMaxMissingClustersOutPlaneEff = 1; // at most 1 layer out of 1 external ones without cluster
788       // param->fRequireClusterInOuterLayerPlaneEff = kTRUE;
789       //param->fOnlyConstraintPlaneEff = kTRUE;
790     }
791     if (i==5) {
792       param->fMinPtPlaneEff = 0.200; // high pt particles
793       param->fMaxMissingClustersPlaneEff = 2; // at most 2 layer out of 5 without cluster
794     }
795     //
796     return param;
797   }
798   else if (i==-1) { // Method using tracklets
799     AliITSRecoParam *param;
800     param = GetLowFluxParam();
801     param->SetIPlanePlaneEff(i);
802     param->SetComputePlaneEff(kTRUE,kFALSE);
803     param->SetUseTrackletsPlaneEff(kTRUE);
804     param->SetTrackleterPhiWindowL2(0.07);
805     param->SetTrackleterZetaWindowL2(0.4);
806     param->SetTrackleterPhiWindowL1(0.10);
807     param->SetTrackleterZetaWindowL1(0.6);
808     param->SetUpdateOncePerEventPlaneEff(kTRUE);
809     param->SetMinContVtxPlaneEff(3);
810     return param;
811   }
812   else {
813     AliErrorGeneral("AliITSRecoParam",Form("Unrecognised value of i %d\n",i));
814     return 0;
815   }
816 }
817
818 //_____________________________________________________________________________
819 void AliITSRecoParam::SetLayersParameters() 
820 {
821   //
822   // number of layers and layers spatial resolutions
823   //
824
825   // spatial resolutions of the detectors
826   // y: 12 12 38 38 20 20 micron
827   fSigmaY2[0]=1.44e-6;
828   fSigmaY2[1]=1.44e-6;
829   fSigmaY2[2]=1.444e-5;
830   fSigmaY2[3]=1.444e-5;
831   fSigmaY2[4]=4.0e-6;
832   fSigmaY2[5]=4.0e-6;
833   // z: 120 120 28 28 830 830 micron
834   fSigmaZ2[0]=1.44e-4;
835   fSigmaZ2[1]=1.44e-4;
836   fSigmaZ2[2]=7.84e-6;
837   fSigmaZ2[3]=7.84e-6;
838   fSigmaZ2[4]=6.889e-3;
839   fSigmaZ2[5]=6.889e-3;
840
841   return;
842 }
843 //_____________________________________________________________________________
844 void AliITSRecoParam::PrintParameters() const 
845 {
846   //
847   // print parameters
848   //
849
850   printf("=============================  AliITSRecoParam::PrintParameters ");
851   printf("============================= \n\n");
852   for(Int_t i=0; i<AliITSgeomTGeo::kNLayers; i++) {
853     if(!fLayersToSkip[i]) {
854       printf("ITS Traking: using layer %d\n",i);
855     } else {
856       printf("ITS Traking: skipping layer %d\n",i);
857     }
858   }
859   for(Int_t i=0; i<AliITSgeomTGeo::kNLayers; i++) {
860     if(fUseAmplitudeInfo[i]) {
861       printf("ITS Traking: use amplitude info for layer %d\n",i);
862     } else {
863       printf("ITS Traking: don't use amplitude info for layer %d\n",i);
864     }
865   }
866   for(Int_t i=0; i<AliITSgeomTGeo::kNLayers; i++)
867     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]);
868
869
870   Dump();
871
872   return;
873 }