- fixing warnings/coverity
[u/mrichter/AliRoot.git] / ITS / MakeITSRecoParam_2010.C
1 void MakeITSRecoParam_2010(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult, const char* cdbURI="local://") {
2 //========================================================================
3 //
4 // Steering macro for ITS reconstruction parameters
5 //
6 // Author: A.Dainese
7 // Contact: andrea.dainese@lnl.infn.it
8 //
9 //========================================================================
10
11
12   const char* macroname = "MakeITSRecoParam_2010.C";
13
14   // Activate CDB storage and load geometry from CDB
15   AliCDBManager* cdb = AliCDBManager::Instance();
16   cdb->SetDefaultStorage(cdbURI);
17   
18   TObjArray *recoParamArray = new TObjArray();
19
20   {
21     AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetCosmicTestParam();
22     // find independently ITS SA tracks 
23     itsRecoParam->SetSAUseAllClusters();
24     itsRecoParam->SetMinNPointsSA(2);
25     itsRecoParam->SetOuterStartLayerSA(AliITSgeomTGeo::GetNLayers()-2);
26
27     // to maximize efficiency
28     itsRecoParam->SetAllowProlongationWithEmptyRoad();
29     
30     // larger seach windows for SA (in case of large misalignments)
31     itsRecoParam->SetNLoopsSA(33);
32     itsRecoParam->SetFactorSAWindowSizes(20);
33     
34     // additional error due to misal (B off)
35     itsRecoParam->SetClusterMisalErrorY(1.0,1.0,1.0,1.0,1.0,1.0); // [cm]
36     itsRecoParam->SetClusterMisalErrorZ(1.0,1.0,1.0,1.0,1.0,1.0); // [cm]
37     // additional error due to misal (B on)
38     itsRecoParam->SetClusterMisalErrorYBOn(0.0,0.0,0.1,0.1,0.1,0.1); // [cm]
39     itsRecoParam->SetClusterMisalErrorZBOn(0.1,0.1,0.1,0.1,0.1,0.1); // [cm]
40
41     itsRecoParam->SetClusterErrorsParam(2);
42     itsRecoParam->SetFindV0s(kFALSE);
43     itsRecoParam->SetAddVirtualClustersInDeadZone(kFALSE);
44     itsRecoParam->SetUseAmplitudeInfo(kFALSE);
45     itsRecoParam->SetEventSpecie(AliRecoParam::kCosmic);
46     itsRecoParam->SetTitle("Cosmic");
47     recoParamArray->AddLast(itsRecoParam);
48   }
49   {
50     AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetLowFluxParam();
51     itsRecoParam->SetClusterErrorsParam(2);
52
53     // find independently ITS SA tracks 
54     itsRecoParam->SetSAUseAllClusters();
55     itsRecoParam->SetOuterStartLayerSA(2);
56
57     itsRecoParam->SetAllowProlongationWithEmptyRoad(kTRUE);
58     
59     // larger seach windows for SA (in case of large misalignments)
60     itsRecoParam->SetFactorSAWindowSizes(2);
61     
62     // Misalignment syst errors decided at ITS meeting 25.03.2010
63     // Errors in Z reduced on 11.10.2010 for SPD and SDD
64     // additional error due to misal (B off)
65     itsRecoParam->SetClusterMisalErrorY(0.0010,0.0010,0.0300,0.0300,0.0020,0.0020); // [cm]
66     itsRecoParam->SetClusterMisalErrorZ(0.0050,0.0050,0.0050,0.0050,0.1000,0.1000); // [cm]
67     // additional error due to misal (B on)
68     itsRecoParam->SetClusterMisalErrorYBOn(0.0010,0.0030,0.0500,0.0500,0.0020,0.0020); // [cm]
69     itsRecoParam->SetClusterMisalErrorZBOn(0.0050,0.0050,0.0050,0.0050,0.1000,0.1000); // [cm]
70     //----
71
72     // SDD configuration 
73     itsRecoParam->SetUseSDDCorrectionMaps(kTRUE); // changed 30.04.2010
74     itsRecoParam->SetUseSDDClusterSizeSelection(kTRUE);
75     itsRecoParam->SetMinClusterChargeSDD(30.);
76     itsRecoParam->SetUseUnfoldingInClusterFinderSDD(kFALSE);
77
78     // Plane Efficiency evaluation with tracklets Method
79     itsRecoParam->SetIPlanePlaneEff(-1);
80     itsRecoParam->SetComputePlaneEff(kTRUE,kFALSE);
81     itsRecoParam->SetUseTrackletsPlaneEff(kTRUE);
82     itsRecoParam->SetTrackleterPhiWindowL2(0.07);
83     itsRecoParam->SetTrackleterZetaWindowL2(0.4);
84     itsRecoParam->SetTrackleterPhiWindowL1(0.10);
85     itsRecoParam->SetTrackleterZetaWindowL1(0.6);
86     itsRecoParam->SetUpdateOncePerEventPlaneEff(kTRUE);
87     itsRecoParam->SetMinContVtxPlaneEff(3);
88     // itsRecoParam->SetOptTrackletsPlaneEff(kTRUE); // activate it for MC (very important) !
89     // Removal of tracklets reconstructed in the SPD overlaps 
90     itsRecoParam->SetTrackleterRemoveClustersFromOverlaps(kTRUE);
91   
92     // V0 finder (A. Marin)
93     itsRecoParam->GetESDV0Params()->SetMaxPidProbPionForb(0.9);
94
95     //******************************************************************
96
97     itsRecoParam->SetEventSpecie(AliRecoParam::kLowMult);
98     itsRecoParam->SetTitle("LowMult");
99     recoParamArray->AddLast(itsRecoParam);
100   }
101   {
102     AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetHighFluxParam();
103     itsRecoParam->SetClusterErrorsParam(2);
104
105     // find independently ITS SA tracks for nContrSPD<50
106     itsRecoParam->SetSAUseAllClusters();
107     itsRecoParam->SetMaxSPDcontrForSAToUseAllClusters(50);
108
109     itsRecoParam->SetImproveWithVertex(kTRUE);
110     // Misalignment syst errors decided at ITS meeting 25.03.2010
111     // additional error due to misal (B off)
112     itsRecoParam->SetClusterMisalErrorY(0.0010,0.0010,0.0300,0.0300,0.0020,0.0020); // [cm]
113     itsRecoParam->SetClusterMisalErrorZ(0.0100,0.0100,0.0100,0.0100,0.0500,0.0500); // [cm]
114     // additional error due to misal (B on)
115     itsRecoParam->SetClusterMisalErrorYBOn(0.0010,0.0030,0.0500,0.0500,0.0020,0.0020); // [cm]
116     itsRecoParam->SetClusterMisalErrorZBOn(0.0050,0.0050,0.0050,0.0050,0.1000,0.1000); // [cm]
117     //----
118
119     //Vertexer Z
120     itsRecoParam->SetVertexerZ();
121
122
123     // tracklets
124     itsRecoParam->SetTrackleterPhiWindowL2(0.07);
125     itsRecoParam->SetTrackleterZetaWindowL2(0.4);
126     itsRecoParam->SetTrackleterPhiWindowL1(0.10);
127     itsRecoParam->SetTrackleterZetaWindowL1(0.6);
128     //
129     itsRecoParam->SetTrackleterPhiWindow(0.06);
130     itsRecoParam->SetTrackleterThetaWindow(0.025);
131     itsRecoParam->SetTrackleterNStdDevCut(25);
132     itsRecoParam->SetTrackleterScaleDThetaBySin2T(kTRUE);
133     //
134     // Removal of tracklets reconstructed in the SPD overlaps 
135     itsRecoParam->SetTrackleterRemoveClustersFromOverlaps(kTRUE);
136
137     // SDD configuration 
138     itsRecoParam->SetUseSDDCorrectionMaps(kFALSE); 
139     itsRecoParam->SetUseSDDClusterSizeSelection(kTRUE);
140     itsRecoParam->SetMinClusterChargeSDD(30.);
141     itsRecoParam->SetUseUnfoldingInClusterFinderSDD(kFALSE);
142
143     itsRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
144     itsRecoParam->SetTitle("HighMult");
145     recoParamArray->AddLast(itsRecoParam);
146   }
147
148   // Set the default
149   Bool_t defaultIsSet = kFALSE;
150   for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
151     AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
152     if (!param) continue;
153     if (default & param->GetEventSpecie()) {
154       param->SetAsDefault();
155       defaultIsSet = kTRUE;
156     }
157   }
158
159   if (!defaultIsSet) {
160     Error(macroname,"The default reconstruction parameters are not set! Exiting...");
161     return;
162   }
163
164   // save in CDB storage
165   AliCDBMetaData *md= new AliCDBMetaData();
166   md->SetResponsible("Andrea Dainese");
167   md->SetComment("Reconstruction parameters ITS.");
168   md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
169   md->SetBeamPeriod(0);
170   AliCDBId id("ITS/Calib/RecoParam",0,AliCDBRunRange::Infinity());
171   cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
172
173   return;
174 }
175
176