]>
Commit | Line | Data |
---|---|---|
e3d40058 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2010, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | ///////////////////////////////////////////////////////////// | |
17 | // | |
18 | // Class for cuts on AOD reconstructed Lc->pKpi | |
19 | // | |
20 | // Author: A.Dainese, andrea.dainese@pd.infn.it | |
21 | ///////////////////////////////////////////////////////////// | |
22 | ||
23 | #include <TDatabasePDG.h> | |
24 | #include <Riostream.h> | |
25 | ||
26 | #include "AliRDHFCutsLctopKpi.h" | |
27 | #include "AliAODRecoDecayHF3Prong.h" | |
7ad4b782 | 28 | #include "AliRDHFCuts.h" |
e3d40058 | 29 | #include "AliAODTrack.h" |
30 | #include "AliESDtrack.h" | |
7ad4b782 | 31 | #include "AliKFParticle.h" |
32 | #include "AliESDVertex.h" | |
e3d40058 | 33 | |
34 | ClassImp(AliRDHFCutsLctopKpi) | |
35 | ||
36 | //-------------------------------------------------------------------------- | |
a9b75906 | 37 | AliRDHFCutsLctopKpi::AliRDHFCutsLctopKpi(const char* name) : |
7ad4b782 | 38 | AliRDHFCuts(name), |
39 | fPidObjprot(0), | |
40 | fPidObjpion(0), | |
41 | fRecoKF(kFALSE) | |
e3d40058 | 42 | { |
43 | // | |
44 | // Default Constructor | |
45 | // | |
46 | Int_t nvars=12; | |
47 | SetNVars(nvars); | |
48 | TString varNames[12]={"inv. mass [GeV]", | |
a8b8e864 | 49 | "pTK [GeV/c]", |
e3d40058 | 50 | "pTPi [GeV/c]", |
a8b8e864 | 51 | "d0K [cm] lower limit!", |
e3d40058 | 52 | "d0Pi [cm] lower limit!", |
53 | "dist12 (cm)", | |
54 | "sigmavert (cm)", | |
55 | "dist prim-sec (cm)", | |
56 | "pM=Max{pT1,pT2,pT3} (GeV/c)", | |
57 | "cosThetaPoint", | |
58 | "Sum d0^2 (cm^2)", | |
59 | "dca cut (cm)"}; | |
60 | Bool_t isUpperCut[12]={kTRUE, | |
61 | kFALSE, | |
62 | kFALSE, | |
63 | kFALSE, | |
64 | kFALSE, | |
65 | kFALSE, | |
66 | kTRUE, | |
67 | kFALSE, | |
68 | kFALSE, | |
69 | kFALSE, | |
70 | kFALSE, | |
71 | kTRUE}; | |
72 | SetVarNames(nvars,varNames,isUpperCut); | |
4755453e | 73 | Bool_t forOpt[12]={kFALSE, |
e3d40058 | 74 | kFALSE, |
75 | kFALSE, | |
76 | kFALSE, | |
77 | kFALSE, | |
78 | kFALSE, | |
79 | kTRUE, | |
80 | kTRUE, | |
81 | kTRUE, | |
82 | kTRUE, | |
83 | kTRUE, | |
84 | kFALSE}; | |
4755453e | 85 | SetVarsForOpt(5,forOpt); |
e3d40058 | 86 | Float_t limits[2]={0,999999999.}; |
87 | SetPtBins(2,limits); | |
88 | } | |
89 | //-------------------------------------------------------------------------- | |
90 | AliRDHFCutsLctopKpi::AliRDHFCutsLctopKpi(const AliRDHFCutsLctopKpi &source) : | |
7ad4b782 | 91 | AliRDHFCuts(source), |
92 | fPidObjprot(0), | |
93 | fPidObjpion(0), | |
94 | fRecoKF(kFALSE) | |
e3d40058 | 95 | { |
96 | // | |
97 | // Copy constructor | |
98 | // | |
7ad4b782 | 99 | if(source.fPidObjprot) SetPidprot(source.fPidObjprot); |
100 | if(source.fPidObjpion) SetPidpion(source.fPidObjpion); | |
e3d40058 | 101 | } |
102 | //-------------------------------------------------------------------------- | |
103 | AliRDHFCutsLctopKpi &AliRDHFCutsLctopKpi::operator=(const AliRDHFCutsLctopKpi &source) | |
104 | { | |
105 | // | |
106 | // assignment operator | |
107 | // | |
108 | if(&source == this) return *this; | |
109 | ||
110 | AliRDHFCuts::operator=(source); | |
7ad4b782 | 111 | SetPidprot(source.GetPidprot()); |
112 | SetPidpion(source.GetPidpion()); | |
e3d40058 | 113 | |
114 | return *this; | |
115 | } | |
7ad4b782 | 116 | //--------------------------------------------------------------------------- |
117 | AliRDHFCutsLctopKpi::~AliRDHFCutsLctopKpi() { | |
118 | // | |
119 | // // Default Destructor | |
120 | // | |
121 | if(fPidObjpion){ | |
122 | delete fPidObjpion; | |
123 | fPidObjpion=0; | |
124 | } | |
125 | if(fPidObjprot){ | |
126 | delete fPidObjprot; | |
127 | fPidObjprot=0; | |
128 | } | |
e3d40058 | 129 | |
7ad4b782 | 130 | } |
e3d40058 | 131 | |
132 | //--------------------------------------------------------------------------- | |
133 | void AliRDHFCutsLctopKpi::GetCutVarsForOpt(AliAODRecoDecayHF *d,Float_t *vars,Int_t nvars,Int_t *pdgdaughters) { | |
134 | // | |
135 | // Fills in vars the values of the variables | |
136 | // | |
137 | ||
138 | if(nvars!=fnVarsForOpt) { | |
139 | printf("AliRDHFCutsLctopKpi::GetCutsVarsForOpt: wrong number of variables\n"); | |
140 | return; | |
141 | } | |
142 | ||
143 | AliAODRecoDecayHF3Prong *dd = (AliAODRecoDecayHF3Prong*)d; | |
144 | ||
145 | Int_t iter=-1; | |
146 | if(fVarsForOpt[0]){ | |
147 | iter++; | |
148 | vars[iter]=dd->InvMassLcpKpi(); | |
149 | } | |
150 | if(fVarsForOpt[1]){ | |
151 | iter++; | |
152 | for(Int_t iprong=0;iprong<3;iprong++){ | |
153 | if(TMath::Abs(pdgdaughters[iprong])==2212) { | |
154 | vars[iter]=dd->PtProng(iprong); | |
155 | } | |
156 | } | |
157 | } | |
158 | if(fVarsForOpt[2]){ | |
159 | iter++; | |
160 | for(Int_t iprong=0;iprong<3;iprong++){ | |
161 | if(TMath::Abs(pdgdaughters[iprong])==211) { | |
162 | vars[iter]=dd->PtProng(iprong); | |
163 | } | |
164 | } | |
165 | } | |
166 | if(fVarsForOpt[3]){ | |
167 | iter++; | |
168 | for(Int_t iprong=0;iprong<3;iprong++){ | |
169 | if(TMath::Abs(pdgdaughters[iprong])==2212) { | |
170 | vars[iter]=dd->Getd0Prong(iprong); | |
171 | } | |
172 | } | |
173 | } | |
174 | if(fVarsForOpt[4]){ | |
175 | iter++; | |
176 | for(Int_t iprong=0;iprong<3;iprong++){ | |
177 | if(TMath::Abs(pdgdaughters[iprong])==211) { | |
178 | vars[iter]=dd->Getd0Prong(iprong); | |
179 | } | |
180 | } | |
181 | } | |
182 | if(fVarsForOpt[5]){ | |
183 | iter++; | |
184 | vars[iter]=dd->GetDist12toPrim(); | |
185 | } | |
186 | if(fVarsForOpt[6]){ | |
187 | iter++; | |
188 | vars[iter]=dd->GetSigmaVert(); | |
189 | } | |
190 | if(fVarsForOpt[7]){ | |
191 | iter++; | |
192 | vars[iter] = dd->DecayLength(); | |
193 | } | |
194 | if(fVarsForOpt[8]){ | |
195 | iter++; | |
196 | Float_t ptmax=0; | |
197 | for(Int_t i=0;i<3;i++){ | |
198 | if(dd->PtProng(i)>ptmax)ptmax=dd->PtProng(i); | |
199 | } | |
200 | vars[iter]=ptmax; | |
201 | } | |
202 | if(fVarsForOpt[9]){ | |
203 | iter++; | |
204 | vars[iter]=dd->CosPointingAngle(); | |
205 | } | |
206 | if(fVarsForOpt[10]){ | |
207 | iter++; | |
208 | vars[iter]=dd->Getd0Prong(0)*dd->Getd0Prong(0)+dd->Getd0Prong(1)*dd->Getd0Prong(1)+dd->Getd0Prong(2)*dd->Getd0Prong(2); | |
209 | } | |
210 | if(fVarsForOpt[11]){ | |
211 | iter++; | |
212 | vars[iter]=dd->GetDCA(); | |
213 | } | |
214 | ||
215 | return; | |
216 | } | |
217 | //--------------------------------------------------------------------------- | |
7ad4b782 | 218 | Int_t AliRDHFCutsLctopKpi::IsSelected(TObject* obj,Int_t selectionLevel,AliAODEvent *aod) { |
e3d40058 | 219 | // |
220 | // Apply selection | |
221 | // | |
222 | ||
223 | if(!fCutsRD){ | |
224 | cout<<"Cut matrice not inizialized. Exit..."<<endl; | |
225 | return 0; | |
226 | } | |
227 | //PrintAll(); | |
228 | AliAODRecoDecayHF3Prong* d=(AliAODRecoDecayHF3Prong*)obj; | |
229 | ||
230 | if(!d){ | |
231 | cout<<"AliAODRecoDecayHF3Prong null"<<endl; | |
232 | return 0; | |
233 | } | |
234 | ||
235 | ||
e3d40058 | 236 | |
228974b3 | 237 | Int_t returnvalue=3; |
7ad4b782 | 238 | Int_t returnvaluePID=3; |
239 | ||
47aa3d55 | 240 | if(d->Pt()<fMinPtCand) return 0; |
241 | if(d->Pt()>fMaxPtCand) return 0; | |
e3d40058 | 242 | |
243 | // selection on candidate | |
244 | if(selectionLevel==AliRDHFCuts::kAll || | |
245 | selectionLevel==AliRDHFCuts::kCandidate) { | |
246 | ||
247 | Double_t pt=d->Pt(); | |
248 | ||
249 | Int_t ptbin=PtBin(pt); | |
250 | ||
251 | Double_t mLcpKpi,mLcpiKp; | |
252 | Int_t okLcpKpi=1,okLcpiKp=1; | |
253 | ||
254 | Double_t mLcPDG = TDatabasePDG::Instance()->GetParticle(4122)->Mass(); | |
255 | ||
256 | mLcpKpi=d->InvMassLcpKpi(); | |
257 | mLcpiKp=d->InvMassLcpiKp(); | |
258 | ||
259 | if(TMath::Abs(mLcpKpi-mLcPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) okLcpKpi = 0; | |
260 | if(TMath::Abs(mLcpiKp-mLcPDG)>fCutsRD[GetGlobalIndex(0,ptbin)]) okLcpiKp = 0; | |
261 | if(!okLcpKpi && !okLcpiKp) return 0; | |
262 | ||
263 | if(TMath::Abs(d->PtProng(1)) < fCutsRD[GetGlobalIndex(1,ptbin)] || TMath::Abs(d->Getd0Prong(1))<fCutsRD[GetGlobalIndex(3,ptbin)]) return 0;//Kaon | |
228974b3 | 264 | //if(TMath::Abs(d->PtProng(0)) < fCutsRD[GetGlobalIndex(2,ptbin)] || TMath::Abs(d->Getd0Prong(0))<fCutsRD[GetGlobalIndex(4,ptbin)]) return 0;//Proton |
265 | //if(TMath::Abs(d->PtProng(2)) < fCutsRD[GetGlobalIndex(2,ptbin)] || TMath::Abs(d->Getd0Prong(2))<fCutsRD[GetGlobalIndex(4,ptbin)]) return 0;//Pion | |
266 | if((TMath::Abs(d->PtProng(0)) < fCutsRD[GetGlobalIndex(2,ptbin)]) || (TMath::Abs(d->PtProng(2)) < 0.4)) okLcpKpi=0; | |
7ad4b782 | 267 | if((TMath::Abs(d->PtProng(2)) < fCutsRD[GetGlobalIndex(2,ptbin)]) || (TMath::Abs(d->PtProng(0)) < 0.4))okLcpiKp=0; |
268 | if(!okLcpKpi && !okLcpiKp) return 0; | |
e3d40058 | 269 | |
270 | ||
7ad4b782 | 271 | if(fRecoKF){ |
272 | Int_t valueTmp=3; | |
273 | if(okLcpKpi) returnvalue=1; //cuts passed as Lc->pKpi | |
274 | if(okLcpiKp) returnvalue=2; //cuts passed as Lc->piKp | |
275 | if(okLcpKpi && okLcpiKp) returnvalue=3; //cuts passed as both pKpi and piKp | |
276 | ||
277 | Int_t valueTotTmp=CombinePIDCuts(valueTmp,returnvaluePID); | |
278 | Int_t pdgs[3]={2212,321,211}; | |
279 | if(valueTotTmp>=2) { | |
280 | pdgs[0]=211; | |
281 | pdgs[2]=2212; | |
282 | } | |
283 | if(!d->GetOwnPrimaryVtx()){ | |
284 | AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex(); | |
285 | d->SetOwnPrimaryVtx(vtx1); | |
286 | } | |
287 | Double_t field=aod->GetMagneticField(); | |
288 | ReconstructKF(d,pdgs,field); | |
289 | } | |
e3d40058 | 290 | //2track cuts |
291 | if(d->GetDist12toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]|| d->GetDist23toPrim()<fCutsRD[GetGlobalIndex(5,ptbin)]) return 0; | |
228974b3 | 292 | if(d->GetDist12toPrim()>1.) return 0; |
293 | if(d->GetDist23toPrim()>1.) return 0; | |
e3d40058 | 294 | if(d->Getd0Prong(0)*d->Getd0Prong(1)<0. && d->Getd0Prong(2)*d->Getd0Prong(1)<0.) return 0; |
295 | ||
296 | //sec vert | |
297 | if(d->GetSigmaVert()>fCutsRD[GetGlobalIndex(6,ptbin)]) return 0; | |
298 | ||
299 | if(d->DecayLength()<fCutsRD[GetGlobalIndex(7,ptbin)]) return 0; | |
228974b3 | 300 | if(d->DecayLength()>0.5) return 0; |
e3d40058 | 301 | |
302 | if(TMath::Abs(d->PtProng(0))<fCutsRD[GetGlobalIndex(8,ptbin)] && TMath::Abs(d->PtProng(1))<fCutsRD[GetGlobalIndex(8,ptbin)] && TMath::Abs(d->PtProng(2))<fCutsRD[GetGlobalIndex(8,ptbin)]) return 0; | |
303 | if(d->CosPointingAngle()< fCutsRD[GetGlobalIndex(9,ptbin)]) return 0; | |
304 | Double_t sum2=d->Getd0Prong(0)*d->Getd0Prong(0)+d->Getd0Prong(1)*d->Getd0Prong(1)+d->Getd0Prong(2)*d->Getd0Prong(2); | |
305 | if(sum2<fCutsRD[GetGlobalIndex(10,ptbin)]) return 0; | |
306 | ||
307 | //DCA | |
308 | for(Int_t i=0;i<3;i++) if(d->GetDCA(i)>fCutsRD[GetGlobalIndex(11,ptbin)]) return 0; | |
309 | ||
310 | ||
311 | if(okLcpKpi) returnvalue=1; //cuts passed as Lc->pKpi | |
312 | if(okLcpiKp) returnvalue=2; //cuts passed as Lc->piKp | |
313 | if(okLcpKpi && okLcpiKp) returnvalue=3; //cuts passed as both pKpi and piKp | |
dcc2ade0 | 314 | |
dcc2ade0 | 315 | } |
316 | ||
317 | if(fUsePID || selectionLevel==AliRDHFCuts::kPID) returnvaluePID = IsSelectedPID(d); | |
318 | if(returnvaluePID==0) return 0; | |
319 | ||
320 | // selection on daughter tracks | |
321 | if(selectionLevel==AliRDHFCuts::kAll || | |
322 | selectionLevel==AliRDHFCuts::kTracks) { | |
323 | if(!AreDaughtersSelected(d)) return 0; | |
e3d40058 | 324 | } |
dcc2ade0 | 325 | |
326 | ||
7ad4b782 | 327 | Int_t returnvalueTot=CombinePIDCuts(returnvalue,returnvaluePID); |
328 | return returnvalueTot; | |
e3d40058 | 329 | } |
330 | //--------------------------------------------------------------------------- | |
7ad4b782 | 331 | Int_t AliRDHFCutsLctopKpi::IsSelectedPID(AliAODRecoDecayHF* obj) { |
332 | ||
333 | ||
334 | if(!obj) {return 3;} | |
335 | Int_t okLcpKpi=0,okLcpiKp=0; | |
336 | Int_t returnvalue=0; | |
337 | Bool_t isPeriodd=fPidHF->GetOnePad(); | |
338 | Bool_t isPbPb=fPidHF->GetPbPb(); | |
339 | Bool_t ispion0=kTRUE,ispion2=kTRUE; | |
340 | Bool_t isproton0=kFALSE,isproton2=kFALSE; | |
341 | Bool_t iskaon1=kFALSE; | |
342 | Double_t sigmaTOF=120.; | |
343 | if(isPeriodd) sigmaTOF=160.; | |
344 | if(isPbPb) sigmaTOF=160.; | |
345 | fPidObjprot->SetTofSigma(sigmaTOF); | |
346 | fPidHF->SetTofSigma(sigmaTOF); | |
347 | ||
348 | for(Int_t i=0;i<3;i++){ | |
349 | AliAODTrack *track=(AliAODTrack*)obj->GetDaughter(i); | |
350 | if(!track) return 0; | |
351 | // identify kaon | |
352 | if(i==1) { | |
353 | Int_t isKaon=fPidHF->MakeRawPid(track,3); | |
354 | if(isKaon>=1) { | |
355 | iskaon1=kTRUE; | |
356 | if(fPidHF->MakeRawPid(track,2)>=1) iskaon1=kFALSE; | |
357 | } | |
47aa3d55 | 358 | if(!iskaon1) return 0; |
7ad4b782 | 359 | |
360 | }else{ | |
361 | //pion or proton | |
362 | ||
363 | Int_t isProton=fPidObjprot->MakeRawPid(track,4); | |
364 | if(isProton>=1){ | |
365 | if(fPidHF->MakeRawPid(track,2)>=1) isProton=-1; | |
366 | if(fPidHF->MakeRawPid(track,3)>=1) isProton=-1; | |
367 | } | |
368 | ||
369 | Int_t isPion=fPidObjpion->MakeRawPid(track,2); | |
370 | if(fPidHF->MakeRawPid(track,3)>=1) isPion=-1; | |
371 | if(fPidObjprot->MakeRawPid(track,4)>=1) isPion=-1; | |
372 | ||
373 | ||
374 | if(i==0) { | |
375 | if(isPion<0) ispion0=kFALSE; | |
376 | if(isProton>=1) isproton0=kTRUE; | |
377 | ||
378 | } | |
47aa3d55 | 379 | if(!ispion0 && !isproton0) return 0; |
7ad4b782 | 380 | if(i==2) { |
381 | if(isPion<0) ispion2=kFALSE; | |
382 | if(isProton>=1) isproton2=kTRUE; | |
383 | } | |
384 | ||
385 | } | |
386 | } | |
387 | ||
388 | if(ispion2 && isproton0 && iskaon1) okLcpKpi=1; | |
389 | if(ispion0 && isproton2 && iskaon1) okLcpiKp=1; | |
390 | if(okLcpKpi) returnvalue=1; //cuts passed as Lc->pKpi | |
391 | if(okLcpiKp) returnvalue=2; //cuts passed as Lc->piKp | |
392 | if(okLcpKpi && okLcpiKp) returnvalue=3; //cuts passed as both pKpi and piKp | |
393 | ||
394 | return returnvalue; | |
395 | } | |
396 | //----------------------- | |
397 | Int_t AliRDHFCutsLctopKpi::CombinePIDCuts(Int_t returnvalue, Int_t returnvaluePID) const { | |
398 | ||
399 | Int_t returnvalueTot=0; | |
400 | Int_t okLcpKpi=0,okLcpiKp=0; | |
401 | if(returnvaluePID==1){ | |
402 | if(returnvalue==1 || returnvalue==3) okLcpKpi=1; | |
403 | } | |
404 | if(returnvaluePID==2){ | |
405 | if(returnvalue>=2) okLcpiKp=1; | |
406 | } | |
407 | if(returnvaluePID==3 && returnvalue>0){ | |
408 | if(returnvalue==1 || returnvalue==3) okLcpKpi=1; | |
409 | if(returnvalue>=2) okLcpiKp=1; | |
410 | } | |
411 | ||
412 | if(okLcpKpi) returnvalueTot=1; //cuts passed as Lc->pKpi | |
413 | if(okLcpiKp) returnvalueTot=2; //cuts passed as Lc->piKp | |
414 | if(okLcpKpi && okLcpiKp) returnvalueTot=3; //cuts passed as both pKpi and piKp | |
415 | return returnvalueTot; | |
416 | } | |
417 | //---------------------------------- | |
418 | void AliRDHFCutsLctopKpi::SetStandardCutsPP2010() { | |
419 | ||
420 | SetName("LctopKpiProdCuts"); | |
421 | SetTitle("Production cuts for Lc analysis"); | |
422 | ||
423 | AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts","default"); | |
424 | esdTrackCuts->SetRequireSigmaToVertex(kFALSE); | |
425 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
426 | esdTrackCuts->SetMinNClustersTPC(70); | |
427 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, | |
428 | AliESDtrackCuts::kAny); | |
429 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
430 | esdTrackCuts->SetMinNClustersITS(4); | |
431 | esdTrackCuts->SetMinDCAToVertexXY(0.); | |
432 | esdTrackCuts->SetEtaRange(-0.8,0.8); | |
433 | esdTrackCuts->SetPtRange(0.3,1.e10); | |
434 | AddTrackCuts(esdTrackCuts); | |
435 | ||
436 | const Int_t nptbins=4; | |
437 | const Int_t nvars=12; | |
438 | Float_t* ptbins; | |
439 | ptbins=new Float_t[nptbins+1]; | |
440 | ||
441 | ptbins[0]=0.; | |
442 | ptbins[1]=2.; | |
443 | ptbins[2]=3.; | |
444 | ptbins[3]=4.; | |
445 | ptbins[4]=9999.; | |
446 | ||
447 | SetGlobalIndex(nvars,nptbins); | |
448 | SetPtBins(nptbins+1,ptbins); | |
449 | ||
450 | Float_t** prodcutsval; | |
451 | prodcutsval=new Float_t*[nvars]; | |
452 | for(Int_t iv=0;iv<nvars;iv++){ | |
453 | prodcutsval[iv]=new Float_t[nptbins]; | |
454 | } | |
e11ae259 | 455 | |
7ad4b782 | 456 | for(Int_t ipt=0;ipt<nptbins;ipt++){ |
457 | prodcutsval[0][ipt]=0.18; | |
458 | prodcutsval[1][ipt]=0.4; | |
459 | prodcutsval[2][ipt]=0.5; | |
460 | prodcutsval[3][ipt]=0.; | |
461 | prodcutsval[4][ipt]=0.; | |
462 | prodcutsval[5][ipt]=0.01; | |
463 | prodcutsval[6][ipt]=0.06; | |
464 | prodcutsval[7][ipt]=0.005; | |
465 | prodcutsval[8][ipt]=0.; | |
466 | prodcutsval[9][ipt]=0.; | |
467 | prodcutsval[10][ipt]=0.; | |
468 | prodcutsval[11][ipt]=0.05; | |
469 | } | |
470 | SetCuts(nvars,nptbins,prodcutsval); | |
471 | ||
472 | AliAODPidHF* pidObjK=new AliAODPidHF(); | |
473 | Double_t sigmasK[5]={3.,1.,1.,3.,2.}; | |
474 | pidObjK->SetSigma(sigmasK); | |
475 | pidObjK->SetAsym(kTRUE); | |
476 | pidObjK->SetMatch(1); | |
477 | pidObjK->SetTPC(kTRUE); | |
478 | pidObjK->SetTOF(kTRUE); | |
479 | pidObjK->SetITS(kTRUE); | |
480 | Double_t plimK[2]={0.5,0.8}; | |
481 | pidObjK->SetPLimit(plimK,2); | |
482 | ||
483 | SetPidHF(pidObjK); | |
484 | ||
485 | AliAODPidHF* pidObjpi=new AliAODPidHF(); | |
486 | pidObjpi->SetTPC(kTRUE); | |
487 | Double_t sigmaspi[5]={3.,0.,0.,0.,0.}; | |
488 | pidObjpi->SetSigma(sigmaspi); | |
489 | SetPidpion(pidObjpi); | |
490 | ||
491 | AliAODPidHF* pidObjp=new AliAODPidHF(); | |
492 | Double_t sigmasp[5]={3.,1.,1.,3.,2.}; | |
493 | pidObjp->SetSigma(sigmasp); | |
494 | pidObjp->SetAsym(kTRUE); | |
495 | pidObjp->SetMatch(1); | |
496 | pidObjp->SetTPC(kTRUE); | |
497 | pidObjp->SetTOF(kTRUE); | |
498 | pidObjp->SetITS(kTRUE); | |
499 | Double_t plimp[2]={1.,2.}; | |
500 | pidObjp->SetPLimit(plimp,2); | |
501 | ||
502 | SetPidprot(pidObjp); | |
503 | ||
504 | SetUsePID(kTRUE); | |
505 | ||
506 | PrintAll(); | |
507 | ||
e11ae259 | 508 | for(Int_t iiv=0;iiv<nvars;iiv++){ |
509 | delete [] prodcutsval[iiv]; | |
510 | } | |
511 | delete [] prodcutsval; | |
512 | prodcutsval=NULL; | |
513 | delete [] ptbins; | |
514 | ptbins=NULL; | |
515 | ||
516 | delete pidObjp; | |
517 | pidObjp=NULL; | |
518 | ||
7ad4b782 | 519 | return; |
520 | } | |
a8b8e864 | 521 | //------------------ |
522 | void AliRDHFCutsLctopKpi::SetStandardCutsPbPb2010() { | |
523 | ||
524 | SetName("LctopKpiProdCuts"); | |
525 | SetTitle("Production cuts for Lc analysis"); | |
526 | ||
527 | AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts("AliESDtrackCuts","default"); | |
528 | ||
529 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
530 | esdTrackCuts->SetMinNClustersTPC(70); | |
531 | esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, | |
532 | AliESDtrackCuts::kAny); | |
533 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
534 | esdTrackCuts->SetMinNClustersITS(4); | |
535 | esdTrackCuts->SetMinDCAToVertexXYPtDep("0.0100*TMath::Max(0.,(1-TMath::Floor(TMath::Abs(pt)/2.)))"); | |
536 | esdTrackCuts->SetEtaRange(-0.8,0.8); | |
537 | esdTrackCuts->SetMaxDCAToVertexXY(1.); | |
538 | esdTrackCuts->SetMaxDCAToVertexZ(1.); | |
539 | esdTrackCuts->SetPtRange(0.8,1.e10); | |
540 | AddTrackCuts(esdTrackCuts); | |
541 | ||
542 | const Int_t nptbins=4; | |
543 | const Int_t nvars=12; | |
544 | Float_t* ptbins; | |
545 | ptbins=new Float_t[nptbins+1]; | |
546 | ||
547 | ptbins[0]=0.; | |
548 | ptbins[1]=2.; | |
549 | ptbins[2]=3.; | |
550 | ptbins[3]=4.; | |
551 | ptbins[4]=9999.; | |
552 | ||
553 | SetGlobalIndex(nvars,nptbins); | |
554 | SetPtBins(nptbins+1,ptbins); | |
555 | ||
556 | Float_t** prodcutsval; | |
557 | prodcutsval=new Float_t*[nvars]; | |
558 | for(Int_t iv=0;iv<nvars;iv++){ | |
559 | prodcutsval[iv]=new Float_t[nptbins]; | |
560 | } | |
561 | ||
562 | for(Int_t ipt=0;ipt<nptbins;ipt++){ | |
563 | prodcutsval[0][ipt]=0.13; | |
564 | prodcutsval[1][ipt]=0.5; | |
565 | prodcutsval[2][ipt]=0.6; | |
566 | prodcutsval[3][ipt]=0.; | |
567 | prodcutsval[4][ipt]=0.; | |
568 | prodcutsval[5][ipt]=0.01; | |
569 | prodcutsval[6][ipt]=0.04; | |
570 | prodcutsval[7][ipt]=0.006; | |
571 | prodcutsval[8][ipt]=0.8; | |
572 | prodcutsval[9][ipt]=0.3; | |
573 | prodcutsval[10][ipt]=0.; | |
574 | prodcutsval[11][ipt]=0.05; | |
575 | } | |
576 | SetCuts(nvars,nptbins,prodcutsval); | |
577 | ||
578 | AliAODPidHF* pidObjK=new AliAODPidHF(); | |
579 | Double_t sigmasK[5]={3.,1.,1.,3.,2.}; | |
580 | pidObjK->SetSigma(sigmasK); | |
581 | pidObjK->SetAsym(kTRUE); | |
582 | pidObjK->SetMatch(1); | |
583 | pidObjK->SetTPC(kTRUE); | |
584 | pidObjK->SetTOF(kTRUE); | |
585 | pidObjK->SetITS(kTRUE); | |
586 | Double_t plimK[2]={0.5,0.8}; | |
587 | pidObjK->SetPLimit(plimK,2); | |
588 | ||
589 | SetPidHF(pidObjK); | |
590 | ||
591 | AliAODPidHF* pidObjpi=new AliAODPidHF(); | |
592 | pidObjpi->SetTPC(kTRUE); | |
593 | Double_t sigmaspi[5]={3.,0.,0.,0.,0.}; | |
594 | pidObjpi->SetSigma(sigmaspi); | |
595 | SetPidpion(pidObjpi); | |
7ad4b782 | 596 | |
a8b8e864 | 597 | AliAODPidHF* pidObjp=new AliAODPidHF(); |
598 | Double_t sigmasp[5]={3.,1.,1.,3.,2.}; | |
599 | pidObjp->SetSigma(sigmasp); | |
600 | pidObjp->SetAsym(kTRUE); | |
601 | pidObjp->SetMatch(1); | |
602 | pidObjp->SetTPC(kTRUE); | |
603 | pidObjp->SetTOF(kTRUE); | |
604 | pidObjp->SetITS(kTRUE); | |
605 | Double_t plimp[2]={1.,2.}; | |
606 | pidObjp->SetPLimit(plimp,2); | |
607 | ||
608 | SetPidprot(pidObjp); | |
609 | ||
610 | SetUsePID(kTRUE); | |
611 | ||
612 | PrintAll(); | |
613 | ||
614 | for(Int_t iiv=0;iiv<nvars;iiv++){ | |
615 | delete [] prodcutsval[iiv]; | |
616 | } | |
617 | delete [] prodcutsval; | |
618 | prodcutsval=NULL; | |
619 | delete [] ptbins; | |
620 | ptbins=NULL; | |
621 | ||
622 | delete pidObjp; | |
623 | pidObjp=NULL; | |
624 | ||
625 | return; | |
626 | } | |
7ad4b782 | 627 | //------------------ |
628 | Bool_t AliRDHFCutsLctopKpi::ReconstructKF(AliAODRecoDecayHF3Prong *d,Int_t *pdgs,Double_t field) const{ | |
629 | ||
630 | Int_t nprongs=d->GetNProngs(); | |
631 | Int_t iprongs[nprongs]; | |
632 | for(Int_t i=0;i<nprongs;i++) iprongs[i]=i; | |
633 | ||
634 | Double_t mass[2]={0.,0.}; | |
635 | ||
636 | AliKFParticle *decay=d->ApplyVertexingKF(iprongs,nprongs,pdgs,kTRUE,field,mass); | |
637 | if(!decay) return kTRUE; | |
638 | AliESDVertex *vertexESD = new AliESDVertex(decay->Parameters(), | |
639 | decay->CovarianceMatrix(), | |
640 | decay->GetChi2(), | |
641 | nprongs); | |
642 | Double_t pos[3],cov[6],chi2perNDF; | |
643 | vertexESD->GetXYZ(pos); | |
644 | vertexESD->GetCovMatrix(cov); | |
645 | chi2perNDF = vertexESD->GetChi2toNDF(); | |
646 | delete vertexESD; vertexESD=NULL; | |
647 | AliAODVertex *vertexAOD = new AliAODVertex(pos,cov,chi2perNDF,0x0,-1,AliAODVertex::kUndef,nprongs); | |
648 | d->SetSecondaryVtx(vertexAOD); | |
649 | return kTRUE; | |
650 | } | |
a8b8e864 | 651 |