5 #include "TDatabasePDG.h"
7 #include "AliESDEvent.h"
8 #include "AliESDInputHandler.h"
10 #include "AliMCEvent.h"
11 #include "AliESDtrackCuts.h"
12 #include "AliAODEvent.h"
13 #include "AliAODInputHandler.h"
14 #include "AliAODMCParticle.h"
16 #include "AliAnalysisNetParticleEffCont.h"
20 // Task for NetParticle checks
21 // Author: Jochen Thaeder <jochen@thaeder.de>
23 ClassImp(AliAnalysisNetParticleEffCont)
26 * ---------------------------------------------------------------------------------
27 * Constructor / Destructor
28 * ---------------------------------------------------------------------------------
31 //________________________________________________________________________
32 AliAnalysisNetParticleEffCont::AliAnalysisNetParticleEffCont() :
45 fAODtrackCutBit(1024),
56 AliLog::SetClassDebugLevel("AliAnalysisNetParticleEffCont",10);
59 //________________________________________________________________________
60 AliAnalysisNetParticleEffCont::~AliAnalysisNetParticleEffCont() {
66 delete[] (fLabelsRec[0]);
69 delete[] (fLabelsRec[1]);
76 * ---------------------------------------------------------------------------------
78 * ---------------------------------------------------------------------------------
81 //________________________________________________________________________
82 void AliAnalysisNetParticleEffCont::Initialize(AliESDtrackCuts *cuts , AliAnalysisNetParticleHelper* helper, Int_t trackCutBit) {
85 // -------------------
92 // -- Get particle species / pdgCode
93 // -------------------------
94 fPdgCode = AliPID::ParticleCode(fHelper->GetParticleSpecies());
96 // -- MC Labels for efficiency
97 // -----------------------------
98 fLabelsRec = new Int_t*[2];
99 for (Int_t ii = 0; ii < 2 ; ++ii)
100 fLabelsRec[ii] = NULL;
102 // -- AOD track filter bit
103 // -------------------------
104 fAODtrackCutBit = trackCutBit;
106 // -- Create THnSparse Histograms
107 // --------------------------------
114 * ---------------------------------------------------------------------------------
115 * Setup/Reset Methods - private
116 * ---------------------------------------------------------------------------------
119 //________________________________________________________________________
120 Int_t AliAnalysisNetParticleEffCont::SetupEvent(AliESDInputHandler *esdHandler, AliAODInputHandler *aodHandler, AliMCEvent *mcEvent) {
124 // -------------------
128 // -------------------
130 // -- Get ESD objects
132 fESD = esdHandler->GetEvent();
133 fNTracks = fESD->GetNumberOfTracks();
136 // -- Get AOD objects
137 else if(aodHandler) {
138 fAOD = aodHandler->GetEvent();
139 fNTracks = fAOD->GetNumberOfTracks();
141 fArrayMC = dynamic_cast<TClonesArray*>(fAOD->FindListObject(AliAODMCParticle::StdBranchName()));
143 AliFatal("No array of MC particles found !!!"); // MW no AliFatal use return values
150 fStack = fMCEvent->Stack();
153 fCentralityBin = fHelper->GetCentralityBin();
155 // -- Create label arrays
156 // ------------------------
157 fLabelsRec[0] = new Int_t[fNTracks];
159 AliError("Cannot create fLabelsRec[0]");
163 fLabelsRec[1] = new Int_t[fNTracks];
165 AliError("Cannot create fLabelsRec[1] for TPC");
169 for(Int_t ii = 0; ii < fNTracks; ++ii) {
170 fLabelsRec[0][ii] = 0;
171 fLabelsRec[1][ii] = 0;
177 //________________________________________________________________________
178 void AliAnalysisNetParticleEffCont::ResetEvent() {
181 for (Int_t ii = 0; ii < 2 ; ++ii) {
183 delete[] fLabelsRec[ii];
184 fLabelsRec[ii] = NULL;
190 //________________________________________________________________________
191 void AliAnalysisNetParticleEffCont::Process() {
194 // -- Setup (clean, create and fill) MC labels
195 // ---------------------------------------------
198 // -- Fill MC histograms for efficiency studies
199 // -----------------------------------------------
209 * ---------------------------------------------------------------------------------
211 * ---------------------------------------------------------------------------------
214 //________________________________________________________________________
215 void AliAnalysisNetParticleEffCont::CreateHistograms() {
216 // -- Create histograms
218 Double_t dCent[2] = {-0.5, 8.5};
221 Double_t dEta[2] = {-0.9, 0.9};
222 Int_t iEta = Int_t((dEta[1]-dEta[0]) / 0.075) +1 ;
224 Double_t dRap[2] = {-0.5, 0.5};
225 Int_t iRap = Int_t((dRap[1]-dRap[0]) / 0.075) +1 ;
227 Double_t dPhi[2] = {0.0, TMath::TwoPi()};
230 Double_t dPt[2] = {0.1, 3.0};
231 Int_t iPt = Int_t((dPt[1]-dPt[0]) / 0.075);
233 Double_t dSign[2] = {-1.5, 1.5};
236 // ------------------------------------------------------------------
237 // -- Create THnSparseF - Eff
238 // ------------------------------------------------------------------
240 // cent: etaMC: yMC: phiMC: ptMC: sign:findable:recStatus:pidStatus: etaRec: phiRec: ptRec:deltaEta: deltaPhi: deltaPt
241 Int_t binHnEff[15] = { iCent, iEta, iRap, iPhi, iPt, iSign, 2, 2 , 2 , iEta, iPhi, iPt, iEta, 2*iPhi+1, 2*iPt+1};
242 Double_t minHnEff[15] = {dCent[0], dEta[0], dRap[0], dPhi[0], dPt[0], dSign[0], -0.5, -0.5, -0.5, dEta[0], dPhi[0], dPt[0], dEta[0], -dPhi[1], -dPt[1]};
243 Double_t maxHnEff[15] = {dCent[1], dEta[1], dRap[1], dPhi[1], dPt[1], dSign[1], 1.5, 1.5, 1.5, dEta[1], dPhi[1], dPt[1], dEta[1], dPhi[1], dPt[1]};
245 fHnEff = new THnSparseF("fHnEff", "cent:etaMC:yMC:phiMC:ptMC:sign:findable:recStatus:pidStatus:etaRec:phiRec:ptRec:deltaEta:deltaPhi:deltaPt",
246 15, binHnEff, minHnEff, maxHnEff);
250 fHnEff->GetAxis(0)->SetTitle("centrality"); // 0-5|5-10|10-20|20-30|30-40|40-50|50-60|60-70|70-80|80-90 --> 10 bins
251 fHnEff->GetAxis(1)->SetTitle("#eta_{MC}"); // eta [-0.9, 0.9]
252 fHnEff->GetAxis(2)->SetTitle("#it{y}_{MC}"); // rapidity [-0.5, 0.5]
253 fHnEff->GetAxis(3)->SetTitle("#varphi_{MC} (rad)"); // phi [ 0. , 2Pi]
254 fHnEff->GetAxis(4)->SetTitle("#it{p}_{T,MC} (GeV/#it{c})"); // pt [ 0.1, 3.0]
256 fHnEff->GetAxis(5)->SetTitle("sign"); // -1 | 0 | +1
257 fHnEff->GetAxis(6)->SetTitle("findable"); // 0 not findable | 1 findable
258 fHnEff->GetAxis(7)->SetTitle("recStatus"); // 0 not reconstructed | 1 reconstructed
259 fHnEff->GetAxis(8)->SetTitle("recPid"); // 0 not accepted | 1 accepted
261 fHnEff->GetAxis(9)->SetTitle("#eta_{Rec}"); // eta [-0.9, 0.9]
262 fHnEff->GetAxis(10)->SetTitle("#varphi_{Rec} (rad)"); // phi [ 0. , 2Pi]
263 fHnEff->GetAxis(11)->SetTitle("#it{p}_{T,Rec} (GeV/#it{c})"); // pt [ 0.1, 3.0]
265 fHnEff->GetAxis(12)->SetTitle("#eta_{MC}-#eta_{Rec}"); // eta [-0.9,0.9]
266 fHnEff->GetAxis(13)->SetTitle("#varphi_{MC}-#varphi_{Rec} (rad)"); // phi [ 0. ,2Pi]
267 fHnEff->GetAxis(14)->SetTitle("#it{p}_{T,MC}-#it{p}_{T,Rec} (GeV/#it{c})"); // pt [ 3.0,3.0]
269 fHelper->BinLogAxis(fHnEff, 4);
270 fHelper->BinLogAxis(fHnEff, 11);
273 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
275 creation -> findable -> reconstructed -> pid_TPC+TOF
277 || findable | recStatus | recPid
278 1) all primary probeParticles_MC || - - -
279 2) all findable primary probeParticles_MC || x - -
280 3) all reconstructed primary probeParticles_MC || x x -
281 4) all reconstructed primary probeParticles_MC & recPid_TPC+TOF || x x x
283 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
286 // ------------------------------------------------------------------
287 // -- Create THnSparseF - Cont
288 // ------------------------------------------------------------------
290 // cent: etaMC: yMC: phiMC: ptMC: sign:contPart: contSign: etaRec: phiRec: ptRec:deltaEta: deltaPhi: deltaPt
291 Int_t binHnCont[14] = { iCent, iEta, iRap, iPhi, iPt, iSign, 8, iSign, iEta, iPhi, iPt, iEta, 2*iPhi+1, 2*iPt+1};
292 Double_t minHnCont[14] = {dCent[0], dEta[0], dRap[0], dPhi[0], dPt[0], dSign[0], 0.5, dSign[0], dEta[0], dPhi[0], dPt[0], dEta[0], -dPhi[1], -dPt[1]};
293 Double_t maxHnCont[14] = {dCent[1], dEta[1], dRap[1], dPhi[1], dPt[1], dSign[1], 8.5, dSign[1], dEta[1], dPhi[1], dPt[1], dEta[1], dPhi[1], dPt[1]};
294 fHnCont = new THnSparseF("fHnCont", "cent:etaMC:yMC:phiMC:ptMC:sign:contPart:contSign:etaRec:phiRec:ptRec:deltaEta:deltaPhi:deltaPt",
295 14, binHnCont, minHnCont, maxHnCont);
299 fHnCont->GetAxis(0)->SetTitle("centrality"); // 0-5|5-10|10-20|20-30|30-40|40-50|50-60|60-70|70-80|80-90 --> 10 bins
300 fHnCont->GetAxis(1)->SetTitle("#eta_{MC}"); // eta [-0.9,0.9]
301 fHnCont->GetAxis(2)->SetTitle("#it{y}_{MC}"); // rapidity [-0.5, 0.5]
302 fHnCont->GetAxis(3)->SetTitle("#varphi_{MC} (rad)"); // phi [ 0. ,2Pi]
303 fHnCont->GetAxis(4)->SetTitle("#it{p}_{T,MC} (GeV/#it{c})"); // pT [ 0.1,1.3]
304 fHnCont->GetAxis(5)->SetTitle("sign"); // -1 | 0 | +1
306 fHnCont->GetAxis(6)->SetTitle("contPart"); // 1 pi | 2 K | 3 p | 4 e | 5 mu | 6 other | 7 p from WeakDecay | 8 p from Material
307 fHnCont->GetAxis(7)->SetTitle("contSign"); // -1 | 0 | +1
309 fHnCont->GetAxis(8)->SetTitle("#eta_{Rec}"); // eta [-0.9, 0.9]
310 fHnCont->GetAxis(9)->SetTitle("#varphi_{Rec} (rad)"); // phi [ 0. , 2Pi]
311 fHnCont->GetAxis(10)->SetTitle("#it{p}_{T,Rec} (GeV/#it{c})"); // pt [ 0.1, 3.0]
313 fHnCont->GetAxis(11)->SetTitle("#eta_{MC}-#eta_{Rec}"); // eta [-0.9,0.9]
314 fHnCont->GetAxis(12)->SetTitle("#varphi_{MC}-#varphi_{Rec} (rad)"); // phi [ 0. ,2Pi]
315 fHnCont->GetAxis(13)->SetTitle("#it{p}_{T,MC}-#it{p}_{T,Rec} (GeV/#it{c})"); // pt [ 3.0,3.0]
317 fHelper->BinLogAxis(fHnCont, 4);
318 fHelper->BinLogAxis(fHnCont, 10);
320 // ------------------------------------------------------------------
325 //________________________________________________________________________
326 void AliAnalysisNetParticleEffCont::FillMCLabels() {
328 // Loop over ESD tracks and fill arrays with MC lables
329 // fLabelsRec[0] : all Tracks
330 // fLabelsRec[1] : all Tracks accepted by PID of TPC
331 // Check every accepted track if correctly identified
332 // otherwise check for contamination
334 for (Int_t idxTrack = 0; idxTrack < fNTracks; ++idxTrack) {
336 AliVTrack *track = (fESD) ? static_cast<AliVTrack*>(fESD->GetTrack(idxTrack)) : static_cast<AliVTrack*>(fAOD->GetTrack(idxTrack));
338 // -- Check if track is accepted for basic parameters
339 if (!fHelper->IsTrackAcceptedBasicCharged(track))
342 // -- Check if accepted - ESD
343 if (fESD && !fESDTrackCuts->AcceptTrack(dynamic_cast<AliESDtrack*>(track)))
346 // -- Check if accepted - AOD
347 if (fAOD && (dynamic_cast<AliAODTrack*>(track))){
348 if(!((dynamic_cast<AliAODTrack*>(track))->TestFilterBit(fAODtrackCutBit)))
352 // -- Check if accepted in rapidity window
354 if (!fHelper->IsTrackAcceptedRapidity(track, yP))
357 // -- Check if accepted with thighter DCA cuts
358 // -- returns kTRUE for AODs for now : MW
359 if (!fHelper->IsTrackAcceptedDCA(track))
362 Int_t label = TMath::Abs(track->GetLabel());
364 // -- Fill Label of all reconstructed
365 fLabelsRec[0][idxTrack] = label;
367 // -- Check if accepted by PID from TPC or TPC+TOF
369 if (!fHelper->IsTrackAcceptedPID(track, pid))
372 // -- Fill Label of all reconstructed && recPid_TPC+TOF
373 fLabelsRec[1][idxTrack] = label;
375 // -- Check for contamination and fill contamination THnSparse
377 CheckContTrack(label, track->Charge(), idxTrack);
379 CheckContTrackAOD(label, track->Charge(), idxTrack);
381 } // for (Int_t idxTrack = 0; idxTrack < fNTracks; ++idxTrack) {
386 //________________________________________________________________________
387 void AliAnalysisNetParticleEffCont::CheckContTrack(Int_t label, Float_t sign, Int_t idxTrack) {
388 // Check if particle is contamination or correctly identified for ESDs
389 // Fill contamination THnSparse
391 TParticle* particle = fStack->Particle(label);
395 Bool_t isSecondaryFromWeakDecay = kFALSE;
396 Bool_t isSecondaryFromMaterial = kFALSE;
398 // -- Check if correctly identified
399 // > Check for Primaries and Secondaries
400 if (fHelper->GetUsePID()) {
401 if (particle->GetPdgCode() == (sign*fPdgCode)) {
403 // Check if is physical primary -> all ok
404 if (fStack->IsPhysicalPrimary(label))
407 // -- Check if secondaries from material or weak decay
408 isSecondaryFromWeakDecay = fStack->IsSecondaryFromWeakDecay(label);
409 isSecondaryFromMaterial = fStack->IsSecondaryFromMaterial(label);
413 // -- If no PID is required
414 // > only check for Primaries and Secondaries
416 // Check if is physical primary -> all ok
417 if (fStack->IsPhysicalPrimary(label))
420 // -- Check if secondaries from material or weak decay
421 isSecondaryFromWeakDecay = fStack->IsSecondaryFromWeakDecay(label);
422 isSecondaryFromMaterial = fStack->IsSecondaryFromMaterial(label);
426 Float_t contSign = 0.;
427 if (particle->GetPDG()->Charge() == 0.) contSign = 0.;
428 else if (particle->GetPDG()->Charge() < 0.) contSign = -1.;
429 else if (particle->GetPDG()->Charge() > 0.) contSign = 1.;
431 // -- Get contaminating particle
432 Float_t contPart = 0;
433 if (isSecondaryFromWeakDecay) contPart = 7; // probeParticle from WeakDecay
434 else if (isSecondaryFromMaterial) contPart = 8; // probeParticle from Material
436 if (TMath::Abs(particle->GetPdgCode()) == 211) contPart = 1; // pion
437 else if (TMath::Abs(particle->GetPdgCode()) == 321) contPart = 2; // kaon
438 else if (TMath::Abs(particle->GetPdgCode()) == 2212) contPart = 3; // proton
439 else if (TMath::Abs(particle->GetPdgCode()) == 11) contPart = 4; // electron
440 else if (TMath::Abs(particle->GetPdgCode()) == 13) contPart = 5; // muon
441 else contPart = 6; // other
444 // -- Get Reconstructed values
449 AliESDtrack *track = fESD->GetTrack(idxTrack);
451 // if no track present (which should not happen)
452 // -> pt = 0. , which is not in the looked at range
454 // -- Get Reconstructed eta/phi/pt
455 etaRec = track->Eta();
456 phiRec = track->Phi();
461 Double_t hnCont[14] = {fCentralityBin, particle->Eta(), particle->Y(), particle->Phi(), particle->Pt(), sign,
462 contPart, contSign, etaRec, phiRec, ptRec,
463 particle->Eta()-etaRec, particle->Phi()-phiRec, particle->Pt()-ptRec};
464 fHnCont->Fill(hnCont);
467 //________________________________________________________________________
468 void AliAnalysisNetParticleEffCont::CheckContTrackAOD(Int_t label, Float_t sign, Int_t idxTrack) {
469 // Check if particle is contamination or correctly identified for AODs
470 // Fill contamination THnSparse
472 AliAODMCParticle* particle = static_cast<AliAODMCParticle*>(fArrayMC->At(label));
477 Bool_t isSecondaryFromWeakDecay = kFALSE;
478 Bool_t isSecondaryFromMaterial = kFALSE;
480 // -- Check if correctly identified
481 // > Check for Primaries and Secondaries
482 if (fHelper->GetUsePID()) {
483 if (particle->GetPdgCode() == (sign*fPdgCode)) {
485 // Check if is physical primary -> all ok
486 if (particle->IsPhysicalPrimary())
489 // -- Check if secondaries from material or weak decay
490 isSecondaryFromWeakDecay = particle->IsSecondaryFromWeakDecay();
491 isSecondaryFromMaterial = particle->IsSecondaryFromMaterial();
495 // -- If no PID is required
496 // > only check for Primaries and Secondaries
498 // Check if is physical primary -> all ok
499 if (particle->IsPhysicalPrimary())
502 // -- Check if secondaries from material or weak decay
503 isSecondaryFromWeakDecay = particle->IsSecondaryFromWeakDecay();
504 isSecondaryFromMaterial = particle->IsSecondaryFromMaterial();
508 Float_t contSign = 0.;
509 // Crashing (MW)? --> why do we need the PDG charge?
510 // if ((TDatabasePDG::Instance()->GetParticle(particle->PdgCode()))->Charge() == 0.) contSign = 0.;
511 // else if ((TDatabasePDG::Instance()->GetParticle(particle->PdgCode()))->Charge() < 0.) contSign = -1.;
512 // else if ((TDatabasePDG::Instance()->GetParticle(particle->PdgCode()))->Charge() > 0.) contSign = 1.;
513 if (particle->Charge() == 0.) contSign = 0.;
514 else if (particle->Charge() < 0.) contSign = -1.;
515 else if (particle->Charge() > 0.) contSign = 1.;
517 // -- Get contaminating particle
518 Float_t contPart = 0;
519 if (isSecondaryFromWeakDecay) contPart = 7; // probeParticle from WeakDecay
520 else if (isSecondaryFromMaterial) contPart = 8; // probeParticle from Material
522 if (TMath::Abs(particle->GetPdgCode()) == 211) contPart = 1; // pion
523 else if (TMath::Abs(particle->GetPdgCode()) == 321) contPart = 2; // kaon
524 else if (TMath::Abs(particle->GetPdgCode()) == 2212) contPart = 3; // proton
525 else if (TMath::Abs(particle->GetPdgCode()) == 11) contPart = 4; // electron
526 else if (TMath::Abs(particle->GetPdgCode()) == 13) contPart = 5; // muon
527 else contPart = 6; // other
530 // -- Get Reconstructed values
535 AliAODTrack *track = fAOD->GetTrack(idxTrack);
538 // if no track present (which should not happen)
539 // -> pt = 0. , which is not in the looked at range
541 // -- Get Reconstructed eta/phi/pt
542 etaRec = track->Eta();
543 phiRec = track->Phi();
548 Double_t hnCont[14] = {fCentralityBin, particle->Eta(), particle->Y(), particle->Phi(), particle->Pt(), sign,
549 contPart, contSign, etaRec, phiRec, ptRec,
550 particle->Eta()-etaRec, particle->Phi()-phiRec, particle->Pt()-ptRec};
551 fHnCont->Fill(hnCont);
554 //________________________________________________________________________
555 void AliAnalysisNetParticleEffCont::FillMCEffHist() {
556 // Fill efficiency THnSparse for ESDs
558 Int_t nPart = fStack->GetNprimary();
561 fESDTrackCuts->GetEtaRange(etaRange[0],etaRange[1]);
563 for (Int_t idxMC = 0; idxMC < nPart; ++idxMC) {
564 TParticle* particle = fStack->Particle(idxMC);
566 // -- Check basic MC properties -> charged physical primary
567 if (!fHelper->IsParticleAcceptedBasicCharged(particle, idxMC))
570 // -- Check rapidity window
572 if (!fHelper->GetUsePID())
574 if (!fHelper->IsParticleAcceptedRapidity(particle, yMC))
577 // -- Check if probeParticle / anti-probeParticle
578 // > skip check if PID is not required
579 if (fHelper->GetUsePID() && TMath::Abs(particle->GetPdgCode()) != fPdgCode){
580 printf("SHOULD NOT HAPPEN !!!\n"); // JMT
584 // -- Get sign of particle
585 Float_t sign = (particle->GetPdgCode() < 0) ? -1. : 1.;
587 // -- Get if particle is findable
588 Float_t findable = Float_t(fHelper->IsParticleFindable(idxMC));
590 // -- Get recStatus and pidStatus
591 Float_t recStatus = 0.;
594 // -- Get Reconstructed values
599 // -- Loop over all labels
600 for (Int_t idxRec=0; idxRec < fNTracks; ++idxRec) {
601 if (idxMC == fLabelsRec[0][idxRec]) {
604 if (idxMC == fLabelsRec[1][idxRec])
607 AliESDtrack *track = fESD->GetTrack(idxRec);
609 // if no track present (which should not happen)
610 // -> pt = 0. , which is not in the looked at range
612 // -- Get Reconstructed eta/phi/pt
613 etaRec = track->Eta();
614 phiRec = track->Phi();
619 } // for (Int_t idxRec=0; idxRec < fNTracks; ++idxRec) {
622 Double_t hnEff[15] = {fCentralityBin, particle->Eta(), particle->Y(), particle->Phi(), particle->Pt(), sign,
623 findable, recStatus, recPid, etaRec, phiRec, ptRec,
624 particle->Eta()-etaRec, particle->Phi()-phiRec, particle->Pt()-ptRec};
627 } // for (Int_t idxMC = 0; idxMC < nPart; ++idxMC) {
632 //________________________________________________________________________
633 void AliAnalysisNetParticleEffCont::FillMCEffHistAOD() {
634 // Fill efficiency THnSparse for AODs
636 Int_t nPart = fArrayMC->GetEntriesFast();
638 for (Int_t idxMC = 0; idxMC < nPart; ++idxMC) {
640 AliAODMCParticle* particle = static_cast<AliAODMCParticle*>(fArrayMC->At(idxMC));
642 // -- Check basic MC properties -> charged physical primary
643 if (!fHelper->IsParticleAcceptedBasicCharged(particle))
646 // -- Check rapidity window
648 if (!fHelper->IsParticleAcceptedRapidity((TParticle*)particle, yMC)) // MW : das geht? wenn ja use c++ cast
651 // -- Check if probeParticle / anti-probeParticle
652 // > skip check if PID is not required
653 if (fHelper->GetUsePID() && TMath::Abs(particle->GetPdgCode()) != fPdgCode)
656 // -- Get sign of particle
657 Float_t sign = (particle->GetPdgCode() < 0) ? -1. : 1.;
659 // -- Get if particle is findable
660 Float_t findable = 1.;// Float_t(fHelper->IsParticleFindable(idxMC)); XXX
662 // -- Get recStatus and pidStatus
663 Float_t recStatus = 0.;
666 // -- Get Reconstructed values
671 // -- Loop over all labels
672 for (Int_t idxRec=0; idxRec < fNTracks; ++idxRec) {
673 if (idxMC == fLabelsRec[0][idxRec]) {
676 if (idxMC == fLabelsRec[1][idxRec])
679 AliVTrack *track = NULL;
681 track = fESD->GetTrack(idxRec);
683 track = fAOD->GetTrack(idxRec);
686 // if no track present (which should not happen)
687 // -> pt = 0. , which is not in the looked at range
689 // -- Get Reconstructed eta/phi/pt
690 etaRec = track->Eta();
691 phiRec = track->Phi();
696 } // for (Int_t idxRec=0; idxRec < fNTracks; ++idxRec) {
699 Double_t hnEff[15] = {fCentralityBin, particle->Eta(), particle->Y(), particle->Phi(), particle->Pt(), sign,
700 findable, recStatus, recPid, etaRec, phiRec, ptRec,
701 particle->Eta()-etaRec, particle->Phi()-phiRec, particle->Pt()-ptRec};
704 } // for (Int_t idxMC = 0; idxMC < nPart; ++idxMC) {