From a91427fd609ee4fd812a648aaa4e6d12fc7ad355 Mon Sep 17 00:00:00 2001 From: miweber Date: Tue, 13 Jan 2015 12:04:02 +0100 Subject: [PATCH] Exclude all particles with a mother index in MC mode, ExcludeResonancesInMC (only for testing) --- .../BalanceFunctions/AliAnalysisTaskBFPsi.cxx | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskBFPsi.cxx b/PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskBFPsi.cxx index 686663121df..0f7b868f2b3 100755 --- a/PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskBFPsi.cxx +++ b/PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskBFPsi.cxx @@ -2178,33 +2178,35 @@ TObjArray* AliAnalysisTaskBFPsi::GetAcceptedTracks(AliVEvent *event, Double_t gC Bool_t kExcludeParticle = kFALSE; Int_t gMotherIndex = particle->GetFirstMother(); + if(gMotherIndex != -1) { - AliMCParticle* motherTrack = dynamic_cast(event->GetTrack(gMotherIndex)); - if(motherTrack) { - TParticle *motherParticle = motherTrack->Particle(); - if(motherParticle) { - Int_t pdgCodeOfMother = motherParticle->GetPdgCode(); - //if((pdgCodeOfMother == 113)||(pdgCodeOfMother == 213)||(pdgCodeOfMother == 221)||(pdgCodeOfMother == 223)||(pdgCodeOfMother == 331)||(pdgCodeOfMother == 333)) { - if(pdgCodeOfMother == 113 // rho0 - || pdgCodeOfMother == 213 || pdgCodeOfMother == -213 // rho+ - // || pdgCodeOfMother == 221 // eta - // || pdgCodeOfMother == 331 // eta' - // || pdgCodeOfMother == 223 // omega - // || pdgCodeOfMother == 333 // phi - || pdgCodeOfMother == 311 || pdgCodeOfMother == -311 // K0 - // || pdgCodeOfMother == 313 || pdgCodeOfMother == -313 // K0* - // || pdgCodeOfMother == 323 || pdgCodeOfMother == -323 // K+* - || pdgCodeOfMother == 3122 || pdgCodeOfMother == -3122 // Lambda - || pdgCodeOfMother == 111 // pi0 Dalitz - ) { - kExcludeParticle = kTRUE; - } - } - } + // AliMCParticle* motherTrack = dynamic_cast(event->GetTrack(gMotherIndex)); + // if(motherTrack) { + // TParticle *motherParticle = motherTrack->Particle(); + // if(motherParticle) { + // Int_t pdgCodeOfMother = motherParticle->GetPdgCode(); + // //if((pdgCodeOfMother == 113)||(pdgCodeOfMother == 213)||(pdgCodeOfMother == 221)||(pdgCodeOfMother == 223)||(pdgCodeOfMother == 331)||(pdgCodeOfMother == 333)) { + // if(pdgCodeOfMother == 113 // rho0 + // || pdgCodeOfMother == 213 || pdgCodeOfMother == -213 // rho+ + // // || pdgCodeOfMother == 221 // eta + // // || pdgCodeOfMother == 331 // eta' + // // || pdgCodeOfMother == 223 // omega + // // || pdgCodeOfMother == 333 // phi + // || pdgCodeOfMother == 311 || pdgCodeOfMother == -311 // K0 + // // || pdgCodeOfMother == 313 || pdgCodeOfMother == -313 // K0* + // // || pdgCodeOfMother == 323 || pdgCodeOfMother == -323 // K+* + // || pdgCodeOfMother == 3122 || pdgCodeOfMother == -3122 // Lambda + // || pdgCodeOfMother == 111 // pi0 Dalitz + // ) { + kExcludeParticle = kTRUE; + // } + // } + //} } //Exclude from the analysis decay products of rho0, rho+, eta, eta' and phi if(kExcludeParticle) continue; + } //Exclude electrons with PDG -- 2.39.3