Skip to content

Commit 079247e

Browse files
committed
Further migration
1 parent df6534f commit 079247e

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

PWGHF/TableProducer/candidateCreatorBs.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ struct HfCandidateCreatorBsExpressions {
446446
arrPDGDaughDs[iProng] = std::abs(daughI.pdgCode());
447447
}
448448
if ((arrPDGDaughDs[0] == arrPDGResonantDsPhiPi[0] && arrPDGDaughDs[1] == arrPDGResonantDsPhiPi[1]) || (arrPDGDaughDs[0] == arrPDGResonantDsPhiPi[1] && arrPDGDaughDs[1] == arrPDGResonantDsPhiPi[0])) {
449-
flagChannelMain = sign * BIT(hf_cand_bs::DecayTypeMc::B0ToDsPiToPhiPiPiToKKPiPi);
449+
flagChannelMain = sign * DecayChannelMain::B0ToDsPi;
450450
}
451451
}
452452
}
@@ -472,7 +472,7 @@ struct HfCandidateCreatorBsExpressions {
472472
// look for common b-hadron ancestor
473473
if (index0Mother > -1 && index1Mother > -1 && index2Mother > -1 && index3Mother > -1) {
474474
if (index0Mother == index1Mother && index1Mother == index2Mother && index2Mother == index3Mother) {
475-
flagChannelMain = BIT(hf_cand_bs::DecayTypeMc::PartlyRecoDecay); // FIXME
475+
flagChannelMain = hf_cand_bs::DecayTypeMc::PartlyRecoDecay; // FIXME
476476
break;
477477
}
478478
}
@@ -519,7 +519,7 @@ struct HfCandidateCreatorBsExpressions {
519519
arrPDGDaughDs[jProng] = std::abs(daughJ.pdgCode());
520520
}
521521
if ((arrPDGDaughDs[0] == arrPDGResonantDsPhiPi[0] && arrPDGDaughDs[1] == arrPDGResonantDsPhiPi[1]) || (arrPDGDaughDs[0] == arrPDGResonantDsPhiPi[1] && arrPDGDaughDs[1] == arrPDGResonantDsPhiPi[0])) {
522-
flagChannelMain = sign * BIT(hf_cand_bs::DecayTypeMc::B0ToDsPiToPhiPiPiToKKPiPi);
522+
flagChannelMain = sign * DecayChannelMain::B0ToDsPi;
523523
}
524524
}
525525
}

PWGHF/TableProducer/derivedDataCreatorB0ToDPi.cxx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ using namespace o2::framework;
5353
using namespace o2::framework::expressions;
5454
using namespace o2::aod::pid_tpc_tof_utils;
5555
using namespace o2::analysis::hf_derived;
56+
using namespace o2::hf_decay::hf_cand_beauty;
5657

5758
/// Writes the full information in an output TTree
5859
struct HfDerivedDataCreatorB0ToDPi {
@@ -106,7 +107,7 @@ struct HfDerivedDataCreatorB0ToDPi {
106107
using THfCandDaughtersMl = soa::Join<aod::HfCand3ProngWPidPiKa, aod::HfMlDplusToPiKPi>;
107108

108109
Filter filterSelectCandidates = (aod::hf_sel_candidate_b0::isSelB0ToDPi & static_cast<int8_t>(BIT(aod::SelectionStep::RecoMl - 1))) != 0;
109-
Filter filterMcGenMatching = nabs(aod::hf_cand_b0::flagMcMatchGen) == static_cast<int8_t>(o2::hf_decay::hf_cand_beauty::DecayChannelMain::B0ToDminusPi);
110+
Filter filterMcGenMatching = nabs(aod::hf_cand_b0::flagMcMatchGen) == static_cast<int8_t>(DecayChannelMain::B0ToDminusPi);
110111

111112
Preslice<SelectedCandidates> candidatesPerCollision = aod::hf_cand::collisionId;
112113
Preslice<SelectedCandidatesMc> candidatesMcPerCollision = aod::hf_cand::collisionId;
@@ -120,10 +121,10 @@ struct HfDerivedDataCreatorB0ToDPi {
120121
Partition<SelectedCandidatesMl> candidatesMlAll = aod::hf_sel_candidate_b0::isSelB0ToDPi >= 0;
121122
Partition<SelectedCandidatesMcMl> candidatesMcMlAll = aod::hf_sel_candidate_b0::isSelB0ToDPi >= 0;
122123
// partitions for signal and background
123-
Partition<SelectedCandidatesMc> candidatesMcSig = nabs(aod::hf_cand_b0::flagMcMatchRec) == static_cast<int8_t>(o2::hf_decay::hf_cand_beauty::DecayChannelMain::B0ToDminusPi);
124-
Partition<SelectedCandidatesMc> candidatesMcBkg = nabs(aod::hf_cand_b0::flagMcMatchRec) != static_cast<int8_t>(o2::hf_decay::hf_cand_beauty::DecayChannelMain::B0ToDminusPi);
125-
Partition<SelectedCandidatesMcMl> candidatesMcMlSig = nabs(aod::hf_cand_b0::flagMcMatchRec) == static_cast<int8_t>(o2::hf_decay::hf_cand_beauty::DecayChannelMain::B0ToDminusPi);
126-
Partition<SelectedCandidatesMcMl> candidatesMcMlBkg = nabs(aod::hf_cand_b0::flagMcMatchRec) != static_cast<int8_t>(o2::hf_decay::hf_cand_beauty::DecayChannelMain::B0ToDminusPi);
124+
Partition<SelectedCandidatesMc> candidatesMcSig = nabs(aod::hf_cand_b0::flagMcMatchRec) == static_cast<int8_t>(DecayChannelMain::B0ToDminusPi);
125+
Partition<SelectedCandidatesMc> candidatesMcBkg = nabs(aod::hf_cand_b0::flagMcMatchRec) != static_cast<int8_t>(DecayChannelMain::B0ToDminusPi);
126+
Partition<SelectedCandidatesMcMl> candidatesMcMlSig = nabs(aod::hf_cand_b0::flagMcMatchRec) == static_cast<int8_t>(DecayChannelMain::B0ToDminusPi);
127+
Partition<SelectedCandidatesMcMl> candidatesMcMlBkg = nabs(aod::hf_cand_b0::flagMcMatchRec) != static_cast<int8_t>(DecayChannelMain::B0ToDminusPi);
127128

128129
void init(InitContext const&)
129130
{
@@ -291,7 +292,7 @@ struct HfDerivedDataCreatorB0ToDPi {
291292
flagMcRec = candidate.flagMcMatchRec();
292293
origin = candidate.originMcRec();
293294
if constexpr (onlyBkg) {
294-
if (std::abs(flagMcRec) == o2::hf_decay::hf_cand_beauty::DecayChannelMain::B0ToDminusPi) {
295+
if (std::abs(flagMcRec) == DecayChannelMain::B0ToDminusPi) {
295296
continue;
296297
}
297298
if (downSampleBkgFactor < 1.) {
@@ -302,7 +303,7 @@ struct HfDerivedDataCreatorB0ToDPi {
302303
}
303304
}
304305
if constexpr (onlySig) {
305-
if (std::abs(flagMcRec) != o2::hf_decay::hf_cand_beauty::DecayChannelMain::B0ToDminusPi) {
306+
if (std::abs(flagMcRec) != DecayChannelMain::B0ToDminusPi) {
306307
continue;
307308
}
308309
}

PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
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;
5354
using namespace o2::framework::expressions;
5455
using namespace o2::aod::pid_tpc_tof_utils;
5556
using namespace o2::analysis::hf_derived;
57+
using namespace o2::hf_decay::hf_cand_beauty;
5658

5759
/// Writes the full information in an output TTree
5860
struct 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

Comments
 (0)