From 5e9fad63181b8e9ad2c8b4dede4d5c99a8840139 Mon Sep 17 00:00:00 2001 From: skhade Date: Tue, 2 Jun 2026 20:51:29 +0530 Subject: [PATCH] Fix trigger daughter rejection logic --- PWGHF/HFC/TableProducer/correlatorD0Hadrons.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PWGHF/HFC/TableProducer/correlatorD0Hadrons.cxx b/PWGHF/HFC/TableProducer/correlatorD0Hadrons.cxx index d5e8a924fc8..9c864ab2909 100644 --- a/PWGHF/HFC/TableProducer/correlatorD0Hadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorD0Hadrons.cxx @@ -966,6 +966,14 @@ struct HfCorrelatorD0Hadrons { if (!particleAssoc.isPhysicalPrimary()) { continue; } + + // Explicitly reject direct daughters of the current trigger D0/D0bar. + auto const motherIdxD0 = RecoDecay::getMother(mcParticles, particleAssoc, Pdg::kD0, true, nullptr, 1); + auto const motherIdxD0bar = RecoDecay::getMother(mcParticles, particleAssoc, -Pdg::kD0, true, nullptr, 1); + if (motherIdxD0 == particleTrigg.globalIndex() || motherIdxD0bar == particleTrigg.globalIndex()) { + continue; + } + // ==============================soft pion removal================================ registry.fill(HIST("hTrackCounter"), 1); // fill before soft pi removal // method used: indexMother = -1 by default if the mother doesn't match with given PID of the mother. We find mother of pion if it is D* and mother of D0 if it is D*. If they are both positive and they both match each other, then it is detected as a soft pion