Skip to content
Merged
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
15 changes: 11 additions & 4 deletions PWGHF/D2H/DataModel/ReducedDataModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,8 @@ using HfRedCandLb = soa::Join<HfCandLbExt, HfRedLbProngs>;

namespace hf_cand_mc_flag
{
DECLARE_SOA_COLUMN(FlagWrongCollision, flagWrongCollision, int8_t); //! reconstruction level
DECLARE_SOA_COLUMN(FlagWrongCollision, flagWrongCollision, int8_t); //! reconstruction level
DECLARE_SOA_COLUMN(IsHadronLeptonSwapped, isHadronLeptonSwapped, bool); //! flag to tag candidates with swapped hypotheses between leptons and hadrons
}

namespace hf_b0_mc
Expand Down Expand Up @@ -951,7 +952,8 @@ DECLARE_SOA_TABLE(HfMcRecRedJPK0ss, "AOD", "HFMCRECREDJPK0S", //! Table with rec
hf_cand_mc_flag::FlagMcDecayChanRec,
hf_cand_mc_flag::FlagWrongCollision,
hf_cand_mc_flag::DebugMcRec,
hf_b0_mc::PtMother);
hf_b0_mc::PtMother,
hf_cand_mc_flag::IsHadronLeptonSwapped);

// Table with same size as HFCANDB0
DECLARE_SOA_TABLE(HfMcRecRedB0s, "AOD", "HFMCRECREDB0", //! Reconstruction-level MC information on B0 candidates for reduced workflow
Expand Down Expand Up @@ -1041,7 +1043,8 @@ DECLARE_SOA_TABLE(HfMcRecRedJPKs, "AOD", "HFMCRECREDJPK", //! Table with reconst
hf_cand_mc_flag::FlagMcDecayChanRec,
hf_cand_mc_flag::FlagWrongCollision,
hf_cand_mc_flag::DebugMcRec,
hf_bplus_mc::PtMother);
hf_bplus_mc::PtMother,
hf_cand_mc_flag::IsHadronLeptonSwapped);

// DECLARE_SOA_EXTENDED_TABLE_USER(ExTable, Tracks, "EXTABLE",
DECLARE_SOA_TABLE(HfMcCheckD0Pis, "AOD", "HFMCCHECKD0PI", //! Table with reconstructed MC information on D0Pi(<-B0) pairs for MC checks in reduced workflow
Expand Down Expand Up @@ -1143,7 +1146,8 @@ DECLARE_SOA_TABLE(HfMcRecRedJPPhis, "AOD", "HFMCRECREDJPPHI", //! Table with rec
hf_cand_mc_flag::FlagMcDecayChanRec,
hf_cand_mc_flag::FlagWrongCollision,
hf_cand_mc_flag::DebugMcRec,
hf_bs_mc::PtMother);
hf_bs_mc::PtMother,
hf_cand_mc_flag::IsHadronLeptonSwapped);

// try with extended table ?
// DECLARE_SOA_EXTENDED_TABLE_USER(ExTable, Tracks, "EXTABLE",
Expand Down Expand Up @@ -1288,6 +1292,9 @@ DECLARE_SOA_TABLE(HfCandLbConfigs, "AOD", "HFCANDLBCONFIG", //! Table with confi
hf_cand_lb_config::MySelectionFlagLc,
hf_cand_lb_config::MyInvMassWindowLcPi);

DECLARE_SOA_TABLE(HfMcRecBJpSwaps, "AOD", "HFMCRECBJPSWAP", //! Table with configurables information for reduced workflow
hf_cand_mc_flag::IsHadronLeptonSwapped);

// Charm resonances analysis
namespace hf_reso_3_prong
{
Expand Down
7 changes: 7 additions & 0 deletions PWGHF/D2H/TableProducer/candidateCreatorBToJpsiReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ struct HfCandidateCreatorBToJpsiReducedExpressions {
Produces<aod::HfMcRecRedBps> rowBplusMcRec;
Produces<aod::HfMcRecRedB0s> rowB0McRec;
Produces<aod::HfMcRecRedBss> rowBsMcRec;
Produces<aod::HfMcRecBJpSwaps> rowBToJPsiSwap;

/// Fill candidate information at MC reconstruction level
/// \param rowsJpsiHadMcRec MC reco information on Jpsi hadron pairs
Expand All @@ -569,35 +570,41 @@ struct HfCandidateCreatorBToJpsiReducedExpressions {
continue;
}
rowBplusMcRec(rowJpsiHadMcRec.flagMcMatchRec(), rowJpsiHadMcRec.flagMcDecayChanRec(), rowJpsiHadMcRec.flagWrongCollision(), rowJpsiHadMcRec.debugMcRec(), rowJpsiHadMcRec.ptMother());
rowBToJPsiSwap(rowJpsiHadMcRec.isHadronLeptonSwapped());
filledMcInfo = true;
break;
}
if (!filledMcInfo) { // protection to get same size tables in case something went wrong: we created a candidate that was not preselected in the Jpsi-K creator
rowBplusMcRec(0, -1, -1, -1, -1.f);
rowBToJPsiSwap(false);
}
} else if constexpr (DecChannel == DecayChannel::B0ToJpsiK0Star) {
for (const auto& rowJpsiHadMcRec : rowsJpsiHadMcRec) {
if ((rowJpsiHadMcRec.jpsiId() != candB.jpsiId()) || (rowJpsiHadMcRec.prong0K0StarId() != candB.prong0K0StarId()) || (rowJpsiHadMcRec.prong1K0StarId() != candB.prong1K0StarId())) {
continue;
}
rowB0McRec(rowJpsiHadMcRec.flagMcMatchRec(), rowJpsiHadMcRec.flagMcDecayChanRec(), rowJpsiHadMcRec.flagWrongCollision(), rowJpsiHadMcRec.debugMcRec(), rowJpsiHadMcRec.ptMother());
rowBToJPsiSwap(rowJpsiHadMcRec.isHadronLeptonSwapped());
filledMcInfo = true;
break;
}
if (!filledMcInfo) { // protection to get same size tables in case something went wrong: we created a candidate that was not preselected in the Jpsi-K creator
rowB0McRec(0, -1, -1, -1, -1.f);
rowBToJPsiSwap(false);
}
} else if constexpr (DecChannel == DecayChannel::BsToJpsiPhi) {
for (const auto& rowJpsiHadMcRec : rowsJpsiHadMcRec) {
if ((rowJpsiHadMcRec.jpsiId() != candB.jpsiId()) || (rowJpsiHadMcRec.prong0PhiId() != candB.prong0PhiId()) || (rowJpsiHadMcRec.prong1PhiId() != candB.prong1PhiId())) {
continue;
}
rowBsMcRec(rowJpsiHadMcRec.flagMcMatchRec(), rowJpsiHadMcRec.flagMcDecayChanRec(), rowJpsiHadMcRec.flagWrongCollision(), rowJpsiHadMcRec.debugMcRec(), rowJpsiHadMcRec.ptMother());
rowBToJPsiSwap(rowJpsiHadMcRec.isHadronLeptonSwapped());
filledMcInfo = true;
break;
}
if (!filledMcInfo) { // protection to get same size tables in case something went wrong: we created a candidate that was not preselected in the Jpsi-K creator
rowBsMcRec(0, -1, -1, -1, -1.f);
rowBToJPsiSwap(false);
}
}
}
Expand Down
Loading
Loading