From 0669b5aa55af8840dbe92dbdb95dee62a96868ea Mon Sep 17 00:00:00 2001 From: Shyam Kumar Date: Fri, 14 Nov 2025 15:17:52 +0100 Subject: [PATCH 1/4] Update correlatorDplusHadrons.cxx Minor fix in logic --- .../TableProducer/correlatorDplusHadrons.cxx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx index eb81d093ec9..bad37b290f8 100644 --- a/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx @@ -563,23 +563,7 @@ struct HfCorrelatorDplusHadrons { if (std::abs(yD) >= yCandMax || particle1.pt() <= ptCandMin) { continue; } - registry.fill(HIST("hDplusBin"), poolBin); - registry.fill(HIST("hPtCandMCGen"), particle1.pt()); - registry.fill(HIST("hEtaMcGen"), particle1.eta()); - registry.fill(HIST("hPhiMcGen"), RecoDecay::constrainAngle(particle1.phi(), -PIHalf)); - registry.fill(HIST("hYMCGen"), yD); - - // prompt and non-prompt division - isDplusPrompt = particle1.originMcGen() == RecoDecay::OriginType::Prompt; - isDplusNonPrompt = particle1.originMcGen() == RecoDecay::OriginType::NonPrompt; - if (isDplusPrompt) { - registry.fill(HIST("hPtCandMcGenPrompt"), particle1.pt()); - } else if (isDplusNonPrompt) { - registry.fill(HIST("hPtCandMcGenNonPrompt"), particle1.pt()); - } - - // prompt and non-prompt division - std::vector listDaughters{}; + std::vector listDaughters{}; std::array const arrDaughDplusPDG = {+kPiPlus, -kKPlus, kPiPlus}; std::array prongsId{}; listDaughters.clear(); @@ -600,6 +584,22 @@ struct HfCorrelatorDplusHadrons { if (!isDaughtersOk) continue; // Skip this D+ candidate if any daughter fails eta cut counterDplusHadron++; + + registry.fill(HIST("hDplusBin"), poolBin); + registry.fill(HIST("hPtCandMCGen"), particle1.pt()); + registry.fill(HIST("hEtaMcGen"), particle1.eta()); + registry.fill(HIST("hPhiMcGen"), RecoDecay::constrainAngle(particle1.phi(), -PIHalf)); + registry.fill(HIST("hYMCGen"), yD); + + // prompt and non-prompt division + isDplusPrompt = particle1.originMcGen() == RecoDecay::OriginType::Prompt; + isDplusNonPrompt = particle1.originMcGen() == RecoDecay::OriginType::NonPrompt; + if (isDplusPrompt) { + registry.fill(HIST("hPtCandMcGenPrompt"), particle1.pt()); + } else if (isDplusNonPrompt) { + registry.fill(HIST("hPtCandMcGenNonPrompt"), particle1.pt()); + } + // Dplus Hadron correlation dedicated section // if it's a Dplus particle, search for Hadron and evaluate correlations registry.fill(HIST("hcountDplustriggersMCGen"), 0, particle1.pt()); // to count trigger Dplus for normalisation) From 7b7232e04962b4dce5ed6c6afb9c135dbdc52695 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Fri, 14 Nov 2025 14:24:11 +0000 Subject: [PATCH 2/4] Please consider the following formatting changes --- PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx index bad37b290f8..2c06a223b8e 100644 --- a/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx @@ -563,7 +563,7 @@ struct HfCorrelatorDplusHadrons { if (std::abs(yD) >= yCandMax || particle1.pt() <= ptCandMin) { continue; } - std::vector listDaughters{}; + std::vector listDaughters{}; std::array const arrDaughDplusPDG = {+kPiPlus, -kKPlus, kPiPlus}; std::array prongsId{}; listDaughters.clear(); @@ -584,7 +584,7 @@ struct HfCorrelatorDplusHadrons { if (!isDaughtersOk) continue; // Skip this D+ candidate if any daughter fails eta cut counterDplusHadron++; - + registry.fill(HIST("hDplusBin"), poolBin); registry.fill(HIST("hPtCandMCGen"), particle1.pt()); registry.fill(HIST("hEtaMcGen"), particle1.eta()); From 01d2d7ed106617a2effcc5c24b6cf9ba3ac1f0c6 Mon Sep 17 00:00:00 2001 From: Shyam Kumar Date: Fri, 14 Nov 2025 15:33:02 +0100 Subject: [PATCH 3/4] Update correlatorDplusHadrons.cxx Fixed for Camelcase warning. --- PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx index 2c06a223b8e..2ec06db45bb 100644 --- a/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx @@ -182,7 +182,7 @@ struct HfCorrelatorDplusHadrons { Produces entryDplus; Produces entryHadron; static constexpr std::size_t NDaughters{3u}; - static constexpr float kEtaDaughtersMax = 0.8f; // Eta cut on daughters of D+ meson as Run2 + static constexpr float EtaDaughtersMax = 0.8f; // Eta cut on daughters of D+ meson as Run2 Configurable selectionFlagDplus{"selectionFlagDplus", 7, "Selection Flag for Dplus"}; // 7 corresponds to topo+PID cuts Configurable numberEventsMixed{"numberEventsMixed", 5, "Number of events mixed in ME process"}; @@ -437,7 +437,7 @@ struct HfCorrelatorDplusHadrons { double etaDaugh1 = RecoDecay::eta(std::array{candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()}); double etaDaugh2 = RecoDecay::eta(std::array{candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()}); double etaDaugh3 = RecoDecay::eta(std::array{candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()}); - if (std::abs(etaDaugh1) >= kEtaDaughtersMax || std::abs(etaDaugh2) >= kEtaDaughtersMax || std::abs(etaDaugh3) >= kEtaDaughtersMax) { + if (std::abs(etaDaugh1) >= EtaDaughtersMax || std::abs(etaDaugh2) >= EtaDaughtersMax || std::abs(etaDaugh3) >= EtaDaughtersMax) { continue; } // efficiency weight determination @@ -574,7 +574,7 @@ struct HfCorrelatorDplusHadrons { bool isDaughtersOk = true; for (const auto& dauIdx : listDaughters) { auto daughI = mcParticles.rawIteratorAt(dauIdx - mcParticles.offset()); - if (std::abs(daughI.eta()) >= kEtaDaughtersMax) { + if (std::abs(daughI.eta()) >= EtaDaughtersMax) { isDaughtersOk = false; break; } From ff574ff7cc0dd57d7aa0a976f816e80ad81d8e85 Mon Sep 17 00:00:00 2001 From: Shyam Kumar Date: Mon, 17 Nov 2025 09:03:59 +0100 Subject: [PATCH 4/4] Update correlatorDplusHadrons.cxx Removed useless declarations --- .../HFC/TableProducer/correlatorDplusHadrons.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx index 2ec06db45bb..37fdb8acea8 100644 --- a/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx @@ -425,9 +425,6 @@ struct HfCorrelatorDplusHadrons { float const multiplicityFT0M = collision.multFT0M(); // MC reco level - bool isDplusPrompt = false; - bool isDplusNonPrompt = false; - bool isDplusSignal = false; for (const auto& candidate : candidates) { // rapidity and pT selections if (std::abs(HfHelper::yDplus(candidate)) >= yCandMax || candidate.pt() <= ptCandMin || candidate.pt() >= ptCandMax) { @@ -447,10 +444,10 @@ struct HfCorrelatorDplusHadrons { efficiencyWeightD = 1. / efficiencyD->at(effBinD); } // Dplus flag - isDplusSignal = std::abs(candidate.flagMcMatchRec()) == hf_decay::hf_cand_3prong::DecayChannelMain::DplusToPiKPi; + bool isDplusSignal = std::abs(candidate.flagMcMatchRec()) == hf_decay::hf_cand_3prong::DecayChannelMain::DplusToPiKPi; // prompt and non-prompt division - isDplusPrompt = candidate.originMcRec() == RecoDecay::OriginType::Prompt; - isDplusNonPrompt = candidate.originMcRec() == RecoDecay::OriginType::NonPrompt; + bool isDplusPrompt = candidate.originMcRec() == RecoDecay::OriginType::Prompt; + bool isDplusNonPrompt = candidate.originMcRec() == RecoDecay::OriginType::NonPrompt; std::vector outputMl = {-1., -1., -1.}; @@ -548,8 +545,6 @@ struct HfCorrelatorDplusHadrons { int poolBin = corrBinningMcGen.getBin(std::make_tuple(mcCollision.posZ(), mcCollision.multMCFT0A())); registry.fill(HIST("hMultFT0AMcGen"), mcCollision.multMCFT0A()); - bool isDplusPrompt = false; - bool isDplusNonPrompt = false; // MC gen level for (const auto& particle1 : mcParticles) { // check if the particle is Dplus (for general plot filling and selection, so both cases are fine) - NOTE: decay channel is not probed! @@ -592,8 +587,8 @@ struct HfCorrelatorDplusHadrons { registry.fill(HIST("hYMCGen"), yD); // prompt and non-prompt division - isDplusPrompt = particle1.originMcGen() == RecoDecay::OriginType::Prompt; - isDplusNonPrompt = particle1.originMcGen() == RecoDecay::OriginType::NonPrompt; + bool isDplusPrompt = particle1.originMcGen() == RecoDecay::OriginType::Prompt; + bool isDplusNonPrompt = particle1.originMcGen() == RecoDecay::OriginType::NonPrompt; if (isDplusPrompt) { registry.fill(HIST("hPtCandMcGenPrompt"), particle1.pt()); } else if (isDplusNonPrompt) {