1515// /
1616// / \author Vít Kučera <vit.kucera@cern.ch>, Inha University
1717
18+ #include " PWGHF/Core/DecayChannels.h"
1819#include " PWGHF/Core/HfHelper.h"
1920#include " PWGHF/DataModel/CandidateReconstructionTables.h"
2021#include " PWGHF/DataModel/CandidateSelectionTables.h"
@@ -53,6 +54,7 @@ using namespace o2::framework;
5354using namespace o2 ::framework::expressions;
5455using namespace o2 ::aod::pid_tpc_tof_utils;
5556using namespace o2 ::analysis::hf_derived;
57+ using namespace o2 ::hf_decay::hf_cand_beauty;
5658
5759// / Writes the full information in an output TTree
5860struct HfDerivedDataCreatorBplusToD0Pi {
@@ -106,7 +108,7 @@ struct HfDerivedDataCreatorBplusToD0Pi {
106108 using THfCandDaughtersMl = soa::Join<aod::HfCand2ProngWPid, aod::HfMlD0>;
107109
108110 Filter filterSelectCandidates = (aod::hf_sel_candidate_bplus::isSelBplusToD0Pi & static_cast <int8_t >(BIT(aod::SelectionStep::RecoMl - 1 ))) != 0 ;
109- Filter filterMcGenMatching = nabs(aod::hf_cand_bplus::flagMcMatchGen) == static_cast <int8_t >(BIT(aod::hf_cand_bplus::DecayType:: BplusToD0Pi) );
111+ Filter filterMcGenMatching = nabs(aod::hf_cand_bplus::flagMcMatchGen) == static_cast <int8_t >(DecayChannelMain:: BplusToD0Pi);
110112
111113 Preslice<SelectedCandidates> candidatesPerCollision = aod::hf_cand::collisionId;
112114 Preslice<SelectedCandidatesMc> candidatesMcPerCollision = aod::hf_cand::collisionId;
@@ -120,10 +122,10 @@ struct HfDerivedDataCreatorBplusToD0Pi {
120122 Partition<SelectedCandidatesMl> candidatesMlAll = aod::hf_sel_candidate_bplus::isSelBplusToD0Pi >= 0 ;
121123 Partition<SelectedCandidatesMcMl> candidatesMcMlAll = aod::hf_sel_candidate_bplus::isSelBplusToD0Pi >= 0 ;
122124 // partitions for signal and background
123- Partition<SelectedCandidatesMc> candidatesMcSig = nabs(aod::hf_cand_bplus::flagMcMatchRec) == static_cast <int8_t >(BIT(aod::hf_cand_bplus::DecayType:: BplusToD0Pi) );
124- Partition<SelectedCandidatesMc> candidatesMcBkg = nabs(aod::hf_cand_bplus::flagMcMatchRec) != static_cast <int8_t >(BIT(aod::hf_cand_bplus::DecayType:: BplusToD0Pi) );
125- Partition<SelectedCandidatesMcMl> candidatesMcMlSig = nabs(aod::hf_cand_bplus::flagMcMatchRec) == static_cast <int8_t >(BIT(aod::hf_cand_bplus::DecayType:: BplusToD0Pi) );
126- Partition<SelectedCandidatesMcMl> candidatesMcMlBkg = nabs(aod::hf_cand_bplus::flagMcMatchRec) != static_cast <int8_t >(BIT(aod::hf_cand_bplus::DecayType:: BplusToD0Pi) );
125+ Partition<SelectedCandidatesMc> candidatesMcSig = nabs(aod::hf_cand_bplus::flagMcMatchRec) == static_cast <int8_t >(DecayChannelMain:: BplusToD0Pi);
126+ Partition<SelectedCandidatesMc> candidatesMcBkg = nabs(aod::hf_cand_bplus::flagMcMatchRec) != static_cast <int8_t >(DecayChannelMain:: BplusToD0Pi);
127+ Partition<SelectedCandidatesMcMl> candidatesMcMlSig = nabs(aod::hf_cand_bplus::flagMcMatchRec) == static_cast <int8_t >(DecayChannelMain:: BplusToD0Pi);
128+ Partition<SelectedCandidatesMcMl> candidatesMcMlBkg = nabs(aod::hf_cand_bplus::flagMcMatchRec) != static_cast <int8_t >(DecayChannelMain:: BplusToD0Pi);
127129
128130 void init (InitContext const &)
129131 {
@@ -293,7 +295,7 @@ struct HfDerivedDataCreatorBplusToD0Pi {
293295 flagMcRec = candidate.flagMcMatchRec ();
294296 origin = candidate.originMcRec ();
295297 if constexpr (onlyBkg) {
296- if (TESTBIT ( std::abs (flagMcRec), aod::hf_cand_bplus::DecayType:: BplusToD0Pi) ) {
298+ if (std::abs (flagMcRec) == DecayChannelMain:: BplusToD0Pi) {
297299 continue ;
298300 }
299301 if (downSampleBkgFactor < 1 .) {
@@ -304,7 +306,7 @@ struct HfDerivedDataCreatorBplusToD0Pi {
304306 }
305307 }
306308 if constexpr (onlySig) {
307- if (! TESTBIT ( std::abs (flagMcRec), aod::hf_cand_bplus::DecayType:: BplusToD0Pi) ) {
309+ if (std::abs (flagMcRec) != DecayChannelMain:: BplusToD0Pi) {
308310 continue ;
309311 }
310312 }
0 commit comments