1 void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult, const char* cdbURI="local://") {
2 //========================================================================
4 // Steering macro for ITSU reconstruction parameters
6 // Contact: ruben.shahoyan@cern.ch
8 //========================================================================
9 const char* macroname = "MakeITSRecoParam.C";
11 enum {kBit0=0x1<<0,kBit1=0x1<<1,kBit2=0x1<<2,kBit3=0x1<<3,kBit4=0x1<<4,kBit5=0x1<<5,kBit6=0x1<<6,kBit7=0x7<<2,kBit8=0x1<<8};
14 gSystem->Load("libITSUpgradeBase.so");
15 gSystem->Load("libITSUpgradeSim.so");
16 gSystem->Load("libITSUpgradeRec.so");
18 // Activate CDB storage and load geometry from CDB
19 AliCDBManager* cdb = AliCDBManager::Instance();
20 cdb->SetDefaultStorage(cdbURI);
21 AliITSUTrackCond* trcond = 0;
24 TObjArray *recoParamArray = new TObjArray();
27 AliITSURecoParam * itsRecoParam = AliITSURecoParam::GetCosmicTestParam();
29 itsRecoParam->SetNLayers(nLr);
31 //******************************************************************
32 itsRecoParam->SetEventSpecie(AliRecoParam::kCosmic);
33 itsRecoParam->SetTitle("Cosmic");
34 recoParamArray->AddLast(itsRecoParam);
37 const Bool_t kAllowDiagCl = kFALSE;
39 // tuned for 20x20 pixels with x/x0= 0.3,0.3,0.3,0.5,0.5,0.5,0.5%
40 int nBranch[7] = {5,10,15,4,6,6,10}; // max branching for the seed on layer
41 int nCands[7] = {10,20,45,20,45,15,10}; // max candidates for the TPC seed
42 float tr2clChi2[7] = {20,25,30,40,45,45,70}; // cut on cluster to track chi2
43 float gloChi2[7] = {10, 15,20,40,70,70,70}; // cut on seed global norm chi2
44 float missPen[7] = {2.,2.,2.,2.,2.,2.,2.}; // missing cluster penalty
45 float maxChi2Match = 10.;
46 float maxChi2SA = 10.;
49 // tuned for 20x33 pixels
50 int nBranch[7] = {5,10,15,4,6,6,10}; // max branching for the seed on layer
51 int nCands[7] = {10,20,25,20,30,15,20}; // max candidates for the TPC seed
52 float tr2clChi2[7] = {20,20,25,25,25,30,40}; // cut on cluster to track chi2
53 float gloChi2[7] = {9, 10,15,20,30,30,30}; // cut on seed global norm chi2
54 float missPen[7] = {2.,2.,2.,2.,2.,2.,2.}; // missing cluster penalty
55 float maxChi2Match = 10.;
56 float maxChi2SA = 10.;
60 // this is for tuning only
61 int nBranch[7] = {30,20,20,20,20,20,20}; // max branching for the seed on layer
62 int nCands[7] = {20,100,100,100,100,55,20}; // max candidates for the TPC seed
63 float tr2clChi2[7] = {40,50,60,80,80,80,80}; // cut on cluster to track chi2
64 float gloChi2[7] = {20, 30,40,60,80,80,80}; // cut on seed global norm chi2
65 float missPen[7] = {2.,2.,2.,2.,2.,2.,2.}; // missing cluster penalty
66 float maxChi2Match = 20.;
67 float maxChi2SA = 20.;
71 AliITSURecoParam * itsRecoParam = AliITSURecoParam::GetLowFluxParam();
73 itsRecoParam->SetNLayers(nLr);
75 //******************************************************************
76 itsRecoParam->SetEventSpecie(AliRecoParam::kLowMult);
77 itsRecoParam->SetTitle("LowMult");
78 recoParamArray->AddLast(itsRecoParam);
79 //******************************************************************
80 for (int i=0;i<nLr;i++) itsRecoParam->SetAllowDiagonalClusterization(i,kAllowDiagCl);
82 // Add tracking conditions >>>
83 trCond = new AliITSUTrackCond();
84 trCond->SetNLayers(nLr);
85 trCond->SetMaxITSTPCMatchChi2(maxChi2Match);
86 trCond->SetMaxITSSAChi2(maxChi2SA);
88 for (int i=0;i<nLr;i++) {
89 trCond->SetMaxBranches(i,nBranch[i]); // each seed propagated to given layer can produce max nBranch branches
90 trCond->SetMaxCandidates(i,nCands[i]); // each tpc track may have at most nCands prolongations
91 trCond->SetMaxTr2ClChi2(i,tr2clChi2[i]); // cut on cluster to track chi2
92 trCond->SetMaxChi2GloNrm(i,gloChi2[i]); // cut on cluster to track global chi2
93 trCond->SetMissPenalty(i,missPen[i]); // missing cluster penalty
97 trCond->AddNewCondition(5); // min hits
98 trCond->AddGroupPattern( kBit0|kBit1|kBit2, 2); // at least 2 hits in 3 inner layers
99 trCond->AddGroupPattern( kBit3|kBit4 , 1); // at least 1 hit in 2 middle layers
100 trCond->AddGroupPattern( kBit5|kBit6 , 1); // at least 1 hit in 2 outer layers
104 itsRecoParam->AddTrackingCondition(trCond);
105 // Add tracking conditions <<<
108 AliITSURecoParam * itsRecoParam = AliITSURecoParam::GetHighFluxParam();
110 itsRecoParam->SetNLayers(nLr);
112 //******************************************************************
113 itsRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
114 itsRecoParam->SetTitle("HighMult");
115 recoParamArray->AddLast(itsRecoParam);
116 //******************************************************************
117 for (int i=0;i<nLr;i++) itsRecoParam->SetAllowDiagonalClusterization(i,kAllowDiagCl);
119 // Add tracking conditions >>>
120 trCond = new AliITSUTrackCond();
121 trCond->SetNLayers(nLr);
122 trCond->SetMaxITSTPCMatchChi2(maxChi2Match);
123 trCond->SetMaxITSSAChi2(maxChi2SA);
125 for (int i=0;i<nLr;i++) {
126 trCond->SetMaxBranches(i,nBranch[i]); // each seed propagated to given layer can produce max nBranch branches
127 trCond->SetMaxCandidates(i,nCands[i]); // each tpc track may have at most nCands prolongations
128 trCond->SetMaxTr2ClChi2(i,tr2clChi2[i]); // cut on cluster to track chi2
129 trCond->SetMaxChi2GloNrm(i,gloChi2[i]); // cut on cluster to track global chi2
130 trCond->SetMissPenalty(i,missPen[i]); // missing cluster penalty
134 trCond->AddNewCondition(5); // min hits
135 trCond->AddGroupPattern( kBit0|kBit1|kBit2, 2); // at least 2 hits in 3 inner layers
136 trCond->AddGroupPattern( kBit3|kBit4 , 1); // at least 1 hit in 2 middle layers
137 trCond->AddGroupPattern( kBit5|kBit6 , 1); // at least 1 hit in 2 outer layers
141 itsRecoParam->AddTrackingCondition(trCond);
142 // Add tracking conditions <<<
147 Bool_t defaultIsSet = kFALSE;
148 for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
149 AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
150 if (!param) continue;
151 if (default & param->GetEventSpecie()) {
152 param->SetAsDefault();
153 defaultIsSet = kTRUE;
158 Error(macroname,"The default reconstruction parameters are not set! Exiting...");
162 // save in CDB storage
163 AliCDBMetaData *md= new AliCDBMetaData();
164 md->SetResponsible("Andrea Dainese");
165 md->SetComment("Reconstruction parameters ITS.");
166 md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
167 md->SetBeamPeriod(0);
168 AliCDBId id("ITS/Calib/RecoParam",0,AliCDBRunRange::Infinity());
169 cdb->GetDefaultStorage()->Put(recoParamArray,id, md);