Skip to content

Commit

Permalink
PWGHF: Add check for wrong collision association for B0 and B+ mesons (
Browse files Browse the repository at this point in the history
…#7779)

* Add check for wrong collision association for B0 and B+ mesons

* Please consider the following formatting changes

* B+: fix MC gen level

* Implement Fabrizio's suggestions

---------

Co-authored-by: ALICE Action Bot <[email protected]>
Co-authored-by: Antonio Palasciano <[email protected]>
  • Loading branch information
3 people authored Oct 3, 2024
1 parent 1e355da commit a733d0e
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 54 deletions.
4 changes: 4 additions & 0 deletions PWGHF/D2H/DataModel/ReducedDataModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ DECLARE_SOA_TABLE(HfMcRecRedDpPis, "AOD", "HFMCRECREDDPPI", //! Table with recon
hf_cand_b0_reduced::Prong0Id,
hf_cand_b0_reduced::Prong1Id,
hf_cand_b0::FlagMcMatchRec,
hf_cand_b0::FlagWrongCollision,
hf_cand_b0::DebugMcRec,
hf_b0_mc::PtMother);

Expand All @@ -312,6 +313,7 @@ DECLARE_SOA_TABLE(HfMcCheckDpPis, "AOD", "HFMCCHECKDPPI", //! Table with reconst
// Table with same size as HFCANDB0
DECLARE_SOA_TABLE(HfMcRecRedB0s, "AOD", "HFMCRECREDB0", //! Reconstruction-level MC information on B0 candidates for reduced workflow
hf_cand_b0::FlagMcMatchRec,
hf_cand_b0::FlagWrongCollision,
hf_cand_b0::DebugMcRec,
hf_b0_mc::PtMother);

Expand Down Expand Up @@ -374,6 +376,7 @@ DECLARE_SOA_TABLE(HfMcRecRedD0Pis, "AOD", "HFMCRECREDD0PI", //! Table with recon
hf_cand_bplus_reduced::Prong0Id,
hf_cand_bplus_reduced::Prong1Id,
hf_cand_bplus::FlagMcMatchRec,
hf_cand_bplus::FlagWrongCollision,
hf_cand_bplus::DebugMcRec,
hf_bplus_mc::PtMother);

Expand All @@ -388,6 +391,7 @@ DECLARE_SOA_TABLE(HfMcCheckD0Pis, "AOD", "HFMCCHECKD0PI", //! Table with reconst
// Table with same size as HFCANDBPLUS
DECLARE_SOA_TABLE(HfMcRecRedBps, "AOD", "HFMCRECREDBP", //! Reconstruction-level MC information on B+ candidates for reduced workflow
hf_cand_bplus::FlagMcMatchRec,
hf_cand_bplus::FlagWrongCollision,
hf_cand_bplus::DebugMcRec,
hf_bplus_mc::PtMother);

Expand Down
4 changes: 2 additions & 2 deletions PWGHF/D2H/TableProducer/candidateCreatorB0Reduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ struct HfCandidateCreatorB0ReducedExpressions {
if ((rowDPiMcRec.prong0Id() != candB0.prong0Id()) || (rowDPiMcRec.prong1Id() != candB0.prong1Id())) {
continue;
}
rowB0McRec(rowDPiMcRec.flagMcMatchRec(), rowDPiMcRec.debugMcRec(), rowDPiMcRec.ptMother());
rowB0McRec(rowDPiMcRec.flagMcMatchRec(), rowDPiMcRec.flagWrongCollision(), rowDPiMcRec.debugMcRec(), rowDPiMcRec.ptMother());
filledMcInfo = true;
if constexpr (checkDecayTypeMc) {
rowB0McCheck(rowDPiMcRec.pdgCodeBeautyMother(),
Expand All @@ -306,7 +306,7 @@ struct HfCandidateCreatorB0ReducedExpressions {
break;
}
if (!filledMcInfo) { // protection to get same size tables in case something went wrong: we created a candidate that was not preselected in the D-Pi creator
rowB0McRec(0, -1, -1.f);
rowB0McRec(0, -1, -1, -1.f);
if constexpr (checkDecayTypeMc) {
rowB0McCheck(-1, -1, -1, -1, -1, -1);
}
Expand Down
4 changes: 2 additions & 2 deletions PWGHF/D2H/TableProducer/candidateCreatorBplusReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ struct HfCandidateCreatorBplusReducedExpressions {
if ((rowD0PiMcRec.prong0Id() != candBplus.prong0Id()) || (rowD0PiMcRec.prong1Id() != candBplus.prong1Id())) {
continue;
}
rowBplusMcRec(rowD0PiMcRec.flagMcMatchRec(), rowD0PiMcRec.debugMcRec(), rowD0PiMcRec.ptMother());
rowBplusMcRec(rowD0PiMcRec.flagMcMatchRec(), rowD0PiMcRec.flagWrongCollision(), rowD0PiMcRec.debugMcRec(), rowD0PiMcRec.ptMother());
filledMcInfo = true;
if constexpr (checkDecayTypeMc) {
rowBplusMcCheck(rowD0PiMcRec.pdgCodeBeautyMother(),
Expand All @@ -302,7 +302,7 @@ struct HfCandidateCreatorBplusReducedExpressions {
break;
}
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
rowBplusMcRec(0, -1, -1.f);
rowBplusMcRec(0, -1, -1, -1.f);
if constexpr (checkDecayTypeMc) {
rowBplusMcCheck(-1, -1, -1, -1);
}
Expand Down
Loading

0 comments on commit a733d0e

Please sign in to comment.