Skip to content

Commit 1a396c2

Browse files
authored
[PWGHF] Fixed mc gen of taskCharmResoDTrkReduced to mirror MC rec (#17425)
1 parent b4f16fd commit 1a396c2

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

PWGHF/D2H/Tasks/taskCharmResoToDTrkReduced.cxx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,11 @@ struct HfTaskCharmResoToDTrkReduced {
412412
std::array<float, 2> ptProngs = {particle.ptProng0(), particle.ptProng1()};
413413
std::array<float, 2> etaProngs = {particle.etaProng0(), particle.etaProng1()};
414414
bool const prongsInAcc = isProngInAcceptance(etaProngs[0], ptProngs[0]) && isProngInAcceptance(etaProngs[1], ptProngs[1]);
415-
if (Channel == DecayChannel::D0Kplus &&
416-
!hf_decay::hf_cand_reso::particlesToD0Kplus.contains(static_cast<hf_decay::hf_cand_reso::DecayChannelMain>(std::abs(flag)))) {
417-
continue;
415+
if constexpr (Channel == DecayChannel::D0Kplus) {
416+
if (fillOnlySignal &&
417+
!hf_decay::hf_cand_reso::particlesToD0Kplus.contains(static_cast<hf_decay::hf_cand_reso::DecayChannelMain>(std::abs(flag)))) {
418+
continue;
419+
}
418420
}
419421
registry.fill(HIST("hYGenAll"), ptParticle, yParticle);
420422
if (yCandGenMax >= 0. && std::abs(yParticle) > yCandGenMax) {

0 commit comments

Comments
 (0)