possibility to cut on the pt of candidate (Rossella)
[u/mrichter/AliRoot.git] / GRP / MakeGRPRecoParam.C
CommitLineData
6ca15f89 1void 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);
a8da38a1 21 param->SetVertexerTracksConstraintITS(kFALSE);
22 param->SetVertexerTracksConstraintTPC(kFALSE);
6ca15f89 23 recoParamArray->AddLast(param);
24 }
25 {
a8da38a1 26 // new settings for pass 2reco of Dec09 pp data
6ca15f89 27 AliGRPRecoParam * param = AliGRPRecoParam::GetLowFluxParam();
28 param->SetEventSpecie(AliRecoParam::kLowMult);
a8da38a1 29 param->SetVertexerTracksConstraintITS(kTRUE);
30 Double_t cutsITS[12]={0.1,
31 0.1,
32 0.5,
33 4, // minimum 4 clusters (default was 5)
34 1,
35 3.,
36 100.,
37 1000.,
38 3.,
39 30.,
40 1,
41 4};
42 param->SetVertexerTracksCutsITS(12,cutsITS);
43 param->SetVertexerTracksConstraintTPC(kTRUE);
6ca15f89 44 recoParamArray->AddLast(param);
45 }
46 {
47 AliGRPRecoParam * param = AliGRPRecoParam::GetHighFluxParam();
48 param->SetEventSpecie(AliRecoParam::kHighMult);
a8da38a1 49 param->SetVertexerTracksConstraintITS(kFALSE);
50 param->SetVertexerTracksConstraintTPC(kFALSE);
6ca15f89 51 recoParamArray->AddLast(param);
52 }
53
54 // Set the default
55 Bool_t defaultIsSet = kFALSE;
56 for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
57 AliDetectorRecoParam *par = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
58 if (!par) continue;
59 if (default & par->GetEventSpecie()) {
60 par->SetAsDefault();
61 defaultIsSet = kTRUE;
62 }
63 }
64
65 if (!defaultIsSet) {
66 Error(macroname,"The default reconstruction parameters are not set! Exiting...");
67 return;
68 }
69
70 // save in CDB storage
71 AliCDBMetaData *md= new AliCDBMetaData();
72 md->SetResponsible("Cvetan Cheshkov");
73 md->SetComment("GRP reconstruction parameters");
74 md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
75 md->SetBeamPeriod(0);
76 AliCDBId id("GRP/Calib/RecoParam",0,AliCDBRunRange::Infinity());
77 cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
78
79 return;
80}