From e1e303ac8ec95bcf16314f3fb1f728d479b0c007 Mon Sep 17 00:00:00 2001 From: maria Date: Fri, 4 Aug 2023 12:44:19 +0200 Subject: [PATCH] split neutral isolation: ph and neutralHadron --- NanoAOD/plugins/MesonProducer.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/NanoAOD/plugins/MesonProducer.cc b/NanoAOD/plugins/MesonProducer.cc index f9f0d60..3037153 100644 --- a/NanoAOD/plugins/MesonProducer.cc +++ b/NanoAOD/plugins/MesonProducer.cc @@ -1835,10 +1835,11 @@ MesonProducer::computeCandIsolation(const pat::PackedCandidate& pfCand1, const p if (particleType==0) { if (pfCandIso.charge() == 0 ) continue; // for chargedIsolation if (!pfCandIso.hasTrackDetails()) continue; - } else if (particleType==22) { - if (pfCandIso.charge() != 0 ) continue; // for neutralIsolation MARIA + } else if (particleType==22 and pfCandIso.pdgId()==22) { + if (pfCandIso.charge() != 0 ) continue; // only photons for neutralIsolation } else { - if (pfCandIso.charge() != 0 ) continue; // for neutralIsolation MARIA + if (pfCandIso.pdgId() == 22) continue; // only neutral hadrons + if (pfCandIso.charge() != 0 ) continue; // for neutralIsolation } if (pfCandIso.pt()