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