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