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