]> git.uio.no Git - u/mrichter/AliRoot.git/blob - GRP/MakeGRPRecoParam.C
Removed hardcoded AliESDs.root in AliESDInputHandler(RP)::Notify()
[u/mrichter/AliRoot.git] / GRP / MakeGRPRecoParam.C
1 void MakeGRPRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult) {
2 //========================================================================
3 //
4 // Steering macro for GRP reconstruction parameters
5 //
6 //
7 //========================================================================
8
9
10   const char* macroname = "MakeGRPRecoParam.C";
11
12   // Activate CDB storage and load geometry from CDB
13   AliCDBManager* cdb = AliCDBManager::Instance();
14   if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://OCDB");
15   
16   TObjArray *recoParamArray = new TObjArray();
17
18   {
19     AliGRPRecoParam * param = AliGRPRecoParam::GetCosmicTestParam();
20     param->SetEventSpecie(AliRecoParam::kCosmic);
21     param->SetVertexerTracksConstraintITS(kFALSE);
22     param->SetVertexerTracksConstraintTPC(kFALSE);
23     recoParamArray->AddLast(param);
24   }
25   {
26     // new settings for pass 2reco of Dec09 pp data
27     AliGRPRecoParam * param = AliGRPRecoParam::GetLowFluxParam();
28     param->SetEventSpecie(AliRecoParam::kLowMult);
29     param->SetVertexerTracksConstraintITS(kTRUE);
30     Double_t cutsITS[21]={0.1,
31                           0.1,
32                           0.5,
33                           //4, // minimum 4 clusters (default was 5)
34                           3, // minimum 3 clusters (was 4)
35                           1,
36                           3.,
37                           100.,
38                           1000.,
39                           3.,
40                           30.,
41                           6, // 6: MultiVertexer (was 1)
42                           4,
43                           // multivertexer settings
44                           7., 
45                           1e3.,
46                           5.0,
47                           0.05,
48                           10e-4,
49                           2.,
50                           10.,
51                           1.,
52                           50.
53     };
54     param->SetVertexerTracksCutsITS(21,cutsITS);
55     param->SetVertexerTracksConstraintTPC(kTRUE);
56     recoParamArray->AddLast(param);
57   }
58   {
59     AliGRPRecoParam * param = AliGRPRecoParam::GetHighFluxParam();
60     param->SetEventSpecie(AliRecoParam::kHighMult);
61     param->SetVertexerTracksConstraintITS(kTRUE);
62     Double_t cutsITS[21]={0.1,
63                           0.1,
64                           0.5,
65                           4, // minimum 4 clusters (default was 5)
66                           1,
67                           3.,
68                           100.,
69                           1000.,
70                           3.,
71                           30.,
72                           1,
73                           1,
74                           // multivertexer settings
75                           7., 
76                           1e3.,
77                           5.0,
78                           0.05,
79                           10e-4,
80                           2.,
81                           10.,
82                           1.,
83                           50.
84     }; // faster finder algo for Iteration 0
85     param->SetVertexerTracksCutsITS(21,cutsITS);
86     param->SetVertexerTracksConstraintTPC(kTRUE);
87     recoParamArray->AddLast(param);
88   }
89
90   // Set the default
91   Bool_t defaultIsSet = kFALSE;
92   for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
93     AliDetectorRecoParam *par = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
94     if (!par) continue;
95     if (default & par->GetEventSpecie()) {
96       par->SetAsDefault();
97       defaultIsSet = kTRUE;
98     }
99   }
100
101   if (!defaultIsSet) {
102     Error(macroname,"The default reconstruction parameters are not set! Exiting...");
103     return;
104   }
105
106   // save in CDB storage
107   AliCDBMetaData *md= new AliCDBMetaData();
108   md->SetResponsible("Cvetan Cheshkov");
109   md->SetComment("GRP reconstruction parameters");
110   md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
111   md->SetBeamPeriod(0);
112   AliCDBId id("GRP/Calib/RecoParam",0,AliCDBRunRange::Infinity());
113   cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
114
115   return;
116 }