From 43cf2f45ebeee2e8476a6ec6df44b4a2d5f9025b Mon Sep 17 00:00:00 2001 From: Fabrizio Grosa Date: Mon, 18 Jul 2022 13:43:50 +0200 Subject: [PATCH 1/3] Fix Ds selection in femto trigger --- EventFiltering/PWGHF/HFFilter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EventFiltering/PWGHF/HFFilter.cxx b/EventFiltering/PWGHF/HFFilter.cxx index 54520170745..81d1965a5bb 100644 --- a/EventFiltering/PWGHF/HFFilter.cxx +++ b/EventFiltering/PWGHF/HFFilter.cxx @@ -925,7 +925,7 @@ struct HfFilter { // Main struct for HF triggers // 3-prong femto if (isSelectedProton4Femto(track)) { for (int iHypo{0}; iHypo < kNCharmParticles - 1 && !keepEvent[kFemto]; ++iHypo) { - if (isCharmTagged[iHypo] && ((iHypo != 1 && is3Prong[iHypo]) || (iHypo == 1 && is3Prong[iHypo] && (TESTBIT(is3Prong[iHypo], 2) || TESTBIT(is3Prong[iHypo], 3))))) { + if (isCharmTagged[iHypo] && ((iHypo != 1 && is3Prong[iHypo]) || (iHypo == 1 && is3Prong[iHypo] && (TESTBIT(is3ProngInMass[iHypo], 2) || TESTBIT(is3ProngInMass[iHypo], 3))))) { float relativeMomentum = computeRelativeMomentum(track, pVec3Prong, massCharmHypos[iHypo]); if (relativeMomentum < femtoMaxRelativeMomentum) { keepEvent[kFemto] = true; From 12b4076622d7e7c19b726698b2aaa3161af24c01 Mon Sep 17 00:00:00 2001 From: Fabrizio Grosa Date: Mon, 18 Jul 2022 13:49:19 +0200 Subject: [PATCH 2/3] Fix multicharm 3-prong selection --- EventFiltering/PWGHF/HFFilter.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EventFiltering/PWGHF/HFFilter.cxx b/EventFiltering/PWGHF/HFFilter.cxx index 81d1965a5bb..8a84b5e70f5 100644 --- a/EventFiltering/PWGHF/HFFilter.cxx +++ b/EventFiltering/PWGHF/HFFilter.cxx @@ -859,7 +859,9 @@ struct HfFilter { // Main struct for HF triggers continue; } - n3Prongs++; + if (!std::accumulate(isCharmTagged.begin(), isCharmTagged.end(), 0)) { + n3Prongs++; + } // end multiple 3-prong selection std::array pVecFirst = {trackFirst.px(), trackFirst.py(), trackFirst.pz()}; std::array pVecSecond = {trackSecond.px(), trackSecond.py(), trackSecond.pz()}; From c3ba74eee772d0e336794644ba475db4d886ac34 Mon Sep 17 00:00:00 2001 From: Fabrizio Grosa Date: Mon, 18 Jul 2022 14:01:20 +0200 Subject: [PATCH 3/3] Minor modification --- EventFiltering/PWGHF/HFFilter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EventFiltering/PWGHF/HFFilter.cxx b/EventFiltering/PWGHF/HFFilter.cxx index 8a84b5e70f5..65cbafb6a30 100644 --- a/EventFiltering/PWGHF/HFFilter.cxx +++ b/EventFiltering/PWGHF/HFFilter.cxx @@ -953,7 +953,7 @@ struct HfFilter { // Main struct for HF triggers tags(keepEvent[kHighPt], keepEvent[kBeauty], keepEvent[kFemto], keepEvent[kDoubleCharm]); - if (!keepEvent[kHighPt] && !keepEvent[kBeauty] && !keepEvent[kFemto] && !keepEvent[kDoubleCharm]) { + if (!std::accumulate(keepEvent, keepEvent + kNtriggersHF, 0)) { hProcessedEvents->Fill(1); } else { for (int iTrigger{0}; iTrigger < kNtriggersHF; ++iTrigger) {