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