Skip to content

Commit 0ad6a87

Browse files
authored
[PWGHF,PWGJE] Propagate new MC flags to beauty candidates (#11960)
1 parent 2d0c61b commit 0ad6a87

22 files changed

+184
-151
lines changed

PWGHF/Core/DecayChannels.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ enum DecayChannelMain : int8_t {
154154
B0ToDminusPiPi0 = 2, // D− π+ π0
155155
B0ToDminusPiGamma = 3, // D− π+ γ0
156156
B0ToDminusK = 4, // D− K+
157-
B0ToD0PiPi = 5, // anti-D0 π+
157+
B0ToD0PiPi = 5, // anti-D0 π+ π−
158+
B0ToDsPi = 19, // Ds− π+
158159
// Bs0
159160
BsToDsPi = 6, // Ds− π+
160161
BsToDsPiPi0 = 7, // Ds− π+ π0
@@ -172,7 +173,7 @@ enum DecayChannelMain : int8_t {
172173
BplusToD0PiGamma = 17, // anti-D0 π+ γ0
173174
BplusToD0K = 18, // anti-D0 K+
174175
//
175-
NChannelsMain = BplusToD0K // last channel
176+
NChannelsMain = B0ToDsPi // last channel
176177
};
177178
/// @brief beauty candidates: resonant channels
178179
enum DecayChannelResonant : int8_t {

PWGHF/D2H/DataModel/ReducedDataModel.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ DECLARE_SOA_TABLE(HfMcCheckDpPis, "AOD", "HFMCCHECKDPPI", //! Table with reconst
828828
// Table with same size as HFCANDB0
829829
DECLARE_SOA_TABLE(HfMcRecRedB0s, "AOD", "HFMCRECREDB0", //! Reconstruction-level MC information on B0 candidates for reduced workflow
830830
hf_cand_b0::FlagMcMatchRec,
831-
hf_cand_b0::ChannelMcMatchRec,
831+
hf_cand_b0::FlagMcDecayChanRec,
832832
hf_cand_b0::FlagWrongCollision,
833833
hf_cand_b0::DebugMcRec,
834834
hf_b0_mc::PtMother);
@@ -844,7 +844,7 @@ DECLARE_SOA_TABLE(HfMcCheckB0s, "AOD", "HFMCCHECKB0", //! Table with reconstruct
844844

845845
DECLARE_SOA_TABLE(HfMcGenRedB0s, "AOD", "HFMCGENREDB0", //! Generation-level MC information on B0 candidates for reduced workflow
846846
hf_cand_b0::FlagMcMatchGen,
847-
hf_cand_b0::ChannelMcMatchRec,
847+
hf_cand_b0::FlagMcDecayChanRec,
848848
hf_b0_mc::PtTrack,
849849
hf_b0_mc::YTrack,
850850
hf_b0_mc::EtaTrack,
@@ -906,7 +906,7 @@ DECLARE_SOA_TABLE(HfMcRecRedJPKs, "AOD", "HFMCRECREDJPK", //! Table with reconst
906906
hf_cand_bplus_reduced::JpsiId,
907907
hf_cand_bplus_reduced::BachKaId,
908908
hf_cand_bplus::FlagMcMatchRec,
909-
hf_cand_bplus::ChannelMcMatchRec,
909+
hf_cand_bplus::FlagMcDecayChanRec,
910910
hf_cand_bplus::FlagWrongCollision,
911911
hf_cand_bplus::DebugMcRec,
912912
hf_bplus_mc::PtMother);
@@ -923,7 +923,7 @@ DECLARE_SOA_TABLE(HfMcCheckD0Pis, "AOD", "HFMCCHECKD0PI", //! Table with reconst
923923
// Table with same size as HFCANDBPLUS
924924
DECLARE_SOA_TABLE(HfMcRecRedBps, "AOD", "HFMCRECREDBP", //! Reconstruction-level MC information on B+ candidates for reduced workflow
925925
hf_cand_bplus::FlagMcMatchRec,
926-
hf_cand_bplus::ChannelMcMatchRec,
926+
hf_cand_bplus::FlagMcDecayChanRec,
927927
hf_cand_bplus::FlagWrongCollision,
928928
hf_cand_bplus::DebugMcRec,
929929
hf_bplus_mc::PtMother);
@@ -938,7 +938,7 @@ DECLARE_SOA_TABLE(HfMcCheckBps, "AOD", "HFMCCHECKBP", //! Table with reconstruct
938938

939939
DECLARE_SOA_TABLE(HfMcGenRedBps, "AOD", "HFMCGENREDBP", //! Generation-level MC information on B+ candidates for reduced workflow
940940
hf_cand_bplus::FlagMcMatchGen,
941-
hf_cand_bplus::ChannelMcMatchRec,
941+
hf_cand_bplus::FlagMcDecayChanRec,
942942
hf_bplus_mc::PtTrack,
943943
hf_bplus_mc::YTrack,
944944
hf_bplus_mc::EtaTrack,
@@ -1008,7 +1008,7 @@ DECLARE_SOA_TABLE(HfMcRecRedJPPhis, "AOD", "HFMCRECREDJPPHI", //! Table with rec
10081008
hf_cand_bs_reduced::Prong0PhiId,
10091009
hf_cand_bs_reduced::Prong1PhiId,
10101010
hf_cand_bs::FlagMcMatchRec,
1011-
hf_cand_bs::ChannelMcMatchRec,
1011+
hf_cand_bs::FlagMcDecayChanRec,
10121012
hf_cand_bs::FlagWrongCollision,
10131013
hf_cand_bs::DebugMcRec,
10141014
hf_bs_mc::PtMother);
@@ -1027,7 +1027,7 @@ DECLARE_SOA_TABLE(HfMcCheckDsPis, "AOD", "HFMCCHECKDSPI", //! Table with reconst
10271027
// Table with same size as HFCANDBS
10281028
DECLARE_SOA_TABLE(HfMcRecRedBss, "AOD", "HFMCRECREDBS", //! Reconstruction-level MC information on Bs candidates for reduced workflow
10291029
hf_cand_bs::FlagMcMatchRec,
1030-
hf_cand_bs::ChannelMcMatchRec,
1030+
hf_cand_bs::FlagMcDecayChanRec,
10311031
hf_cand_bs::FlagWrongCollision,
10321032
hf_cand_bs::DebugMcRec,
10331033
hf_bs_mc::PtMother);
@@ -1043,7 +1043,7 @@ DECLARE_SOA_TABLE(HfMcCheckBss, "AOD", "HFMCCHECKBS", //! Table with reconstruct
10431043

10441044
DECLARE_SOA_TABLE(HfMcGenRedBss, "AOD", "HFMCGENREDBS", //! Generation-level MC information on Bs candidates for reduced workflow
10451045
hf_cand_bs::FlagMcMatchGen,
1046-
hf_cand_bs::ChannelMcMatchRec,
1046+
hf_cand_bs::FlagMcDecayChanRec,
10471047
hf_bs_mc::PtTrack,
10481048
hf_bs_mc::YTrack,
10491049
hf_bs_mc::EtaTrack,

PWGHF/D2H/TableProducer/candidateCreatorBToJpsiReduced.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ struct HfCandidateCreatorBToJpsiReducedExpressions {
436436
if ((rowJpsiHadMcRec.jpsiId() != candB.jpsiId()) || (rowJpsiHadMcRec.bachKaId() != candB.bachKaId())) {
437437
continue;
438438
}
439-
rowBplusMcRec(rowJpsiHadMcRec.flagMcMatchRec(), rowJpsiHadMcRec.channelMcMatchRec(), rowJpsiHadMcRec.flagWrongCollision(), rowJpsiHadMcRec.debugMcRec(), rowJpsiHadMcRec.ptMother());
439+
rowBplusMcRec(rowJpsiHadMcRec.flagMcMatchRec(), rowJpsiHadMcRec.flagMcDecayChanRec(), rowJpsiHadMcRec.flagWrongCollision(), rowJpsiHadMcRec.debugMcRec(), rowJpsiHadMcRec.ptMother());
440440
filledMcInfo = true;
441441
break;
442442
}
@@ -448,7 +448,7 @@ struct HfCandidateCreatorBToJpsiReducedExpressions {
448448
if ((rowJpsiHadMcRec.jpsiId() != candB.jpsiId()) || (rowJpsiHadMcRec.prong0PhiId() != candB.prong0PhiId()) || (rowJpsiHadMcRec.prong1PhiId() != candB.prong1PhiId())) {
449449
continue;
450450
}
451-
rowBsMcRec(rowJpsiHadMcRec.flagMcMatchRec(), rowJpsiHadMcRec.channelMcMatchRec(), rowJpsiHadMcRec.flagWrongCollision(), rowJpsiHadMcRec.debugMcRec(), rowJpsiHadMcRec.ptMother());
451+
rowBsMcRec(rowJpsiHadMcRec.flagMcMatchRec(), rowJpsiHadMcRec.flagMcDecayChanRec(), rowJpsiHadMcRec.flagWrongCollision(), rowJpsiHadMcRec.debugMcRec(), rowJpsiHadMcRec.ptMother());
452452
filledMcInfo = true;
453453
break;
454454
}

PWGHF/D2H/Tasks/taskB0.cxx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
///
1515
/// \author Alexandre Bigot <alexandre.bigot@cern.ch>, IPHC Strasbourg
1616

17+
#include "PWGHF/Core/DecayChannels.h"
1718
#include "PWGHF/Core/HfHelper.h"
1819
#include "PWGHF/Core/SelectorCuts.h"
1920
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
@@ -48,6 +49,7 @@ using namespace o2::aod;
4849
using namespace o2::analysis;
4950
using namespace o2::framework;
5051
using namespace o2::framework::expressions;
52+
using namespace o2::hf_decay::hf_cand_beauty;
5153

5254
/// B0 analysis task
5355
struct HfTaskB0 {
@@ -146,15 +148,15 @@ struct HfTaskB0 {
146148
registry.add("hPtGenWithProngsInAcceptance", "MC particles (generated-daughters in acceptance);candidate #it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{300, 0., 30.}}});
147149

148150
if (checkDecayTypeMc) {
149-
constexpr uint8_t kNBinsDecayTypeMc = hf_cand_b0::DecayTypeMc::NDecayTypeMc;
150-
TString labels[kNBinsDecayTypeMc];
151+
constexpr uint8_t NBinsDecayTypeMc = hf_cand_b0::DecayTypeMc::NDecayTypeMc; // FIXME
152+
TString labels[NBinsDecayTypeMc];
151153
labels[hf_cand_b0::DecayTypeMc::B0ToDplusPiToPiKPiPi] = "B^{0} #rightarrow (D^{#minus} #rightarrow #pi^{#minus} K^{#plus} #pi^{#minus}) #pi^{#plus}";
152154
labels[hf_cand_b0::DecayTypeMc::B0ToDsPiToKKPiPi] = "B^{0} #rightarrow (D^{#minus}_{s} #rightarrow K^{#minus} K^{#plus} #pi^{#minus}) #pi^{#plus}";
153155
labels[hf_cand_b0::DecayTypeMc::PartlyRecoDecay] = "Partly reconstructed decay channel";
154156
labels[hf_cand_b0::DecayTypeMc::OtherDecay] = "Other decays";
155-
static const AxisSpec axisDecayType = {kNBinsDecayTypeMc, 0.5, kNBinsDecayTypeMc + 0.5, ""};
157+
static const AxisSpec axisDecayType = {NBinsDecayTypeMc, 0.5, NBinsDecayTypeMc + 0.5, ""};
156158
registry.add("hDecayTypeMc", "DecayType", {HistType::kTH3F, {axisDecayType, axisMassB0, axisPt}});
157-
for (uint8_t iBin = 0; iBin < kNBinsDecayTypeMc; ++iBin) {
159+
for (uint8_t iBin = 0; iBin < NBinsDecayTypeMc; ++iBin) {
158160
registry.get<TH3>(HIST("hDecayTypeMc"))->GetXaxis()->SetBinLabel(iBin + 1, labels[iBin]);
159161
}
160162
}
@@ -219,9 +221,9 @@ struct HfTaskB0 {
219221
auto ptCandB0 = candidate.pt();
220222
auto candD = candidate.prong0_as<soa::Join<aod::HfCand3Prong, aod::HfCand3ProngMcRec>>();
221223
auto invMassCandB0 = hfHelper.invMassB0ToDPi(candidate);
222-
int flagMcMatchRecB0 = std::abs(candidate.flagMcMatchRec());
224+
auto flagMcMatchRecB0 = std::abs(candidate.flagMcMatchRec());
223225

224-
if (TESTBIT(flagMcMatchRecB0, hf_cand_b0::DecayTypeMc::B0ToDplusPiToPiKPiPi)) {
226+
if (flagMcMatchRecB0 == DecayChannelMain::B0ToDminusPi) {
225227
auto indexMother = RecoDecay::getMother(mcParticles, candidate.prong1_as<aod::TracksWMc>().mcParticle_as<soa::Join<aod::McParticles, aod::HfCandB0McGen>>(), o2::constants::physics::Pdg::kB0, true);
226228
auto particleMother = mcParticles.rawIteratorAt(indexMother);
227229

@@ -267,9 +269,9 @@ struct HfTaskB0 {
267269
registry.fill(HIST("hChi2PCARecBg"), candidate.chi2PCA(), ptCandB0);
268270

269271
if (checkDecayTypeMc) {
270-
if (TESTBIT(flagMcMatchRecB0, hf_cand_b0::DecayTypeMc::B0ToDsPiToKKPiPi)) { // B0 → Ds- π+ → (K- K+ π-) π+
272+
if (flagMcMatchRecB0 == DecayChannelMain::B0ToDsPi) { // B0 → Ds- π+ → (K- K+ π-) π+
271273
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_b0::DecayTypeMc::B0ToDsPiToKKPiPi, invMassCandB0, ptCandB0);
272-
} else if (TESTBIT(flagMcMatchRecB0, hf_cand_b0::DecayTypeMc::PartlyRecoDecay)) { // Partly reconstructed decay channel
274+
} else if (flagMcMatchRecB0 == hf_cand_b0::DecayTypeMc::PartlyRecoDecay) { // FIXME, Partly reconstructed decay channel
273275
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_b0::DecayTypeMc::PartlyRecoDecay, invMassCandB0, ptCandB0);
274276
} else {
275277
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_b0::DecayTypeMc::OtherDecay, invMassCandB0, ptCandB0);
@@ -280,7 +282,7 @@ struct HfTaskB0 {
280282

281283
// MC gen. level
282284
for (const auto& particle : mcParticles) {
283-
if (TESTBIT(std::abs(particle.flagMcMatchGen()), hf_cand_b0::DecayType::B0ToDPi)) {
285+
if (std::abs(particle.flagMcMatchGen()) == o2::hf_decay::hf_cand_beauty::DecayChannelMain::B0ToDminusPi) {
284286

285287
auto ptParticle = particle.pt();
286288
auto yParticle = RecoDecay::y(particle.pVector(), o2::constants::physics::MassB0);

PWGHF/D2H/Tasks/taskBplus.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
/// \author Antonio Palasciano <antonio.palasciano@cern.ch>, Università degli Studi di Bari & INFN, Sezione di Bari
1919
/// \author Deepa Thomas <deepa.thomas@cern.ch>, UT Austin
2020

21+
#include "PWGHF/Core/DecayChannels.h"
2122
#include "PWGHF/Core/HfHelper.h"
2223
#include "PWGHF/Core/SelectorCuts.h"
2324
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
@@ -48,6 +49,7 @@ using namespace o2::aod;
4849
using namespace o2::analysis;
4950
using namespace o2::framework;
5051
using namespace o2::framework::expressions;
52+
using namespace o2::hf_decay::hf_cand_beauty;
5153

5254
// string definitions, used for histogram axis labels
5355
const TString stringPt = "#it{p}_{T} (GeV/#it{c})";
@@ -224,7 +226,7 @@ struct HfTaskBplus {
224226
}
225227
auto ptCandBplus = candidate.pt();
226228
// auto candD0 = candidate.prong0_as<aod::HfCand2Prong>();
227-
if (TESTBIT(std::abs(candidate.flagMcMatchRec()), hf_cand_bplus::DecayType::BplusToD0Pi)) {
229+
if (std::abs(candidate.flagMcMatchRec()) == DecayChannelMain::BplusToD0Pi) {
228230

229231
auto indexMother = RecoDecay::getMother(mcParticles, candidate.prong1_as<aod::TracksWMc>().mcParticle_as<soa::Join<aod::McParticles, aod::HfCandBplusMcGen>>(), o2::constants::physics::Pdg::kBPlus, true);
230232
auto particleMother = mcParticles.rawIteratorAt(indexMother);
@@ -267,7 +269,7 @@ struct HfTaskBplus {
267269

268270
// MC gen. level
269271
for (const auto& particle : mcParticles) {
270-
if (TESTBIT(std::abs(particle.flagMcMatchGen()), hf_cand_bplus::DecayType::BplusToD0Pi)) {
272+
if (std::abs(particle.flagMcMatchGen()) == DecayChannelMain::BplusToD0Pi) {
271273

272274
auto ptParticle = particle.pt();
273275
auto yParticle = RecoDecay::y(particle.pVector(), o2::constants::physics::MassBPlus);

PWGHF/D2H/Tasks/taskBplusToJpsiKReduced.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ DECLARE_SOA_TABLE(HfRedCandBpLites, "AOD", "HFREDCANDBPLITE", //! Table with som
163163
hf_cand_bplustojpsik_lite::NSigTpcTofKaBachelor,
164164
// MC truth
165165
hf_cand_bplus::FlagMcMatchRec,
166-
hf_cand_bplus::ChannelMcMatchRec,
166+
hf_cand_bplus::FlagMcDecayChanRec,
167167
hf_cand_bplus::OriginMcRec,
168168
hf_cand_bplustojpsik_lite::FlagWrongCollision,
169169
hf_cand_bplustojpsik_lite::PtGen);
@@ -345,11 +345,11 @@ struct HfTaskBplusToJpsiKReduced {
345345
auto invMassJpsi = candJpsi.m();
346346
uint8_t statusBplus = 0;
347347

348-
int8_t flagMcMatchRec{0}, channelMcMatchRec{0}, flagWrongCollision{0};
348+
int8_t flagMcMatchRec{0}, flagMcDecayChanRec{0}, flagWrongCollision{0};
349349
bool isSignal = false;
350350
if constexpr (doMc) {
351351
flagMcMatchRec = candidate.flagMcMatchRec();
352-
channelMcMatchRec = candidate.channelMcMatchRec();
352+
flagMcDecayChanRec = candidate.flagMcDecayChanRec();
353353
flagWrongCollision = candidate.flagWrongCollision();
354354
isSignal = std::abs(flagMcMatchRec) == o2::hf_decay::hf_cand_beauty::BplusToJpsiK;
355355
}
@@ -458,7 +458,7 @@ struct HfTaskBplusToJpsiKReduced {
458458
candKa.tpcTofNSigmaKa(),
459459
// MC truth
460460
flagMcMatchRec,
461-
channelMcMatchRec,
461+
flagMcDecayChanRec,
462462
isSignal,
463463
flagWrongCollision,
464464
ptMother);

PWGHF/D2H/Tasks/taskBs.cxx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
///
1616
/// \author Phil Stahlhut <phil.lennart.stahlhut@cern.ch>
1717

18+
#include "PWGHF/Core/DecayChannels.h"
1819
#include "PWGHF/Core/HfHelper.h"
1920
#include "PWGHF/Core/SelectorCuts.h"
2021
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
@@ -49,6 +50,7 @@ using namespace o2::aod;
4950
using namespace o2::analysis;
5051
using namespace o2::framework;
5152
using namespace o2::framework::expressions;
53+
using namespace o2::hf_decay::hf_cand_beauty;
5254

5355
/// Bs analysis task
5456
struct HfTaskBs {
@@ -144,15 +146,15 @@ struct HfTaskBs {
144146
registry.add("hYGenWithProngsInAcceptance", "MC particles (generated-daughters in acceptance);B^{0}_{s} candidate #it{y}^{gen};entries", {HistType::kTH2F, {{100, -2., 2.}, axisPt}});
145147

146148
if (checkDecayTypeMc) {
147-
constexpr uint8_t kNBinsDecayTypeMc = hf_cand_bs::DecayTypeMc::NDecayTypeMc + 1;
148-
TString labels[kNBinsDecayTypeMc];
149+
constexpr uint8_t NBinsDecayTypeMc = hf_cand_bs::DecayTypeMc::NDecayTypeMc + 1;
150+
TString labels[NBinsDecayTypeMc];
149151
labels[hf_cand_bs::DecayTypeMc::BsToDsPiToPhiPiPiToKKPiPi] = "B^{0}_{s} #rightarrow (D^{#mp}_{s} #rightarrow K^{#minus} K^{#plus} #pi^{#mp}) #pi^{#pm}";
150152
labels[hf_cand_bs::DecayTypeMc::B0ToDsPiToPhiPiPiToKKPiPi] = "B^{0} #rightarrow (D^{#pm}_{s} #rightarrow K^{#minus} K^{#plus} #pi^{#pm}) #pi^{#mp}";
151153
labels[hf_cand_bs::DecayTypeMc::PartlyRecoDecay] = "Partly reconstructed decay channel";
152154
labels[hf_cand_bs::DecayTypeMc::NDecayTypeMc] = "Other decays";
153-
static const AxisSpec axisDecayType = {kNBinsDecayTypeMc, 0.5, kNBinsDecayTypeMc + 0.5, ""};
155+
static const AxisSpec axisDecayType = {NBinsDecayTypeMc, 0.5, NBinsDecayTypeMc + 0.5, ""};
154156
registry.add("hDecayTypeMc", "DecayType", {HistType::kTH3F, {axisDecayType, axisMassBs, axisPt}});
155-
for (uint8_t iBin = 0; iBin < kNBinsDecayTypeMc; ++iBin) {
157+
for (uint8_t iBin = 0; iBin < NBinsDecayTypeMc; ++iBin) {
156158
registry.get<TH3>(HIST("hDecayTypeMc"))->GetXaxis()->SetBinLabel(iBin + 1, labels[iBin]);
157159
}
158160
}
@@ -216,9 +218,9 @@ struct HfTaskBs {
216218
auto ptCandBs = candidate.pt();
217219
auto candDs = candidate.prong0_as<soa::Join<aod::HfCand3Prong, aod::HfCand3ProngMcRec>>();
218220
auto invMassCandBs = hfHelper.invMassBsToDsPi(candidate);
219-
int flagMcMatchRecBs = std::abs(candidate.flagMcMatchRec());
221+
auto flagMcMatchRecBs = std::abs(candidate.flagMcMatchRec());
220222

221-
if (TESTBIT(flagMcMatchRecBs, hf_cand_bs::DecayTypeMc::BsToDsPiToPhiPiPiToKKPiPi)) {
223+
if (flagMcMatchRecBs == DecayChannelMain::BsToDsPi) {
222224
auto indexMother = RecoDecay::getMother(mcParticles, candidate.prong1_as<aod::TracksWMc>().mcParticle_as<soa::Join<aod::McParticles, aod::HfCandBsMcGen>>(), o2::constants::physics::Pdg::kBS, true);
223225
auto particleMother = mcParticles.rawIteratorAt(indexMother);
224226

@@ -264,9 +266,9 @@ struct HfTaskBs {
264266
registry.fill(HIST("hChi2PCARecBg"), candidate.chi2PCA(), ptCandBs);
265267

266268
if (checkDecayTypeMc) {
267-
if (TESTBIT(flagMcMatchRecBs, hf_cand_bs::DecayTypeMc::B0ToDsPiToPhiPiPiToKKPiPi)) { // B0(bar) → Ds± π∓ → (K- K+ π±) π∓
269+
if (flagMcMatchRecBs == DecayChannelMain::B0ToDsPi) { // B0(bar) → Ds± π∓ → (K- K+ π±) π∓
268270
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_bs::DecayTypeMc::B0ToDsPiToPhiPiPiToKKPiPi, invMassCandBs, ptCandBs);
269-
} else if (TESTBIT(flagMcMatchRecBs, hf_cand_bs::DecayTypeMc::PartlyRecoDecay)) { // Partly reconstructed decay channel
271+
} else if (flagMcMatchRecBs == hf_cand_bs::DecayTypeMc::PartlyRecoDecay) { // FIXME, Partly reconstructed decay channel
270272
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_bs::DecayTypeMc::PartlyRecoDecay, invMassCandBs, ptCandBs);
271273
} else {
272274
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_bs::DecayTypeMc::NDecayTypeMc, invMassCandBs, ptCandBs);
@@ -277,7 +279,7 @@ struct HfTaskBs {
277279

278280
// MC gen. level
279281
for (const auto& particle : mcParticles) {
280-
if (TESTBIT(std::abs(particle.flagMcMatchGen()), hf_cand_bs::DecayTypeMc::BsToDsPiToPhiPiPiToKKPiPi)) {
282+
if (std::abs(particle.flagMcMatchGen()) == DecayChannelMain::BsToDsPi) {
281283

282284
auto ptParticle = particle.pt();
283285
auto yParticle = RecoDecay::y(particle.pVector(), o2::constants::physics::MassBS);

PWGHF/D2H/Tasks/taskBsToJpsiPhiReduced.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ DECLARE_SOA_TABLE(HfRedCandBsLites, "AOD", "HFREDCANDBSLITE", //! Table with som
188188
hf_cand_bstojpsiphi_lite::NSigTpcTofKaBachelor1,
189189
// MC truth
190190
hf_cand_bs::FlagMcMatchRec,
191-
hf_cand_bs::ChannelMcMatchRec,
191+
hf_cand_bs::FlagMcDecayChanRec,
192192
hf_cand_bs::OriginMcRec,
193193
hf_cand_bstojpsiphi_lite::FlagWrongCollision,
194194
hf_cand_bstojpsiphi_lite::PtGen);
@@ -381,14 +381,14 @@ struct HfTaskBsToJpsiPhiReduced {
381381
auto invMassPhi = RecoDecay::m(std::array{pVecKa0, pVecKa1}, std::array{o2::constants::physics::MassKPlus, o2::constants::physics::MassKPlus});
382382
uint8_t statusBs = 0;
383383

384-
int8_t flagMcMatchRec{0}, channelMcMatchRec{0}, flagWrongCollision{0};
384+
int8_t flagMcMatchRec{0}, flagMcDecayChanRec{0}, flagWrongCollision{0};
385385
bool isSignal = false;
386386
if constexpr (doMc) {
387387
flagMcMatchRec = candidate.flagMcMatchRec();
388-
channelMcMatchRec = candidate.channelMcMatchRec();
388+
flagMcDecayChanRec = candidate.flagMcDecayChanRec();
389389
flagWrongCollision = candidate.flagWrongCollision();
390390
isSignal = flagMcMatchRec == o2::hf_decay::hf_cand_beauty::BsToJpsiKK &&
391-
channelMcMatchRec == o2::hf_decay::hf_cand_beauty::BsToJpsiPhi;
391+
flagMcDecayChanRec == o2::hf_decay::hf_cand_beauty::BsToJpsiPhi;
392392
}
393393

394394
SETBIT(statusBs, SelectionStep::RecoSkims);
@@ -513,7 +513,7 @@ struct HfTaskBsToJpsiPhiReduced {
513513
candKa1.tpcTofNSigmaKa(),
514514
// MC truth
515515
flagMcMatchRec,
516-
channelMcMatchRec,
516+
flagMcDecayChanRec,
517517
isSignal,
518518
flagWrongCollision,
519519
ptMother);

0 commit comments

Comments
 (0)