Skip to content

Commit 3cb4a87

Browse files
committed
Revert changes in reduced workflows
1 parent 273539c commit 3cb4a87

File tree

5 files changed

+26
-30
lines changed

5 files changed

+26
-30
lines changed

PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx

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

2121
#include "PWGHF/Core/CentralityEstimation.h"
22-
#include "PWGHF/Core/DecayChannels.h"
2322
#include "PWGHF/Core/HfHelper.h"
2423
#include "PWGHF/Core/SelectorCuts.h"
2524
#include "PWGHF/D2H/DataModel/ReducedDataModel.h"
@@ -82,7 +81,6 @@ using namespace o2::constants::physics;
8281
using namespace o2::framework;
8382
using namespace o2::framework::expressions;
8483
using namespace o2::hf_trkcandsel;
85-
using namespace o2::hf_decay::hf_cand_beauty;
8684

8785
enum Event : uint8_t {
8886
Processed = 0,
@@ -475,7 +473,7 @@ struct HfDataCreatorCharmHadPiReduced {
475473
// Printf("Checking D- → π- K+ π-");
476474
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);
477475
if (indexRec > -1) {
478-
flag = sign * DecayChannelMain::B0ToDminusPi;
476+
flag = sign * BIT(hf_cand_b0::DecayTypeMc::B0ToDplusPiToPiKPiPi);
479477
} else {
480478
debug = 1;
481479
LOGF(debug, "B0 decays in the expected final state but the condition on the intermediate state is not fulfilled");
@@ -498,7 +496,7 @@ struct HfDataCreatorCharmHadPiReduced {
498496
// Ds- → K- K+ π-
499497
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);
500498
if (indexRec > -1) {
501-
flag = sign * DecayChannelMain::B0ToDsPi;
499+
flag = sign * BIT(hf_cand_b0::DecayTypeMc::B0ToDsPiToKKPiPi);
502500
}
503501
}
504502
}
@@ -509,7 +507,7 @@ struct HfDataCreatorCharmHadPiReduced {
509507
// Ds- → K- K+ π-
510508
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);
511509
if (indexRec > -1) {
512-
flag = sign * DecayChannelMain::BsToDsPi;
510+
flag = sign * BIT(hf_cand_b0::DecayTypeMc::BsToDsPiToKKPiPi);
513511
}
514512
}
515513
}
@@ -520,7 +518,7 @@ struct HfDataCreatorCharmHadPiReduced {
520518
// D- → π- K+ π-
521519
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);
522520
if (indexRec > -1) {
523-
flag = sign * DecayChannelMain::B0ToDminusK;
521+
flag = sign * BIT(hf_cand_b0::DecayTypeMc::B0ToDplusKToPiKPiK);
524522
}
525523
}
526524
}
@@ -545,7 +543,7 @@ struct HfDataCreatorCharmHadPiReduced {
545543
// look for common b-hadron ancestor
546544
if (index0Mother > -1 && index1Mother > -1 && index2Mother > -1 && index3Mother > -1) {
547545
if (index0Mother == index1Mother && index1Mother == index2Mother && index2Mother == index3Mother) {
548-
flag = hf_cand_b0::DecayTypeMc::PartlyRecoDecay; // FIXME
546+
flag = BIT(hf_cand_b0::DecayTypeMc::PartlyRecoDecay);
549547
pdgCodeBeautyMother = particlesMc.rawIteratorAt(index0Mother).pdgCode();
550548
pdgCodeCharmMother = 0;
551549
pdgCodeProng0 = particleProng0.pdgCode();
@@ -598,7 +596,7 @@ struct HfDataCreatorCharmHadPiReduced {
598596
}
599597
// Ds- → Phi π- → K- K+ π- and Ds- → K0* K- → K- K+ π-
600598
if ((arrPDGDaughDs[0] == arrPDGResonantDsPhiPi[0] && arrPDGDaughDs[1] == arrPDGResonantDsPhiPi[1]) || (arrPDGDaughDs[0] == arrPDGResonantDsPhiPi[1] && arrPDGDaughDs[1] == arrPDGResonantDsPhiPi[0])) {
601-
flag = sign * DecayChannelMain::BsToDsPi;
599+
flag = sign * BIT(hf_cand_bs::DecayTypeMc::BsToDsPiToPhiPiPiToKKPiPi);
602600
} else if ((arrPDGDaughDs[0] == arrPDGResonantDKstarK[0] && arrPDGDaughDs[1] == arrPDGResonantDKstarK[1]) || (arrPDGDaughDs[0] == arrPDGResonantDKstarK[1] && arrPDGDaughDs[1] == arrPDGResonantDKstarK[0])) {
603601
flag = sign * BIT(hf_cand_bs::DecayTypeMc::BsToDsPiToK0starKPiToKKPiPi);
604602
}
@@ -699,7 +697,7 @@ struct HfDataCreatorCharmHadPiReduced {
699697
// look for common b-hadron ancestor
700698
if (index0Mother > -1 && index1Mother > -1 && index2Mother > -1 && index3Mother > -1) {
701699
if (index0Mother == index1Mother && index1Mother == index2Mother && index2Mother == index3Mother) {
702-
flag = BIT(hf_cand_bs::DecayTypeMc::PartlyRecoDecay); // FIXME
700+
flag = BIT(hf_cand_bs::DecayTypeMc::PartlyRecoDecay);
703701
pdgCodeBeautyMother = particlesMc.rawIteratorAt(index0Mother).pdgCode();
704702
pdgCodeCharmMother = 0;
705703
pdgCodeProng0 = particleProng0.pdgCode();
@@ -798,7 +796,7 @@ struct HfDataCreatorCharmHadPiReduced {
798796
// look for common b-hadron ancestor
799797
if (index0Mother > -1 && index1Mother > -1 && index2Mother > -1) {
800798
if (index0Mother == index1Mother && index1Mother == index2Mother) {
801-
flag = BIT(hf_cand_bplus::DecayTypeMc::PartlyRecoDecay); // FIXME
799+
flag = BIT(hf_cand_bplus::DecayTypeMc::PartlyRecoDecay);
802800
pdgCodeBeautyMother = particlesMc.rawIteratorAt(index0Mother).pdgCode();
803801
pdgCodeCharmMother = 0;
804802
pdgCodeProng0 = particleProng0.pdgCode();
@@ -901,7 +899,7 @@ struct HfDataCreatorCharmHadPiReduced {
901899
// look for common b-hadron ancestor
902900
if (index0Mother > -1 && index1Mother > -1 && index2Mother > -1 && index3Mother > -1) {
903901
if (index0Mother == index1Mother && index1Mother == index2Mother && index2Mother == index3Mother) {
904-
flag = hf_cand_b0::DecayTypeMc::PartlyRecoDecay; // FIXME
902+
flag = BIT(hf_cand_b0::DecayTypeMc::PartlyRecoDecay);
905903
pdgCodeBeautyMother = particlesMc.rawIteratorAt(index0Mother).pdgCode();
906904
pdgCodeCharmMother = 0;
907905
pdgCodeProng0 = particleProng0.pdgCode();
@@ -1365,12 +1363,12 @@ struct HfDataCreatorCharmHadPiReduced {
13651363
auto candCMC = particlesMc.rawIteratorAt(particle.daughtersIds().front());
13661364
// Printf("Checking D- -> π- K+ π-");
13671365
if (RecoDecay::isMatchedMCGen(particlesMc, candCMC, -static_cast<int>(Pdg::kDPlus), std::array{-kPiPlus, +kKPlus, -kPiPlus}, true, &sign, 2)) {
1368-
flag = sign * DecayChannelMain::B0ToDminusPi;
1366+
flag = sign * BIT(hf_cand_b0::DecayType::B0ToDPi);
13691367
}
13701368
}
13711369

13721370
// save information for B0 task
1373-
if (std::abs(flag) != DecayChannelMain::B0ToDminusPi) {
1371+
if (!TESTBIT(std::abs(flag), hf_cand_b0::DecayType::B0ToDPi)) {
13741372
continue;
13751373
}
13761374

@@ -1407,7 +1405,7 @@ struct HfDataCreatorCharmHadPiReduced {
14071405
}
14081406
// Ds- → Phi π- → K- K+ π- and Ds- → K0* K- → K- K+ π-
14091407
if ((arrPDGDaughDs[0] == arrPDGResonantDsPhiPi[0] && arrPDGDaughDs[1] == arrPDGResonantDsPhiPi[1]) || (arrPDGDaughDs[0] == arrPDGResonantDsPhiPi[1] && arrPDGDaughDs[1] == arrPDGResonantDsPhiPi[0])) {
1410-
flag = sign * DecayChannelMain::BsToDsPi;
1408+
flag = sign * BIT(hf_cand_bs::DecayTypeMc::BsToDsPiToPhiPiPiToKKPiPi);
14111409
} else if ((arrPDGDaughDs[0] == arrPDGResonantDKstarK[0] && arrPDGDaughDs[1] == arrPDGResonantDKstarK[1]) || (arrPDGDaughDs[0] == arrPDGResonantDKstarK[1] && arrPDGDaughDs[1] == arrPDGResonantDKstarK[0])) {
14121410
flag = sign * BIT(hf_cand_bs::DecayTypeMc::BsToDsPiToK0starKPiToKKPiPi);
14131411
}
@@ -1444,7 +1442,7 @@ struct HfDataCreatorCharmHadPiReduced {
14441442
}
14451443

14461444
// save information for Bs task
1447-
if (!TESTBIT(std::abs(flag), DecayChannelMain::BsToDsPi) && !TESTBIT(std::abs(flag), hf_cand_bs::DecayTypeMc::BsToDsPiToK0starKPiToKKPiPi) &&
1445+
if (!TESTBIT(std::abs(flag), hf_cand_bs::DecayTypeMc::BsToDsPiToPhiPiPiToKKPiPi) && !TESTBIT(std::abs(flag), hf_cand_bs::DecayTypeMc::BsToDsPiToK0starKPiToKKPiPi) &&
14481446
!TESTBIT(std::abs(flag), hf_cand_bs::DecayTypeMc::B0ToDsPiToPhiPiPiToKKPiPi) && !TESTBIT(std::abs(flag), hf_cand_bs::DecayTypeMc::B0ToDsPiToK0starKPiToKKPiPi)) {
14491447
continue;
14501448
}

PWGHF/D2H/Tasks/taskB0Reduced.cxx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
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"
1918
#include "PWGHF/Core/HfHelper.h"
2019
#include "PWGHF/D2H/DataModel/ReducedDataModel.h"
2120
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
@@ -47,7 +46,6 @@ using namespace o2::aod;
4746
using namespace o2::analysis;
4847
using namespace o2::framework;
4948
using namespace o2::framework::expressions;
50-
using namespace o2::hf_decay::hf_cand_beauty;
5149

5250
namespace o2::aod
5351
{
@@ -323,17 +321,17 @@ struct HfTaskB0Reduced {
323321
}
324322
// MC checks
325323
if (doprocessMcWithDecayTypeCheck || doprocessMcWithB0MlAndDecayTypeCheck || doprocessMcWithDmesMlAndDecayTypeCheck) {
326-
constexpr uint8_t NBinsDecayTypeMc = hf_cand_b0::DecayTypeMc::NDecayTypeMc;
327-
TString labels[NBinsDecayTypeMc];
324+
constexpr uint8_t kNBinsDecayTypeMc = hf_cand_b0::DecayTypeMc::NDecayTypeMc;
325+
TString labels[kNBinsDecayTypeMc];
328326
labels[hf_cand_b0::DecayTypeMc::B0ToDplusPiToPiKPiPi] = "B^{0} #rightarrow (D^{#minus} #rightarrow #pi^{#minus} K^{#plus} #pi^{#minus}) #pi^{#plus}";
329327
labels[hf_cand_b0::DecayTypeMc::B0ToDsPiToKKPiPi] = "B^{0} #rightarrow (D^{#minus}_{s} #rightarrow K^{#minus} K^{#plus} #pi^{#minus}) #pi^{#plus}";
330328
labels[hf_cand_b0::DecayTypeMc::BsToDsPiToKKPiPi] = "B_{s}^{0} #rightarrow (D^{#minus}_{s} #rightarrow K^{#minus} K^{#plus} #pi^{#minus}) #pi^{#plus}";
331329
labels[hf_cand_b0::DecayTypeMc::B0ToDplusKToPiKPiK] = "B^{0} #rightarrow (D^{#minus} #rightarrow #pi^{#minus} K^{#plus} #pi^{#minus}) K^{#plus}";
332330
labels[hf_cand_b0::DecayTypeMc::PartlyRecoDecay] = "Partly reconstructed decay channel";
333331
labels[hf_cand_b0::DecayTypeMc::OtherDecay] = "Other decays";
334-
static const AxisSpec axisDecayType = {NBinsDecayTypeMc, 0.5, NBinsDecayTypeMc + 0.5, ""};
332+
static const AxisSpec axisDecayType = {kNBinsDecayTypeMc, 0.5, kNBinsDecayTypeMc + 0.5, ""};
335333
registry.add("hDecayTypeMc", "DecayType", {HistType::kTH3F, {axisDecayType, axisMassB0, axisPtB0}});
336-
for (uint8_t iBin = 0; iBin < NBinsDecayTypeMc; ++iBin) {
334+
for (uint8_t iBin = 0; iBin < kNBinsDecayTypeMc; ++iBin) {
337335
registry.get<TH3>(HIST("hDecayTypeMc"))->GetXaxis()->SetBinLabel(iBin + 1, labels[iBin]);
338336
}
339337
}
@@ -417,7 +415,7 @@ struct HfTaskB0Reduced {
417415
if constexpr (doMc) {
418416
flagMcMatchRec = candidate.flagMcMatchRec();
419417
flagWrongCollision = candidate.flagWrongCollision();
420-
isSignal = std::abs(flagMcMatchRec) == DecayChannelMain::B0ToDminusPi;
418+
isSignal = TESTBIT(std::abs(flagMcMatchRec), hf_cand_b0::DecayTypeMc::B0ToDplusPiToPiKPiPi);
421419
}
422420

423421
if (fillHistograms) {
@@ -480,13 +478,13 @@ struct HfTaskB0Reduced {
480478
registry.fill(HIST("hMlScoreSigB0RecBg"), ptCandB0, candidate.mlProbB0ToDPi());
481479
}
482480
} else if constexpr (withDecayTypeCheck) {
483-
if (flagMcMatchRec == DecayChannelMain::B0ToDsPi) { // B0 → Ds- π+ → (K- K+ π-) π+
481+
if (TESTBIT(flagMcMatchRec, hf_cand_b0::DecayTypeMc::B0ToDsPiToKKPiPi)) { // B0 → Ds- π+ → (K- K+ π-) π+
484482
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_b0::DecayTypeMc::B0ToDsPiToKKPiPi, invMassB0, ptCandB0);
485-
} else if (flagMcMatchRec == DecayChannelMain::BsToDsPi) { // B0s → Ds- π+ → (K- K+ π-) π+
483+
} else if (TESTBIT(flagMcMatchRec, hf_cand_b0::DecayTypeMc::BsToDsPiToKKPiPi)) { // B0s → Ds- π+ → (K- K+ π-) π+
486484
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_b0::DecayTypeMc::BsToDsPiToKKPiPi, invMassB0, ptCandB0);
487-
} else if (flagMcMatchRec == DecayChannelMain::B0ToDminusK) { // B0 → D- K+ → (π- K+ π-) K+
485+
} else if (TESTBIT(flagMcMatchRec, hf_cand_b0::DecayTypeMc::B0ToDplusKToPiKPiK)) { // B0 → D- K+ → (π- K+ π-) K+
488486
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_b0::DecayTypeMc::B0ToDplusKToPiKPiK, invMassB0, ptCandB0);
489-
} else if (flagMcMatchRec == hf_cand_b0::DecayTypeMc::PartlyRecoDecay) { // FIXME, Partly reconstructed decay channel
487+
} else if (TESTBIT(flagMcMatchRec, hf_cand_b0::DecayTypeMc::PartlyRecoDecay)) { // Partly reconstructed decay channel
490488
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_b0::DecayTypeMc::PartlyRecoDecay, invMassB0, ptCandB0);
491489
} else {
492490
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)) { // FIXME, Partly reconstructed decay channel
499+
} else if (TESTBIT(flagMcMatchRec, hf_cand_bplus::DecayTypeMc::PartlyRecoDecay)) { // 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/taskBsReduced.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ struct HfTaskBsReduced {
368368
if constexpr (doMc) {
369369
flagMcMatchRec = candidate.flagMcMatchRec();
370370
flagWrongCollision = candidate.flagWrongCollision();
371-
isSignal = TESTBIT(std::abs(flagMcMatchRec), DecayChannelMain::BsToDsPi);
371+
isSignal = TESTBIT(std::abs(flagMcMatchRec), hf_cand_bs::DecayTypeMc::BsToDsPiToPhiPiPiToKKPiPi);
372372
}
373373

374374
if (fillHistograms) {
@@ -572,7 +572,7 @@ struct HfTaskBsReduced {
572572
void fillCandMcGen(aod::HfMcGenRedBss::iterator const& particle)
573573
{
574574
// keep only generated Bs with the analysis decay channel
575-
if (!TESTBIT(std::abs(particle.flagMcMatchGen()), DecayChannelMain::BsToDsPi)) {
575+
if (!TESTBIT(std::abs(particle.flagMcMatchGen()), hf_cand_bs::DecayTypeMc::BsToDsPiToPhiPiPiToKKPiPi)) {
576576
return;
577577
}
578578
auto ptParticle = particle.ptTrack();

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)) { // FIXME, Partly reconstructed decay channel
482+
} else if (TESTBIT(flagMcMatchRec, hf_cand_lb::DecayTypeMc::PartlyRecoDecay)) { // 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);

0 commit comments

Comments
 (0)