Skip to content

Commit e7295f8

Browse files
committed
Add configurables to use J/Psi PDG mass instead of reconstructed one
1 parent 27e3828 commit e7295f8

3 files changed

Lines changed: 83 additions & 48 deletions

File tree

PWGHF/Core/HfHelper.h

Lines changed: 52 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,18 @@ struct HfHelper {
172172
}
173173

174174
template <typename T>
175-
static auto invMassBplusToJpsiK(const T& candidate)
176-
{
177-
return candidate.m(std::array{o2::constants::physics::MassMuon, o2::constants::physics::MassMuon, o2::constants::physics::MassKPlus});
175+
static auto invMassBplusToJpsiK(const T& candidate, const bool useJpsiPdgMass)
176+
{
177+
const std::array pVecMuPos{candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()};
178+
const std::array pVecMuNeg{candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()};
179+
const std::array pVecKa{candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()};
180+
if (useJpsiPdgMass) {
181+
return RecoDecay::m(std::array{RecoDecay::pVec(pVecMuPos, pVecMuNeg), pVecKa},
182+
std::array{o2::constants::physics::MassJPsi, o2::constants::physics::MassKPlus});
183+
} else {
184+
return RecoDecay::m(std::array{pVecMuPos, pVecMuNeg, pVecKa},
185+
std::array{o2::constants::physics::MassMuon, o2::constants::physics::MassMuon, o2::constants::physics::MassKPlus});
186+
}
178187
}
179188

180189
template <typename T>
@@ -684,9 +693,25 @@ struct HfHelper {
684693
}
685694

686695
template <typename T>
687-
static auto invMassBsToJpsiPhi(const T& candidate)
696+
static auto invMassBsToJpsiPhi(const T& candidate, const bool useJpsiPdgMass, const bool usePhiPdgMass)
688697
{
689-
return candidate.m(std::array{o2::constants::physics::MassMuon, o2::constants::physics::MassMuon, o2::constants::physics::MassKPlus, o2::constants::physics::MassKPlus});
698+
const std::array pVecMuPos{candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()};
699+
const std::array pVecMuNeg{candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()};
700+
const std::array pVecKaPos{candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()};
701+
const std::array pVecKaNeg{candidate.pxProng3(), candidate.pyProng3(), candidate.pzProng3()};
702+
if (useJpsiPdgMass && usePhiPdgMass) {
703+
return RecoDecay::m(std::array{RecoDecay::pVec(pVecMuPos, pVecMuNeg), RecoDecay::pVec(pVecKaPos, pVecKaNeg)},
704+
std::array{o2::constants::physics::MassJPsi, o2::constants::physics::MassPhi});
705+
} else if (useJpsiPdgMass && !usePhiPdgMass) {
706+
return RecoDecay::m(std::array{RecoDecay::pVec(pVecMuPos, pVecMuNeg), pVecKaPos, pVecKaNeg},
707+
std::array{o2::constants::physics::MassJPsi, o2::constants::physics::MassKPlus, o2::constants::physics::MassKPlus});
708+
} else if (!useJpsiPdgMass && usePhiPdgMass) {
709+
return RecoDecay::m(std::array{pVecMuPos, pVecMuNeg, RecoDecay::pVec(pVecKaPos, pVecKaNeg)},
710+
std::array{o2::constants::physics::MassMuon, o2::constants::physics::MassMuon, o2::constants::physics::MassPhi});
711+
} else {
712+
return RecoDecay::m(std::array{pVecMuPos, pVecMuNeg, pVecKaPos, pVecKaNeg},
713+
std::array{o2::constants::physics::MassMuon, o2::constants::physics::MassMuon, o2::constants::physics::MassKPlus, o2::constants::physics::MassKPlus});
714+
}
690715
}
691716

692717
template <typename T>
@@ -905,14 +930,18 @@ struct HfHelper {
905930
/// \param candBp B+ candidate
906931
/// \param cuts B+ candidate selection per pT bin
907932
/// \param binsPt pT bin limits
933+
/// \param useJpsiPdgMass Use PDG mass for J/psi when calculating Bs candidate mass
908934
/// \return true if candidate passes all selections
909935
template <typename T1, typename T2, typename T3>
910-
static bool selectionBplusToJpsiKTopol(const T1& candBp, const T2& cuts, const T3& binsPt)
936+
static bool selectionBplusToJpsiKTopol(const T1& candBp, const T2& cuts, const T3& binsPt, const bool useJpsiPdgMass)
911937
{
912938
auto ptCandBp = candBp.pt();
913-
auto mCandBp = invMassBplusToJpsiK(candBp);
914-
auto ptJpsi = RecoDecay::pt(candBp.pxProng0(), candBp.pyProng0());
915-
auto ptKa = RecoDecay::pt(candBp.pxProng1(), candBp.pyProng1());
939+
auto mCandBp = invMassBplusToJpsiK(candBp, useJpsiPdgMass);
940+
std::array<float, 3> const pVecMu0 = {candBp.pxProng0(), candBp.pyProng0(), candBp.pzProng0()};
941+
std::array<float, 3> const pVecMu1 = {candBp.pxProng1(), candBp.pyProng1(), candBp.pzProng1()};
942+
std::array<float, 3> const pVecKa = {candBp.pxProng2(), candBp.pyProng2(), candBp.pzProng2()};
943+
auto ptJpsi = RecoDecay::pt(pVecMu0, pVecMu1);
944+
auto ptKa = RecoDecay::pt(pVecKa);
916945
auto candJpsi = candBp.jpsi();
917946
float pseudoPropDecLen = candBp.decayLengthXY() * mCandBp / ptCandBp;
918947

@@ -1088,20 +1117,24 @@ struct HfHelper {
10881117

10891118
// Apply topological cuts as defined in SelectorCuts.h
10901119
/// \param candBs Bs candidate
1091-
/// \param candKa0 kaon candidate 0 (phi daughter)
1092-
/// \param candKa1 kaon candidate 1 (phi daughter)
10931120
/// \param cuts Bs candidate selection per pT bin
10941121
/// \param binsPt pT bin limits
1122+
/// \param useJpsiPdgMass Use PDG mass for J/psi when calculating Bs candidate mass
1123+
/// \param usePhiPdgMass Use PDG mass for phi when calculating Bs candidate mass
10951124
/// \return true if candidate passes all selections
1096-
template <typename T1, typename T2, typename T3, typename T4, typename T5>
1097-
static bool selectionBsToJpsiPhiTopol(const T1& candBs, const T2& candKa0, const T3& candKa1, const T4& cuts, const T5& binsPt)
1125+
template <typename T1, typename T2, typename T3>
1126+
static bool selectionBsToJpsiPhiTopol(const T1& candBs, const T2& cuts, const T3& binsPt, const bool useJpsiPdgMass, const bool usePhiPdgMass)
10981127
{
10991128
auto ptCandBs = candBs.pt();
1100-
auto mCandBs = invMassBsToJpsiPhi(candBs);
1101-
std::array<float, 3> pVecKa0 = candKa0.pVector();
1102-
std::array<float, 3> pVecKa1 = candKa1.pVector();
1129+
auto mCandBs = invMassBsToJpsiPhi(candBs, useJpsiPdgMass, usePhiPdgMass);
1130+
std::array<float, 3> const pVecMu0 = {candBs.pxProng0(), candBs.pyProng0(), candBs.pzProng0()};
1131+
std::array<float, 3> const pVecMu1 = {candBs.pxProng1(), candBs.pyProng1(), candBs.pzProng1()};
1132+
std::array<float, 3> const pVecKa0 = {candBs.pxProng2(), candBs.pyProng2(), candBs.pzProng2()};
1133+
std::array<float, 3> const pVecKa1 = {candBs.pxProng3(), candBs.pyProng3(), candBs.pzProng3()};
11031134
auto mCandPhi = RecoDecay::m(std::array{pVecKa0, pVecKa1}, std::array{o2::constants::physics::MassKPlus, o2::constants::physics::MassKPlus});
1104-
auto ptJpsi = RecoDecay::pt(candBs.pxProng0(), candBs.pyProng0());
1135+
auto ptJpsi = RecoDecay::pt(pVecMu0, pVecMu1);
1136+
auto ptKa0 = RecoDecay::pt(pVecKa0);
1137+
auto ptKa1 = RecoDecay::pt(pVecKa1);
11051138
auto candJpsi = candBs.jpsi();
11061139
float pseudoPropDecLen = candBs.decayLengthXY() * mCandBs / ptCandBs;
11071140

@@ -1116,8 +1149,8 @@ struct HfHelper {
11161149
}
11171150

11181151
// kaon pt
1119-
if (candKa0.pt() < cuts->get(binPt, "pT K") &&
1120-
candKa1.pt() < cuts->get(binPt, "pT K")) {
1152+
if (ptKa0 < cuts->get(binPt, "pT K") &&
1153+
ptKa1 < cuts->get(binPt, "pT K")) {
11211154
return false;
11221155
}
11231156

PWGHF/D2H/Tasks/taskBplusToJpsiKReduced.cxx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ DECLARE_SOA_TABLE(HfRedCandBpLites, "AOD", "HFREDCANDBPLITE", //! Table with som
141141
hf_cand_bplustojpsik_lite::PtJpsi,
142142
hf_cand_bplustojpsik_lite::ImpactParameterJpsiDauPos,
143143
hf_cand_bplustojpsik_lite::ImpactParameterJpsiDauNeg,
144-
hf_cand_bplustojpsik_lite::ImpactParameterLfTrack0,
145144
// Jpsi daughter features
146145
hf_cand_bplustojpsik_lite::ItsNClsJpsiDauPos,
147146
hf_cand_bplustojpsik_lite::TpcNClsCrossedRowsJpsiDauPos,
@@ -155,6 +154,7 @@ DECLARE_SOA_TABLE(HfRedCandBpLites, "AOD", "HFREDCANDBPLITE", //! Table with som
155154
hf_cand_bplustojpsik_lite::AbsEtaJpsiDauNeg,
156155
// kaon features
157156
hf_cand_bplustojpsik_lite::PtBach,
157+
hf_cand_bplustojpsik_lite::ImpactParameterLfTrack0,
158158
hf_cand_bplustojpsik_lite::ItsNClsLfTrack0,
159159
hf_cand_bplustojpsik_lite::TpcNClsCrossedRowsLfTrack0,
160160
hf_cand_bplustojpsik_lite::ItsChi2NClLfTrack0,
@@ -207,6 +207,7 @@ struct HfTaskBplusToJpsiKReduced {
207207
Configurable<bool> fillBackground{"fillBackground", false, "Flag to enable filling of background histograms/sparses/tree (only MC)"};
208208
Configurable<float> downSampleBkgFactor{"downSampleBkgFactor", 1., "Fraction of background candidates to keep for ML trainings"};
209209
Configurable<float> ptMaxForDownSample{"ptMaxForDownSample", 10., "Maximum pt for the application of the downsampling factor"};
210+
Configurable<bool> useJpsiPdgMass{"useJpsiPdgMass", true, "Whether to use J/Psi PDG mass for B+ candidate mass evaluation or to use the invariant mass of the two prongs"};
210211
// topological cuts
211212
Configurable<std::vector<double>> binsPt{"binsPt", std::vector<double>{hf_cuts_bplus_to_jpsi_k::vecBinsPt}, "pT bin limits"};
212213
Configurable<LabeledArray<double>> cuts{"cuts", {hf_cuts_bplus_to_jpsi_k::Cuts[0], hf_cuts_bplus_to_jpsi_k::NBinsPt, hf_cuts_bplus_to_jpsi_k::NCutVars, hf_cuts_bplus_to_jpsi_k::labelsPt, hf_cuts_bplus_to_jpsi_k::labelsCutVar}, "B+ candidate selection per pT bin"};
@@ -339,11 +340,13 @@ struct HfTaskBplusToJpsiKReduced {
339340
aod::HfRedBach0Tracks const&)
340341
{
341342
auto ptCandBplus = candidate.pt();
342-
auto invMassBplus = HfHelper::invMassBplusToJpsiK(candidate);
343+
auto invMassBplus = HfHelper::invMassBplusToJpsiK(candidate, useJpsiPdgMass);
343344
auto candJpsi = candidate.template jpsi_as<aod::HfRedJpsis>();
344345
auto candKa = candidate.template bachKa_as<aod::HfRedBach0Tracks>();
345-
auto ptJpsi = candidate.ptProng0();
346-
auto invMassJpsi = candJpsi.m();
346+
std::array<float, 3> const pVecMu0 = {candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()};
347+
std::array<float, 3> const pVecMu1 = {candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()};
348+
auto ptJpsi = RecoDecay::pt(pVecMu0, pVecMu1);
349+
auto invMassJpsi = RecoDecay::m(std::array{pVecMu0, pVecMu1}, std::array{o2::constants::physics::MassMuonPlus, o2::constants::physics::MassMuonMinus});
347350
uint8_t statusBplus = 0;
348351

349352
int8_t flagMcMatchRec{0}, flagMcDecayChanRec{0}, flagWrongCollision{0};
@@ -356,7 +359,7 @@ struct HfTaskBplusToJpsiKReduced {
356359
}
357360

358361
SETBIT(statusBplus, SelectionStep::RecoSkims);
359-
if (HfHelper::selectionBplusToJpsiKTopol(candidate, cuts, binsPt)) {
362+
if (HfHelper::selectionBplusToJpsiKTopol(candidate, cuts, binsPt, useJpsiPdgMass)) {
360363
SETBIT(statusBplus, SelectionStep::RecoTopol);
361364
} else if (selectionFlagBplus >= BIT(SelectionStep::RecoTopol) * 2 - 1) {
362365
return;
@@ -391,17 +394,17 @@ struct HfTaskBplusToJpsiKReduced {
391394
}
392395

393396
registry.fill(HIST("hMass"), invMassBplus, ptCandBplus);
394-
registry.fill(HIST("hMassJpsi"), invMassJpsi, candidate.ptProng0());
395-
registry.fill(HIST("hd0K"), candidate.impactParameter1(), candidate.ptProng1());
397+
registry.fill(HIST("hMassJpsi"), invMassJpsi, ptJpsi);
398+
registry.fill(HIST("hd0K"), candidate.impactParameter2(), candidate.ptProng2());
396399
if constexpr (DoMc) {
397400
if (isSignal) {
398401
registry.fill(HIST("hMassRecSig"), invMassBplus, ptCandBplus);
399-
registry.fill(HIST("hMassJpsiRecSig"), invMassJpsi, candidate.ptProng0());
400-
registry.fill(HIST("hd0KRecSig"), candidate.impactParameter1(), candidate.ptProng1());
402+
registry.fill(HIST("hMassJpsiRecSig"), invMassJpsi, ptJpsi);
403+
registry.fill(HIST("hd0KRecSig"), candidate.impactParameter2(), candidate.ptProng2());
401404
} else if (fillBackground) {
402405
registry.fill(HIST("hMassRecBg"), invMassBplus, ptCandBplus);
403-
registry.fill(HIST("hMassJpsiRecBg"), invMassJpsi, candidate.ptProng0());
404-
registry.fill(HIST("hd0KRecBg"), candidate.impactParameter1(), candidate.ptProng1());
406+
registry.fill(HIST("hMassJpsiRecBg"), invMassJpsi, ptJpsi);
407+
registry.fill(HIST("hd0KRecBg"), candidate.impactParameter2(), candidate.ptProng2());
405408
}
406409
}
407410

@@ -436,7 +439,6 @@ struct HfTaskBplusToJpsiKReduced {
436439
ptJpsi,
437440
candidate.impactParameter0(),
438441
candidate.impactParameter1(),
439-
candidate.impactParameter2(),
440442
candJpsi.itsNClsDauPos(),
441443
candJpsi.tpcNClsCrossedRowsDauPos(),
442444
candJpsi.itsChi2NClDauPos(),
@@ -448,7 +450,8 @@ struct HfTaskBplusToJpsiKReduced {
448450
candJpsi.tpcChi2NClDauNeg(),
449451
absEta(candJpsi.tglDauNeg()),
450452
// kaon features
451-
candidate.ptProng1(),
453+
candidate.ptProng2(),
454+
candidate.impactParameter2(),
452455
candKa.itsNCls(),
453456
candKa.tpcNClsCrossedRows(),
454457
candKa.itsChi2NCl(),

PWGHF/D2H/Tasks/taskBsToJpsiPhiReduced.cxx

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ struct HfTaskBsToJpsiPhiReduced {
232232
Configurable<bool> fillBackground{"fillBackground", false, "Flag to enable filling of background histograms/sparses/tree (only MC)"};
233233
Configurable<float> downSampleBkgFactor{"downSampleBkgFactor", 1., "Fraction of background candidates to keep for ML trainings"};
234234
Configurable<float> ptMaxForDownSample{"ptMaxForDownSample", 10., "Maximum pt for the application of the downsampling factor"};
235+
Configurable<bool> useJpsiPdgMass{"useJpsiPdgMass", true, "Whether to use J/Psi PDG mass for B+ candidate mass evaluation or to use the invariant mass of the two prongs"};
236+
Configurable<bool> usePhiPdgMass{"usePhiPdgMass", true, "Whether to use Phi PDG mass for B+ candidate mass evaluation or to use the invariant mass of the two prongs"};
235237
// topological cuts
236238
Configurable<std::vector<double>> binsPt{"binsPt", std::vector<double>{hf_cuts_bs_to_jpsi_phi::vecBinsPt}, "pT bin limits"};
237239
Configurable<LabeledArray<double>> cuts{"cuts", {hf_cuts_bs_to_jpsi_phi::Cuts[0], hf_cuts_bs_to_jpsi_phi::NBinsPt, hf_cuts_bs_to_jpsi_phi::NCutVars, hf_cuts_bs_to_jpsi_phi::labelsPt, hf_cuts_bs_to_jpsi_phi::labelsCutVar}, "Bs candidate selection per pT bin"};
@@ -310,7 +312,6 @@ struct HfTaskBsToJpsiPhiReduced {
310312
registry.add("hMass", bSCandTitle + "inv. mass J/#Psi K^{+} (GeV/#it{c}^{2});" + stringPt, {HistType::kTH2F, {axisMassBs, axisPtB}});
311313
registry.add("hMassJpsi", bSCandTitle + "inv. mass #mu^{+}#mu^{#minus} (GeV/#it{c}^{2});" + stringPt, {HistType::kTH2F, {axisMassJpsi, axisPtJpsi}});
312314
registry.add("hMassPhi", bSCandTitle + "inv. mass K^{+}K^{#minus} (GeV/#it{c}^{2});" + stringPt, {HistType::kTH2F, {axisMassPhi, axisPtPhi}});
313-
registry.add("hd0K", bSCandTitle + "Kaon DCAxy to prim. vertex (cm);" + stringPt, {HistType::kTH2F, {axisImpactPar, axisPtKa}});
314315

315316
// histograms processMC
316317
if (doprocessMc || doprocessMcWithBsMl) {
@@ -321,11 +322,9 @@ struct HfTaskBsToJpsiPhiReduced {
321322
registry.add("hMassRecSig", bSCandMatch + "inv. mass J/#Psi K^{+} (GeV/#it{c}^{2}); B_{s}^{0} " + stringPt, {HistType::kTH2F, {axisMassBs, axisPtB}});
322323
registry.add("hMassJpsiRecSig", bSCandMatch + "inv. mass #mu^{+}#mu^{#minus} (GeV/#it{c}^{2}); J/#Psi " + stringPt, {HistType::kTH2F, {axisMassJpsi, axisPtJpsi}});
323324
registry.add("hMassPhiRecSig", bSCandMatch + "inv. mass K^{+}K^{#minus} (GeV/#it{c}^{2}); #phi " + stringPt, {HistType::kTH2F, {axisMassPhi, axisPtPhi}});
324-
registry.add("hd0KRecSig", bSCandMatch + "Kaon DCAxy to prim. vertex (cm); K^{+} " + stringPt, {HistType::kTH2F, {axisImpactPar, axisPtKa}});
325325
registry.add("hMassRecBg", bSCandUnmatch + "inv. mass J/#Psi K^{+} (GeV/#it{c}^{2}); B_{s}^{0} " + stringPt, {HistType::kTH2F, {axisMassBs, axisPtB}});
326326
registry.add("hMassJpsiRecBg", bSCandUnmatch + "inv. mass #mu^{+}#mu^{#minus} (GeV/#it{c}^{2}); J/#Psi " + stringPt, {HistType::kTH2F, {axisMassJpsi, axisPtJpsi}});
327327
registry.add("hMassPhiRecBg", bSCandMatch + "inv. mass K^{+}K^{#minus} (GeV/#it{c}^{2}); #phi " + stringPt, {HistType::kTH2F, {axisMassPhi, axisPtPhi}});
328-
registry.add("hd0KRecBg", bSCandMatch + "Kaon DCAxy to prim. vertex (cm); K^{+} " + stringPt, {HistType::kTH2F, {axisImpactPar, axisPtKa}});
329328
}
330329

331330
if (doprocessDataWithBsMl || doprocessMcWithBsMl) {
@@ -371,14 +370,17 @@ struct HfTaskBsToJpsiPhiReduced {
371370
aod::HfRedBach1Tracks const&)
372371
{
373372
auto ptCandBs = candidate.pt();
374-
auto invMassBs = HfHelper::invMassBsToJpsiPhi(candidate);
373+
auto invMassBs = HfHelper::invMassBsToJpsiPhi(candidate, useJpsiPdgMass, usePhiPdgMass);
375374
auto candJpsi = candidate.template jpsi_as<aod::HfRedJpsis>();
376375
auto candKa0 = candidate.template prong0Phi_as<aod::HfRedBach0Tracks>();
377376
auto candKa1 = candidate.template prong1Phi_as<aod::HfRedBach1Tracks>();
378-
std::array<float, 3> const pVecKa0 = {candKa0.px(), candKa0.py(), candKa0.pz()};
379-
std::array<float, 3> const pVecKa1 = {candKa1.px(), candKa1.py(), candKa1.pz()};
380-
auto ptJpsi = candidate.ptProng0();
381-
auto invMassJpsi = candJpsi.m();
377+
std::array<float, 3> const pVecMu0 = {candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()};
378+
std::array<float, 3> const pVecMu1 = {candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()};
379+
std::array<float, 3> const pVecKa0 = {candidate.pxProng2(), candidate.pyProng2(), candidate.pzProng2()};
380+
std::array<float, 3> const pVecKa1 = {candidate.pxProng3(), candidate.pyProng3(), candidate.pzProng3()};
381+
auto ptJpsi = RecoDecay::pt(pVecMu0, pVecMu1);
382+
auto ptPhi = RecoDecay::pt(pVecKa0, pVecKa1);
383+
auto invMassJpsi = RecoDecay::m(std::array{pVecMu0, pVecMu1}, std::array{o2::constants::physics::MassMuonPlus, o2::constants::physics::MassMuonMinus});
382384
auto invMassPhi = RecoDecay::m(std::array{pVecKa0, pVecKa1}, std::array{o2::constants::physics::MassKPlus, o2::constants::physics::MassKPlus});
383385
uint8_t statusBs = 0;
384386

@@ -393,7 +395,7 @@ struct HfTaskBsToJpsiPhiReduced {
393395
}
394396

395397
SETBIT(statusBs, SelectionStep::RecoSkims);
396-
if (HfHelper::selectionBsToJpsiPhiTopol(candidate, candKa0, candKa1, cuts, binsPt)) {
398+
if (HfHelper::selectionBsToJpsiPhiTopol(candidate, cuts, binsPt, useJpsiPdgMass, usePhiPdgMass)) {
397399
SETBIT(statusBs, SelectionStep::RecoTopol);
398400
} else if (selectionFlagBs >= BIT(SelectionStep::RecoTopol) * 2 - 1) {
399401
return;
@@ -432,18 +434,15 @@ struct HfTaskBsToJpsiPhiReduced {
432434
}
433435

434436
registry.fill(HIST("hMass"), invMassBs, ptCandBs);
435-
registry.fill(HIST("hMassJpsi"), invMassJpsi, candidate.ptProng0());
436-
registry.fill(HIST("hMassPhi"), invMassPhi, candidate.ptProng0());
437-
registry.fill(HIST("hd0K"), candidate.impactParameter1(), candidate.ptProng1());
437+
registry.fill(HIST("hMassJpsi"), invMassJpsi, ptJpsi);
438+
registry.fill(HIST("hMassPhi"), invMassPhi, ptPhi);
438439
if constexpr (DoMc) {
439440
if (isSignal) {
440441
registry.fill(HIST("hMassRecSig"), invMassBs, ptCandBs);
441-
registry.fill(HIST("hMassJpsiRecSig"), invMassJpsi, candidate.ptProng0());
442-
registry.fill(HIST("hd0KRecSig"), candidate.impactParameter1(), candidate.ptProng1());
442+
registry.fill(HIST("hMassJpsiRecSig"), invMassJpsi, ptJpsi);
443443
} else if (fillBackground) {
444444
registry.fill(HIST("hMassRecBg"), invMassBs, ptCandBs);
445-
registry.fill(HIST("hMassJpsiRecBg"), invMassJpsi, candidate.ptProng0());
446-
registry.fill(HIST("hd0KRecBg"), candidate.impactParameter1(), candidate.ptProng1());
445+
registry.fill(HIST("hMassJpsiRecBg"), invMassJpsi, ptJpsi);
447446
}
448447
}
449448

0 commit comments

Comments
 (0)