From 1e0b934c2cc7513d6cd5f6ed770d91369d6ecb92 Mon Sep 17 00:00:00 2001 From: Jinhyun Park Date: Thu, 30 Apr 2026 21:53:27 +0900 Subject: [PATCH 1/6] [xic0omegac0] Updated candidate creator & candidate selector --- .../candidateCreatorXic0Omegac0Qa.cxx | 16 +++++----------- .../TableProducer/candidateSelectorToXiPiQa.cxx | 3 --- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx b/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx index 20b4fcaf307..2e811672c1b 100644 --- a/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx +++ b/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx @@ -512,12 +512,6 @@ struct HfCandidateCreatorXic0Omegac0Qa { } // end of initialization - //////////////////////////////////////////////////////////// - // // - // Candidate reconstruction with DCAFitter // - // // - //////////////////////////////////////////////////////////// - // template function for running charm baryon reconstruction with DCAFitter /// \brief centEstimator is for different centrality estimators /// \brief decayChannel is for different decay channels. 0 for XiczeroOmegaczeroToXiPi, 1 for OmegaczeroToOmegaPi, 2 for OmegaczeroToOmeagaK @@ -962,10 +956,10 @@ struct HfCandidateCreatorXic0Omegac0Qa { bool isAnti = (bachTrack.signed1Pt() > 0 ? true : false); - KFParticle kfPos(kfTrack0, (isAnti ? pdgIdOfAntiV0DauPos : pdgIdOfV0DauPos)); - KFParticle kfNeg(kfTrack1, (isAnti ? pdgIdOfAntiV0DauNeg : pdgIdOfV0DauNeg)); - KFParticle kfBach(kfTrackBach, (isAnti ? pdgIdOfAntiBach : pdgIdOfBach)); - KFParticle kfBachRej(kfTrackBach, (isAnti ? pdgIdOfAntiBach : pdgIdOfBach)); // Rej -> Used for Omegac0->OmegaPi only + KFParticle kfPos(kfTrack0, (isAnti ? -pdgIdOfV0DauNeg : pdgIdOfV0DauPos)); + KFParticle kfNeg(kfTrack1, (isAnti ? -pdgIdOfV0DauPos : pdgIdOfV0DauNeg)); + KFParticle kfBach(kfTrackBach, (isAnti ? -pdgIdOfBach : pdgIdOfBach)); + KFParticle kfBachRej(kfTrackBach, (isAnti ? -pdgIdOfBach : pdgIdOfBach)); // Rej -> Used for Omegac0->OmegaPi only // ~~~~~~~Construct V0 with KF~~~~~~~ const KFParticle* v0Daughters[2] = {&kfPos, &kfNeg}; @@ -1049,7 +1043,7 @@ struct HfCandidateCreatorXic0Omegac0Qa { //~~~~~~~Construct Charm Baryon with KF~~~~~~~ auto trackCharmBachelor = tracks.rawIteratorAt(cand.prong0Id()); const KFPTrack kfTrackCharmBach = createKFPTrackFromTrack(trackCharmBachelor); - const KFParticle kfCharmBach(kfTrackCharmBach, (isAnti ? pdgIdOfAntiCharmBach : pdgIdOfCharmBach)); + const KFParticle kfCharmBach(kfTrackCharmBach, (isAnti ? -pdgIdOfCharmBach : pdgIdOfCharmBach)); const KFParticle* charmBaryonDaughters[2] = {&kfCharmBach, &kfCasc}; KFParticle kfCharmBaryon; diff --git a/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx b/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx index b6b40705557..3232d2ec120 100644 --- a/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx +++ b/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx @@ -710,9 +710,6 @@ struct HfCandidateSelectorToXiPiQa { inputFeaturesXic0 = hfMlResponseKf.getInputFeatures(candidate, trackPiFromLam, trackPiFromCasc, trackPiFromCharm); isSelectedMlXic0 = hfMlResponseKf.isSelectedMl(inputFeaturesXic0, ptCandXic0, outputMlXic0ToXiPi); } - if (!isSelectedMlXic0) { - continue; - } hfMlToXiPi(outputMlXic0ToXiPi); } From f23a53e9a82507af52e739b3f0b26ffe7f25bcaa Mon Sep 17 00:00:00 2001 From: Jinhyun Park Date: Thu, 30 Apr 2026 21:55:54 +0900 Subject: [PATCH 2/6] [xic0omegac0] Removed unused configurables --- .../candidateCreatorXic0Omegac0Qa.cxx | 25 ++----------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx b/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx index 2e811672c1b..c78d09c79fb 100644 --- a/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx +++ b/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx @@ -259,15 +259,14 @@ struct HfCandidateCreatorXic0Omegac0Qa { // PDG Id of daughter tracks & V0s & cascades & charm baryons - Used in KFParticle int pdgIdOfV0DauPos, pdgIdOfV0DauNeg, pdgIdOfBach, pdgIdOfCharmBach; - int pdgIdOfAntiV0DauPos, pdgIdOfAntiV0DauNeg, pdgIdOfAntiBach, pdgIdOfAntiCharmBach; int pdgIdOfV0, pdgIdOfCascade, pdgIdOfCharmBaryon; // Track PID - Used in DCAFitter int trackPidOfCascade; // Mass of daughter tracks & V0s & cascades & charm baryons; - float massOfV0DauPos, massOfV0DauNeg, massOfBach, massOfCharmBach; - float massOfV0, massOfCascade, massOfCharmBaryon; + float massOfV0DauPos, massOfV0DauNeg, massOfCharmBach; + float massOfV0, massOfCascade; // Pointer of histograms for QA std::shared_ptr hInvMassCharmBaryonToXiPi, hInvMassCharmBaryonToOmegaPi, hInvMassCharmBaryonToOmegaKa; @@ -317,11 +316,6 @@ struct HfCandidateCreatorXic0Omegac0Qa { pdgIdOfBach = kPiMinus; pdgIdOfCharmBach = kPiPlus; - pdgIdOfAntiV0DauPos = kPiPlus; - pdgIdOfAntiV0DauNeg = kProton; - pdgIdOfAntiBach = kPiPlus; - pdgIdOfAntiCharmBach = kPiMinus; - pdgIdOfV0 = kLambda0; pdgIdOfCascade = kXiMinus; pdgIdOfCharmBaryon = kXiC0; @@ -339,11 +333,6 @@ struct HfCandidateCreatorXic0Omegac0Qa { pdgIdOfBach = kKMinus; pdgIdOfCharmBach = kPiPlus; - pdgIdOfAntiV0DauPos = kPiPlus; - pdgIdOfAntiV0DauNeg = kProton; - pdgIdOfAntiBach = kKPlus; - pdgIdOfAntiCharmBach = kPiMinus; - pdgIdOfV0 = kLambda0; pdgIdOfCascade = kOmegaMinus; pdgIdOfCharmBaryon = kOmegaC0; @@ -361,11 +350,6 @@ struct HfCandidateCreatorXic0Omegac0Qa { pdgIdOfBach = kKMinus; pdgIdOfCharmBach = kKPlus; - pdgIdOfAntiV0DauPos = kPiPlus; - pdgIdOfAntiV0DauNeg = kProton; - pdgIdOfAntiBach = kKPlus; - pdgIdOfAntiCharmBach = kKMinus; - pdgIdOfV0 = kLambda0; pdgIdOfCascade = kOmegaMinus; pdgIdOfCharmBaryon = kOmegaC0; @@ -384,11 +368,6 @@ struct HfCandidateCreatorXic0Omegac0Qa { LOGF(info, "PDG ID of Bachelor: %d", pdgIdOfBach); LOGF(info, "PDG ID of Charm Bachelor: %d", pdgIdOfCharmBach); LOGF(info, "-------------------------------------------"); - LOGF(info, "PDG ID of anti V0 positive daughter: %d", pdgIdOfAntiV0DauPos); - LOGF(info, "PDG ID of anti V0 negative daughter: %d", pdgIdOfAntiV0DauNeg); - LOGF(info, "PDG ID of anti Bachelor: %d", pdgIdOfAntiBach); - LOGF(info, "PDG ID of anti Charm Bachelor: %d", pdgIdOfAntiCharmBach); - LOGF(info, "-------------------------------------------"); LOGF(info, "PDG ID of V0: %d", pdgIdOfV0); LOGF(info, "PDG ID of Cascade: %d", pdgIdOfCascade); LOGF(info, "PDG ID of Charm Baryon: %d", pdgIdOfCharmBaryon); From b7d4dcdeaf7f5dc531082c7fb1f73b17ae8b50a5 Mon Sep 17 00:00:00 2001 From: Jinhyun Park Date: Thu, 30 Apr 2026 23:03:13 +0900 Subject: [PATCH 3/6] Added initiliazation to variables --- PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx b/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx index c78d09c79fb..f531919ebd9 100644 --- a/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx +++ b/PWGHF/TableProducer/candidateCreatorXic0Omegac0Qa.cxx @@ -258,15 +258,15 @@ struct HfCandidateCreatorXic0Omegac0Qa { HfEventSelection hfEvSel; // PDG Id of daughter tracks & V0s & cascades & charm baryons - Used in KFParticle - int pdgIdOfV0DauPos, pdgIdOfV0DauNeg, pdgIdOfBach, pdgIdOfCharmBach; - int pdgIdOfV0, pdgIdOfCascade, pdgIdOfCharmBaryon; + int pdgIdOfV0DauPos{}, pdgIdOfV0DauNeg{}, pdgIdOfBach{}, pdgIdOfCharmBach{}; + int pdgIdOfV0{}, pdgIdOfCascade{}, pdgIdOfCharmBaryon{}; // Track PID - Used in DCAFitter - int trackPidOfCascade; + int trackPidOfCascade{}; // Mass of daughter tracks & V0s & cascades & charm baryons; - float massOfV0DauPos, massOfV0DauNeg, massOfCharmBach; - float massOfV0, massOfCascade; + float massOfV0DauPos{}, massOfV0DauNeg{}, massOfCharmBach{}; + float massOfV0{}, massOfCascade{}; // Pointer of histograms for QA std::shared_ptr hInvMassCharmBaryonToXiPi, hInvMassCharmBaryonToOmegaPi, hInvMassCharmBaryonToOmegaKa; From 15c144c344be07e7980fb08d59f10e1b5bb5390b Mon Sep 17 00:00:00 2001 From: Jinhyun Park Date: Thu, 30 Apr 2026 23:37:12 +0900 Subject: [PATCH 4/6] Re-aranged selection step --- .../candidateSelectorToXiPiQa.cxx | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx b/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx index 3232d2ec120..14b106a41c4 100644 --- a/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx +++ b/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx @@ -699,20 +699,6 @@ struct HfCandidateSelectorToXiPiQa { statusInvMassCharmBaryon = true; } - // ML BDT selection - if (applyMl) { - bool isSelectedMlXic0 = false; - std::vector inputFeaturesXic0 = {}; - if constexpr (svReco == doDcaFitter) { - inputFeaturesXic0 = hfMlResponseDca.getInputFeatures(candidate, trackPiFromLam, trackPiFromCasc, trackPiFromCharm); - isSelectedMlXic0 = hfMlResponseDca.isSelectedMl(inputFeaturesXic0, ptCandXic0, outputMlXic0ToXiPi); - } else { - inputFeaturesXic0 = hfMlResponseKf.getInputFeatures(candidate, trackPiFromLam, trackPiFromCasc, trackPiFromCharm); - isSelectedMlXic0 = hfMlResponseKf.isSelectedMl(inputFeaturesXic0, ptCandXic0, outputMlXic0ToXiPi); - } - hfMlToXiPi(outputMlXic0ToXiPi); - } - // Fill in selection result if constexpr (svReco == doDcaFitter) { hfSelToXiPi(statusPidLambda, statusPidCascade, statusPidCharmBaryon, statusInvMassLambda, statusInvMassCascade, statusInvMassCharmBaryon, resultSelections, infoTpcStored, infoTofStored, @@ -729,6 +715,25 @@ struct HfCandidateSelectorToXiPiQa { trackPiFromCharm.tofNSigmaPi(), trackPiFromCasc.tofNSigmaPi(), trackPiFromLam.tofNSigmaPi(), trackPrFromLam.tofNSigmaPr()); } + // ML BDT selection if required + if (applyMl) { + bool isSelectedMlXic0 = false; + std::vector inputFeaturesXic0 = {}; + if constexpr (svReco == doDcaFitter) { + inputFeaturesXic0 = hfMlResponseDca.getInputFeatures(candidate, trackPiFromLam, trackPiFromCasc, trackPiFromCharm); + isSelectedMlXic0 = hfMlResponseDca.isSelectedMl(inputFeaturesXic0, ptCandXic0, outputMlXic0ToXiPi); + } else { + inputFeaturesXic0 = hfMlResponseKf.getInputFeatures(candidate, trackPiFromLam, trackPiFromCasc, trackPiFromCharm); + isSelectedMlXic0 = hfMlResponseKf.isSelectedMl(inputFeaturesXic0, ptCandXic0, outputMlXic0ToXiPi); + } + + hfMlToXiPi(outputMlXic0ToXiPi); + + if (!isSelectedMlXic0) { + continue; + } + } + // Fill in invariant mass histogram if (resultSelections) { registry.fill(HIST("hInvMassCharmBaryonWoPidInvMassCut"), invMassCharmBaryon); From 5d0a4f7f41883251f7f09aef3466753c2d12afd2 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 30 Apr 2026 14:39:46 +0000 Subject: [PATCH 5/6] Please consider the following formatting changes --- PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx b/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx index 14b106a41c4..2282903ca06 100644 --- a/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx +++ b/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx @@ -730,7 +730,7 @@ struct HfCandidateSelectorToXiPiQa { hfMlToXiPi(outputMlXic0ToXiPi); if (!isSelectedMlXic0) { - continue; + continue; } } From c16043f88537024bf2e1d02812971e4ba228a4bb Mon Sep 17 00:00:00 2001 From: Jinhyun Park Date: Fri, 1 May 2026 21:13:42 +0900 Subject: [PATCH 6/6] Fixed linter issues --- PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx b/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx index 2282903ca06..8845d78ee70 100644 --- a/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx +++ b/PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx @@ -295,7 +295,7 @@ struct HfCandidateSelectorToXiPiQa { // Selection on LF related informations // returns true if all cuts are passed template - bool SelectOnLF(const T& candidate, const int& inputPtBin) + bool selectOnLf(const T& candidate, const int& inputPtBin) { registry.fill(HIST("hSelStatusLf"), 0.0); @@ -442,7 +442,7 @@ struct HfCandidateSelectorToXiPiQa { // Apply cuts with charm baryon & charm bachelor related informations // returns true if all cuts are passed template - bool SelectOnHF(const T& candidate, const int& inputPtBin) + bool selectOnHf(const T& candidate, const int& inputPtBin) { registry.fill(HIST("hSelStatusHf"), 0.0); @@ -561,8 +561,8 @@ struct HfCandidateSelectorToXiPiQa { } // Topological selection - const bool selectionResOnLF = SelectOnLF(candidate, pTBin); - const bool selectionResOnHF = SelectOnHF(candidate, pTBin); + const bool selectionResOnLF = selectOnLf(candidate, pTBin); + const bool selectionResOnHF = selectOnHf(candidate, pTBin); if (!selectionResOnLF || !selectionResOnHF) { resultSelections = false; }