]>
Commit | Line | Data |
---|---|---|
bf315ec1 | 1 | void MakeTPCRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult) { |
2 | //======================================================================== | |
3 | // | |
4 | // Steering macro for TPC reconstruction parameters | |
5 | // | |
6 | // Author: M.Ivanov | |
7 | // Contact: marian.ivanov@cern.ch | |
8 | // | |
9 | //======================================================================== | |
10 | ||
11 | ||
12 | const char* macroname = "MakeTPCRecoParam.C"; | |
13 | ||
14 | // Activate CDB storage and load geometry from CDB | |
15 | AliCDBManager* cdb = AliCDBManager::Instance(); | |
16 | if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://OCDB"); | |
17 | // | |
18 | // | |
19 | TObjArray *recoParamArray = new TObjArray(); | |
20 | { | |
21 | AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetLowFluxParam(); | |
63a13f7b | 22 | Double_t sysError[5]={0.01,0.02, 0.01/150., 0.02/150.,0.01/(150*150.)}; |
23 | tpcRecoParam->SetSystematicError(sysError); | |
bf315ec1 | 24 | tpcRecoParam->SetEventSpecie(AliRecoParam::kLowMult); |
63a13f7b | 25 | tpcRecoParam->SetMinMaxCutAbs(2.5); |
26 | tpcRecoParam->SetMinLeftRightCutAbs(5.); | |
27 | tpcRecoParam->SetMinUpDownCutAbs(5.); | |
28 | // | |
29 | tpcRecoParam->SetMinMaxCutSigma(2.5); | |
30 | tpcRecoParam->SetMinLeftRightCutSigma(5.); | |
31 | tpcRecoParam->SetMinUpDownCutSigma(5.); | |
32 | ||
bf315ec1 | 33 | recoParamArray->AddLast(tpcRecoParam); |
34 | } | |
35 | { | |
36 | AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetHighFluxParam(); | |
37 | tpcRecoParam->SetEventSpecie(AliRecoParam::kHighMult); | |
63a13f7b | 38 | Double_t sysError[5]={0.01,0.02, 0.01/150., 0.02/150.,0.01/(150*150.)}; |
39 | tpcRecoParam->SetSystematicError(sysError); | |
bf315ec1 | 40 | recoParamArray->AddLast(tpcRecoParam); |
41 | } | |
42 | ||
43 | { | |
44 | AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetLaserTestParam(kFALSE); | |
45 | tpcRecoParam->SetEventSpecie(AliRecoParam::kCalib); | |
46 | recoParamArray->AddLast(tpcRecoParam); | |
47 | } | |
48 | ||
49 | { | |
50 | AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kFALSE); | |
51 | tpcRecoParam->SetEventSpecie(AliRecoParam::kCosmic); | |
63a13f7b | 52 | tpcRecoParam->SetTimeInterval(60,940); |
53 | Double_t sysError[5]={0.3,1, 0.3/150., 1./150.,0.3/(150*150.)}; | |
54 | tpcRecoParam->SetSystematicError(sysError); | |
55 | // | |
56 | tpcRecoParam->SetMinMaxCutAbs(2.5); | |
57 | tpcRecoParam->SetMinLeftRightCutAbs(5.); | |
58 | tpcRecoParam->SetMinUpDownCutAbs(5.); | |
59 | // | |
60 | tpcRecoParam->SetMinMaxCutSigma(2.5); | |
61 | tpcRecoParam->SetMinLeftRightCutSigma(5.); | |
62 | tpcRecoParam->SetMinUpDownCutSigma(5.); | |
bf315ec1 | 63 | recoParamArray->AddLast(tpcRecoParam); |
64 | } | |
65 | ||
66 | // Set the default | |
67 | Bool_t defaultIsSet = kFALSE; | |
68 | for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) { | |
69 | AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i); | |
70 | if (!param) continue; | |
71 | if (default & param->GetEventSpecie()) { | |
72 | param->SetAsDefault(); | |
73 | defaultIsSet = kTRUE; | |
74 | } | |
75 | } | |
76 | ||
77 | if (!defaultIsSet) { | |
78 | Error(macroname,"The default reconstruction parameters are not set! Exiting..."); | |
79 | return; | |
80 | } | |
81 | ||
82 | ||
83 | ||
84 | // save in CDB storage | |
85 | AliCDBMetaData *md= new AliCDBMetaData(); | |
86 | md->SetResponsible("Marian Ivanov"); | |
87 | md->SetComment("Reconstruction parameters TPC"); | |
88 | md->SetAliRootVersion(gSystem->Getenv("ARVERSION")); | |
89 | md->SetBeamPeriod(0); | |
90 | AliCDBId id("TPC/Calib/RecoParam",0,AliCDBRunRange::Infinity()); | |
91 | cdb->GetDefaultStorage()->Put(recoParamArray,id, md); | |
92 | return; | |
93 | } | |
94 |