From 15b5794c792d0c4bca07a80126b4a9156a0b7aa9 Mon Sep 17 00:00:00 2001 From: creetz16 Date: Tue, 12 May 2026 17:25:15 +0200 Subject: [PATCH 1/4] Add Xic+ ct QA histogram to HF filter task --- EventFiltering/PWGHF/HFFilter.cxx | 7 ++++--- EventFiltering/PWGHF/HFFilterHelpers.h | 12 ++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/EventFiltering/PWGHF/HFFilter.cxx b/EventFiltering/PWGHF/HFFilter.cxx index 15e6fc87ba8..01307114bd9 100644 --- a/EventFiltering/PWGHF/HFFilter.cxx +++ b/EventFiltering/PWGHF/HFFilter.cxx @@ -238,7 +238,7 @@ struct HfFilter { // Main struct for HF triggers std::shared_ptr hProcessedEvents; // QA histos - std::shared_ptr hN2ProngCharmCand, hN3ProngCharmCand; + std::shared_ptr hN2ProngCharmCand, hN3ProngCharmCand, hMassVsCtCharmBaryonToXiPiPi; std::array, kNCharmParticles> hCharmHighPt{}; std::array, kNCharmParticles> hCharmProtonKstarDistr{}; std::array, kNCharmParticles> hCharmDeuteronKstarDistr{}; @@ -390,6 +390,7 @@ struct HfFilter { // Main struct for HF triggers hMassVsPtC[kNCharmParticles + 15] = registry.add("fMassVsPtCharmBaryonToXiPi", "#it{M} vs. #it{p}_{T} distribution of triggered #Xi+#pi candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", HistType::kTH2D, {ptAxis, massAxisC[kNCharmParticles + 15]}); hMassVsPtC[kNCharmParticles + 16] = registry.add("fMassVsPtCharmBaryonToXiKa", "#it{M} vs. #it{p}_{T} distribution of triggered #Xi+K candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", HistType::kTH2D, {ptAxis, massAxisC[kNCharmParticles + 16]}); hMassVsPtC[kNCharmParticles + 17] = registry.add("fMassVsPtCharmBaryonToXiPiPi", "#it{M} vs. #it{p}_{T} distribution of triggered #Xi+#pi+#pi candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", HistType::kTH2D, {ptAxis, massAxisC[kNCharmParticles + 17]}); + hMassVsCtCharmBaryonToXiPiPi = registry.add("fMassVsCtCharmBaryonToXiPiPi", "#it{M} vs. ct distribution of triggered #Xi+#pi+#pi candidates;ct (cm);#it{M} (GeV/#it{c}^{2});counts", HistType::kTH2D, {ctAxis, massAxisC[kNCharmParticles + 17]}); // JPsi hMassVsPtC[kNCharmParticles + 18] = registry.add("fMassVsPtJPsiToMuMu", "#it{M} vs. #it{p}_{T} distribution of triggered J/#psi to #mu#mu candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", HistType::kTH2D, {ptAxis, massAxisC[kNCharmParticles + 18]}); // Lc resonances @@ -1991,10 +1992,10 @@ struct HfFilter { // Main struct for HF triggers bool isSelXiBachBach{false}; if (requireStrangenessTracking->get(0u, 1u) > 0) { if (hasStrangeTrack) { - isSelXiBachBach = helper.isSelectedXiBachBach<3>(trackParCascTrack, {trackParBachelor, trackParBachelorSecond}, collision, dfStrangeness3, activateQA, hMassVsPtC[kNCharmParticles + 17]); + isSelXiBachBach = helper.isSelectedXiBachBach<3>(trackParCascTrack, {trackParBachelor, trackParBachelorSecond}, collision, dfStrangeness3, activateQA, hMassVsPtC[kNCharmParticles + 17], hMassVsCtCharmBaryonToXiPiPi); } } else { // vertex with only the two bachelors - isSelXiBachBach = helper.isSelectedXiBachBach<2>(trackParCasc, {trackParBachelor, trackParBachelorSecond}, collision, df2, activateQA, hMassVsPtC[kNCharmParticles + 17]); + isSelXiBachBach = helper.isSelectedXiBachBach<2>(trackParCasc, {trackParBachelor, trackParBachelorSecond}, collision, df2, activateQA, hMassVsPtC[kNCharmParticles + 17], hMassVsCtCharmBaryonToXiPiPi); } if (isSelXiBachBach) { keepEvent[kCharmBarToXi2Bach] = true; diff --git a/EventFiltering/PWGHF/HFFilterHelpers.h b/EventFiltering/PWGHF/HFFilterHelpers.h index d215fb0df8d..82b725b5ae6 100644 --- a/EventFiltering/PWGHF/HFFilterHelpers.h +++ b/EventFiltering/PWGHF/HFFilterHelpers.h @@ -288,6 +288,7 @@ constexpr float massJPsi = o2::constants::physics::MassJPsi; static const o2::framework::AxisSpec ptAxis{50, 0.f, 50.f}; static const o2::framework::AxisSpec pAxis{50, 0.f, 10.f}; +static const o2::framework::AxisSpec ctAxis{300, 0.f, 0.3f}; static const o2::framework::AxisSpec kstarAxis{200, 0.f, 2.f}; static const o2::framework::AxisSpec etaAxis{30, -1.5f, 1.5f}; static const o2::framework::AxisSpec nSigmaAxis{100, -10.f, 10.f}; @@ -718,7 +719,7 @@ class HfFilterHelper template bool isSelectedXiBach(T const& trackParCasc, T const& trackParBachelor, int8_t isSelBachelor, C const& collision, o2::vertexing::DCAFitterN<2>& dcaFitter, const int& activateQA, H2 hMassVsPtXiPi, H2 hMassVsPtXiKa); template - bool isSelectedXiBachBach(T const& trackParCasc, std::array const& trackParBachelor, C const& collision, o2::vertexing::DCAFitterN& dcaFitter, const int& activateQA, H2 hMassVsPtXiPiPi); + bool isSelectedXiBachBach(T const& trackParCasc, std::array const& trackParBachelor, C const& collision, o2::vertexing::DCAFitterN& dcaFitter, const int& activateQA, H2 hMassVsPtXiPiPi, H2 hMassVsCtXiPiPi); template bool isSelectedProtonFromLcResoOrThetaC(const T& track); // helpers @@ -2506,8 +2507,9 @@ inline bool HfFilterHelper::isSelectedXiBach(T const& trackParCasc, T const& tra /// \param dcaFitter is the DCAFitter /// \param activateQA is the flag to activate the QA /// \param hMassVsPtXiPiPi is the 2D histogram with pT vs mass(XiPiPi) +/// \param hMassVsCtXiPiPi is the 2D histogram with ct vs mass(XiPiPi) template -inline bool HfFilterHelper::isSelectedXiBachBach(T const& trackParCasc, std::array const& trackParBachelor, C const& collision, o2::vertexing::DCAFitterN& dcaFitter, const int& activateQA, H2 hMassVsPtXiPiPi) +inline bool HfFilterHelper::isSelectedXiBachBach(T const& trackParCasc, std::array const& trackParBachelor, C const& collision, o2::vertexing::DCAFitterN& dcaFitter, const int& activateQA, H2 hMassVsPtXiPiPi, H2 hMassVsCtXiPiPi) { // compute pT std::array pVecBachelorFirst{}, pVecBachelorSecond{}, pVecCascade{}; @@ -2570,13 +2572,15 @@ inline bool HfFilterHelper::isSelectedXiBachBach(T const& trackParCasc, std::arr if (RecoDecay::cpa(primVtx, std::array{vtx[0], vtx[1], vtx[2]}, momXiBachBach) < mCosPaMinXiBach[1]) { return false; } - - if (RecoDecay::distance(primVtx, vtx) < mDecLenMinXiBach[1]) { + auto decLenXiBachBach = RecoDecay::distance(primVtx, vtx); + if (decLenXiBachBach < mDecLenMinXiBach[1]) { return false; } + auto ctXiBachBach = RecoDecay::ct(decLenXiBachBach, momXiBachBach, massXiPiPi); if (activateQA) { hMassVsPtXiPiPi->Fill(ptXiBachBach, massXiPiPi); + hMassVsCtXiPiPi->Fill(ctXiBachBach, massXiPiPi); } } From 5ce119df6f72de81d330c7169a6eef134f860200 Mon Sep 17 00:00:00 2001 From: creetz16 Date: Tue, 12 May 2026 17:50:02 +0200 Subject: [PATCH 2/4] Correct mass value --- EventFiltering/PWGHF/HFFilterHelpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EventFiltering/PWGHF/HFFilterHelpers.h b/EventFiltering/PWGHF/HFFilterHelpers.h index 82b725b5ae6..b555d15387f 100644 --- a/EventFiltering/PWGHF/HFFilterHelpers.h +++ b/EventFiltering/PWGHF/HFFilterHelpers.h @@ -2577,7 +2577,7 @@ inline bool HfFilterHelper::isSelectedXiBachBach(T const& trackParCasc, std::arr return false; } - auto ctXiBachBach = RecoDecay::ct(decLenXiBachBach, momXiBachBach, massXiPiPi); + auto ctXiBachBach = RecoDecay::ct(decLenXiBachBach, momXiBachBach, massXic); if (activateQA) { hMassVsPtXiPiPi->Fill(ptXiBachBach, massXiPiPi); hMassVsCtXiPiPi->Fill(ctXiBachBach, massXiPiPi); From 051c8b83e38088a8d8f4747147cae24c131fceca Mon Sep 17 00:00:00 2001 From: creetz16 Date: Tue, 12 May 2026 17:51:30 +0200 Subject: [PATCH 3/4] Fix shared pointer declaration --- EventFiltering/PWGHF/HFFilter.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EventFiltering/PWGHF/HFFilter.cxx b/EventFiltering/PWGHF/HFFilter.cxx index 01307114bd9..bec34ce57e4 100644 --- a/EventFiltering/PWGHF/HFFilter.cxx +++ b/EventFiltering/PWGHF/HFFilter.cxx @@ -238,7 +238,7 @@ struct HfFilter { // Main struct for HF triggers std::shared_ptr hProcessedEvents; // QA histos - std::shared_ptr hN2ProngCharmCand, hN3ProngCharmCand, hMassVsCtCharmBaryonToXiPiPi; + std::shared_ptr hN2ProngCharmCand, hN3ProngCharmCand; std::array, kNCharmParticles> hCharmHighPt{}; std::array, kNCharmParticles> hCharmProtonKstarDistr{}; std::array, kNCharmParticles> hCharmDeuteronKstarDistr{}; @@ -249,7 +249,7 @@ struct HfFilter { // Main struct for HF triggers std::array, kNCharmParticles> hBDTScorePrompt{}; std::array, kNCharmParticles> hBDTScoreNonPrompt{}; std::array, kNV0> hArmPod{}; - std::shared_ptr hV0Selected; + std::shared_ptr hV0Selected, hMassVsCtCharmBaryonToXiPiPi; std::array, 2> hMassXi{}; // not tracked and tracked std::array, kNBeautyParticles> hCpaVsPtB{}; std::array, kNBeautyParticles> hDecayLengthVsPtB{}; From 312cac762787d039fbe476c6e4affa4267ed9ab9 Mon Sep 17 00:00:00 2001 From: creetz16 Date: Tue, 12 May 2026 18:00:14 +0200 Subject: [PATCH 4/4] Fix order of arguments --- EventFiltering/PWGHF/HFFilterHelpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EventFiltering/PWGHF/HFFilterHelpers.h b/EventFiltering/PWGHF/HFFilterHelpers.h index b555d15387f..d36f0f7cdeb 100644 --- a/EventFiltering/PWGHF/HFFilterHelpers.h +++ b/EventFiltering/PWGHF/HFFilterHelpers.h @@ -2577,7 +2577,7 @@ inline bool HfFilterHelper::isSelectedXiBachBach(T const& trackParCasc, std::arr return false; } - auto ctXiBachBach = RecoDecay::ct(decLenXiBachBach, momXiBachBach, massXic); + auto ctXiBachBach = RecoDecay::ct(momXiBachBach, decLenXiBachBach, massXic); if (activateQA) { hMassVsPtXiPiPi->Fill(ptXiBachBach, massXiPiPi); hMassVsCtXiPiPi->Fill(ctXiBachBach, massXiPiPi);