From 4d4d2ac7a9c1d010fca95179c578333bd6b9a88f Mon Sep 17 00:00:00 2001 From: Mattia Faggin Date: Wed, 5 Nov 2025 07:49:33 +0000 Subject: [PATCH 1/7] Replace legacy decay channels for SigmaC. --- PWGHF/Core/DecayChannels.h | 16 ++++++++++++++++ PWGHF/D2H/Tasks/taskSigmac.cxx | 17 ++++++++--------- .../candidateCreatorSigmac0plusplus.cxx | 17 ++++++++--------- 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/PWGHF/Core/DecayChannels.h b/PWGHF/Core/DecayChannels.h index be813668ec6..8c262639d94 100644 --- a/PWGHF/Core/DecayChannels.h +++ b/PWGHF/Core/DecayChannels.h @@ -259,6 +259,22 @@ enum DecayChannelMain : HfDecayChannel { NChannelsMain = DstarToD0Pi // last channel }; } // namespace hf_cand_reso + +/// @brief Sigmac candidates: main channels +namespace hf_cand_sigmac +{ +enum DecayChannelMain : HfDecayChannel { + // Σc0(2455) → Λc+ π- → p K- π+ π- + Sc0ToPKPiPi = 0, + // Σc++(2455) → Λc+ π+ → p K- π+ π+ + ScplusplusToPKPiPi, + // Σc0(2520) → Λc+ π- → p K- π+ π- + ScStar0ToPKPiPi, + // Σc++(2520) → Λc+ π+ → p K- π+ π+ + ScStarPlusPlusToPKPiPi +}; +} // namespace hf_cand_sigmac + } // namespace o2::hf_decay #endif // PWGHF_CORE_DECAYCHANNELS_H_ diff --git a/PWGHF/D2H/Tasks/taskSigmac.cxx b/PWGHF/D2H/Tasks/taskSigmac.cxx index 1bca721c338..e57a1238226 100644 --- a/PWGHF/D2H/Tasks/taskSigmac.cxx +++ b/PWGHF/D2H/Tasks/taskSigmac.cxx @@ -16,7 +16,6 @@ /// \author Mattia Faggin , University and INFN PADOVA #include "PWGHF/Core/DecayChannels.h" -#include "PWGHF/Core/DecayChannelsLegacy.h" #include "PWGHF/Core/HfHelper.h" #include "PWGHF/D2H/Utils/utilsSigmac.h" #include "PWGHF/DataModel/AliasTables.h" @@ -603,10 +602,10 @@ struct HfTaskSigmac { for (const auto& particle : mcParticlesSc) { /// reject immediately particles different from Σc0,++ - bool const isSc0Gen = (std::abs(particle.flagMcMatchGen()) == BIT(aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi)); - bool const isScStar0Gen = (std::abs(particle.flagMcMatchGen()) == BIT(aod::hf_cand_sigmac::DecayType::ScStar0ToPKPiPi)); - bool const isScPlusPlusGen = (std::abs(particle.flagMcMatchGen()) == BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi)); - bool const isScStarPlusPlusGen = (std::abs(particle.flagMcMatchGen()) == BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi)); + bool const isSc0Gen = (std::abs(particle.flagMcMatchGen()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi)); + bool const isScStar0Gen = (std::abs(particle.flagMcMatchGen()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi)); + bool const isScPlusPlusGen = (std::abs(particle.flagMcMatchGen()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi)); + bool const isScStarPlusPlusGen = (std::abs(particle.flagMcMatchGen()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi)); if (!isSc0Gen && !isScPlusPlusGen && !isScStar0Gen && !isScStarPlusPlusGen) { continue; } @@ -799,10 +798,10 @@ struct HfTaskSigmac { // candidateLc.flagMcDecayChanRec(); - bool const isTrueSc0Reco = std::abs(candSc.flagMcMatchRec()) == BIT(aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi); - bool const isTrueScStar0Reco = std::abs(candSc.flagMcMatchRec()) == BIT(aod::hf_cand_sigmac::DecayType::ScStar0ToPKPiPi); - bool const isTrueScPlusPlusReco = std::abs(candSc.flagMcMatchRec()) == BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi); - bool const isTrueScStarPlusPlusReco = std::abs(candSc.flagMcMatchRec()) == BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi); + bool const isTrueSc0Reco = std::abs(candSc.flagMcMatchRec()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi); + bool const isTrueScStar0Reco = std::abs(candSc.flagMcMatchRec()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi); + bool const isTrueScPlusPlusReco = std::abs(candSc.flagMcMatchRec()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi); + bool const isTrueScStarPlusPlusReco = std::abs(candSc.flagMcMatchRec()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi); int sigmacSpecies = -1; if ((isTrueSc0Reco || isTrueScStar0Reco) && (chargeSc == o2::aod::hf_cand_sigmac::ChargeNull)) { /// Reconstructed Σc0 signal diff --git a/PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx b/PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx index 6b3838f8dc3..cc5fb5db6d0 100644 --- a/PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx +++ b/PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx @@ -17,7 +17,6 @@ #include "PWGHF/Core/CentralityEstimation.h" #include "PWGHF/Core/DecayChannels.h" -#include "PWGHF/Core/DecayChannelsLegacy.h" #include "PWGHF/Core/HfHelper.h" #include "PWGHF/Core/SelectorCuts.h" #include "PWGHF/DataModel/AliasTables.h" @@ -519,7 +518,7 @@ struct HfCandidateSigmac0plusplusMc { /// look for Σc0(2455) indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kSigmaC0, std::array{+kProton, -kKPlus, +kPiPlus, -kPiPlus}, true, &sign, 3); if (indexRec > -1) { /// due to (*) no need to check anything for LambdaC - flag = sign * BIT(aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi); + flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi); } auto particle = mcParticles.rawIteratorAt(indexRec); particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaC0); @@ -528,7 +527,7 @@ struct HfCandidateSigmac0plusplusMc { if (flag == 0) { indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kSigmaCStar0, std::array{+kProton, -kKPlus, +kPiPlus, -kPiPlus}, true, &sign, 3); if (indexRec > -1) { /// due to (*) no need to check anything for LambdaC - flag = sign * BIT(aod::hf_cand_sigmac::DecayType::ScStar0ToPKPiPi); + flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi); } if (particleAntiparticle < 0) { auto particle = mcParticles.rawIteratorAt(indexRec); @@ -546,7 +545,7 @@ struct HfCandidateSigmac0plusplusMc { /// look for Σc++(2455) indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kSigmaCPlusPlus, std::array{+kProton, -kKPlus, +kPiPlus, +kPiPlus}, true, &sign, 3); if (indexRec > -1) { /// due to (*) no need to check anything for LambdaC - flag = sign * BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi); + flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi); } auto particle = mcParticles.rawIteratorAt(indexRec); particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaCPlusPlus); @@ -555,7 +554,7 @@ struct HfCandidateSigmac0plusplusMc { if (flag == 0) { indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kSigmaCStarPlusPlus, std::array{+kProton, -kKPlus, +kPiPlus, +kPiPlus}, true, &sign, 3); if (indexRec > -1) { /// due to (*) no need to check anything for LambdaC - flag = sign * BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi); + flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi); } if (particleAntiparticle < 0) { auto particle = mcParticles.rawIteratorAt(indexRec); @@ -614,7 +613,7 @@ struct HfCandidateSigmac0plusplusMc { } if (std::abs(daughter.flagMcMatchGen()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) { /// Λc+ daughter decaying in pK-π+ found! - flag = sign * BIT(aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi); + flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi); particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaC0); break; } @@ -628,7 +627,7 @@ struct HfCandidateSigmac0plusplusMc { } if (std::abs(daughter.flagMcMatchGen()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) { /// Λc+ daughter decaying in pK-π+ found! - flag = sign * BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi); + flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi); particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaCPlusPlus); break; } @@ -646,7 +645,7 @@ struct HfCandidateSigmac0plusplusMc { } if (std::abs(daughter.flagMcMatchGen()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) { /// Λc+ daughter decaying in pK-π+ found! - flag = sign * BIT(aod::hf_cand_sigmac::DecayType::ScStar0ToPKPiPi); + flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi); particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaCStar0); break; } @@ -660,7 +659,7 @@ struct HfCandidateSigmac0plusplusMc { } if (std::abs(daughter.flagMcMatchGen()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) { /// Λc+ daughter decaying in pK-π+ found! - flag = sign * BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi); + flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi); particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaCStarPlusPlus); break; } From bed5f9dff2287639e99789ddc55e91d276801bdb Mon Sep 17 00:00:00 2001 From: Mattia Faggin Date: Wed, 5 Nov 2025 08:01:03 +0000 Subject: [PATCH 2/7] Fix spaces in comments. --- PWGHF/Core/DecayChannels.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGHF/Core/DecayChannels.h b/PWGHF/Core/DecayChannels.h index 8c262639d94..6297525212c 100644 --- a/PWGHF/Core/DecayChannels.h +++ b/PWGHF/Core/DecayChannels.h @@ -264,13 +264,13 @@ enum DecayChannelMain : HfDecayChannel { namespace hf_cand_sigmac { enum DecayChannelMain : HfDecayChannel { - // Σc0(2455) → Λc+ π- → p K- π+ π- + // Σc0(2455) → Λc+ π- → p K- π+ π- Sc0ToPKPiPi = 0, - // Σc++(2455) → Λc+ π+ → p K- π+ π+ + // Σc++(2455) → Λc+ π+ → p K- π+ π+ ScplusplusToPKPiPi, - // Σc0(2520) → Λc+ π- → p K- π+ π- + // Σc0(2520) → Λc+ π- → p K- π+ π- ScStar0ToPKPiPi, - // Σc++(2520) → Λc+ π+ → p K- π+ π+ + // Σc++(2520) → Λc+ π+ → p K- π+ π+ ScStarPlusPlusToPKPiPi }; } // namespace hf_cand_sigmac From f26f8b8498d407f3808bd4c4eb85a291716b3f11 Mon Sep 17 00:00:00 2001 From: Mattia Faggin Date: Mon, 10 Nov 2025 20:09:18 +0000 Subject: [PATCH 3/7] Add values, remove BIT and remove legacy channels. --- PWGHF/Core/DecayChannels.h | 9 +++++---- PWGHF/Core/DecayChannelsLegacy.h | 10 ---------- PWGHF/D2H/Tasks/taskSigmac.cxx | 16 ++++++++-------- .../candidateCreatorSigmac0plusplus.cxx | 16 ++++++++-------- 4 files changed, 21 insertions(+), 30 deletions(-) diff --git a/PWGHF/Core/DecayChannels.h b/PWGHF/Core/DecayChannels.h index 6297525212c..929079b9b9f 100644 --- a/PWGHF/Core/DecayChannels.h +++ b/PWGHF/Core/DecayChannels.h @@ -265,13 +265,14 @@ namespace hf_cand_sigmac { enum DecayChannelMain : HfDecayChannel { // Σc0(2455) → Λc+ π- → p K- π+ π- - Sc0ToPKPiPi = 0, + Sc0ToPKPiPi = 1, // Σc++(2455) → Λc+ π+ → p K- π+ π+ - ScplusplusToPKPiPi, + ScplusplusToPKPiPi = 2, // Σc0(2520) → Λc+ π- → p K- π+ π- - ScStar0ToPKPiPi, + ScStar0ToPKPiPi = 3, // Σc++(2520) → Λc+ π+ → p K- π+ π+ - ScStarPlusPlusToPKPiPi + ScStarPlusPlusToPKPiPi = 4, + NChannelsMain = ScStarPlusPlusToPKPiPi // last channel }; } // namespace hf_cand_sigmac diff --git a/PWGHF/Core/DecayChannelsLegacy.h b/PWGHF/Core/DecayChannelsLegacy.h index 0dd3c8f0188..675417d975b 100644 --- a/PWGHF/Core/DecayChannelsLegacy.h +++ b/PWGHF/Core/DecayChannelsLegacy.h @@ -50,16 +50,6 @@ enum DecayType { }; } // namespace hf_cand_dstar -namespace hf_cand_sigmac -{ -enum DecayType { - Sc0ToPKPiPi = 0, - ScplusplusToPKPiPi, - ScStar0ToPKPiPi, - ScStarPlusPlusToPKPiPi -}; -} // namespace hf_cand_sigmac - namespace hf_cand_b0 { enum DecayType { diff --git a/PWGHF/D2H/Tasks/taskSigmac.cxx b/PWGHF/D2H/Tasks/taskSigmac.cxx index e57a1238226..b4f6c7d2e60 100644 --- a/PWGHF/D2H/Tasks/taskSigmac.cxx +++ b/PWGHF/D2H/Tasks/taskSigmac.cxx @@ -602,10 +602,10 @@ struct HfTaskSigmac { for (const auto& particle : mcParticlesSc) { /// reject immediately particles different from Σc0,++ - bool const isSc0Gen = (std::abs(particle.flagMcMatchGen()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi)); - bool const isScStar0Gen = (std::abs(particle.flagMcMatchGen()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi)); - bool const isScPlusPlusGen = (std::abs(particle.flagMcMatchGen()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi)); - bool const isScStarPlusPlusGen = (std::abs(particle.flagMcMatchGen()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi)); + bool const isSc0Gen = (std::abs(particle.flagMcMatchGen()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi); + bool const isScStar0Gen = (std::abs(particle.flagMcMatchGen()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi); + bool const isScPlusPlusGen = (std::abs(particle.flagMcMatchGen()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi); + bool const isScStarPlusPlusGen = (std::abs(particle.flagMcMatchGen()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi); if (!isSc0Gen && !isScPlusPlusGen && !isScStar0Gen && !isScStarPlusPlusGen) { continue; } @@ -798,10 +798,10 @@ struct HfTaskSigmac { // candidateLc.flagMcDecayChanRec(); - bool const isTrueSc0Reco = std::abs(candSc.flagMcMatchRec()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi); - bool const isTrueScStar0Reco = std::abs(candSc.flagMcMatchRec()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi); - bool const isTrueScPlusPlusReco = std::abs(candSc.flagMcMatchRec()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi); - bool const isTrueScStarPlusPlusReco = std::abs(candSc.flagMcMatchRec()) == BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi); + bool const isTrueSc0Reco = std::abs(candSc.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi; + bool const isTrueScStar0Reco = std::abs(candSc.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi; + bool const isTrueScPlusPlusReco = std::abs(candSc.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi; + bool const isTrueScStarPlusPlusReco = std::abs(candSc.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi; int sigmacSpecies = -1; if ((isTrueSc0Reco || isTrueScStar0Reco) && (chargeSc == o2::aod::hf_cand_sigmac::ChargeNull)) { /// Reconstructed Σc0 signal diff --git a/PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx b/PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx index cc5fb5db6d0..9423e15931a 100644 --- a/PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx +++ b/PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx @@ -518,7 +518,7 @@ struct HfCandidateSigmac0plusplusMc { /// look for Σc0(2455) indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kSigmaC0, std::array{+kProton, -kKPlus, +kPiPlus, -kPiPlus}, true, &sign, 3); if (indexRec > -1) { /// due to (*) no need to check anything for LambdaC - flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi); + flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi; } auto particle = mcParticles.rawIteratorAt(indexRec); particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaC0); @@ -527,7 +527,7 @@ struct HfCandidateSigmac0plusplusMc { if (flag == 0) { indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kSigmaCStar0, std::array{+kProton, -kKPlus, +kPiPlus, -kPiPlus}, true, &sign, 3); if (indexRec > -1) { /// due to (*) no need to check anything for LambdaC - flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi); + flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi; } if (particleAntiparticle < 0) { auto particle = mcParticles.rawIteratorAt(indexRec); @@ -545,7 +545,7 @@ struct HfCandidateSigmac0plusplusMc { /// look for Σc++(2455) indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kSigmaCPlusPlus, std::array{+kProton, -kKPlus, +kPiPlus, +kPiPlus}, true, &sign, 3); if (indexRec > -1) { /// due to (*) no need to check anything for LambdaC - flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi); + flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi; } auto particle = mcParticles.rawIteratorAt(indexRec); particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaCPlusPlus); @@ -554,7 +554,7 @@ struct HfCandidateSigmac0plusplusMc { if (flag == 0) { indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kSigmaCStarPlusPlus, std::array{+kProton, -kKPlus, +kPiPlus, +kPiPlus}, true, &sign, 3); if (indexRec > -1) { /// due to (*) no need to check anything for LambdaC - flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi); + flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi; } if (particleAntiparticle < 0) { auto particle = mcParticles.rawIteratorAt(indexRec); @@ -613,7 +613,7 @@ struct HfCandidateSigmac0plusplusMc { } if (std::abs(daughter.flagMcMatchGen()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) { /// Λc+ daughter decaying in pK-π+ found! - flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi); + flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi; particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaC0); break; } @@ -627,7 +627,7 @@ struct HfCandidateSigmac0plusplusMc { } if (std::abs(daughter.flagMcMatchGen()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) { /// Λc+ daughter decaying in pK-π+ found! - flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi); + flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi; particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaCPlusPlus); break; } @@ -645,7 +645,7 @@ struct HfCandidateSigmac0plusplusMc { } if (std::abs(daughter.flagMcMatchGen()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) { /// Λc+ daughter decaying in pK-π+ found! - flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi); + flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi; particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaCStar0); break; } @@ -659,7 +659,7 @@ struct HfCandidateSigmac0plusplusMc { } if (std::abs(daughter.flagMcMatchGen()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) { /// Λc+ daughter decaying in pK-π+ found! - flag = sign * BIT(o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi); + flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi; particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaCStarPlusPlus); break; } From d4c920ef4408fa433cdac837d906a4edee70a717 Mon Sep 17 00:00:00 2001 From: Mattia Faggin Date: Mon, 10 Nov 2025 20:55:33 +0000 Subject: [PATCH 4/7] Fix tree creator. --- PWGHF/TableProducer/treeCreatorSigmacCorrBkg.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorSigmacCorrBkg.cxx b/PWGHF/TableProducer/treeCreatorSigmacCorrBkg.cxx index eea4074d3a1..10bae7efabf 100644 --- a/PWGHF/TableProducer/treeCreatorSigmacCorrBkg.cxx +++ b/PWGHF/TableProducer/treeCreatorSigmacCorrBkg.cxx @@ -17,7 +17,6 @@ /// \author Mattia Faggin , INFN PADOVA #include "PWGHF/Core/DecayChannels.h" -#include "PWGHF/Core/DecayChannelsLegacy.h" #include "PWGHF/Core/HfHelper.h" #include "PWGHF/D2H/Utils/utilsSigmac.h" #include "PWGHF/DataModel/AliasTables.h" @@ -148,10 +147,10 @@ struct HfTreeCreatorSigmacCorrBkg { /// tag immediately the Σc0,++(2455) and Σc0,++(2520) signal auto flagMcDecayChanScAbs = std::abs(candidateSc.flagMcMatchRec()); - bool const isTrueSigmac0 = (flagMcDecayChanScAbs == BIT(aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi)); - bool const isTrueSigmacPlusPlus = (flagMcDecayChanScAbs == BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi)); - bool const isTrueSigmacStar0 = (flagMcDecayChanScAbs == BIT(aod::hf_cand_sigmac::DecayType::ScStar0ToPKPiPi)); - bool const isTrueSigmacStarPlusPlus = (flagMcDecayChanScAbs == BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi)); + bool const isTrueSigmac0 = (flagMcDecayChanScAbs == aod::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi); + bool const isTrueSigmacPlusPlus = (flagMcDecayChanScAbs == aod::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi); + bool const isTrueSigmacStar0 = (flagMcDecayChanScAbs == aod::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi); + bool const isTrueSigmacStarPlusPlus = (flagMcDecayChanScAbs == aod::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi); if (isTrueSigmac0) { /// fill the output for the signal fillTable(candidateSc, candLcDauSc, o2::constants::physics::Pdg::kSigmaC0); From b67eb571b7f86d6704ad67c1c204090c23db4a0d Mon Sep 17 00:00:00 2001 From: Mattia Faggin Date: Mon, 10 Nov 2025 21:11:12 +0000 Subject: [PATCH 5/7] Fix namespace. --- PWGHF/TableProducer/treeCreatorSigmacCorrBkg.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorSigmacCorrBkg.cxx b/PWGHF/TableProducer/treeCreatorSigmacCorrBkg.cxx index 10bae7efabf..212d6e597a6 100644 --- a/PWGHF/TableProducer/treeCreatorSigmacCorrBkg.cxx +++ b/PWGHF/TableProducer/treeCreatorSigmacCorrBkg.cxx @@ -147,10 +147,10 @@ struct HfTreeCreatorSigmacCorrBkg { /// tag immediately the Σc0,++(2455) and Σc0,++(2520) signal auto flagMcDecayChanScAbs = std::abs(candidateSc.flagMcMatchRec()); - bool const isTrueSigmac0 = (flagMcDecayChanScAbs == aod::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi); - bool const isTrueSigmacPlusPlus = (flagMcDecayChanScAbs == aod::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi); - bool const isTrueSigmacStar0 = (flagMcDecayChanScAbs == aod::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi); - bool const isTrueSigmacStarPlusPlus = (flagMcDecayChanScAbs == aod::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi); + bool const isTrueSigmac0 = (flagMcDecayChanScAbs == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi); + bool const isTrueSigmacPlusPlus = (flagMcDecayChanScAbs == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi); + bool const isTrueSigmacStar0 = (flagMcDecayChanScAbs == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi); + bool const isTrueSigmacStarPlusPlus = (flagMcDecayChanScAbs == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi); if (isTrueSigmac0) { /// fill the output for the signal fillTable(candidateSc, candLcDauSc, o2::constants::physics::Pdg::kSigmaC0); From 4c2e65446dd80b3ff398c1c2586b18e2c1cc03d0 Mon Sep 17 00:00:00 2001 From: Mattia Faggin Date: Mon, 10 Nov 2025 21:34:06 +0000 Subject: [PATCH 6/7] Restore Legacy channels. --- PWGHF/Core/DecayChannelsLegacy.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PWGHF/Core/DecayChannelsLegacy.h b/PWGHF/Core/DecayChannelsLegacy.h index 675417d975b..0dd3c8f0188 100644 --- a/PWGHF/Core/DecayChannelsLegacy.h +++ b/PWGHF/Core/DecayChannelsLegacy.h @@ -50,6 +50,16 @@ enum DecayType { }; } // namespace hf_cand_dstar +namespace hf_cand_sigmac +{ +enum DecayType { + Sc0ToPKPiPi = 0, + ScplusplusToPKPiPi, + ScStar0ToPKPiPi, + ScStarPlusPlusToPKPiPi +}; +} // namespace hf_cand_sigmac + namespace hf_cand_b0 { enum DecayType { From c426e96938065a809c222f1b6e3c82d8069c29e0 Mon Sep 17 00:00:00 2001 From: Mattia Faggin Date: Tue, 11 Nov 2025 08:15:57 +0000 Subject: [PATCH 7/7] Remove again legacy channels and fix HFC code. --- PWGHF/Core/DecayChannelsLegacy.h | 10 ---------- PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx | 8 ++++---- PWGHF/HFC/Utils/utilsCorrelations.h | 8 ++++---- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/PWGHF/Core/DecayChannelsLegacy.h b/PWGHF/Core/DecayChannelsLegacy.h index 0dd3c8f0188..675417d975b 100644 --- a/PWGHF/Core/DecayChannelsLegacy.h +++ b/PWGHF/Core/DecayChannelsLegacy.h @@ -50,16 +50,6 @@ enum DecayType { }; } // namespace hf_cand_dstar -namespace hf_cand_sigmac -{ -enum DecayType { - Sc0ToPKPiPi = 0, - ScplusplusToPKPiPi, - ScStar0ToPKPiPi, - ScStarPlusPlusToPKPiPi -}; -} // namespace hf_cand_sigmac - namespace hf_cand_b0 { enum DecayType { diff --git a/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx index e1e12910ccf..74e1deaa704 100644 --- a/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx @@ -829,8 +829,8 @@ struct HfCorrelatorLcScHadrons { // (TESTBIT(std::abs(candidate.flagMcMatchRec()), aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi) && chargeCand == 0) || // (TESTBIT(std::abs(candidate.flagMcMatchRec()), aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi) && std::abs(chargeCand) == 2); isSignal = - (std::abs(candidate.flagMcMatchRec()) == (1 << aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi) && chargeCand == ChargeZero) || - (std::abs(candidate.flagMcMatchRec()) == (1 << aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi) && std::abs(chargeCand) == ChargeScPlusPlus); + (std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi && chargeCand == ChargeZero) || + (std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi && std::abs(chargeCand) == ChargeScPlusPlus); auto trackPos1 = candidateLc.template prong0_as(); auto trackPos2 = candidateLc.template prong2_as(); @@ -1057,8 +1057,8 @@ struct HfCorrelatorLcScHadrons { } if constexpr (IsMcRec) { isSignal = - (TESTBIT(std::abs(candidate.flagMcMatchRec()), aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi) && chargeCand == ChargeZero) || - (TESTBIT(std::abs(candidate.flagMcMatchRec()), aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi) && std::abs(chargeCand) == ChargeScPlusPlus); + ((std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi) && chargeCand == ChargeZero) || + ((std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi) && std::abs(chargeCand) == ChargeScPlusPlus); signSoftPion = candidate.template prong1_as().sign(); } else { signSoftPion = candidate.template prong1_as().sign(); diff --git a/PWGHF/HFC/Utils/utilsCorrelations.h b/PWGHF/HFC/Utils/utilsCorrelations.h index acb889e143c..f6905e77b87 100644 --- a/PWGHF/HFC/Utils/utilsCorrelations.h +++ b/PWGHF/HFC/Utils/utilsCorrelations.h @@ -162,22 +162,22 @@ bool matchCandAndMass(McParticleType const& particle, double& massCand) // Map decay type to mass switch (matchGenFlag) { - case BIT(aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi): { + case o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi: { massCand = o2::constants::physics::MassSigmaC0; return true; } - case BIT(aod::hf_cand_sigmac::DecayType::ScStar0ToPKPiPi): { + case o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi: { massCand = o2::constants::physics::MassSigmaCStar0; return true; } - case BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi): { + case o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi: { massCand = o2::constants::physics::MassSigmaCPlusPlus; return true; } - case BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi): { + case o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi: { massCand = o2::constants::physics::MassSigmaCStarPlusPlus; return true; }