Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 33 additions & 6 deletions PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,9 @@ struct HfDataCreatorCharmHadPiReduced {
std::array<int, 3> const bHadronMotherHypos = {Pdg::kB0, Pdg::kBS, Pdg::kLambdaB0};
// c-hadron hypothesis
std::array<int, 4> const cHadronMotherHypos = {Pdg::kDPlus, Pdg::kDS, Pdg::kDStar, Pdg::kLambdaCPlus};
// excited Lc+ hypotheses (Lb0 -> Lc+(2595, 2625) pi- -> (Lc+ pi+ pi-) pi-), and Lc+ -> p K- pi+
std::array<int, 2> const lcStarMotherHypos = {Pdg::kLambdaCPlus2595, Pdg::kLambdaCPlus2625};
std::array<uint8_t, 2> const lcStarDecayTypes = {hf_cand_lb::DecayTypeMc::Lb0ToLc2595PiToLcPiPiPi, hf_cand_lb::DecayTypeMc::Lb0ToLc2625PiToLcPiPiPi};

for (const auto& bHadronMotherHypo : bHadronMotherHypos) {
int const index0Mother = RecoDecay::getMother(particlesMc, particleProng0, bHadronMotherHypo, true);
Expand All @@ -964,6 +967,7 @@ struct HfDataCreatorCharmHadPiReduced {
pdgCodeProng2 = particleProng2.pdgCode();
pdgCodeProng3 = particleProng3.pdgCode();
// look for common c-hadron mother among prongs 0, 1 and 2
int indexLcMother{-1}; // index of the Λc+ mother of prongs 0, 1, 2 (if any)
for (const auto& cHadronMotherHypo : cHadronMotherHypos) {
int8_t depthMax = 2;
if (cHadronMotherHypo == Pdg::kDStar) { // to include D* -> D π0/γ and D* -> D0 π
Expand All @@ -974,13 +978,35 @@ struct HfDataCreatorCharmHadPiReduced {
int const index2CharmMother = RecoDecay::getMother(particlesMc, particleProng2, cHadronMotherHypo, true, &sign, depthMax);
if (index0CharmMother > -1 && index1CharmMother > -1 && index2CharmMother > -1) {
if (index0CharmMother == index1CharmMother && index1CharmMother == index2CharmMother) {
// pdgCodeCharmMother =
// Pdg::kDPlus (if D+ is the mother and does not come from D*+)
// Pdg::kDPlus + Pdg::kDStar (if D+ is the mother and D*+ -> D+ π0/γ)
// Pdg::kDStar (if D*+ is the mother and D*+ -> D0 π+)
// Pdg::kDS (if Ds is the mother)
// Pdg::kLambdaCPlus (if Λc+ is the mother)
pdgCodeCharmMother += std::abs(particlesMc.rawIteratorAt(index0CharmMother).pdgCode());
if (cHadronMotherHypo == Pdg::kLambdaCPlus) {
indexLcMother = index0CharmMother;
}
}
}
}

// Lb0 -> Lc+(2595, 2625) pi- -> (Lc+ pi+ pi-) pi-
// the bachelor pi- must be a direct daughter of the same Lb0
if (bHadronMotherHypo == Pdg::kLambdaB0 && indexLcMother > -1) {
int8_t signLb{0};
int const indexLbDirectBachelor = RecoDecay::getMother(particlesMc, particleProng3, Pdg::kLambdaB0, true, &signLb, 1);
if (indexLbDirectBachelor == index0Mother) {
auto particleLc = particlesMc.rawIteratorAt(indexLcMother);
for (std::size_t iHypo = 0; iHypo < lcStarMotherHypos.size(); ++iHypo) {
int8_t signLcStar{0};
// depth 2: Λc* → Λc+ π+ π- (non-resonant) and Λc* → X π → Λc+ π+ π- (intermediate resonance)
int const indexLcStar = RecoDecay::getMother(particlesMc, particleLc, lcStarMotherHypos[iHypo], true, &signLcStar, 2);
if (indexLcStar < 0) {
continue;
}
auto particleLcStar = particlesMc.rawIteratorAt(indexLcStar);
int const indexLbOfLcStar = RecoDecay::getMother(particlesMc, particleLcStar, Pdg::kLambdaB0, true, nullptr, 1);
if (indexLbOfLcStar == index0Mother && signLcStar == signLb) {
flag = signLb * BIT(lcStarDecayTypes[iHypo]); // signed, as for the signal flag
pdgCodeCharmMother = std::abs(particleLcStar.pdgCode()); // 14122 or 4124
break;
}
}
}
}
Expand All @@ -989,6 +1015,7 @@ struct HfDataCreatorCharmHadPiReduced {
}
}
}

tables.rowHfLcPiMcCheckReduced(pdgCodeBeautyMother, pdgCodeCharmMother, pdgCodeProng0, pdgCodeProng1, pdgCodeProng2, pdgCodeProng3);
}
tables.rowHfLcPiMcRecReduced(indexHfCandCharm, selectedTracksPion.at(vecDaughtersB.back().globalIndex()), flag, flagWrongCollision, debug, motherPt);
Expand Down
13 changes: 10 additions & 3 deletions PWGHF/D2H/Tasks/taskLbReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ struct HfTaskLbReduced {
labels[hf_cand_lb::DecayTypeMc::LbToLcPiToPKPiPi] = "#Lambda_{b}^{0} #rightarrow (#Lambda_{c}^{#plus} #rightarrow p K^{#minus} #pi^{#plus}) #pi^{#minus}";
labels[hf_cand_lb::DecayTypeMc::B0ToDplusPiToPiKPiPi] = "B^{0} #rightarrow (D^{#minus} #rightarrow #pi^{#minus} K^{#plus} #pi^{#minus}) #pi^{#plus}";
labels[hf_cand_lb::DecayTypeMc::LbToLcKToPKPiK] = "#Lambda_{b}^{0} #rightarrow (#Lambda_{c}^{#plus} #rightarrow p K^{#minus} #pi^{#plus}) K^{#minus}";
labels[hf_cand_lb::DecayTypeMc::Lb0ToLc2595PiToLcPiPiPi] = "#Lambda_{b}^{0} #rightarrow #Lambda_{c}(2595)^{#plus} #pi^{#minus} #rightarrow #Lambda_{c}^{#plus} #pi^{#plus} #pi^{#minus} #pi^{#minus}";
labels[hf_cand_lb::DecayTypeMc::Lb0ToLc2625PiToLcPiPiPi] = "#Lambda_{b}^{0} #rightarrow #Lambda_{c}(2625)^{#plus} #pi^{#minus} #rightarrow #Lambda_{c}^{#plus} #pi^{#plus} #pi^{#minus} #pi^{#minus}";
labels[hf_cand_lb::DecayTypeMc::PartlyRecoDecay] = "Partly reconstructed decay channel";
labels[hf_cand_lb::DecayTypeMc::OtherDecay] = "Other decays";
static const AxisSpec axisDecayType = {kNBinsDecayTypeMc, 0.5, kNBinsDecayTypeMc + 0.5, ""};
Expand Down Expand Up @@ -485,11 +487,16 @@ struct HfTaskLbReduced {
registry.fill(HIST("hMlScoreSigLbRecBg"), ptCandLb, candidate.mlProbLbToLcPi());
}
} else if constexpr (WithDecayTypeCheck) {
if (TESTBIT(flagMcMatchRec, hf_cand_lb::DecayTypeMc::LbToLcKToPKPiK)) { // Lb → Lc+ K- → (pK-π+) K-
// flags are signed (-BIT(k) for charge conjugates): their upper bits are all set, so use std::abs(flag) to test a single bit.
if (TESTBIT(std::abs(flagMcMatchRec), hf_cand_lb::DecayTypeMc::LbToLcKToPKPiK)) { // Lb → Lc+ K- → (pK-π+) K-
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_lb::DecayTypeMc::LbToLcKToPKPiK, invMassLb, ptCandLb);
} else if (TESTBIT(flagMcMatchRec, hf_cand_lb::DecayTypeMc::B0ToDplusPiToPiKPiPi)) { // // B0 → D- π+ → (π- K+ π-) π+
} else if (TESTBIT(std::abs(flagMcMatchRec), hf_cand_lb::DecayTypeMc::B0ToDplusPiToPiKPiPi)) { // // B0 → D- π+ → (π- K+ π-) π+
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_lb::DecayTypeMc::B0ToDplusPiToPiKPiPi, invMassLb, ptCandLb);
} else if (TESTBIT(flagMcMatchRec, hf_cand_lb::DecayTypeMc::PartlyRecoDecay)) { // Partly reconstructed decay channel
} else if (TESTBIT(std::abs(flagMcMatchRec), hf_cand_lb::DecayTypeMc::Lb0ToLc2595PiToLcPiPiPi)) { // Lb0 -> Lc+(2595) pi- -> (Lc+ pi+ pi-) pi-
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_lb::DecayTypeMc::Lb0ToLc2595PiToLcPiPiPi, invMassLb, ptCandLb);
} else if (TESTBIT(std::abs(flagMcMatchRec), hf_cand_lb::DecayTypeMc::Lb0ToLc2625PiToLcPiPiPi)) { // Lb0 -> Lc+(2625) pi- -> (Lc+ pi+ pi-) pi-
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_lb::DecayTypeMc::Lb0ToLc2625PiToLcPiPiPi, invMassLb, ptCandLb);
} else if (TESTBIT(std::abs(flagMcMatchRec), hf_cand_lb::DecayTypeMc::PartlyRecoDecay)) { // Partly reconstructed decay channel
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_lb::DecayTypeMc::PartlyRecoDecay, invMassLb, ptCandLb);
} else {
registry.fill(HIST("hDecayTypeMc"), 1 + hf_cand_lb::DecayTypeMc::OtherDecay, invMassLb, ptCandLb);
Expand Down
2 changes: 2 additions & 0 deletions PWGHF/DataModel/CandidateReconstructionTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -1859,6 +1859,8 @@ DECLARE_SOA_INDEX_COLUMN_FULL(Prong0, prong0, int, HfCand3Prong, "_0"); // Lb in
enum DecayTypeMc : uint8_t { LbToLcPiToPKPiPi = 0,
LbToLcKToPKPiK,
B0ToDplusPiToPiKPiPi,
Lb0ToLc2595PiToLcPiPiPi,
Lb0ToLc2625PiToLcPiPiPi,
PartlyRecoDecay,
OtherDecay,
NDecayTypeMc };
Expand Down
Loading