diff --git a/PWGHF/Core/DecayChannels.h b/PWGHF/Core/DecayChannels.h index be813668ec6..929079b9b9f 100644 --- a/PWGHF/Core/DecayChannels.h +++ b/PWGHF/Core/DecayChannels.h @@ -259,6 +259,23 @@ 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 = 1, + // Σc++(2455) → Λc+ π+ → p K- π+ π+ + ScplusplusToPKPiPi = 2, + // Σc0(2520) → Λc+ π- → p K- π+ π- + ScStar0ToPKPiPi = 3, + // Σc++(2520) → Λc+ π+ → p K- π+ π+ + ScStarPlusPlusToPKPiPi = 4, + NChannelsMain = ScStarPlusPlusToPKPiPi // last channel +}; +} // namespace hf_cand_sigmac + } // namespace o2::hf_decay #endif // PWGHF_CORE_DECAYCHANNELS_H_ 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 1bca721c338..b4f6c7d2e60 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()) == 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; } @@ -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()) == 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/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; } diff --git a/PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx b/PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx index 6b3838f8dc3..9423e15931a 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi; particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaCStarPlusPlus); break; } diff --git a/PWGHF/TableProducer/treeCreatorSigmacCorrBkg.cxx b/PWGHF/TableProducer/treeCreatorSigmacCorrBkg.cxx index eea4074d3a1..212d6e597a6 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 == 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);