From 3e64a4f35a65b88214a67ef5b4c57322210535dc Mon Sep 17 00:00:00 2001 From: Daiki Sekihata Date: Tue, 1 Dec 2026 13:13:40 +0100 Subject: [PATCH] [PWGHF] add bits for Lc+(2595,2625) in MC reco flag for Lb0 analysis --- .../dataCreatorCharmHadPiReduced.cxx | 39 ++++++++++++++++--- PWGHF/D2H/Tasks/taskLbReduced.cxx | 13 +++++-- .../DataModel/CandidateReconstructionTables.h | 2 + 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx index 1ce65722fb2..c93d6252615 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx @@ -946,6 +946,9 @@ struct HfDataCreatorCharmHadPiReduced { std::array const bHadronMotherHypos = {Pdg::kB0, Pdg::kBS, Pdg::kLambdaB0}; // c-hadron hypothesis std::array 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 const lcStarMotherHypos = {Pdg::kLambdaCPlus2595, Pdg::kLambdaCPlus2625}; + std::array 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); @@ -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 π @@ -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; + } } } } @@ -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); diff --git a/PWGHF/D2H/Tasks/taskLbReduced.cxx b/PWGHF/D2H/Tasks/taskLbReduced.cxx index da430368482..2bd3d139f81 100644 --- a/PWGHF/D2H/Tasks/taskLbReduced.cxx +++ b/PWGHF/D2H/Tasks/taskLbReduced.cxx @@ -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, ""}; @@ -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); diff --git a/PWGHF/DataModel/CandidateReconstructionTables.h b/PWGHF/DataModel/CandidateReconstructionTables.h index a6d60e03580..70f9501b000 100644 --- a/PWGHF/DataModel/CandidateReconstructionTables.h +++ b/PWGHF/DataModel/CandidateReconstructionTables.h @@ -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 };