From 0c47a116868dd6ecccd398b15b8b285ad6b22050 Mon Sep 17 00:00:00 2001 From: miweber Date: Mon, 14 Jan 2013 16:55:40 +0000 Subject: [PATCH] Net Particle updates: remove printout for PID check and TDataBasePDG for charge in AODs --- .../AliAnalysisNetParticleEffCont.cxx | 7 ++----- .../AliAnalysisNetParticleHelper.cxx | 17 ++++------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleEffCont.cxx b/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleEffCont.cxx index 5766840cd82..61ab6e6eb04 100644 --- a/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleEffCont.cxx +++ b/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleEffCont.cxx @@ -2,7 +2,6 @@ #include "TMath.h" #include "TAxis.h" -#include "TDatabasePDG.h" #include "AliESDEvent.h" #include "AliESDInputHandler.h" @@ -574,11 +573,9 @@ void AliAnalysisNetParticleEffCont::FillMCEffHist() { // -- Check if probeParticle / anti-probeParticle // > skip check if PID is not required - if (fHelper->GetUsePID() && TMath::Abs(particle->GetPdgCode()) != fPdgCode){ - printf("SHOULD NOT HAPPEN !!!\n"); // JMT - printf("%d %d !!!\n", particle->GetPdgCode(), fPdgCode ); // JMT + if (fHelper->GetUsePID() && TMath::Abs(particle->GetPdgCode()) != fPdgCode) continue; - } + // -- Get sign of particle Float_t sign = (particle->GetPdgCode() < 0) ? -1. : 1.; diff --git a/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleHelper.cxx b/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleHelper.cxx index eb6d91a2fc2..4161186880f 100644 --- a/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleHelper.cxx +++ b/PWGCF/EBYE/NetParticle/AliAnalysisNetParticleHelper.cxx @@ -5,7 +5,6 @@ #include "TSystem.h" #include "TFile.h" #include "TPRegexp.h" -#include "TDatabasePDG.h" #include "AliStack.h" #include "AliMCEvent.h" @@ -487,14 +486,10 @@ Bool_t AliAnalysisNetParticleHelper::IsParticleAcceptedBasicCharged(AliAODMCPart if (!particle) return kFALSE; - // -- check if PDF code exists - if (!(TDatabasePDG::Instance()->GetParticle(particle->PdgCode()))) - return kFALSE; - // -- check if charged - if ((TDatabasePDG::Instance()->GetParticle(particle->PdgCode()))->Charge() == 0.0) + if (particle->Charge() == 0.0) return kFALSE; - + // -- check if physical primary if(!particle->IsPhysicalPrimary()) return kFALSE; @@ -530,14 +525,10 @@ Bool_t AliAnalysisNetParticleHelper::IsParticleAcceptedBasicNeutral(AliAODMCPart if (!particle) return kFALSE; - // -- check if PDF code exists - if (!(TDatabasePDG::Instance()->GetParticle(particle->PdgCode()))) - return kFALSE; - // -- check if charged - if ((TDatabasePDG::Instance()->GetParticle(particle->PdgCode()))->Charge() != 0.0) + if (particle->Charge() != 0.0) return kFALSE; - + // -- check if physical primary if(!particle->IsPhysicalPrimary()) return kFALSE; -- 2.43.5