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;
8182using namespace o2 ::framework;
8283using namespace o2 ::framework::expressions;
8384using namespace o2 ::hf_trkcandsel;
85+ using namespace o2 ::hf_decay::hf_cand_beauty;
8486
8587enum 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
0 commit comments