Added option for different binning of DCAxy axis in THnSparse. Same width for all...
[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     // 
91     itsRecoParam->SetTrackleterRemoveClustersFromOverlaps(kTRUE);
92     itsRecoParam->SetTrackleterPhiWindow(0.08);
93     itsRecoParam->SetTrackleterThetaWindow(0.025);
94     itsRecoParam->SetTrackleterScaleDThetaBySin2T(kTRUE);
95     //
96     // V0 finder (A. Marin)
97     itsRecoParam->GetESDV0Params()->SetMaxPidProbPionForb(0.9);
98
99     //******************************************************************
100
101     itsRecoParam->SetEventSpecie(AliRecoParam::kLowMult);
102     itsRecoParam->SetTitle("LowMult");
103     recoParamArray->AddLast(itsRecoParam);
104   }
105   {
106     AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetHighFluxParam();
107     itsRecoParam->SetClusterErrorsParam(2);
108
109     // find independently ITS SA tracks for nContrSPD<50
110     itsRecoParam->SetSAUseAllClusters();
111     itsRecoParam->SetMaxSPDcontrForSAToUseAllClusters(50);
112
113     itsRecoParam->SetImproveWithVertex(kTRUE);
114     // Misalignment syst errors decided at ITS meeting 25.03.2010
115     // additional error due to misal (B off)
116     itsRecoParam->SetClusterMisalErrorY(0.0010,0.0010,0.0100,0.0100,0.0020,0.0020); // [cm]
117     itsRecoParam->SetClusterMisalErrorZ(0.0100,0.0100,0.0100,0.0100,0.0500,0.0500); // [cm]
118     // additional error due to misal (B on)
119     itsRecoParam->SetClusterMisalErrorYBOn(0.0010,0.0030,0.0100,0.0100,0.0020,0.0020); // [cm]
120     itsRecoParam->SetClusterMisalErrorZBOn(0.0050,0.0050,0.0050,0.0050,0.1000,0.1000); // [cm]
121     //----
122
123     //Vertexer Z
124     itsRecoParam->SetVertexerZ();
125
126
127     // tracklets
128     itsRecoParam->SetTrackleterPhiWindowL2(0.07);
129     itsRecoParam->SetTrackleterZetaWindowL2(0.4);
130     itsRecoParam->SetTrackleterPhiWindowL1(0.10);
131     itsRecoParam->SetTrackleterZetaWindowL1(0.6);
132     //
133     itsRecoParam->SetTrackleterPhiWindow(0.06);
134     itsRecoParam->SetTrackleterThetaWindow(0.025);
135     itsRecoParam->SetTrackleterScaleDThetaBySin2T(kTRUE);
136     //
137     // Removal of tracklets reconstructed in the SPD overlaps 
138     itsRecoParam->SetTrackleterRemoveClustersFromOverlaps(kTRUE);
139
140     // SDD configuration 
141     itsRecoParam->SetUseSDDCorrectionMaps(kTRUE); 
142     itsRecoParam->SetUseSDDClusterSizeSelection(kTRUE);
143     itsRecoParam->SetMinClusterChargeSDD(30.);
144     itsRecoParam->SetUseUnfoldingInClusterFinderSDD(kFALSE);
145
146     itsRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
147     itsRecoParam->SetTitle("HighMult");
148     recoParamArray->AddLast(itsRecoParam);
149   }
150
151   // Set the default
152   Bool_t defaultIsSet = kFALSE;
153   for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
154     AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
155     if (!param) continue;
156     if (default & param->GetEventSpecie()) {
157       param->SetAsDefault();
158       defaultIsSet = kTRUE;
159     }
160   }
161
162   if (!defaultIsSet) {
163     Error(macroname,"The default reconstruction parameters are not set! Exiting...");
164     return;
165   }
166
167   // save in CDB storage
168   AliCDBMetaData *md= new AliCDBMetaData();
169   md->SetResponsible("Andrea Dainese");
170   md->SetComment("Reconstruction parameters ITS.");
171   md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
172   md->SetBeamPeriod(0);
173   AliCDBId id("ITS/Calib/RecoParam",0,AliCDBRunRange::Infinity());
174   cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
175
176   return;
177 }
178