From 3542ff4c6ce1ed1edbf200691805778f5b500871 Mon Sep 17 00:00:00 2001 From: fcolamar Date: Fri, 6 Jun 2025 12:50:07 +0200 Subject: [PATCH 1/4] [ALICE 3] Adding decay channel check for D efficiency evaluation in decay finder --- ALICE3/TableProducer/alice3-decayfinder.cxx | 34 +++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/ALICE3/TableProducer/alice3-decayfinder.cxx b/ALICE3/TableProducer/alice3-decayfinder.cxx index 83f1998bf38..50488e33e48 100644 --- a/ALICE3/TableProducer/alice3-decayfinder.cxx +++ b/ALICE3/TableProducer/alice3-decayfinder.cxx @@ -267,6 +267,7 @@ struct alice3decayFinder { dmeson.mcTruth = 2; // D0bar } } + return true; } @@ -362,7 +363,9 @@ struct alice3decayFinder { if (doprocessFindDmesons) { histos.add("h2dGenD", "h2dGenD", kTH2F, {axisPt, axisEta}); + histos.add("h2dGenD_KpiOnly", "h2dGenD_KpiOnly", kTH2F, {axisPt, axisEta}); histos.add("h2dGenDbar", "h2dGenDbar", kTH2F, {axisPt, axisEta}); + histos.add("h2dGenDbar_KpiOnly", "h2dGenDbar_KpiOnly", kTH2F, {axisPt, axisEta}); histos.add("h3dRecD", "h3dRecD", kTH3F, {axisPt, axisEta, axisDMass}); histos.add("h3dRecDSig", "h3dRecDSig", kTH3F, {axisPt, axisEta, axisDMass}); histos.add("h3dRecDRefl", "h3dRecDRefl", kTH3F, {axisPt, axisEta, axisDMass}); @@ -471,11 +474,35 @@ struct alice3decayFinder { if (doprocessFindDmesons) { for (auto const& mcParticle : trueD) { histos.fill(HIST("h2dGenD"), mcParticle.pt(), mcParticle.eta()); - histos.fill(HIST("hDGenForEfficiency"), mcParticle.pt(), mcParticle.y()); // in common for D and Dbar + auto daughters = mcParticle.template daughters_as(); + if (daughters.size() != 2) + continue; + int daugID[2], daugPDG[2], i = 0; + for (const auto& dau : daughters) { + daugID[i] = dau.globalIndex(); + daugPDG[i] = dau.pdgCode(); + i++; + } + if ((std::fabs(daugPDG[0]) == 321 && std::fabs(daugPDG[1]) == 211) || (std::fabs(daugPDG[0]) == 211 && std::fabs(daugPDG[1]) == 321)) { + histos.fill(HIST("h2dGenD_KpiOnly"), mcParticle.pt(), mcParticle.eta()); + histos.fill(HIST("hDGenForEfficiency"), mcParticle.pt(), mcParticle.y()); // in common for D and Dbar + } } for (auto const& mcParticle : trueDbar) { histos.fill(HIST("h2dGenDbar"), mcParticle.pt(), mcParticle.eta()); - histos.fill(HIST("hDGenForEfficiency"), mcParticle.pt(), mcParticle.y()); // in common for D and Dbar + auto daughters = mcParticle.template daughters_as(); + if (daughters.size() != 2) + continue; + int daugID[2], daugPDG[2], i = 0; + for (const auto& dau : daughters) { + daugID[i] = dau.globalIndex(); + daugPDG[i] = dau.pdgCode(); + i++; + } + if ((std::fabs(daugPDG[0]) == 321 && std::fabs(daugPDG[1]) == 211) || (std::fabs(daugPDG[0]) == 211 && std::fabs(daugPDG[1]) == 321)) { + histos.fill(HIST("h2dGenDbar_KpiOnly"), mcParticle.pt(), mcParticle.eta()); + histos.fill(HIST("hDGenForEfficiency"), mcParticle.pt(), mcParticle.y()); // in common for D and Dbar + } } } if (doprocessFindLcBaryons) { @@ -509,6 +536,7 @@ struct alice3decayFinder { // D0 mesons for (auto const& posTrackRow : tracksPiPlusFromDgrouped) { for (auto const& negTrackRow : tracksKaMinusFromDgrouped) { + if (mcSameMotherCheck && !checkSameMother(posTrackRow, negTrackRow)) continue; if (!buildDecayCandidateTwoBody(posTrackRow, negTrackRow, o2::constants::physics::MassPionCharged, o2::constants::physics::MassKaonCharged, mcParticles)) @@ -651,9 +679,11 @@ struct alice3decayFinder { mcTruthOutcome(dmeson.mcTruth); } } + // D0bar mesons for (auto const& posTrackRow : tracksKaPlusFromDgrouped) { for (auto const& negTrackRow : tracksPiMinusFromDgrouped) { + if (mcSameMotherCheck && !checkSameMother(posTrackRow, negTrackRow)) continue; if (!buildDecayCandidateTwoBody(posTrackRow, negTrackRow, o2::constants::physics::MassKaonCharged, o2::constants::physics::MassPionCharged, mcParticles)) From 2d6fd94e99f4fd5afad8a425c3d1309f9ffc6d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Sat, 7 Jun 2025 14:33:50 +0200 Subject: [PATCH 2/4] Update alice3-decayfinder.cxx --- ALICE3/TableProducer/alice3-decayfinder.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ALICE3/TableProducer/alice3-decayfinder.cxx b/ALICE3/TableProducer/alice3-decayfinder.cxx index 50488e33e48..b2aaaec7fc4 100644 --- a/ALICE3/TableProducer/alice3-decayfinder.cxx +++ b/ALICE3/TableProducer/alice3-decayfinder.cxx @@ -477,9 +477,10 @@ struct alice3decayFinder { auto daughters = mcParticle.template daughters_as(); if (daughters.size() != 2) continue; - int daugID[2], daugPDG[2], i = 0; + // int daugID[2]; + int daugPDG[2], i = 0; for (const auto& dau : daughters) { - daugID[i] = dau.globalIndex(); + // daugID[i] = dau.globalIndex(); daugPDG[i] = dau.pdgCode(); i++; } From 4a3c16b5317183ad97fea20f84af9ea671851cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Sat, 7 Jun 2025 14:37:05 +0200 Subject: [PATCH 3/4] Update alice3-decayfinder.cxx --- ALICE3/TableProducer/alice3-decayfinder.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALICE3/TableProducer/alice3-decayfinder.cxx b/ALICE3/TableProducer/alice3-decayfinder.cxx index b2aaaec7fc4..202757f379c 100644 --- a/ALICE3/TableProducer/alice3-decayfinder.cxx +++ b/ALICE3/TableProducer/alice3-decayfinder.cxx @@ -480,7 +480,7 @@ struct alice3decayFinder { // int daugID[2]; int daugPDG[2], i = 0; for (const auto& dau : daughters) { - // daugID[i] = dau.globalIndex(); + // daugID[i] = dau.globalIndex(); daugPDG[i] = dau.pdgCode(); i++; } From c714840e5e5437557c8687fae3dcbf743a79136f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Sat, 7 Jun 2025 20:59:40 +0200 Subject: [PATCH 4/4] Update alice3-decayfinder.cxx --- ALICE3/TableProducer/alice3-decayfinder.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ALICE3/TableProducer/alice3-decayfinder.cxx b/ALICE3/TableProducer/alice3-decayfinder.cxx index 202757f379c..2d12ea9ed14 100644 --- a/ALICE3/TableProducer/alice3-decayfinder.cxx +++ b/ALICE3/TableProducer/alice3-decayfinder.cxx @@ -494,9 +494,10 @@ struct alice3decayFinder { auto daughters = mcParticle.template daughters_as(); if (daughters.size() != 2) continue; - int daugID[2], daugPDG[2], i = 0; + // int daugID[2]; + int daugPDG[2], i = 0; for (const auto& dau : daughters) { - daugID[i] = dau.globalIndex(); + // daugID[i] = dau.globalIndex(); daugPDG[i] = dau.pdgCode(); i++; }