Skip to content

Commit 38bd86e

Browse files
committed
More fixes
1 parent 3933ffb commit 38bd86e

15 files changed

+82
-56
lines changed

PWGHF/D2H/DataModel/ReducedDataModel.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ DECLARE_SOA_TABLE(HfMcCheckDpPis, "AOD", "HFMCCHECKDPPI", //! Table with reconst
807807
// Table with same size as HFCANDB0
808808
DECLARE_SOA_TABLE(HfMcRecRedB0s, "AOD", "HFMCRECREDB0", //! Reconstruction-level MC information on B0 candidates for reduced workflow
809809
hf_cand_b0::FlagMcMatchRec,
810-
hf_cand_b0::ChannelMcMatchRec,
810+
hf_cand_b0::FlagMcDecayChanRec,
811811
hf_cand_b0::FlagWrongCollision,
812812
hf_cand_b0::DebugMcRec,
813813
hf_b0_mc::PtMother);
@@ -823,7 +823,7 @@ DECLARE_SOA_TABLE(HfMcCheckB0s, "AOD", "HFMCCHECKB0", //! Table with reconstruct
823823

824824
DECLARE_SOA_TABLE(HfMcGenRedB0s, "AOD", "HFMCGENREDB0", //! Generation-level MC information on B0 candidates for reduced workflow
825825
hf_cand_b0::FlagMcMatchGen,
826-
hf_cand_b0::ChannelMcMatchRec,
826+
hf_cand_b0::FlagMcDecayChanRec,
827827
hf_b0_mc::PtTrack,
828828
hf_b0_mc::YTrack,
829829
hf_b0_mc::EtaTrack,
@@ -885,7 +885,7 @@ DECLARE_SOA_TABLE(HfMcRecRedJPKs, "AOD", "HFMCRECREDJPK", //! Table with reconst
885885
hf_cand_bplus_reduced::JpsiId,
886886
hf_cand_bplus_reduced::BachKaId,
887887
hf_cand_bplus::FlagMcMatchRec,
888-
hf_cand_bplus::ChannelMcMatchRec,
888+
hf_cand_bplus::FlagMcDecayChanRec,
889889
hf_cand_bplus::FlagWrongCollision,
890890
hf_cand_bplus::DebugMcRec,
891891
hf_bplus_mc::PtMother);
@@ -902,7 +902,7 @@ DECLARE_SOA_TABLE(HfMcCheckD0Pis, "AOD", "HFMCCHECKD0PI", //! Table with reconst
902902
// Table with same size as HFCANDBPLUS
903903
DECLARE_SOA_TABLE(HfMcRecRedBps, "AOD", "HFMCRECREDBP", //! Reconstruction-level MC information on B+ candidates for reduced workflow
904904
hf_cand_bplus::FlagMcMatchRec,
905-
hf_cand_bplus::ChannelMcMatchRec,
905+
hf_cand_bplus::FlagMcDecayChanRec,
906906
hf_cand_bplus::FlagWrongCollision,
907907
hf_cand_bplus::DebugMcRec,
908908
hf_bplus_mc::PtMother);
@@ -917,7 +917,7 @@ DECLARE_SOA_TABLE(HfMcCheckBps, "AOD", "HFMCCHECKBP", //! Table with reconstruct
917917

918918
DECLARE_SOA_TABLE(HfMcGenRedBps, "AOD", "HFMCGENREDBP", //! Generation-level MC information on B+ candidates for reduced workflow
919919
hf_cand_bplus::FlagMcMatchGen,
920-
hf_cand_bplus::ChannelMcMatchRec,
920+
hf_cand_bplus::FlagMcDecayChanRec,
921921
hf_bplus_mc::PtTrack,
922922
hf_bplus_mc::YTrack,
923923
hf_bplus_mc::EtaTrack,
@@ -987,7 +987,7 @@ DECLARE_SOA_TABLE(HfMcRecRedJPPhis, "AOD", "HFMCRECREDJPPHI", //! Table with rec
987987
hf_cand_bs_reduced::Prong0PhiId,
988988
hf_cand_bs_reduced::Prong1PhiId,
989989
hf_cand_bs::FlagMcMatchRec,
990-
hf_cand_bs::ChannelMcMatchRec,
990+
hf_cand_bs::FlagMcDecayChanRec,
991991
hf_cand_bs::FlagWrongCollision,
992992
hf_cand_bs::DebugMcRec,
993993
hf_bs_mc::PtMother);
@@ -1006,7 +1006,7 @@ DECLARE_SOA_TABLE(HfMcCheckDsPis, "AOD", "HFMCCHECKDSPI", //! Table with reconst
10061006
// Table with same size as HFCANDBS
10071007
DECLARE_SOA_TABLE(HfMcRecRedBss, "AOD", "HFMCRECREDBS", //! Reconstruction-level MC information on Bs candidates for reduced workflow
10081008
hf_cand_bs::FlagMcMatchRec,
1009-
hf_cand_bs::ChannelMcMatchRec,
1009+
hf_cand_bs::FlagMcDecayChanRec,
10101010
hf_cand_bs::FlagWrongCollision,
10111011
hf_cand_bs::DebugMcRec,
10121012
hf_bs_mc::PtMother);
@@ -1022,7 +1022,7 @@ DECLARE_SOA_TABLE(HfMcCheckBss, "AOD", "HFMCCHECKBS", //! Table with reconstruct
10221022

10231023
DECLARE_SOA_TABLE(HfMcGenRedBss, "AOD", "HFMCGENREDBS", //! Generation-level MC information on Bs candidates for reduced workflow
10241024
hf_cand_bs::FlagMcMatchGen,
1025-
hf_cand_bs::ChannelMcMatchRec,
1025+
hf_cand_bs::FlagMcDecayChanRec,
10261026
hf_bs_mc::PtTrack,
10271027
hf_bs_mc::YTrack,
10281028
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/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
@@ -150,7 +150,7 @@ DECLARE_SOA_TABLE(HfRedCandBpLites, "AOD", "HFREDCANDBPLITE", //! Table with som
150150
hf_cand_bplustojpsik_lite::NSigTpcTofKaBachelor,
151151
// MC truth
152152
hf_cand_bplus::FlagMcMatchRec,
153-
hf_cand_bplus::ChannelMcMatchRec,
153+
hf_cand_bplus::FlagMcDecayChanRec,
154154
hf_cand_bplus::OriginMcRec,
155155
hf_cand_bplustojpsik_lite::FlagWrongCollision,
156156
hf_cand_bplustojpsik_lite::PtGen);
@@ -324,11 +324,11 @@ struct HfTaskBplusToJpsiKReduced {
324324
auto invMassJpsi = candJpsi.m();
325325
uint8_t statusBplus = 0;
326326

327-
int8_t flagMcMatchRec{0}, channelMcMatchRec{0}, flagWrongCollision{0};
327+
int8_t flagMcMatchRec{0}, flagMcDecayChanRec{0}, flagWrongCollision{0};
328328
bool isSignal = false;
329329
if constexpr (doMc) {
330330
flagMcMatchRec = candidate.flagMcMatchRec();
331-
channelMcMatchRec = candidate.channelMcMatchRec();
331+
flagMcDecayChanRec = candidate.flagMcDecayChanRec();
332332
flagWrongCollision = candidate.flagWrongCollision();
333333
isSignal = std::abs(flagMcMatchRec) == o2::hf_decay::hf_cand_beauty::BplusToJpsiK;
334334
}
@@ -431,7 +431,7 @@ struct HfTaskBplusToJpsiKReduced {
431431
candKa.tpcTofNSigmaKa(),
432432
// MC truth
433433
flagMcMatchRec,
434-
channelMcMatchRec,
434+
flagMcDecayChanRec,
435435
isSignal,
436436
flagWrongCollision,
437437
ptMother);

PWGHF/D2H/Tasks/taskBs.cxx

Lines changed: 7 additions & 5 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 {
@@ -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, DecayChannelMain::BsToDsPi)) {
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)) { // FIXME, 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()), DecayChannelMain::BsToDsPi)) {
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
@@ -169,7 +169,7 @@ DECLARE_SOA_TABLE(HfRedCandBsLites, "AOD", "HFREDCANDBSLITE", //! Table with som
169169
hf_cand_bstojpsiphi_lite::NSigTpcTofKaBachelor1,
170170
// MC truth
171171
hf_cand_bs::FlagMcMatchRec,
172-
hf_cand_bs::ChannelMcMatchRec,
172+
hf_cand_bs::FlagMcDecayChanRec,
173173
hf_cand_bs::OriginMcRec,
174174
hf_cand_bstojpsiphi_lite::FlagWrongCollision,
175175
hf_cand_bstojpsiphi_lite::PtGen);
@@ -354,14 +354,14 @@ struct HfTaskBsToJpsiPhiReduced {
354354
auto invMassPhi = RecoDecay::m(std::array{pVecKa0, pVecKa1}, std::array{o2::constants::physics::MassKPlus, o2::constants::physics::MassKPlus});
355355
uint8_t statusBs = 0;
356356

357-
int8_t flagMcMatchRec{0}, channelMcMatchRec{0}, flagWrongCollision{0};
357+
int8_t flagMcMatchRec{0}, flagMcDecayChanRec{0}, flagWrongCollision{0};
358358
bool isSignal = false;
359359
if constexpr (doMc) {
360360
flagMcMatchRec = candidate.flagMcMatchRec();
361-
channelMcMatchRec = candidate.channelMcMatchRec();
361+
flagMcDecayChanRec = candidate.flagMcDecayChanRec();
362362
flagWrongCollision = candidate.flagWrongCollision();
363363
isSignal = flagMcMatchRec == o2::hf_decay::hf_cand_beauty::BsToJpsiKK &&
364-
channelMcMatchRec == o2::hf_decay::hf_cand_beauty::BsToJpsiPhi;
364+
flagMcDecayChanRec == o2::hf_decay::hf_cand_beauty::BsToJpsiPhi;
365365
}
366366

367367
SETBIT(statusBs, SelectionStep::RecoSkims);
@@ -474,7 +474,7 @@ struct HfTaskBsToJpsiPhiReduced {
474474
candKa1.tpcTofNSigmaKa(),
475475
// MC truth
476476
flagMcMatchRec,
477-
channelMcMatchRec,
477+
flagMcDecayChanRec,
478478
isSignal,
479479
flagWrongCollision,
480480
ptMother);

PWGHF/D2H/Tasks/taskLb.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
/// \author Panos Christakoglou <panos.christakoglou@cern.ch>, Nikhef
1616
/// \author Martin Voelkl <martin.andreas.volkl@cern.ch>, University of Birmingham
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"
@@ -53,6 +54,7 @@ using namespace o2::aod;
5354
using namespace o2::analysis;
5455
using namespace o2::framework;
5556
using namespace o2::framework::expressions;
57+
using namespace o2::hf_decay::hf_cand_beauty;
5658

5759
/// Λb0 analysis task
5860
struct HfTaskLb {
@@ -351,7 +353,7 @@ struct HfTaskLb {
351353
auto candLc = candidate.prong0_as<soa::Join<aod::HfCand3Prong, aod::HfCand3ProngMcRec>>();
352354
int flagMcMatchRecLb = std::abs(candidate.flagMcMatchRec());
353355

354-
if (TESTBIT(flagMcMatchRecLb, hf_cand_lb::DecayType::LbToLcPi)) {
356+
if (flagMcMatchRecLb == DecayChannelMain::LbToLcPi) {
355357

356358
auto indexMother = RecoDecay::getMother(mcParticles, candidate.prong1_as<TracksWExtMc>().mcParticle_as<soa::Join<aod::McParticles, aod::HfCandLbMcGen>>(), o2::constants::physics::Pdg::kLambdaB0, true);
357359
auto particleMother = mcParticles.rawIteratorAt(indexMother);
@@ -398,7 +400,7 @@ struct HfTaskLb {
398400

399401
// MC gen. level
400402
for (const auto& particle : mcParticles) {
401-
if (std::abs(particle.flagMcMatchGen()) == 1 << hf_cand_lb::DecayType::LbToLcPi) {
403+
if (std::abs(particle.flagMcMatchGen()) == DecayChannelMain::LbToLcPi) {
402404

403405
auto yParticle = RecoDecay::y(particle.pVector(), o2::constants::physics::MassLambdaB0);
404406
if (yCandGenMax >= 0. && std::abs(yParticle) > yCandGenMax) {

PWGHF/DataModel/CandidateReconstructionTables.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2254,15 +2254,15 @@ using HfCandB0 = soa::Join<HfCandB0Ext, HfCandB0Prongs>;
22542254
// table with results of reconstruction level MC matching
22552255
DECLARE_SOA_TABLE(HfCandB0McRec, "AOD", "HFCANDB0MCREC",
22562256
hf_cand_b0::FlagMcMatchRec,
2257-
hf_cand_b0::OriginMcRec,
22582257
hf_cand_b0::FlagMcDecayChanRec,
2258+
hf_cand_b0::OriginMcRec,
22592259
hf_cand_b0::DebugMcRec);
22602260

22612261
// table with results of generator level MC matching
22622262
DECLARE_SOA_TABLE(HfCandB0McGen, "AOD", "HFCANDB0MCGEN",
22632263
hf_cand_b0::FlagMcMatchGen,
2264-
hf_cand_b0::OriginMcGen,
2265-
hf_cand_b0::FlagMcDecayChanGen);
2264+
hf_cand_b0::FlagMcDecayChanGen,
2265+
hf_cand_b0::OriginMcGen);
22662266

22672267
// specific Bs candidate properties
22682268
namespace hf_cand_bs

PWGHF/TableProducer/candidateCreatorB0.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ using namespace o2::constants::physics;
6868
using namespace o2::framework;
6969
using namespace o2::framework::expressions;
7070
using namespace o2::hf_trkcandsel;
71+
using namespace o2::hf_decay::hf_cand_beauty;
7172

7273
/// Reconstruction of B0 candidates
7374
struct HfCandidateCreatorB0 {
@@ -431,7 +432,7 @@ struct HfCandidateCreatorB0Expressions {
431432
// D- → π- K+ π-
432433
indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughtersD, Pdg::kDMinus, std::array{-kPiPlus, +kKPlus, -kPiPlus}, true, &sign, 2);
433434
if (indexRec > -1) {
434-
flagChannelMain = sign * o2::hf_decay::hf_cand_beauty::DecayChannelMain::B0ToDminusPi;
435+
flagChannelMain = sign * DecayChannelMain::B0ToDminusPi;
435436
} else {
436437
debug = 1;
437438
LOGF(debug, "WARNING: B0 in decays in the expected final state but the condition on the intermediate state is not fulfilled");
@@ -445,7 +446,7 @@ struct HfCandidateCreatorB0Expressions {
445446
// Ds- → K- K+ π-
446447
indexRec = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughtersD, -Pdg::kDS, std::array{-kKPlus, +kKPlus, -kPiPlus}, true, &sign, 2);
447448
if (indexRec > -1) {
448-
flagChannelMain = sign * o2::hf_decay::hf_cand_beauty::DecayChannelMain::B0ToDsPi;
449+
flagChannelMain = sign * DecayChannelMain::B0ToDsPi;
449450
}
450451
}
451452
}
@@ -474,7 +475,7 @@ struct HfCandidateCreatorB0Expressions {
474475
}
475476
}
476477

477-
rowMcMatchRec(flagChannelMain, origin, debug);
478+
rowMcMatchRec(flagChannelMain, flagChannelReso, origin, debug);
478479
} // rec
479480

480481
hf_mc_gen::fillMcMatchGenB0(mcParticles, rowMcMatchGen); // gen

PWGHF/TableProducer/candidateCreatorBplus.cxx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
/// \author Deepa Thomas <deepa.thomas@cern.ch>, UT Austin
1919
/// \author Antonio Palasciano <antonio.palasciano@cern.ch>, Università degli Studi di Bari & INFN, Sezione di Bari
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"
@@ -70,6 +71,7 @@ using namespace o2::aod;
7071
using namespace o2::constants::physics;
7172
using namespace o2::framework;
7273
using namespace o2::framework::expressions;
74+
using namespace o2::hf_decay::hf_cand_beauty;
7375

7476
/// Reconstruction of B± → D0bar(D0) π± → (K± π∓) π±
7577
struct HfCandidateCreatorBplus {
@@ -388,14 +390,16 @@ struct HfCandidateCreatorBplusExpressions {
388390

389391
int indexRec = -1, indexRecD0 = -1;
390392
int8_t signB = 0, signD0 = 0;
391-
int8_t flag = 0;
393+
int8_t flagChannelMain = 0;
394+
int8_t flagChannelReso = 0;
392395
int8_t origin = 0;
393396

394397
// Match reconstructed candidates.
395398
// Spawned table can be used directly
396399
for (const auto& candidate : candsBplus) {
397400

398-
flag = 0;
401+
flagChannelMain = 0;
402+
flagChannelReso = 0;
399403
origin = 0;
400404
auto candDaughterD0 = candidate.prong0();
401405
auto arrayDaughtersD0 = std::array{candDaughterD0.prong0_as<aod::TracksWMc>(), candDaughterD0.prong1_as<aod::TracksWMc>()};
@@ -406,9 +410,9 @@ struct HfCandidateCreatorBplusExpressions {
406410
indexRecD0 = RecoDecay::getMatchedMCRec(mcParticles, arrayDaughtersD0, -Pdg::kD0, std::array{+kKPlus, -kPiPlus}, true, &signD0, 1);
407411

408412
if (indexRecD0 > -1 && indexRec > -1) {
409-
flag = signB * (1 << hf_cand_bplus::DecayType::BplusToD0Pi);
413+
flagChannelMain = signB * DecayChannelMain::BplusToD0Pi;
410414
}
411-
rowMcMatchRec(flag, origin);
415+
rowMcMatchRec(flagChannelMain, flagChannelReso, origin);
412416
}
413417
hf_mc_gen::fillMcMatchGenBplus(mcParticles, rowMcMatchGen); // gen
414418
} // process

0 commit comments

Comments
 (0)