From 2732c8764fd4777c4a63637cd038a7e78dfafb4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?BiaoZhang=20=28=E5=BC=A0=E5=BD=AA=29?= <52267892+zhangbiao-phy@users.noreply.github.com> Date: Thu, 20 Nov 2025 16:00:17 +0100 Subject: [PATCH 1/5] Update derivedDataCreatorDplusToPiKPi.cxx --- PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx b/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx index 1458dfddcf1..8708edb7685 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx @@ -189,7 +189,7 @@ struct HfDerivedDataCreatorDplusToPiKPi { } if (fillCandidateSel) { rowCandidateSel( - BIT(candFlag)); + candFlag); } if (fillCandidateMl) { rowCandidateMl( @@ -289,7 +289,9 @@ struct HfDerivedDataCreatorDplusToPiKPi { if constexpr (IsMl) { std::copy(candidate.mlProbDplusToPiKPi().begin(), candidate.mlProbDplusToPiKPi().end(), std::back_inserter(mlScoresDplusToPiKPi)); } - fillTablesCandidate(candidate, 0, massDplusToPiKPi, ct, y, flagMcRec, origin, swapping, flagDecayChanRec, mlScoresDplusToPiKPi); + auto trackprong0 = candidate.template prong0_as(); + int const sign = trackprong0.sign(); + fillTablesCandidate(candidate, sign, massDplusToPiKPi, ct, y, flagMcRec, origin, swapping, flagDecayChanRec, mlScoresDplusToPiKPi); } } } From b641fe07320f959405c33eb41eb7c3fc6c345c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?BiaoZhang=20=28=E5=BC=A0=E5=BD=AA=29?= <52267892+zhangbiao-phy@users.noreply.github.com> Date: Thu, 20 Nov 2025 17:04:53 +0100 Subject: [PATCH 2/5] Update derivedDataCreatorDplusToPiKPi.cxx based on Vit's comment --- PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx b/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx index 8708edb7685..50bfe3ceb08 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx @@ -291,6 +291,12 @@ struct HfDerivedDataCreatorDplusToPiKPi { } auto trackprong0 = candidate.template prong0_as(); int const sign = trackprong0.sign(); + uint8_t candFlag = 0; + if (sign > 0) { + candFlag |= BIT(0); // D+ + } else if (sign < 0) { + candFlag |= BIT(1); // D- + } fillTablesCandidate(candidate, sign, massDplusToPiKPi, ct, y, flagMcRec, origin, swapping, flagDecayChanRec, mlScoresDplusToPiKPi); } } From d07ded14dc30b088dc5dc62b09ecf9f3b13fce60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?BiaoZhang=20=28=E5=BC=A0=E5=BD=AA=29?= <52267892+zhangbiao-phy@users.noreply.github.com> Date: Thu, 20 Nov 2025 17:08:28 +0100 Subject: [PATCH 3/5] Update derivedDataCreatorDplusToPiKPi.cxx based on Vit's comment --- PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx b/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx index 50bfe3ceb08..205ee4d69fe 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx @@ -129,7 +129,7 @@ struct HfDerivedDataCreatorDplusToPiKPi { } template - void fillTablesCandidate(const T& candidate, int candFlag, double invMass, + void fillTablesCandidate(const T& candidate, uint8_t candFlag, double invMass, double ct, double y, int8_t flagMc, int8_t origin, int8_t swapping, int8_t flagDecayChan, const std::vector& mlScores) { rowsCommon.fillTablesCandidate(candidate, invMass, y); From 003c2999becbc9891695a38c29cfc712cfeef7ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?BiaoZhang=20=28=E5=BC=A0=E5=BD=AA=29?= <52267892+zhangbiao-phy@users.noreply.github.com> Date: Thu, 20 Nov 2025 17:47:00 +0100 Subject: [PATCH 4/5] Update derivedDataCreatorDplusToPiKPi.cxx based on Vit's comment --- .../TableProducer/derivedDataCreatorDplusToPiKPi.cxx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx b/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx index 205ee4d69fe..b32196d8d3d 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx @@ -129,7 +129,7 @@ struct HfDerivedDataCreatorDplusToPiKPi { } template - void fillTablesCandidate(const T& candidate, uint8_t candFlag, double invMass, + void fillTablesCandidate(const T& candidate, int candFlag, double invMass, double ct, double y, int8_t flagMc, int8_t origin, int8_t swapping, int8_t flagDecayChan, const std::vector& mlScores) { rowsCommon.fillTablesCandidate(candidate, invMass, y); @@ -189,7 +189,7 @@ struct HfDerivedDataCreatorDplusToPiKPi { } if (fillCandidateSel) { rowCandidateSel( - candFlag); + BIT(candFlag)); } if (fillCandidateMl) { rowCandidateMl( @@ -290,13 +290,7 @@ struct HfDerivedDataCreatorDplusToPiKPi { std::copy(candidate.mlProbDplusToPiKPi().begin(), candidate.mlProbDplusToPiKPi().end(), std::back_inserter(mlScoresDplusToPiKPi)); } auto trackprong0 = candidate.template prong0_as(); - int const sign = trackprong0.sign(); - uint8_t candFlag = 0; - if (sign > 0) { - candFlag |= BIT(0); // D+ - } else if (sign < 0) { - candFlag |= BIT(1); // D- - } + int const candFlag = (trackprong0.sign() > 0) ? 0 : 1; // 0: D+, 1: D- fillTablesCandidate(candidate, sign, massDplusToPiKPi, ct, y, flagMcRec, origin, swapping, flagDecayChanRec, mlScoresDplusToPiKPi); } } From 820c06d5ea82808770a4b52161fe7bb6007a01bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?BiaoZhang=20=28=E5=BC=A0=E5=BD=AA=29?= <52267892+zhangbiao-phy@users.noreply.github.com> Date: Thu, 20 Nov 2025 17:59:16 +0100 Subject: [PATCH 5/5] Update derivedDataCreatorDplusToPiKPi.cxx --- PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx b/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx index b32196d8d3d..ce15964cade 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDplusToPiKPi.cxx @@ -291,7 +291,7 @@ struct HfDerivedDataCreatorDplusToPiKPi { } auto trackprong0 = candidate.template prong0_as(); int const candFlag = (trackprong0.sign() > 0) ? 0 : 1; // 0: D+, 1: D- - fillTablesCandidate(candidate, sign, massDplusToPiKPi, ct, y, flagMcRec, origin, swapping, flagDecayChanRec, mlScoresDplusToPiKPi); + fillTablesCandidate(candidate, candFlag, massDplusToPiKPi, ct, y, flagMcRec, origin, swapping, flagDecayChanRec, mlScoresDplusToPiKPi); } } }