Skip to content

Commit b6595a8

Browse files
committed
Refactor decay channels
1 parent 90caf89 commit b6595a8

11 files changed

+79
-53
lines changed

PWGHF/Core/DecayChannels.h

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ enum DecayChannelMain : int8_t {
152152
BplusToD0PiPi0, // anti-D0 π+ π0
153153
BplusToD0PiGamma, // anti-D0 π+ γ0
154154
BplusToD0K, // anti-D0 K+
155-
BplusToJpsiK, // J/ψ K+
156155
//
157156
LastChannelMain
158157
};
@@ -161,11 +160,9 @@ enum DecayChannelResonant : int8_t {
161160
// B0
162161
B0ToDminusRhoplus = 1, // D− ρ+
163162
B0ToDstarminusPi, // D*− π+
164-
B0ToJpsiKStar0, // J/ψ K*0(892)
165163
// Bs0
166164
BsToDsRhoplus, // Ds− ρ+
167165
BsToDsstarPi, // Ds*− π+
168-
BsToJpsiPhi, // J/ψ φ
169166
// Λb0
170167
LbToLcRhoplus, // Λc+ ρ−
171168
LbToScPi, // Σc+ π−
@@ -177,6 +174,23 @@ enum DecayChannelResonant : int8_t {
177174
//
178175
LastChannelResonant
179176
};
177+
/// @brief beauty candidates: beauty to J/ψ decay channels
178+
enum DecayChannelToJpsiMain : int8_t {
179+
BplusToJpsiK = 1, // J/ψ K+
180+
B0ToJpsiPiK, // J/ψ π- K+
181+
BsToJpsiKK, // J/ψ K+ K-
182+
BcToJPsiPi, // J/ψ π+
183+
LbToJpsipK, // J/ψ p K-
184+
//
185+
LastChannelBeautyToJpsi
186+
};
187+
/// @brief beauty candidates: beauty to J/ψ resonant decay channels
188+
enum DecayChannelToJpsiResonant : int8_t {
189+
B0ToJpsiKStar0 = 1, // J/ψ K*0(892)
190+
BsToJpsiPhi, // J/ψ φ
191+
//
192+
LastChannelBeautyToJpsiResonant
193+
};
180194
} // namespace hf_cand_beauty
181195
} // namespace o2::hf_decay
182196

PWGHF/D2H/DataModel/ReducedDataModel.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,7 @@ DECLARE_SOA_TABLE(HfMcCheckDpPis, "AOD", "HFMCCHECKDPPI", //! Table with reconst
796796
// Table with same size as HFCANDB0
797797
DECLARE_SOA_TABLE(HfMcRecRedB0s, "AOD", "HFMCRECREDB0", //! Reconstruction-level MC information on B0 candidates for reduced workflow
798798
hf_cand_b0::FlagMcMatchRec,
799+
hf_cand_b0::ChannelMcMatchRec,
799800
hf_cand_b0::FlagWrongCollision,
800801
hf_cand_b0::DebugMcRec,
801802
hf_b0_mc::PtMother);
@@ -811,6 +812,7 @@ DECLARE_SOA_TABLE(HfMcCheckB0s, "AOD", "HFMCCHECKB0", //! Table with reconstruct
811812

812813
DECLARE_SOA_TABLE(HfMcGenRedB0s, "AOD", "HFMCGENREDB0", //! Generation-level MC information on B0 candidates for reduced workflow
813814
hf_cand_b0::FlagMcMatchGen,
815+
hf_cand_b0::ChannelMcMatchRec,
814816
hf_b0_mc::PtTrack,
815817
hf_b0_mc::YTrack,
816818
hf_b0_mc::EtaTrack,
@@ -869,6 +871,7 @@ DECLARE_SOA_TABLE(HfMcRecRedJPKs, "AOD", "HFMCRECREDJPK", //! Table with reconst
869871
hf_cand_bplus_reduced::JpsiId,
870872
hf_cand_bplus_reduced::Prong1Id,
871873
hf_cand_bplus::FlagMcMatchRec,
874+
hf_cand_bplus::ChannelMcMatchRec,
872875
hf_cand_bplus::FlagWrongCollision,
873876
hf_cand_bplus::DebugMcRec,
874877
hf_bplus_mc::PtMother);
@@ -885,6 +888,7 @@ DECLARE_SOA_TABLE(HfMcCheckD0Pis, "AOD", "HFMCCHECKD0PI", //! Table with reconst
885888
// Table with same size as HFCANDBPLUS
886889
DECLARE_SOA_TABLE(HfMcRecRedBps, "AOD", "HFMCRECREDBP", //! Reconstruction-level MC information on B+ candidates for reduced workflow
887890
hf_cand_bplus::FlagMcMatchRec,
891+
hf_cand_bplus::ChannelMcMatchRec,
888892
hf_cand_bplus::FlagWrongCollision,
889893
hf_cand_bplus::DebugMcRec,
890894
hf_bplus_mc::PtMother);
@@ -899,6 +903,7 @@ DECLARE_SOA_TABLE(HfMcCheckBps, "AOD", "HFMCCHECKBP", //! Table with reconstruct
899903

900904
DECLARE_SOA_TABLE(HfMcGenRedBps, "AOD", "HFMCGENREDBP", //! Generation-level MC information on B+ candidates for reduced workflow
901905
hf_cand_bplus::FlagMcMatchGen,
906+
hf_cand_bplus::ChannelMcMatchRec,
902907
hf_bplus_mc::PtTrack,
903908
hf_bplus_mc::YTrack,
904909
hf_bplus_mc::EtaTrack,
@@ -965,6 +970,7 @@ DECLARE_SOA_TABLE(HfMcRecRedJPPhis, "AOD", "HFMCRECREDJPPHI", //! Table with rec
965970
hf_cand_bs_reduced::Prong0PhiId,
966971
hf_cand_bs_reduced::Prong1PhiId,
967972
hf_cand_bs::FlagMcMatchRec,
973+
hf_cand_bs::ChannelMcMatchRec,
968974
hf_cand_bs::FlagWrongCollision,
969975
hf_cand_bs::DebugMcRec,
970976
hf_bs_mc::PtMother);
@@ -983,6 +989,7 @@ DECLARE_SOA_TABLE(HfMcCheckDsPis, "AOD", "HFMCCHECKDSPI", //! Table with reconst
983989
// Table with same size as HFCANDBS
984990
DECLARE_SOA_TABLE(HfMcRecRedBss, "AOD", "HFMCRECREDBS", //! Reconstruction-level MC information on Bs candidates for reduced workflow
985991
hf_cand_bs::FlagMcMatchRec,
992+
hf_cand_bs::ChannelMcMatchRec,
986993
hf_cand_bs::FlagWrongCollision,
987994
hf_cand_bs::DebugMcRec,
988995
hf_bs_mc::PtMother);
@@ -998,6 +1005,7 @@ DECLARE_SOA_TABLE(HfMcCheckBss, "AOD", "HFMCCHECKBS", //! Table with reconstruct
9981005

9991006
DECLARE_SOA_TABLE(HfMcGenRedBss, "AOD", "HFMCGENREDBS", //! Generation-level MC information on Bs candidates for reduced workflow
10001007
hf_cand_bs::FlagMcMatchGen,
1008+
hf_cand_bs::ChannelMcMatchRec,
10011009
hf_bs_mc::PtTrack,
10021010
hf_bs_mc::YTrack,
10031011
hf_bs_mc::EtaTrack,

PWGHF/D2H/TableProducer/candidateCreatorB0Reduced.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ struct HfCandidateCreatorB0Reduced {
203203
rowCandidateDmesMlScores(candD.mlScoreBkgMassHypo0(), candD.mlScorePromptMassHypo0(), candD.mlScoreNonpromptMassHypo0());
204204
}
205205
} // pi loop
206-
} // D loop
206+
} // D loop
207207
}
208208

209209
void processData(HfRedCollisionsWithExtras const& collisions,
@@ -295,7 +295,7 @@ struct HfCandidateCreatorB0ReducedExpressions {
295295
if ((rowDPiMcRec.prong0Id() != candB0.prong0Id()) || (rowDPiMcRec.prong1Id() != candB0.prong1Id())) {
296296
continue;
297297
}
298-
rowB0McRec(rowDPiMcRec.flagMcMatchRec(), rowDPiMcRec.flagWrongCollision(), rowDPiMcRec.debugMcRec(), rowDPiMcRec.ptMother());
298+
rowB0McRec(rowDPiMcRec.flagMcMatchRec(), -1 /*channel*/, rowDPiMcRec.flagWrongCollision(), rowDPiMcRec.debugMcRec(), rowDPiMcRec.ptMother());
299299
filledMcInfo = true;
300300
if constexpr (checkDecayTypeMc) {
301301
rowB0McCheck(rowDPiMcRec.pdgCodeBeautyMother(),
@@ -308,7 +308,7 @@ struct HfCandidateCreatorB0ReducedExpressions {
308308
break;
309309
}
310310
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
311-
rowB0McRec(0, -1, -1, -1.f);
311+
rowB0McRec(0, -1, -1, -1, -1.f);
312312
if constexpr (checkDecayTypeMc) {
313313
rowB0McCheck(-1, -1, -1, -1, -1, -1);
314314
}

PWGHF/D2H/TableProducer/candidateCreatorBToJpsiReduced.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,24 +422,24 @@ struct HfCandidateCreatorBToJpsiReducedExpressions {
422422
if ((rowJpsiHadMcRec.jPsiId() != candB.jPsiId()) || (rowJpsiHadMcRec.prong1Id() != candB.bachKaId())) {
423423
continue;
424424
}
425-
rowBplusMcRec(rowJpsiHadMcRec.flagMcMatchRec(), rowJpsiHadMcRec.flagWrongCollision(), rowJpsiHadMcRec.debugMcRec(), rowJpsiHadMcRec.ptMother());
425+
rowBplusMcRec(rowJpsiHadMcRec.flagMcMatchRec(), rowJpsiHadMcRec.channelMcMatchRec(), rowJpsiHadMcRec.flagWrongCollision(), rowJpsiHadMcRec.debugMcRec(), rowJpsiHadMcRec.ptMother());
426426
filledMcInfo = true;
427427
break;
428428
}
429429
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
430-
rowBplusMcRec(0, -1, -1, -1.f);
430+
rowBplusMcRec(0, -1, -1, -1, -1.f);
431431
}
432432
} else if constexpr (decChannel == DecayChannel::BsToJpsiPhi) {
433433
for (const auto& rowJpsiHadMcRec : rowsJpsiHadMcRec) {
434434
if ((rowJpsiHadMcRec.jPsiId() != candB.jPsiId()) || (rowJpsiHadMcRec.prong0PhiId() != candB.prong0PhiId()) || (rowJpsiHadMcRec.prong1PhiId() != candB.prong1PhiId())) {
435435
continue;
436436
}
437-
rowBsMcRec(rowJpsiHadMcRec.flagMcMatchRec(), rowJpsiHadMcRec.flagWrongCollision(), rowJpsiHadMcRec.debugMcRec(), rowJpsiHadMcRec.ptMother());
437+
rowBsMcRec(rowJpsiHadMcRec.flagMcMatchRec(), rowJpsiHadMcRec.channelMcMatchRec(), rowJpsiHadMcRec.flagWrongCollision(), rowJpsiHadMcRec.debugMcRec(), rowJpsiHadMcRec.ptMother());
438438
filledMcInfo = true;
439439
break;
440440
}
441441
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
442-
rowBsMcRec(0, -1, -1, -1.f);
442+
rowBsMcRec(0, -1, -1, -1, -1.f);
443443
}
444444
}
445445
}

PWGHF/D2H/TableProducer/candidateCreatorBplusReduced.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ struct HfCandidateCreatorBplusReducedExpressions {
293293
if ((rowD0PiMcRec.prong0Id() != candBplus.prong0Id()) || (rowD0PiMcRec.prong1Id() != candBplus.prong1Id())) {
294294
continue;
295295
}
296-
rowBplusMcRec(rowD0PiMcRec.flagMcMatchRec(), rowD0PiMcRec.flagWrongCollision(), rowD0PiMcRec.debugMcRec(), rowD0PiMcRec.ptMother());
296+
rowBplusMcRec(rowD0PiMcRec.flagMcMatchRec(), -1 /*channel*/, rowD0PiMcRec.flagWrongCollision(), rowD0PiMcRec.debugMcRec(), rowD0PiMcRec.ptMother());
297297
filledMcInfo = true;
298298
if constexpr (checkDecayTypeMc) {
299299
rowBplusMcCheck(rowD0PiMcRec.pdgCodeBeautyMother(),
@@ -305,7 +305,7 @@ struct HfCandidateCreatorBplusReducedExpressions {
305305
break;
306306
}
307307
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
308-
rowBplusMcRec(0, -1, -1, -1.f);
308+
rowBplusMcRec(0, -1, -1, -1, -1.f);
309309
if constexpr (checkDecayTypeMc) {
310310
rowBplusMcCheck(-1, -1, -1, -1, -1);
311311
}

PWGHF/D2H/TableProducer/candidateCreatorBsReduced.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ struct HfCandidateCreatorBsReducedExpressions {
292292
if ((rowDPiMcRec.prong0Id() != candB.prong0Id()) || (rowDPiMcRec.prong1Id() != candB.prong1Id())) {
293293
continue;
294294
}
295-
rowBsMcRec(rowDPiMcRec.flagMcMatchRec(), rowDPiMcRec.flagWrongCollision(), rowDPiMcRec.debugMcRec(), rowDPiMcRec.ptMother());
295+
rowBsMcRec(rowDPiMcRec.flagMcMatchRec(), -1 /*channel*/, rowDPiMcRec.flagWrongCollision(), rowDPiMcRec.debugMcRec(), rowDPiMcRec.ptMother());
296296
filledMcInfo = true;
297297
if constexpr (checkDecayTypeMc) {
298298
rowBsMcCheck(rowDPiMcRec.pdgCodeBeautyMother(),
@@ -305,7 +305,7 @@ struct HfCandidateCreatorBsReducedExpressions {
305305
break;
306306
}
307307
if (!filledMcInfo) { // protection to get same size tables in case something went wrong: we created a candidate that was not preselected in the DsPi creator
308-
rowBsMcRec(0, -1, -1, -1.f);
308+
rowBsMcRec(0, -1, -1, -1, -1.f);
309309
if constexpr (checkDecayTypeMc) {
310310
rowBsMcCheck(-1, -1, -1, -1, -1, -1);
311311
}

PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ struct HfDataCreatorCharmHadPiReduced {
13111311
yProngs[counter] = RecoDecay::y(daught.pVector(), pdg->Mass(daught.pdgCode()));
13121312
counter++;
13131313
}
1314-
rowHfB0McGenReduced(flag, ptParticle, yParticle, etaParticle,
1314+
rowHfB0McGenReduced(flag, -1 /*channel*/, ptParticle, yParticle, etaParticle,
13151315
ptProngs[0], yProngs[0], etaProngs[0],
13161316
ptProngs[1], yProngs[1], etaProngs[1]);
13171317
} else if constexpr (decayChannel == DecayChannel::BsToDsminusPi) {
@@ -1386,7 +1386,7 @@ struct HfDataCreatorCharmHadPiReduced {
13861386
yProngs[counter] = RecoDecay::y(daught.pVector(), pdg->Mass(daught.pdgCode()));
13871387
counter++;
13881388
}
1389-
rowHfBsMcGenReduced(flag, ptParticle, yParticle, etaParticle,
1389+
rowHfBsMcGenReduced(flag, -1 /*channel*/, ptParticle, yParticle, etaParticle,
13901390
ptProngs[0], yProngs[0], etaProngs[0],
13911391
ptProngs[1], yProngs[1], etaProngs[1]);
13921392
} else if constexpr (decayChannel == DecayChannel::BplusToD0barPi) {
@@ -1419,7 +1419,7 @@ struct HfDataCreatorCharmHadPiReduced {
14191419
yProngs[counter] = RecoDecay::y(daught.pVector(), pdg->Mass(daught.pdgCode()));
14201420
counter++;
14211421
}
1422-
rowHfBpMcGenReduced(flag, ptParticle, yParticle, etaParticle,
1422+
rowHfBpMcGenReduced(flag, -1 /*channel*/, ptParticle, yParticle, etaParticle,
14231423
ptProngs[0], yProngs[0], etaProngs[0],
14241424
ptProngs[1], yProngs[1], etaProngs[1]);
14251425
} else if constexpr (decayChannel == DecayChannel::LbToLcplusPi) {

0 commit comments

Comments
 (0)