Skip to content

Commit 86f480b

Browse files
authored
[PWGHF] B+ improve correlated background identification (AliceO2Group#9878)
1 parent b759a34 commit 86f480b

File tree

4 files changed

+37
-8
lines changed

4 files changed

+37
-8
lines changed

PWGHF/D2H/DataModel/ReducedDataModel.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ namespace aod
4040
{
4141
namespace hf_reduced_collision
4242
{
43-
DECLARE_SOA_COLUMN(Bz, bz, float); //! Magnetic field in z-direction
43+
DECLARE_SOA_COLUMN(Bz, bz, float); //! Magnetic field in z-direction
4444
DECLARE_SOA_COLUMN(HfCollisionRejectionMap, hfCollisionRejectionMap, uint16_t); //! Bitmask with failed selection criteria
4545
// keep track of the number of studied events (for normalization purposes)
46-
DECLARE_SOA_COLUMN(OriginalCollisionCount, originalCollisionCount, int); //! Size of COLLISION table processed
46+
DECLARE_SOA_COLUMN(OriginalCollisionCount, originalCollisionCount, int); //! Size of COLLISION table processed
4747
DECLARE_SOA_COLUMN(ZvtxSelectedCollisionCount, zvtxSelectedCollisionCount, int); //! Number of COLLISIONS with |zvtx| < zvtxMax
4848
DECLARE_SOA_COLUMN(TriggerSelectedCollisionCount, triggerSelectedCollisionCount, int); //! Number of COLLISIONS with sel8
4949
DECLARE_SOA_COLUMN(ZvtxAndTriggerSelectedCollisionCount, zvtxAndTriggerSelectedCollisionCount, int); //! Number of COLLISIONS with |zvtx| < zvtxMax and sel8
@@ -516,6 +516,7 @@ DECLARE_SOA_COLUMN(YProng1, yProng1, float); //! Rapidity of the track's pro
516516
DECLARE_SOA_COLUMN(EtaProng1, etaProng1, float); //! Pseudorapidity of the track's prong1
517517

518518
DECLARE_SOA_COLUMN(PdgCodeBeautyMother, pdgCodeBeautyMother, int); //! Pdg code of beauty mother
519+
DECLARE_SOA_COLUMN(PdgCodeCharmMother, pdgCodeCharmMother, int); //! Pdg code of charm mother
519520
DECLARE_SOA_COLUMN(PdgCodeProng0, pdgCodeProng0, int); //! Pdg code of prong0
520521
DECLARE_SOA_COLUMN(PdgCodeProng1, pdgCodeProng1, int); //! Pdg code of prong1
521522
DECLARE_SOA_COLUMN(PdgCodeProng2, pdgCodeProng2, int); //! Pdg code of prong2
@@ -533,6 +534,7 @@ DECLARE_SOA_TABLE(HfMcRecRedD0Pis, "AOD", "HFMCRECREDD0PI", //! Table with recon
533534
// DECLARE_SOA_EXTENDED_TABLE_USER(ExTable, Tracks, "EXTABLE",
534535
DECLARE_SOA_TABLE(HfMcCheckD0Pis, "AOD", "HFMCCHECKD0PI", //! Table with reconstructed MC information on D0Pi(<-B0) pairs for MC checks in reduced workflow
535536
hf_bplus_mc::PdgCodeBeautyMother,
537+
hf_bplus_mc::PdgCodeCharmMother,
536538
hf_bplus_mc::PdgCodeProng0,
537539
hf_bplus_mc::PdgCodeProng1,
538540
hf_bplus_mc::PdgCodeProng2,
@@ -547,6 +549,7 @@ DECLARE_SOA_TABLE(HfMcRecRedBps, "AOD", "HFMCRECREDBP", //! Reconstruction-level
547549

548550
DECLARE_SOA_TABLE(HfMcCheckBps, "AOD", "HFMCCHECKBP", //! Table with reconstructed MC information on B+ candidates for MC checks in reduced workflow
549551
hf_bplus_mc::PdgCodeBeautyMother,
552+
hf_bplus_mc::PdgCodeCharmMother,
550553
hf_bplus_mc::PdgCodeProng0,
551554
hf_bplus_mc::PdgCodeProng1,
552555
hf_bplus_mc::PdgCodeProng2,
@@ -687,7 +690,7 @@ DECLARE_SOA_COLUMN(Dca, dca, float); //! DCA of V0 candidate
687690
DECLARE_SOA_COLUMN(Radius, radius, float); //! Radius of V0 candidate
688691
DECLARE_SOA_COLUMN(V0Type, v0Type, uint8_t); //! Bitmap with mass hypothesis of the V0
689692

690-
DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //!
693+
DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //!
691694
[](float pxProng0, float pxProng1) -> float { return 1.f * pxProng0 + 1.f * pxProng1; });
692695
DECLARE_SOA_DYNAMIC_COLUMN(Py, py, //!
693696
[](float pyProng0, float pyProng1) -> float { return 1.f * pyProng0 + 1.f * pyProng1; });

PWGHF/D2H/TableProducer/candidateCreatorBplusReduced.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ struct HfCandidateCreatorBplusReduced {
200200
}
201201
}
202202
} // pi loop
203-
} // D0 loop
204-
} // end runCandidateCreation
203+
} // D0 loop
204+
} // end runCandidateCreation
205205

206206
void processData(HfRedCollisionsWithExtras const& collisions,
207207
soa::Join<aod::HfRed2Prongs, aod::HfRed2ProngsCov> const& candsD,
@@ -297,6 +297,7 @@ struct HfCandidateCreatorBplusReducedExpressions {
297297
filledMcInfo = true;
298298
if constexpr (checkDecayTypeMc) {
299299
rowBplusMcCheck(rowD0PiMcRec.pdgCodeBeautyMother(),
300+
rowD0PiMcRec.pdgCodeCharmMother(),
300301
rowD0PiMcRec.pdgCodeProng0(),
301302
rowD0PiMcRec.pdgCodeProng1(),
302303
rowD0PiMcRec.pdgCodeProng2());
@@ -306,7 +307,7 @@ struct HfCandidateCreatorBplusReducedExpressions {
306307
if (!filledMcInfo) { // protection to get same size tables in case something went wrong: we created a candidate that was not preselected in the D0-Pi creator
307308
rowBplusMcRec(0, -1, -1, -1.f);
308309
if constexpr (checkDecayTypeMc) {
309-
rowBplusMcCheck(-1, -1, -1, -1);
310+
rowBplusMcCheck(-1, -1, -1, -1, -1);
310311
}
311312
}
312313
}

PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,9 @@ struct HfDataCreatorCharmHadPiReduced {
651651
auto particleProng1 = vecDaughtersB[1].mcParticle();
652652
auto particleProng2 = vecDaughtersB[2].mcParticle();
653653
// b-hadron hypothesis
654-
std::array<int, 3> bHadronMotherHypos = {Pdg::kBPlus, Pdg::kB0, Pdg::kBS};
654+
std::array<int, 4> bHadronMotherHypos = {Pdg::kBPlus, Pdg::kB0, Pdg::kBS, Pdg::kLambdaB0};
655+
// c-hadron hypothesis
656+
std::array<int, 5> cHadronMotherHypos = {Pdg::kDPlus, Pdg::kDS, Pdg::kDStar, Pdg::kDSStar, Pdg::kLambdaCPlus};
655657

656658
for (const auto& bHadronMotherHypo : bHadronMotherHypos) {
657659
int index0Mother = RecoDecay::getMother(particlesMc, particleProng0, bHadronMotherHypo, true);
@@ -667,12 +669,33 @@ struct HfDataCreatorCharmHadPiReduced {
667669
pdgCodeProng0 = particleProng0.pdgCode();
668670
pdgCodeProng1 = particleProng1.pdgCode();
669671
pdgCodeProng2 = particleProng2.pdgCode();
672+
// look for common c-hadron mother among prongs 0, 1 and 2
673+
for (const auto& cHadronMotherHypo : cHadronMotherHypos) {
674+
int8_t depthMax = 2;
675+
if (cHadronMotherHypo == Pdg::kDStar || cHadronMotherHypo == Pdg::kDSStar) { // to include D* -> D π0/γ, D* -> D0 π, and Ds* -> Ds π0/γ
676+
depthMax += 1;
677+
}
678+
int index0CharmMother = RecoDecay::getMother(particlesMc, particleProng0, cHadronMotherHypo, true, &sign, depthMax);
679+
int index1CharmMother = RecoDecay::getMother(particlesMc, particleProng1, cHadronMotherHypo, true, &sign, depthMax);
680+
if (index0CharmMother > -1 && index1CharmMother > -1) {
681+
if (index0CharmMother == index1CharmMother) {
682+
// pdgCodeCharmMother =
683+
// Pdg::kDPlus (if D+ is the mother and does not come from D*+)
684+
// Pdg::kDPlus + Pdg::kDStar (if D+ is the mother and D*+ -> D+ π0/γ)
685+
// Pdg::kDStar (if D*+ is the mother and D*+ -> D0 π+)
686+
// Pdg::kDS (if Ds is the mother and does not come from Ds*)
687+
// Pdg::kDS + Pdg::kDSStar (if Ds is the mother and Ds* -> Ds π0/γ)
688+
// Pdg::kLambdaCPlus (if Λc+ is the mother)
689+
pdgCodeCharmMother += std::abs(particlesMc.rawIteratorAt(index0CharmMother).pdgCode());
690+
}
691+
}
692+
}
670693
break;
671694
}
672695
}
673696
}
674697
}
675-
rowHfD0PiMcCheckReduced(pdgCodeBeautyMother, pdgCodeProng0, pdgCodeProng1, pdgCodeProng2);
698+
rowHfD0PiMcCheckReduced(pdgCodeBeautyMother, pdgCodeCharmMother, pdgCodeProng0, pdgCodeProng1, pdgCodeProng2);
676699
}
677700
rowHfD0PiMcRecReduced(indexHfCandCharm, selectedTracksPion[vecDaughtersB.back().globalIndex()], flag, flagWrongCollision, debug, motherPt);
678701
}

PWGHF/D2H/Tasks/taskBplusReduced.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ DECLARE_SOA_TABLE(HfRedBpMcCheck, "AOD", "HFREDBPMCCHECK", //! Table with MC dec
148148
hf_cand_bplus_lite::Pt,
149149
hf_cand_bplus_lite::MlScoreSig,
150150
hf_bplus_mc::PdgCodeBeautyMother,
151+
hf_bplus_mc::PdgCodeCharmMother,
151152
hf_bplus_mc::PdgCodeProng0,
152153
hf_bplus_mc::PdgCodeProng1,
153154
hf_bplus_mc::PdgCodeProng2);
@@ -640,6 +641,7 @@ struct HfTaskBplusReduced {
640641
ptCandBplus,
641642
candidateMlScoreSig,
642643
candidate.pdgCodeBeautyMother(),
644+
candidate.pdgCodeCharmMother(),
643645
candidate.pdgCodeProng0(),
644646
candidate.pdgCodeProng1(),
645647
candidate.pdgCodeProng2());

0 commit comments

Comments
 (0)