AliRoot Core  edcc906 (edcc906)
MakeTPCRecoParam_Run2DistMC.C
Go to the documentation of this file.
1 
9 
10 void MakeTPCRecoParam_Run2DistMC(const char* storage="local://OCDB", AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult) {
11 
12  const char* macroname = "MakeTPCRecoParam.C";
13 
14  double sysCovMatColl[5] = {0.02,0.3, 2.5e-4, 2.5e-4, 5.0e-3}; // systematic error for low/high flux
15  double sysCovMatCosm[5] = {0.05,0.5, 5.0e-4, 5.0e-4, 2.0e-2}; // systematic error for cosmics and calb (old one from Marian)
16  // vector for charging-up masking
17  TVectorF zreg(1),zregsigInv(1);
18  zreg[0] = -5.;
19  zregsigInv[0] = 1./2.0; // 2cm sigma in Z
20 
21  // Activate CDB storage and load geometry from CDB
23  if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage(storage);
24  //
25  //
26  TObjArray *recoParamArray = new TObjArray();
27  {
30 
31  // Double_t sysError[5]={0.01,0.02, 0.01/150., 0.02/150.,0.01/(150*150.)};
32  tpcRecoParam->SetSystematicError(sysCovMatColl);
33  tpcRecoParam->SetMinMaxCutAbs(2.5);
34  tpcRecoParam->SetMinLeftRightCutAbs(5.);
35  tpcRecoParam->SetMinUpDownCutAbs(5.);
36  //
37  tpcRecoParam->SetMinMaxCutSigma(2.5);
38  tpcRecoParam->SetMinLeftRightCutSigma(5.);
39  tpcRecoParam->SetMinUpDownCutSigma(5.);
40  //
41  tpcRecoParam->SetUseHLTClusters(4);
42  tpcRecoParam->SetUseOulierClusterFilter(1);
43  tpcRecoParam->SetUseOnePadCluster(1);
44  tpcRecoParam->SetUseHLTOnePadCluster(0);
45  tpcRecoParam->SetCtgRange(10);
46 
47  // we use in data Ion tail and X-talk corrections
48  tpcRecoParam->SetUseIonTailCorrection(0);
49  tpcRecoParam->SetCrosstalkCorrection(0.);
50  tpcRecoParam->SetCrosstalkCorrectionMissingCharge(1.);
51  tpcRecoParam->SetUseMultiplicityCorrectionDedx(0);
52 
53  tpcRecoParam->SetUseGainCorrectionTime(1);
54 
55  // Settings needed for SP distortion corrections
56  tpcRecoParam->SetUseCorrectionMap(kTRUE);
57  tpcRecoParam->SetAccountDistortions(1);
58  // scaling
61  tpcRecoParam->SetUseMapLumiInfoCOG(kTRUE); // use lumi correction from the map if available
62  // add difference to reference distortions as syst. error
63  tpcRecoParam->SetUseDistortionFractionAsErrorY(-1);
64  tpcRecoParam->SetUseDistortionFractionAsErrorZ(-1);
65  //
66  // add difference to reference dispersion as syst. error
67  tpcRecoParam->SetUseDistDispFractionAsErrorY(0.6);
68  tpcRecoParam->SetUseDistDispFractionAsErrorZ(0.3);
69  //
70  // eliminate pads with too large distortions XYZ or dispersions
71  tpcRecoParam->SetBadPadMaxDistXYZD(7.0,10.,999, 1.0);
72 
73  // SP corrections are coupled to these VDrift settings
74  tpcRecoParam->SetUseDriftCorrectionTime(1);
75  tpcRecoParam->SetUseDriftCorrectionGY(1);
76 
77  // disable obsolete corrections
78  tpcRecoParam->SetUseComposedCorrection(kFALSE);
79  tpcRecoParam->SetUseExBCorrection(kFALSE);
80  tpcRecoParam->SetUseAlignmentTime(kFALSE);
81  tpcRecoParam->SetUseFieldCorrection(0);
82  tpcRecoParam->SetUseRPHICorrection(0);
83  tpcRecoParam->SetUseRadialCorrection(0);
84  tpcRecoParam->SetUseQuadrantAlignment(0);
85  tpcRecoParam->SetUseSectorAlignment(0);
86  tpcRecoParam->SetUseMultiplicityCorrectionDedx(kFALSE);
87  tpcRecoParam->SetUseAlignmentTime(kFALSE);
88  //
89  // charging-up zone errors
90  tpcRecoParam->SetSystErrClInnerRegZ( new TVectorF(zreg) );
91  tpcRecoParam->SetSystErrClInnerRegZSigInv( new TVectorF(zregsigInv) );
92  double *clInner = (double*)tpcRecoParam->GetSystematicErrorClusterInner();
93  clInner[0] = 1.0; // 1.5 cm err at maximum
94  clInner[1] = 5.0; // dumped with 5 cm
95  //
96  recoParamArray->AddLast(tpcRecoParam);
97  }
98  {
101 
102  // Double_t sysError[5]={0.01,0.02, 0.01/150., 0.02/150.,0.01/(150*150.)};
103  tpcRecoParam->SetSystematicError(sysCovMatColl);
104  //
105  tpcRecoParam->SetUseHLTClusters(4);
106  tpcRecoParam->SetUseOulierClusterFilter(1);
107  tpcRecoParam->SetUseOnePadCluster(1);
108  tpcRecoParam->SetUseHLTOnePadCluster(0);
109  tpcRecoParam->SetCtgRange(10);
110 
111  // we use in data Ion tail and X-talk corrections
112  tpcRecoParam->SetUseIonTailCorrection(0);
113  tpcRecoParam->SetCrosstalkCorrection(0.);
114  tpcRecoParam->SetCrosstalkCorrectionMissingCharge(1.);
115  tpcRecoParam->SetUseMultiplicityCorrectionDedx(0);
116 
117  tpcRecoParam->SetUseGainCorrectionTime(1);
118 
119  // Settings needed for SP distortion corrections
120  tpcRecoParam->SetUseCorrectionMap(kTRUE);
121  tpcRecoParam->SetAccountDistortions(1);
122  // scaling
123  tpcRecoParam->SetUseLumiType(AliLumiTools::kLumiCTP);
125  tpcRecoParam->SetUseMapLumiInfoCOG(kTRUE); // use lumi correction from the map if available
126  // add difference to reference distortions as syst. error
127  tpcRecoParam->SetUseDistortionFractionAsErrorY(-1);
128  tpcRecoParam->SetUseDistortionFractionAsErrorZ(-1);
129  //
130  // add difference to reference dispersion as syst. error
131  tpcRecoParam->SetUseDistDispFractionAsErrorY(0.6);
132  tpcRecoParam->SetUseDistDispFractionAsErrorZ(0.3);
133  //
134  // eliminate pads with too large distortions XYZ or dispersions
135  tpcRecoParam->SetBadPadMaxDistXYZD(7.0,10.,999, 1.0);
136 
137  // SP corrections are coupled to these VDrift settings
138  tpcRecoParam->SetUseDriftCorrectionTime(1);
139  tpcRecoParam->SetUseDriftCorrectionGY(1);
140 
141  // disable obsolete corrections
142  tpcRecoParam->SetUseComposedCorrection(kFALSE);
143  tpcRecoParam->SetUseExBCorrection(kFALSE);
144  tpcRecoParam->SetUseAlignmentTime(kFALSE);
145  tpcRecoParam->SetUseFieldCorrection(0);
146  tpcRecoParam->SetUseRPHICorrection(0);
147  tpcRecoParam->SetUseRadialCorrection(0);
148  tpcRecoParam->SetUseQuadrantAlignment(0);
149  tpcRecoParam->SetUseSectorAlignment(0);
150  tpcRecoParam->SetUseMultiplicityCorrectionDedx(kFALSE);
151  tpcRecoParam->SetUseAlignmentTime(kFALSE);
152  //
153  // charging-up zone errors
154  tpcRecoParam->SetSystErrClInnerRegZ( new TVectorF(zreg) );
155  tpcRecoParam->SetSystErrClInnerRegZSigInv( new TVectorF(zregsigInv) );
156  double *clInner = (double*)tpcRecoParam->GetSystematicErrorClusterInner();
157  clInner[0] = 1.0; // 1.5 cm err at maximum
158  clInner[1] = 5.0; // dumped with 5 cm
159  //
160  recoParamArray->AddLast(tpcRecoParam);
161  }
162 
163  {
164  AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetLaserTestParam(kFALSE);
165  tpcRecoParam->SetEventSpecie(AliRecoParam::kCalib);
166  //
167  tpcRecoParam->SetUseHLTClusters(4);
168  tpcRecoParam->SetUseOulierClusterFilter(1);
169  tpcRecoParam->SetUseOnePadCluster(1);
170  tpcRecoParam->SetUseHLTOnePadCluster(1);
171  tpcRecoParam->SetCtgRange(10);
172 
173  // we use in data Ion tail and X-talk corrections
174  tpcRecoParam->SetUseIonTailCorrection(0);
175  tpcRecoParam->SetCrosstalkCorrection(0.);
176  tpcRecoParam->SetCrosstalkCorrectionMissingCharge(1.);
177  tpcRecoParam->SetUseMultiplicityCorrectionDedx(0);
178  //
179  tpcRecoParam->SetSystematicError(sysCovMatCosm);
180  //
181  recoParamArray->AddLast(tpcRecoParam);
182  }
183 
184  {
185  AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kFALSE);
186  tpcRecoParam->SetEventSpecie(AliRecoParam::kCosmic);
187  //
188  tpcRecoParam->SetTimeInterval(60,1000);
189  tpcRecoParam->SetUseHLTClusters(4);
190  tpcRecoParam->SetUseOulierClusterFilter(1);
191  tpcRecoParam->SetUseOnePadCluster(1);
192  tpcRecoParam->SetUseHLTOnePadCluster(0);
193  tpcRecoParam->SetCtgRange(10);
194 
195  // in cosmics we use ComposedCorrection ?
196  tpcRecoParam->SetUseComposedCorrection(kTRUE);
197  // disable obsolete corrections
198  tpcRecoParam->SetUseExBCorrection(kFALSE);
199  tpcRecoParam->SetUseAlignmentTime(kFALSE);
200  tpcRecoParam->SetUseFieldCorrection(0);
201  tpcRecoParam->SetUseRPHICorrection(0);
202  tpcRecoParam->SetUseRadialCorrection(0);
203  tpcRecoParam->SetUseQuadrantAlignment(0);
204  tpcRecoParam->SetUseSectorAlignment(0);
205  tpcRecoParam->SetUseMultiplicityCorrectionDedx(kFALSE);
206  tpcRecoParam->SetUseAlignmentTime(kFALSE);
207 
208  // we use in data Ion tail and X-talk corrections
209  tpcRecoParam->SetUseIonTailCorrection(0);
210  tpcRecoParam->SetCrosstalkCorrection(0.);
211  tpcRecoParam->SetCrosstalkCorrectionMissingCharge(1.);
212  tpcRecoParam->SetUseMultiplicityCorrectionDedx(0);
213 
214  tpcRecoParam->SetTimeInterval(60,940);
215  // Double_t sysError[5]={0.3,1, 0.3/150., 1./150.,0.3/(150*150.)};
216  // tpcRecoParam->SetSystematicError(sysError);
217  tpcRecoParam->SetSystematicError(sysCovMatCosm);
218  //
219  tpcRecoParam->SetMinMaxCutAbs(2.5);
220  tpcRecoParam->SetMinLeftRightCutAbs(5.);
221  tpcRecoParam->SetMinUpDownCutAbs(5.);
222  //
223  tpcRecoParam->SetMinMaxCutSigma(2.5);
224  tpcRecoParam->SetMinLeftRightCutSigma(5.);
225  tpcRecoParam->SetMinUpDownCutSigma(5.);
226  recoParamArray->AddLast(tpcRecoParam);
227  //
228  }
229 
230  // Set the default
231  Bool_t defaultIsSet = kFALSE;
232  for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
233  AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
234  if (!param) continue;
235  if (default & param->GetEventSpecie()) {
236  param->SetAsDefault();
237  defaultIsSet = kTRUE;
238  }
239  }
240 
241  if (!defaultIsSet) {
242  Error(macroname,"The default reconstruction parameters are not set! Exiting...");
243  return;
244  }
245 
246  // save in CDB storage
247  AliCDBMetaData *md= new AliCDBMetaData();
248  md->SetResponsible("Marian Ivanov");
249  md->SetComment("Reconstruction parameters TPC, as used for Run2 data with distortions");
250  md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
251  md->SetBeamPeriod(0);
252  AliCDBId id("TPC/Calib/RecoParam",227735,AliCDBRunRange::Infinity());
253  cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
254  return;
255 }
256 
void SetUseMultiplicityCorrectionDedx(Bool_t flag)
void SetUseOnePadCluster(Int_t use)
void SetTimeInterval(Int_t first, Int_t last)
static AliTPCRecoParam * GetLaserTestParam(Bool_t bPedestal)
void SetUseDistortionFractionAsErrorY(double v)
Bool_t Put(TObject *object, AliCDBId &id, AliCDBMetaData *metaData, const char *mirrors="", AliCDBManager::DataType type=AliCDBManager::kPrivate)
void SetEventSpecie(AliRecoParam::EventSpecie_t specie)
void SetUseSectorAlignment(Int_t flag)
static AliTPCRecoParam * GetCosmicTestParam(Bool_t bPedestal)
void SetUseDistDispFractionAsErrorZ(double v)
#define TObjArray
void SetMinLeftRightCutAbs(Float_t th)
void SetCorrMapTimeDepMethod(int m)
void SetUseGainCorrectionTime(Int_t flag)
static AliTPCRecoParam * GetLowFluxParam()
void SetUseFieldCorrection(Int_t flag)
void SetUseComposedCorrection(Bool_t flag)
void SetCtgRange(Double_t ctgRange)
void SetMinLeftRightCutSigma(Float_t th)
void SetUseDistortionFractionAsErrorZ(double v)
void SetComment(const char *comment)
void SetMinUpDownCutAbs(Float_t th)
void SetResponsible(const char *yourName)
void SetMinMaxCutSigma(Float_t th)
void SetUseIonTailCorrection(Int_t flag)
void SetCrosstalkCorrectionMissingCharge(Float_t crosstalkCorrection)
void SetUseCorrectionMap(Bool_t v=kTRUE)
void SetBeamPeriod(UInt_t period)
void SetUseMapLumiInfoCOG(Bool_t v=kTRUE)
void SetAliRootVersion(const char *version)
void SetUseHLTOnePadCluster(Bool_t use)
static AliTPCRecoParam * GetHighFluxParam()
void SetUseDriftCorrectionGY(Int_t flag)
void SetUseRadialCorrection(Int_t flag)
void SetUseAlignmentTime(Bool_t flag)
void MakeTPCRecoParam_Run2DistMC(const char *storage="local://OCDB", AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult)
void SetSystErrClInnerRegZSigInv(TVectorF *zs)
void SetUseQuadrantAlignment(Int_t flag)
void SetMinUpDownCutSigma(Float_t th)
void SetSystErrClInnerRegZ(TVectorF *zc)
void SetCrosstalkCorrection(Float_t crosstalkCorrection)
void SetAccountDistortions(Int_t v)
void SetUseExBCorrection(Int_t flag)
void SetDefaultStorage(const char *dbString)
void SetSystematicError(Double_t *systematic)
void SetUseDriftCorrectionTime(Int_t flag)
AliCDBStorage * GetDefaultStorage() const
Definition: AliCDBManager.h:61
Class with TPC reconstruction parameters.
static AliCDBManager * Instance(TMap *entryCache=NULL, Int_t run=-1)
void SetUseOulierClusterFilter(Int_t value)
Bool_t IsDefaultStorageSet() const
Definition: AliCDBManager.h:60
void SetUseHLTClusters(Int_t useHLTClusters)
static Int_t Infinity()
void SetUseDistDispFractionAsErrorY(double v)
void SetMinMaxCutAbs(Float_t th)
void SetUseRPHICorrection(Int_t flag)
const Double_t * GetSystematicErrorClusterInner() const
void SetUseLumiType(int tp)
void SetBadPadMaxDistXYZD(double x, double y, double z, double d)
Int_t GetEventSpecie() const