Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions PWGHF/Core/DecayChannels.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_
10 changes: 0 additions & 10 deletions PWGHF/Core/DecayChannelsLegacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
17 changes: 8 additions & 9 deletions PWGHF/D2H/Tasks/taskSigmac.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
/// \author Mattia Faggin <mfaggin@cern.ch>, 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"
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<aod::TracksWMc>();
auto trackPos2 = candidateLc.template prong2_as<aod::TracksWMc>();
Expand Down Expand Up @@ -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<aod::TracksWMc>().sign();
} else {
signSoftPion = candidate.template prong1_as<aod::Tracks>().sign();
Expand Down
8 changes: 4 additions & 4 deletions PWGHF/HFC/Utils/utilsCorrelations.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
17 changes: 8 additions & 9 deletions PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -175,7 +174,7 @@
LOG(info) << "### ITS hitmap for soft pion";
LOG(info) << " >>> setSoftPiItsHitMap.size(): " << setSoftPiItsHitMap.size();
LOG(info) << " >>> Custom ITS hitmap dfchecked: ";
for (const auto it : setSoftPiItsHitMap) {

Check failure on line 177 in PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
LOG(info) << " Layer " << static_cast<int>(it) << " ";
}
LOG(info) << "############";
Expand Down Expand Up @@ -519,7 +518,7 @@
/// 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);
Expand All @@ -528,7 +527,7 @@
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);
Expand All @@ -546,7 +545,7 @@
/// 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);
Expand All @@ -555,7 +554,7 @@
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);
Expand Down Expand Up @@ -614,7 +613,7 @@
}
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;
}
Expand All @@ -628,7 +627,7 @@
}
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;
}
Expand All @@ -646,7 +645,7 @@
}
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;
}
Expand All @@ -660,7 +659,7 @@
}
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;
}
Expand Down
9 changes: 4 additions & 5 deletions PWGHF/TableProducer/treeCreatorSigmacCorrBkg.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/// \author Mattia Faggin <mfaggin@cern.ch>, 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"
Expand Down Expand Up @@ -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);
Expand Down
Loading