Settings for pp data taking foreseen for Dec,3-rd 2009 (Andrea and Francesco)
[u/mrichter/AliRoot.git] / ITS / MakeITSRecoParam_pp2009.C
1 void MakeITSRecoParam_pp2009(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult, const char* cdbURI) {
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_pp2009.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     itsRecoParam->SetFactorSAWindowSizes(20);
23     itsRecoParam->SetClusterErrorsParam(2);
24     itsRecoParam->SetFindV0s(kFALSE);
25     itsRecoParam->SetAddVirtualClustersInDeadZone(kFALSE);
26     itsRecoParam->SetUseAmplitudeInfo(kFALSE);
27     // In case we want to switch off a layer
28     //  itsRecoParam->SetLayerToSkip(<N>);
29     //  itsRecoParam->SetLayerToSkip(4);
30     //  itsRecoParam->SetLayerToSkip(5);
31     //    itsRecoParam->SetLayerToSkip(2);
32     //    itsRecoParam->SetLayerToSkip(3);
33     //itsRecoParam->SetSAOnePointTracks();
34     itsRecoParam->SetClusterMisalError(0.1); // [cm]
35     itsRecoParam->SetSAUseAllClusters();
36     itsRecoParam->SetMinNPointsSA(2);
37     itsRecoParam->SetEventSpecie(AliRecoParam::kCosmic);
38     recoParamArray->AddLast(itsRecoParam);
39   }
40   {
41     AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetLowFluxParam();
42     itsRecoParam->SetClusterErrorsParam(2);
43     //****** FIRST PHYSICS 2009 *********************
44
45     /* //  First Collisions 23.11.2009 (same as COSMICS 2009) 
46     // find independently ITS SA tracks 
47     itsRecoParam->SetSAUseAllClusters();
48     itsRecoParam->SetOuterStartLayerSA(AliITSgeomTGeo::GetNLayers()-2);
49
50     // to maximize efficiency
51     itsRecoParam->SetAllowProlongationWithEmptyRoad();
52     
53     // larger seach windows for SA (in case of large misalignments)
54     itsRecoParam->SetNLoopsSA(33);
55     itsRecoParam->SetFactorSAWindowSizes(20);
56     
57     // additional error due to misal (B off)
58     itsRecoParam->SetClusterMisalErrorY(1.0,1.0,1.0,1.0,1.0,1.0); // [cm]
59     itsRecoParam->SetClusterMisalErrorZ(1.0,1.0,1.0,1.0,1.0,1.0); // [cm]
60     // additional error due to misal (B on)
61     itsRecoParam->SetClusterMisalErrorYBOn(0.0,0.0,0.1,0.1,0.1,0.1); // [cm]
62     itsRecoParam->SetClusterMisalErrorZBOn(0.1,0.1,0.1,0.1,0.1,0.1); // [cm]
63     */
64
65     //----  Collisions since 03.12.2009 
66     // find independently ITS SA tracks 
67     itsRecoParam->SetSAUseAllClusters();
68     itsRecoParam->SetOuterStartLayerSA(2);
69
70     // to maximize efficiency
71     itsRecoParam->SetAllowProlongationWithEmptyRoad(kFALSE);
72     
73     // larger seach windows for SA (in case of large misalignments)
74     itsRecoParam->SetFactorSAWindowSizes(2);
75     
76     // additional error due to misal (B off)
77     itsRecoParam->SetClusterMisalErrorY(0.01,0.01,0.1,0.1,0.1,0.1); // [cm]
78     itsRecoParam->SetClusterMisalErrorZ(0.01,0.01,0.1,0.1,0.1,0.1); // [cm]
79     // additional error due to misal (B on)
80     itsRecoParam->SetClusterMisalErrorYBOn(0.01,0.01,0.1,0.1,0.1,0.1); // [cm]
81     itsRecoParam->SetClusterMisalErrorZBOn(0.01,0.01,0.1,0.1,0.1,0.1); // [cm]
82     //----
83
84     // SDD configuration 
85     itsRecoParam->SetUseSDDCorrectionMaps(kFALSE);
86     itsRecoParam->SetUseSDDClusterSizeSelection(kTRUE);
87     itsRecoParam->SetMinClusterChargeSDD(30.);
88
89     // Plane Efficiency evaluation with tracklets Method
90     itsRecoParam->SetIPlanePlaneEff(-1);
91     itsRecoParam->SetComputePlaneEff(kTRUE,kFALSE);
92     itsRecoParam->SetUseTrackletsPlaneEff(kTRUE);
93     itsRecoParam->SetTrackleterPhiWindowL2(0.07);
94     itsRecoParam->SetTrackleterZetaWindowL2(0.4);
95     itsRecoParam->SetTrackleterPhiWindowL1(0.10);
96     itsRecoParam->SetTrackleterZetaWindowL1(0.6);
97     itsRecoParam->SetUpdateOncePerEventPlaneEff(kTRUE);
98     itsRecoParam->SetMinContVtxPlaneEff(3);
99     // itsRecoParam->SetOptTrackletsPlaneEff(kTRUE); // activate it for MC (very important) !
100   
101     //******************************************************************
102
103     itsRecoParam->SetEventSpecie(AliRecoParam::kLowMult);
104     recoParamArray->AddLast(itsRecoParam);
105   }
106   {
107     AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetHighFluxParam();
108     itsRecoParam->SetClusterErrorsParam(2);
109     itsRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
110     recoParamArray->AddLast(itsRecoParam);
111   }
112
113   // Set the default
114   Bool_t defaultIsSet = kFALSE;
115   for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
116     AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
117     if (!param) continue;
118     if (default & param->GetEventSpecie()) {
119       param->SetAsDefault();
120       defaultIsSet = kTRUE;
121     }
122   }
123
124   if (!defaultIsSet) {
125     Error(macroname,"The default reconstruction parameters are not set! Exiting...");
126     return;
127   }
128
129   // save in CDB storage
130   AliCDBMetaData *md= new AliCDBMetaData();
131   md->SetResponsible("Andrea Dainese");
132   md->SetComment("Reconstruction parameters ITS. Use large misal errors for cosmics and lowflux, 18 Nov 2009");
133   md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
134   md->SetBeamPeriod(0);
135   AliCDBId id("ITS/Calib/RecoParam",0,AliCDBRunRange::Infinity());
136   cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
137
138   return;
139 }
140
141