Skip to content

Commit f05948c

Browse files
committed
Migrate B0
1 parent 8d53971 commit f05948c

File tree

12 files changed

+67
-56
lines changed

12 files changed

+67
-56
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/TableProducer/dataCreatorCharmHadPiReduced.cxx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
/// \author Biao Zhang <biao.zhang@cern.ch>, Heidelberg University
2020

2121
#include "PWGHF/Core/CentralityEstimation.h"
22+
#include "PWGHF/Core/DecayChannels.h"
2223
#include "PWGHF/Core/HfHelper.h"
2324
#include "PWGHF/Core/SelectorCuts.h"
2425
#include "PWGHF/D2H/DataModel/ReducedDataModel.h"
@@ -81,6 +82,7 @@ using namespace o2::constants::physics;
8182
using namespace o2::framework;
8283
using namespace o2::framework::expressions;
8384
using namespace o2::hf_trkcandsel;
85+
using namespace o2::hf_decay::hf_cand_beauty;
8486

8587
enum Event : uint8_t {
8688
Processed = 0,
@@ -473,7 +475,7 @@ struct HfDataCreatorCharmHadPiReduced {
473475
// Printf("Checking D- → π- K+ π-");
474476
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(particlesMc, std::array{vecDaughtersB[0], vecDaughtersB[1], vecDaughtersB[2]}, Pdg::kDMinus, std::array{-kPiPlus, +kKPlus, -kPiPlus}, true, &sign, 2);
475477
if (indexRec > -1) {
476-
flag = sign * BIT(hf_cand_b0::DecayTypeMc::B0ToDplusPiToPiKPiPi);
478+
flag = sign * DecayChannelMain::B0ToDminusPi;
477479
} else {
478480
debug = 1;
479481
LOGF(debug, "B0 decays in the expected final state but the condition on the intermediate state is not fulfilled");
@@ -496,7 +498,7 @@ struct HfDataCreatorCharmHadPiReduced {
496498
// Ds- → K- K+ π-
497499
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(particlesMc, std::array{vecDaughtersB[0], vecDaughtersB[1], vecDaughtersB[2]}, -Pdg::kDS, std::array{-kKPlus, +kKPlus, -kPiPlus}, true, &sign, 2);
498500
if (indexRec > -1) {
499-
flag = sign * BIT(hf_cand_b0::DecayTypeMc::B0ToDsPiToKKPiPi);
501+
flag = sign * DecayChannelMain::B0ToDsPi;
500502
}
501503
}
502504
}
@@ -507,7 +509,7 @@ struct HfDataCreatorCharmHadPiReduced {
507509
// Ds- → K- K+ π-
508510
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(particlesMc, std::array{vecDaughtersB[0], vecDaughtersB[1], vecDaughtersB[2]}, -Pdg::kDS, std::array{-kKPlus, +kKPlus, -kPiPlus}, true, &sign, 2);
509511
if (indexRec > -1) {
510-
flag = sign * BIT(hf_cand_b0::DecayTypeMc::BsToDsPiToKKPiPi);
512+
flag = sign * DecayChannelMain::BsToDsPi;
511513
}
512514
}
513515
}
@@ -518,7 +520,7 @@ struct HfDataCreatorCharmHadPiReduced {
518520
// D- → π- K+ π-
519521
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(particlesMc, std::array{vecDaughtersB[0], vecDaughtersB[1], vecDaughtersB[2]}, Pdg::kDMinus, std::array{-kPiPlus, +kKPlus, -kPiPlus}, true, &sign, 2);
520522
if (indexRec > -1) {
521-
flag = sign * BIT(hf_cand_b0::DecayTypeMc::B0ToDplusKToPiKPiK);
523+
flag = sign * DecayChannelMain::B0ToDminusK;
522524
}
523525
}
524526
}
@@ -543,7 +545,7 @@ struct HfDataCreatorCharmHadPiReduced {
543545
// look for common b-hadron ancestor
544546
if (index0Mother > -1 && index1Mother > -1 && index2Mother > -1 && index3Mother > -1) {
545547
if (index0Mother == index1Mother && index1Mother == index2Mother && index2Mother == index3Mother) {
546-
flag = BIT(hf_cand_b0::DecayTypeMc::PartlyRecoDecay);
548+
flag = hf_cand_b0::DecayTypeMc::PartlyRecoDecay; // FIXME
547549
pdgCodeBeautyMother = particlesMc.rawIteratorAt(index0Mother).pdgCode();
548550
pdgCodeCharmMother = 0;
549551
pdgCodeProng0 = particleProng0.pdgCode();
@@ -697,7 +699,7 @@ struct HfDataCreatorCharmHadPiReduced {
697699
// look for common b-hadron ancestor
698700
if (index0Mother > -1 && index1Mother > -1 && index2Mother > -1 && index3Mother > -1) {
699701
if (index0Mother == index1Mother && index1Mother == index2Mother && index2Mother == index3Mother) {
700-
flag = BIT(hf_cand_bs::DecayTypeMc::PartlyRecoDecay);
702+
flag = BIT(hf_cand_bs::DecayTypeMc::PartlyRecoDecay); // FIXME
701703
pdgCodeBeautyMother = particlesMc.rawIteratorAt(index0Mother).pdgCode();
702704
pdgCodeCharmMother = 0;
703705
pdgCodeProng0 = particleProng0.pdgCode();
@@ -796,7 +798,7 @@ struct HfDataCreatorCharmHadPiReduced {
796798
// look for common b-hadron ancestor
797799
if (index0Mother > -1 && index1Mother > -1 && index2Mother > -1) {
798800
if (index0Mother == index1Mother && index1Mother == index2Mother) {
799-
flag = BIT(hf_cand_bplus::DecayTypeMc::PartlyRecoDecay);
801+
flag = BIT(hf_cand_bplus::DecayTypeMc::PartlyRecoDecay); // FIXME
800802
pdgCodeBeautyMother = particlesMc.rawIteratorAt(index0Mother).pdgCode();
801803
pdgCodeCharmMother = 0;
802804
pdgCodeProng0 = particleProng0.pdgCode();
@@ -899,7 +901,7 @@ struct HfDataCreatorCharmHadPiReduced {
899901
// look for common b-hadron ancestor
900902
if (index0Mother > -1 && index1Mother > -1 && index2Mother > -1 && index3Mother > -1) {
901903
if (index0Mother == index1Mother && index1Mother == index2Mother && index2Mother == index3Mother) {
902-
flag = BIT(hf_cand_b0::DecayTypeMc::PartlyRecoDecay);
904+
flag = hf_cand_b0::DecayTypeMc::PartlyRecoDecay; // FIXME
903905
pdgCodeBeautyMother = particlesMc.rawIteratorAt(index0Mother).pdgCode();
904906
pdgCodeCharmMother = 0;
905907
pdgCodeProng0 = particleProng0.pdgCode();
@@ -1363,12 +1365,12 @@ struct HfDataCreatorCharmHadPiReduced {
13631365
auto candCMC = particlesMc.rawIteratorAt(particle.daughtersIds().front());
13641366
// Printf("Checking D- -> π- K+ π-");
13651367
if (RecoDecay::isMatchedMCGen(particlesMc, candCMC, -static_cast<int>(Pdg::kDPlus), std::array{-kPiPlus, +kKPlus, -kPiPlus}, true, &sign, 2)) {
1366-
flag = sign * BIT(hf_cand_b0::DecayType::B0ToDPi);
1368+
flag = sign * DecayChannelMain::B0ToDminusPi;
13671369
}
13681370
}
13691371

13701372
// save information for B0 task
1371-
if (!TESTBIT(std::abs(flag), hf_cand_b0::DecayType::B0ToDPi)) {
1373+
if (std::abs(flag) != DecayChannelMain::B0ToDminusPi) {
13721374
continue;
13731375
}
13741376

PWGHF/D2H/Tasks/taskB0.cxx

Lines changed: 10 additions & 8 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
}
@@ -221,7 +223,7 @@ struct HfTaskB0 {
221223
auto invMassCandB0 = hfHelper.invMassB0ToDPi(candidate);
222224
int 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/taskB0Reduced.cxx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
/// \author Alexandre Bigot <alexandre.bigot@cern.ch>, IPHC Strasbourg
1616
/// \author Fabrizio Grosa <fabrizio.grosa@cern.ch>, CERN
1717

18+
#include "PWGHF/Core/DecayChannels.h"
1819
#include "PWGHF/Core/HfHelper.h"
1920
#include "PWGHF/D2H/DataModel/ReducedDataModel.h"
2021
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
@@ -46,6 +47,7 @@ using namespace o2::aod;
4647
using namespace o2::analysis;
4748
using namespace o2::framework;
4849
using namespace o2::framework::expressions;
50+
using namespace o2::hf_decay::hf_cand_beauty;
4951

5052
namespace o2::aod
5153
{
@@ -321,17 +323,17 @@ struct HfTaskB0Reduced {
321323
}
322324
// MC checks
323325
if (doprocessMcWithDecayTypeCheck || doprocessMcWithB0MlAndDecayTypeCheck || doprocessMcWithDmesMlAndDecayTypeCheck) {
324-
constexpr uint8_t kNBinsDecayTypeMc = hf_cand_b0::DecayTypeMc::NDecayTypeMc;
325-
TString labels[kNBinsDecayTypeMc];
326+
constexpr uint8_t NBinsDecayTypeMc = hf_cand_b0::DecayTypeMc::NDecayTypeMc;
327+
TString labels[NBinsDecayTypeMc];
326328
labels[hf_cand_b0::DecayTypeMc::B0ToDplusPiToPiKPiPi] = "B^{0} #rightarrow (D^{#minus} #rightarrow #pi^{#minus} K^{#plus} #pi^{#minus}) #pi^{#plus}";
327329
labels[hf_cand_b0::DecayTypeMc::B0ToDsPiToKKPiPi] = "B^{0} #rightarrow (D^{#minus}_{s} #rightarrow K^{#minus} K^{#plus} #pi^{#minus}) #pi^{#plus}";
328330
labels[hf_cand_b0::DecayTypeMc::BsToDsPiToKKPiPi] = "B_{s}^{0} #rightarrow (D^{#minus}_{s} #rightarrow K^{#minus} K^{#plus} #pi^{#minus}) #pi^{#plus}";
329331
labels[hf_cand_b0::DecayTypeMc::B0ToDplusKToPiKPiK] = "B^{0} #rightarrow (D^{#minus} #rightarrow #pi^{#minus} K^{#plus} #pi^{#minus}) K^{#plus}";
330332
labels[hf_cand_b0::DecayTypeMc::PartlyRecoDecay] = "Partly reconstructed decay channel";
331333
labels[hf_cand_b0::DecayTypeMc::OtherDecay] = "Other decays";
332-
static const AxisSpec axisDecayType = {kNBinsDecayTypeMc, 0.5, kNBinsDecayTypeMc + 0.5, ""};
334+
static const AxisSpec axisDecayType = {NBinsDecayTypeMc, 0.5, NBinsDecayTypeMc + 0.5, ""};
333335
registry.add("hDecayTypeMc", "DecayType", {HistType::kTH3F, {axisDecayType, axisMassB0, axisPtB0}});
334-
for (uint8_t iBin = 0; iBin < kNBinsDecayTypeMc; ++iBin) {
336+
for (uint8_t iBin = 0; iBin < NBinsDecayTypeMc; ++iBin) {
335337
registry.get<TH3>(HIST("hDecayTypeMc"))->GetXaxis()->SetBinLabel(iBin + 1, labels[iBin]);
336338
}
337339
}
@@ -415,7 +417,7 @@ struct HfTaskB0Reduced {
415417
if constexpr (doMc) {
416418
flagMcMatchRec = candidate.flagMcMatchRec();
417419
flagWrongCollision = candidate.flagWrongCollision();
418-
isSignal = TESTBIT(std::abs(flagMcMatchRec), hf_cand_b0::DecayTypeMc::B0ToDplusPiToPiKPiPi);
420+
isSignal = std::abs(flagMcMatchRec) == DecayChannelMain::B0ToDminusPi;
419421
}
420422

421423
if (fillHistograms) {
@@ -478,13 +480,13 @@ struct HfTaskB0Reduced {
478480
registry.fill(HIST("hMlScoreSigB0RecBg"), ptCandB0, candidate.mlProbB0ToDPi());
479481
}
480482
} else if constexpr (withDecayTypeCheck) {
481-
if (TESTBIT(flagMcMatchRec, hf_cand_b0::DecayTypeMc::B0ToDsPiToKKPiPi)) { // B0 → Ds- π+ → (K- K+ π-) π+
483+
if (flagMcMatchRec == DecayChannelMain::B0ToDsPi) { // B0 → Ds- π+ → (K- K+ π-) π+
482484
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_b0::DecayTypeMc::B0ToDsPiToKKPiPi, invMassB0, ptCandB0);
483-
} else if (TESTBIT(flagMcMatchRec, hf_cand_b0::DecayTypeMc::BsToDsPiToKKPiPi)) { // B0s → Ds- π+ → (K- K+ π-) π+
485+
} else if (flagMcMatchRec == DecayChannelMain::BsToDsPi) { // B0s → Ds- π+ → (K- K+ π-) π+
484486
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_b0::DecayTypeMc::BsToDsPiToKKPiPi, invMassB0, ptCandB0);
485-
} else if (TESTBIT(flagMcMatchRec, hf_cand_b0::DecayTypeMc::B0ToDplusKToPiKPiK)) { // B0 → D- K+ → (π- K+ π-) K+
487+
} else if (flagMcMatchRec == DecayChannelMain::B0ToDminusK) { // B0 → D- K+ → (π- K+ π-) K+
486488
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_b0::DecayTypeMc::B0ToDplusKToPiKPiK, invMassB0, ptCandB0);
487-
} else if (TESTBIT(flagMcMatchRec, hf_cand_b0::DecayTypeMc::PartlyRecoDecay)) { // Partly reconstructed decay channel
489+
} else if (flagMcMatchRec == hf_cand_b0::DecayTypeMc::PartlyRecoDecay) { // FIXME, Partly reconstructed decay channel
488490
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_b0::DecayTypeMc::PartlyRecoDecay, invMassB0, ptCandB0);
489491
} else {
490492
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_b0::DecayTypeMc::OtherDecay, invMassB0, ptCandB0);

PWGHF/D2H/Tasks/taskBplusReduced.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ struct HfTaskBplusReduced {
496496
} else if constexpr (withDecayTypeCheck) {
497497
if (TESTBIT(flagMcMatchRec, hf_cand_bplus::DecayTypeMc::BplusToD0KToKPiK)) { // Partly reconstructed decay channel
498498
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_bplus::DecayTypeMc::BplusToD0KToKPiK, invMassBplus, ptCandBplus);
499-
} else if (TESTBIT(flagMcMatchRec, hf_cand_bplus::DecayTypeMc::PartlyRecoDecay)) { // Partly reconstructed decay channel
499+
} else if (TESTBIT(flagMcMatchRec, hf_cand_bplus::DecayTypeMc::PartlyRecoDecay)) { // FIXME, Partly reconstructed decay channel
500500
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_bplus::DecayTypeMc::PartlyRecoDecay, invMassBplus, ptCandBplus);
501501
} else {
502502
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_bplus::DecayTypeMc::OtherDecay, invMassBplus, ptCandBplus);

PWGHF/D2H/Tasks/taskBs.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ struct HfTaskBs {
266266
if (checkDecayTypeMc) {
267267
if (TESTBIT(flagMcMatchRecBs, hf_cand_bs::DecayTypeMc::B0ToDsPiToPhiPiPiToKKPiPi)) { // B0(bar) → Ds± π∓ → (K- K+ π±) π∓
268268
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
269+
} else if (TESTBIT(flagMcMatchRecBs, hf_cand_bs::DecayTypeMc::PartlyRecoDecay)) { // FIXME, Partly reconstructed decay channel
270270
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_bs::DecayTypeMc::PartlyRecoDecay, invMassCandBs, ptCandBs);
271271
} else {
272272
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_bs::DecayTypeMc::NDecayTypeMc, invMassCandBs, ptCandBs);

PWGHF/D2H/Tasks/taskLbReduced.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ struct HfTaskLbReduced {
479479
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_lb::DecayTypeMc::LbToLcKToPKPiK, invMassLb, ptCandLb);
480480
} else if (TESTBIT(flagMcMatchRec, hf_cand_lb::DecayTypeMc::B0ToDplusPiToPiKPiPi)) { // // B0 → D- π+ → (π- K+ π-) π+
481481
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_lb::DecayTypeMc::B0ToDplusPiToPiKPiPi, invMassLb, ptCandLb);
482-
} else if (TESTBIT(flagMcMatchRec, hf_cand_lb::DecayTypeMc::PartlyRecoDecay)) { // Partly reconstructed decay channel
482+
} else if (TESTBIT(flagMcMatchRec, hf_cand_lb::DecayTypeMc::PartlyRecoDecay)) { // FIXME, Partly reconstructed decay channel
483483
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_lb::DecayTypeMc::PartlyRecoDecay, invMassLb, ptCandLb);
484484
} else {
485485
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_lb::DecayTypeMc::OtherDecay, invMassLb, ptCandLb);

PWGHF/TableProducer/candidateCreatorB0.cxx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
///
1616
/// \author Alexandre Bigot <alexandre.bigot@cern.ch>, IPHC Strasbourg
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"
@@ -429,7 +430,7 @@ struct HfCandidateCreatorB0Expressions {
429430
// D- → π- K+ π-
430431
indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughtersD, Pdg::kDMinus, std::array{-kPiPlus, +kKPlus, -kPiPlus}, true, &sign, 2);
431432
if (indexRec > -1) {
432-
flag = sign * BIT(hf_cand_b0::DecayTypeMc::B0ToDplusPiToPiKPiPi);
433+
flag = sign * o2::hf_decay::hf_cand_beauty::DecayChannelMain::B0ToDminusPi;
433434
} else {
434435
debug = 1;
435436
LOGF(debug, "WARNING: B0 in decays in the expected final state but the condition on the intermediate state is not fulfilled");
@@ -443,7 +444,7 @@ struct HfCandidateCreatorB0Expressions {
443444
// Ds- → K- K+ π-
444445
indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughtersD, -Pdg::kDS, std::array{-kKPlus, +kKPlus, -kPiPlus}, true, &sign, 2);
445446
if (indexRec > -1) {
446-
flag = sign * BIT(hf_cand_b0::DecayTypeMc::B0ToDsPiToKKPiPi);
447+
flag = sign * o2::hf_decay::hf_cand_beauty::DecayChannelMain::B0ToDsPi;
447448
}
448449
}
449450
}
@@ -465,11 +466,9 @@ struct HfCandidateCreatorB0Expressions {
465466
int index3Mother = RecoDecay::getMother(mcParticles, particleProng3, bHadronMotherHypo, true);
466467

467468
// look for common b-hadron ancestor
468-
if (index0Mother > -1 && index1Mother > -1 && index2Mother > -1 && index3Mother > -1) {
469-
if (index0Mother == index1Mother && index1Mother == index2Mother && index2Mother == index3Mother) {
470-
flag = BIT(hf_cand_b0::DecayTypeMc::PartlyRecoDecay);
471-
break;
472-
}
469+
if (index0Mother > -1 && index0Mother == index1Mother && index1Mother == index2Mother && index2Mother == index3Mother) {
470+
flag = hf_cand_b0::DecayTypeMc::PartlyRecoDecay; // FIXME
471+
break;
473472
}
474473
}
475474
}

0 commit comments

Comments
 (0)