diff --git a/EventFiltering/PWGHF/HFFilter.cxx b/EventFiltering/PWGHF/HFFilter.cxx index bec34ce57e4..158a358d4ef 100644 --- a/EventFiltering/PWGHF/HFFilter.cxx +++ b/EventFiltering/PWGHF/HFFilter.cxx @@ -249,7 +249,8 @@ struct HfFilter { // Main struct for HF triggers std::array, kNCharmParticles> hBDTScorePrompt{}; std::array, kNCharmParticles> hBDTScoreNonPrompt{}; std::array, kNV0> hArmPod{}; - std::shared_ptr hV0Selected, hMassVsCtCharmBaryonToXiPiPi; + std::shared_ptr hV0Selected; + std::array, 2> hMassVsCtCharmBaryonToXi{}; std::array, 2> hMassXi{}; // not tracked and tracked std::array, kNBeautyParticles> hCpaVsPtB{}; std::array, kNBeautyParticles> hDecayLengthVsPtB{}; @@ -390,7 +391,8 @@ 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]}); + hMassVsCtCharmBaryonToXi[0] = registry.add("fMassVsCtCharmBaryonToXiPi", "#it{M} vs. ct distribution of triggered #Xi+#pi candidates;ct (cm);#it{M} (GeV/#it{c}^{2});counts", HistType::kTH2D, {ctAxis, massAxisC[kNCharmParticles + 15]}); + hMassVsCtCharmBaryonToXi[1] = 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 @@ -1949,10 +1951,10 @@ struct HfFilter { // Main struct for HF triggers bool isSelXiBach{false}; if (requireStrangenessTracking->get(0u, 0u) > 0) { if (hasStrangeTrack) { - isSelXiBach = helper.isSelectedXiBach(trackParCascTrack, trackParBachelor, isSelBachelor, collision, dfStrangeness, activateQA, hMassVsPtC[kNCharmParticles + 15], hMassVsPtC[kNCharmParticles + 16]); + isSelXiBach = helper.isSelectedXiBach(trackParCascTrack, trackParBachelor, isSelBachelor, collision, dfStrangeness, activateQA, hMassVsPtC[kNCharmParticles + 15], hMassVsPtC[kNCharmParticles + 16], hMassVsCtCharmBaryonToXi[0]); } } else { - isSelXiBach = helper.isSelectedXiBach(trackParCasc, trackParBachelor, isSelBachelor, collision, dfStrangeness, activateQA, hMassVsPtC[kNCharmParticles + 15], hMassVsPtC[kNCharmParticles + 16]); + isSelXiBach = helper.isSelectedXiBach(trackParCasc, trackParBachelor, isSelBachelor, collision, dfStrangeness, activateQA, hMassVsPtC[kNCharmParticles + 15], hMassVsPtC[kNCharmParticles + 16], hMassVsCtCharmBaryonToXi[0]); } if (isSelXiBach) { keepEvent[kCharmBarToXiBach] = true; @@ -1992,10 +1994,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], hMassVsCtCharmBaryonToXiPiPi); + isSelXiBachBach = helper.isSelectedXiBachBach<3>(trackParCascTrack, {trackParBachelor, trackParBachelorSecond}, collision, dfStrangeness3, activateQA, hMassVsPtC[kNCharmParticles + 17], hMassVsCtCharmBaryonToXi[1]); } } else { // vertex with only the two bachelors - isSelXiBachBach = helper.isSelectedXiBachBach<2>(trackParCasc, {trackParBachelor, trackParBachelorSecond}, collision, df2, activateQA, hMassVsPtC[kNCharmParticles + 17], hMassVsCtCharmBaryonToXiPiPi); + isSelXiBachBach = helper.isSelectedXiBachBach<2>(trackParCasc, {trackParBachelor, trackParBachelorSecond}, collision, df2, activateQA, hMassVsPtC[kNCharmParticles + 17], hMassVsCtCharmBaryonToXi[1]); } if (isSelXiBachBach) { keepEvent[kCharmBarToXi2Bach] = true; diff --git a/EventFiltering/PWGHF/HFFilterHelpers.h b/EventFiltering/PWGHF/HFFilterHelpers.h index d36f0f7cdeb..13bcfa93fa1 100644 --- a/EventFiltering/PWGHF/HFFilterHelpers.h +++ b/EventFiltering/PWGHF/HFFilterHelpers.h @@ -274,6 +274,7 @@ constexpr float massDPlus = o2::constants::physics::MassDPlus; constexpr float massDs = o2::constants::physics::MassDS; constexpr float massLc = o2::constants::physics::MassLambdaCPlus; constexpr float massXic = o2::constants::physics::MassXiCPlus; +constexpr float massXic0 = o2::constants::physics::MassXiC0; constexpr float massDStar = o2::constants::physics::MassDStar; constexpr float massBPlus = o2::constants::physics::MassBPlus; constexpr float massB0 = o2::constants::physics::MassB0; @@ -717,7 +718,7 @@ class HfFilterHelper template bool isCharmHadronMassInSbRegions(T1 const& massHypo1, T1 const& massHypo2, const float& lowLimitSB, const float& upLimitSB); 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); + 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, H2 hMassVsCtXiPi); template bool isSelectedXiBachBach(T const& trackParCasc, std::array const& trackParBachelor, C const& collision, o2::vertexing::DCAFitterN& dcaFitter, const int& activateQA, H2 hMassVsPtXiPiPi, H2 hMassVsCtXiPiPi); template @@ -2423,8 +2424,9 @@ inline bool HfFilterHelper::isCharmHadronMassInSbRegions(T1 const& massHypo1, T1 /// \param activateQA is the flag to activate the QA /// \param hMassVsPtXiPi is the 2D histogram with pT vs mass(XiPi) /// \param hMassVsPtXiKa is the 2D histogram with pT vs mass(XiKa) +/// \param hMassVsCtXiPi is the 2D histogram with ct vs mass(XiPi) template -inline bool HfFilterHelper::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) +inline bool HfFilterHelper::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, H2 hMassVsCtXiPi) { bool isSelectedXiPi{false}, isSelectedXiKa{false}; @@ -2483,13 +2485,16 @@ inline bool HfFilterHelper::isSelectedXiBach(T const& trackParCasc, T const& tra return false; } - if (RecoDecay::distance(primVtx, vtx) < mDecLenMinXiBach[0]) { + auto decLenXiBach = RecoDecay::distance(primVtx, vtx); + if (decLenXiBach < mDecLenMinXiBach[0]) { return false; } if (activateQA) { if (isSelectedXiPi) { + auto ctXiBach = RecoDecay::ct(momXiBach, decLenXiBach, massXic0); hMassVsPtXiPi->Fill(ptXiBach, massXiPi); + hMassVsCtXiPi->Fill(ctXiBach, massXiPi); } if (isSelectedXiKa) { hMassVsPtXiKa->Fill(ptXiBach, massXiKa);