Skip to content

Commit 216f647

Browse files
authored
[PWGHF] replace legacy decay channels for SigmaC. (#13689)
1 parent ec58799 commit 216f647

File tree

7 files changed

+45
-41
lines changed

7 files changed

+45
-41
lines changed

PWGHF/Core/DecayChannels.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,23 @@ enum DecayChannelMain : HfDecayChannel {
259259
NChannelsMain = DstarToD0Pi // last channel
260260
};
261261
} // namespace hf_cand_reso
262+
263+
/// @brief Sigmac candidates: main channels
264+
namespace hf_cand_sigmac
265+
{
266+
enum DecayChannelMain : HfDecayChannel {
267+
// Σc0(2455) → Λc+ π- → p K- π+ π-
268+
Sc0ToPKPiPi = 1,
269+
// Σc++(2455) → Λc+ π+ → p K- π+ π+
270+
ScplusplusToPKPiPi = 2,
271+
// Σc0(2520) → Λc+ π- → p K- π+ π-
272+
ScStar0ToPKPiPi = 3,
273+
// Σc++(2520) → Λc+ π+ → p K- π+ π+
274+
ScStarPlusPlusToPKPiPi = 4,
275+
NChannelsMain = ScStarPlusPlusToPKPiPi // last channel
276+
};
277+
} // namespace hf_cand_sigmac
278+
262279
} // namespace o2::hf_decay
263280

264281
#endif // PWGHF_CORE_DECAYCHANNELS_H_

PWGHF/Core/DecayChannelsLegacy.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,6 @@ enum DecayType {
5050
};
5151
} // namespace hf_cand_dstar
5252

53-
namespace hf_cand_sigmac
54-
{
55-
enum DecayType {
56-
Sc0ToPKPiPi = 0,
57-
ScplusplusToPKPiPi,
58-
ScStar0ToPKPiPi,
59-
ScStarPlusPlusToPKPiPi
60-
};
61-
} // namespace hf_cand_sigmac
62-
6353
namespace hf_cand_b0
6454
{
6555
enum DecayType {

PWGHF/D2H/Tasks/taskSigmac.cxx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
/// \author Mattia Faggin <mfaggin@cern.ch>, University and INFN PADOVA
1717

1818
#include "PWGHF/Core/DecayChannels.h"
19-
#include "PWGHF/Core/DecayChannelsLegacy.h"
2019
#include "PWGHF/Core/HfHelper.h"
2120
#include "PWGHF/D2H/Utils/utilsSigmac.h"
2221
#include "PWGHF/DataModel/AliasTables.h"
@@ -603,10 +602,10 @@ struct HfTaskSigmac {
603602
for (const auto& particle : mcParticlesSc) {
604603

605604
/// reject immediately particles different from Σc0,++
606-
bool const isSc0Gen = (std::abs(particle.flagMcMatchGen()) == BIT(aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi));
607-
bool const isScStar0Gen = (std::abs(particle.flagMcMatchGen()) == BIT(aod::hf_cand_sigmac::DecayType::ScStar0ToPKPiPi));
608-
bool const isScPlusPlusGen = (std::abs(particle.flagMcMatchGen()) == BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi));
609-
bool const isScStarPlusPlusGen = (std::abs(particle.flagMcMatchGen()) == BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi));
605+
bool const isSc0Gen = (std::abs(particle.flagMcMatchGen()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi);
606+
bool const isScStar0Gen = (std::abs(particle.flagMcMatchGen()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi);
607+
bool const isScPlusPlusGen = (std::abs(particle.flagMcMatchGen()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi);
608+
bool const isScStarPlusPlusGen = (std::abs(particle.flagMcMatchGen()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi);
610609
if (!isSc0Gen && !isScPlusPlusGen && !isScStar0Gen && !isScStarPlusPlusGen) {
611610
continue;
612611
}
@@ -799,10 +798,10 @@ struct HfTaskSigmac {
799798

800799
// candidateLc.flagMcDecayChanRec();
801800

802-
bool const isTrueSc0Reco = std::abs(candSc.flagMcMatchRec()) == BIT(aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi);
803-
bool const isTrueScStar0Reco = std::abs(candSc.flagMcMatchRec()) == BIT(aod::hf_cand_sigmac::DecayType::ScStar0ToPKPiPi);
804-
bool const isTrueScPlusPlusReco = std::abs(candSc.flagMcMatchRec()) == BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi);
805-
bool const isTrueScStarPlusPlusReco = std::abs(candSc.flagMcMatchRec()) == BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi);
801+
bool const isTrueSc0Reco = std::abs(candSc.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi;
802+
bool const isTrueScStar0Reco = std::abs(candSc.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi;
803+
bool const isTrueScPlusPlusReco = std::abs(candSc.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi;
804+
bool const isTrueScStarPlusPlusReco = std::abs(candSc.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi;
806805
int sigmacSpecies = -1;
807806
if ((isTrueSc0Reco || isTrueScStar0Reco) && (chargeSc == o2::aod::hf_cand_sigmac::ChargeNull)) {
808807
/// Reconstructed Σc0 signal

PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -829,8 +829,8 @@ struct HfCorrelatorLcScHadrons {
829829
// (TESTBIT(std::abs(candidate.flagMcMatchRec()), aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi) && chargeCand == 0) ||
830830
// (TESTBIT(std::abs(candidate.flagMcMatchRec()), aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi) && std::abs(chargeCand) == 2);
831831
isSignal =
832-
(std::abs(candidate.flagMcMatchRec()) == (1 << aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi) && chargeCand == ChargeZero) ||
833-
(std::abs(candidate.flagMcMatchRec()) == (1 << aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi) && std::abs(chargeCand) == ChargeScPlusPlus);
832+
(std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi && chargeCand == ChargeZero) ||
833+
(std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi && std::abs(chargeCand) == ChargeScPlusPlus);
834834

835835
auto trackPos1 = candidateLc.template prong0_as<aod::TracksWMc>();
836836
auto trackPos2 = candidateLc.template prong2_as<aod::TracksWMc>();
@@ -1057,8 +1057,8 @@ struct HfCorrelatorLcScHadrons {
10571057
}
10581058
if constexpr (IsMcRec) {
10591059
isSignal =
1060-
(TESTBIT(std::abs(candidate.flagMcMatchRec()), aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi) && chargeCand == ChargeZero) ||
1061-
(TESTBIT(std::abs(candidate.flagMcMatchRec()), aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi) && std::abs(chargeCand) == ChargeScPlusPlus);
1060+
((std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi) && chargeCand == ChargeZero) ||
1061+
((std::abs(candidate.flagMcMatchRec()) == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi) && std::abs(chargeCand) == ChargeScPlusPlus);
10621062
signSoftPion = candidate.template prong1_as<aod::TracksWMc>().sign();
10631063
} else {
10641064
signSoftPion = candidate.template prong1_as<aod::Tracks>().sign();

PWGHF/HFC/Utils/utilsCorrelations.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,22 +162,22 @@ bool matchCandAndMass(McParticleType const& particle, double& massCand)
162162

163163
// Map decay type to mass
164164
switch (matchGenFlag) {
165-
case BIT(aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi): {
165+
case o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi: {
166166
massCand = o2::constants::physics::MassSigmaC0;
167167
return true;
168168
}
169169

170-
case BIT(aod::hf_cand_sigmac::DecayType::ScStar0ToPKPiPi): {
170+
case o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi: {
171171
massCand = o2::constants::physics::MassSigmaCStar0;
172172
return true;
173173
}
174174

175-
case BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi): {
175+
case o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi: {
176176
massCand = o2::constants::physics::MassSigmaCPlusPlus;
177177
return true;
178178
}
179179

180-
case BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi): {
180+
case o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi: {
181181
massCand = o2::constants::physics::MassSigmaCStarPlusPlus;
182182
return true;
183183
}

PWGHF/TableProducer/candidateCreatorSigmac0plusplus.cxx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#include "PWGHF/Core/CentralityEstimation.h"
1919
#include "PWGHF/Core/DecayChannels.h"
20-
#include "PWGHF/Core/DecayChannelsLegacy.h"
2120
#include "PWGHF/Core/HfHelper.h"
2221
#include "PWGHF/Core/SelectorCuts.h"
2322
#include "PWGHF/DataModel/AliasTables.h"
@@ -519,7 +518,7 @@ struct HfCandidateSigmac0plusplusMc {
519518
/// look for Σc0(2455)
520519
indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kSigmaC0, std::array{+kProton, -kKPlus, +kPiPlus, -kPiPlus}, true, &sign, 3);
521520
if (indexRec > -1) { /// due to (*) no need to check anything for LambdaC
522-
flag = sign * BIT(aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi);
521+
flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi;
523522
}
524523
auto particle = mcParticles.rawIteratorAt(indexRec);
525524
particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaC0);
@@ -528,7 +527,7 @@ struct HfCandidateSigmac0plusplusMc {
528527
if (flag == 0) {
529528
indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kSigmaCStar0, std::array{+kProton, -kKPlus, +kPiPlus, -kPiPlus}, true, &sign, 3);
530529
if (indexRec > -1) { /// due to (*) no need to check anything for LambdaC
531-
flag = sign * BIT(aod::hf_cand_sigmac::DecayType::ScStar0ToPKPiPi);
530+
flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi;
532531
}
533532
if (particleAntiparticle < 0) {
534533
auto particle = mcParticles.rawIteratorAt(indexRec);
@@ -546,7 +545,7 @@ struct HfCandidateSigmac0plusplusMc {
546545
/// look for Σc++(2455)
547546
indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kSigmaCPlusPlus, std::array{+kProton, -kKPlus, +kPiPlus, +kPiPlus}, true, &sign, 3);
548547
if (indexRec > -1) { /// due to (*) no need to check anything for LambdaC
549-
flag = sign * BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi);
548+
flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi;
550549
}
551550
auto particle = mcParticles.rawIteratorAt(indexRec);
552551
particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaCPlusPlus);
@@ -555,7 +554,7 @@ struct HfCandidateSigmac0plusplusMc {
555554
if (flag == 0) {
556555
indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughters, Pdg::kSigmaCStarPlusPlus, std::array{+kProton, -kKPlus, +kPiPlus, +kPiPlus}, true, &sign, 3);
557556
if (indexRec > -1) { /// due to (*) no need to check anything for LambdaC
558-
flag = sign * BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi);
557+
flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi;
559558
}
560559
if (particleAntiparticle < 0) {
561560
auto particle = mcParticles.rawIteratorAt(indexRec);
@@ -614,7 +613,7 @@ struct HfCandidateSigmac0plusplusMc {
614613
}
615614
if (std::abs(daughter.flagMcMatchGen()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) {
616615
/// Λc+ daughter decaying in pK-π+ found!
617-
flag = sign * BIT(aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi);
616+
flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi;
618617
particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaC0);
619618
break;
620619
}
@@ -628,7 +627,7 @@ struct HfCandidateSigmac0plusplusMc {
628627
}
629628
if (std::abs(daughter.flagMcMatchGen()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) {
630629
/// Λc+ daughter decaying in pK-π+ found!
631-
flag = sign * BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi);
630+
flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi;
632631
particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaCPlusPlus);
633632
break;
634633
}
@@ -646,7 +645,7 @@ struct HfCandidateSigmac0plusplusMc {
646645
}
647646
if (std::abs(daughter.flagMcMatchGen()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) {
648647
/// Λc+ daughter decaying in pK-π+ found!
649-
flag = sign * BIT(aod::hf_cand_sigmac::DecayType::ScStar0ToPKPiPi);
648+
flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi;
650649
particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaCStar0);
651650
break;
652651
}
@@ -660,7 +659,7 @@ struct HfCandidateSigmac0plusplusMc {
660659
}
661660
if (std::abs(daughter.flagMcMatchGen()) == o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) {
662661
/// Λc+ daughter decaying in pK-π+ found!
663-
flag = sign * BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi);
662+
flag = sign * o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi;
664663
particleAntiparticle = isParticleAntiparticle(particle, Pdg::kSigmaCStarPlusPlus);
665664
break;
666665
}

PWGHF/TableProducer/treeCreatorSigmacCorrBkg.cxx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
/// \author Mattia Faggin <mfaggin@cern.ch>, INFN PADOVA
1818

1919
#include "PWGHF/Core/DecayChannels.h"
20-
#include "PWGHF/Core/DecayChannelsLegacy.h"
2120
#include "PWGHF/Core/HfHelper.h"
2221
#include "PWGHF/D2H/Utils/utilsSigmac.h"
2322
#include "PWGHF/DataModel/AliasTables.h"
@@ -148,10 +147,10 @@ struct HfTreeCreatorSigmacCorrBkg {
148147

149148
/// tag immediately the Σc0,++(2455) and Σc0,++(2520) signal
150149
auto flagMcDecayChanScAbs = std::abs(candidateSc.flagMcMatchRec());
151-
bool const isTrueSigmac0 = (flagMcDecayChanScAbs == BIT(aod::hf_cand_sigmac::DecayType::Sc0ToPKPiPi));
152-
bool const isTrueSigmacPlusPlus = (flagMcDecayChanScAbs == BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi));
153-
bool const isTrueSigmacStar0 = (flagMcDecayChanScAbs == BIT(aod::hf_cand_sigmac::DecayType::ScStar0ToPKPiPi));
154-
bool const isTrueSigmacStarPlusPlus = (flagMcDecayChanScAbs == BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi));
150+
bool const isTrueSigmac0 = (flagMcDecayChanScAbs == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::Sc0ToPKPiPi);
151+
bool const isTrueSigmacPlusPlus = (flagMcDecayChanScAbs == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScplusplusToPKPiPi);
152+
bool const isTrueSigmacStar0 = (flagMcDecayChanScAbs == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStar0ToPKPiPi);
153+
bool const isTrueSigmacStarPlusPlus = (flagMcDecayChanScAbs == o2::hf_decay::hf_cand_sigmac::DecayChannelMain::ScStarPlusPlusToPKPiPi);
155154
if (isTrueSigmac0) {
156155
/// fill the output for the signal
157156
fillTable(candidateSc, candLcDauSc, o2::constants::physics::Pdg::kSigmaC0);

0 commit comments

Comments
 (0)