From fded3b93365dabe5ed829fea149bec4d0165b532 Mon Sep 17 00:00:00 2001 From: Luca610 Date: Wed, 12 Aug 2026 11:50:28 +0200 Subject: [PATCH 1/2] Fixed mc gen of taskCharmResoDTrkReduced to mirror MC rec --- PWGHF/D2H/Tasks/taskCharmResoToDTrkReduced.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/PWGHF/D2H/Tasks/taskCharmResoToDTrkReduced.cxx b/PWGHF/D2H/Tasks/taskCharmResoToDTrkReduced.cxx index 356e36e6894..0b5ec1ea9c1 100644 --- a/PWGHF/D2H/Tasks/taskCharmResoToDTrkReduced.cxx +++ b/PWGHF/D2H/Tasks/taskCharmResoToDTrkReduced.cxx @@ -412,9 +412,11 @@ struct HfTaskCharmResoToDTrkReduced { std::array ptProngs = {particle.ptProng0(), particle.ptProng1()}; std::array etaProngs = {particle.etaProng0(), particle.etaProng1()}; bool const prongsInAcc = isProngInAcceptance(etaProngs[0], ptProngs[0]) && isProngInAcceptance(etaProngs[1], ptProngs[1]); - if (Channel == DecayChannel::D0Kplus && - !hf_decay::hf_cand_reso::particlesToD0Kplus.contains(static_cast(std::abs(flag)))) { - continue; + if (fillOnlySignal) { + if (Channel == DecayChannel::D0Kplus && + !hf_decay::hf_cand_reso::particlesToD0Kplus.contains(static_cast(std::abs(flag)))) { + continue; + } } registry.fill(HIST("hYGenAll"), ptParticle, yParticle); if (yCandGenMax >= 0. && std::abs(yParticle) > yCandGenMax) { From 5e47db13e0daf63d339234d80b801e5f742cb1ec Mon Sep 17 00:00:00 2001 From: Luca610 Date: Wed, 12 Aug 2026 12:05:41 +0200 Subject: [PATCH 2/2] Lint --- PWGHF/D2H/Tasks/taskCharmResoToDTrkReduced.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGHF/D2H/Tasks/taskCharmResoToDTrkReduced.cxx b/PWGHF/D2H/Tasks/taskCharmResoToDTrkReduced.cxx index 0b5ec1ea9c1..07e56a5cfab 100644 --- a/PWGHF/D2H/Tasks/taskCharmResoToDTrkReduced.cxx +++ b/PWGHF/D2H/Tasks/taskCharmResoToDTrkReduced.cxx @@ -412,8 +412,8 @@ struct HfTaskCharmResoToDTrkReduced { std::array ptProngs = {particle.ptProng0(), particle.ptProng1()}; std::array etaProngs = {particle.etaProng0(), particle.etaProng1()}; bool const prongsInAcc = isProngInAcceptance(etaProngs[0], ptProngs[0]) && isProngInAcceptance(etaProngs[1], ptProngs[1]); - if (fillOnlySignal) { - if (Channel == DecayChannel::D0Kplus && + if constexpr (Channel == DecayChannel::D0Kplus) { + if (fillOnlySignal && !hf_decay::hf_cand_reso::particlesToD0Kplus.contains(static_cast(std::abs(flag)))) { continue; }