@@ -859,7 +859,9 @@ struct HfFilter { // Main struct for HF triggers
859859 continue ;
860860 }
861861
862- n3Prongs++;
862+ if (!std::accumulate (isCharmTagged.begin (), isCharmTagged.end (), 0 )) {
863+ n3Prongs++;
864+ } // end multiple 3-prong selection
863865
864866 std::array<float , 3 > pVecFirst = {trackFirst.px (), trackFirst.py (), trackFirst.pz ()};
865867 std::array<float , 3 > pVecSecond = {trackSecond.px (), trackSecond.py (), trackSecond.pz ()};
@@ -925,7 +927,7 @@ struct HfFilter { // Main struct for HF triggers
925927 // 3-prong femto
926928 if (isSelectedProton4Femto (track)) {
927929 for (int iHypo{0 }; iHypo < kNCharmParticles - 1 && !keepEvent[kFemto ]; ++iHypo) {
928- if (isCharmTagged[iHypo] && ((iHypo != 1 && is3Prong[iHypo]) || (iHypo == 1 && is3Prong[iHypo] && (TESTBIT (is3Prong [iHypo], 2 ) || TESTBIT (is3Prong [iHypo], 3 ))))) {
930+ if (isCharmTagged[iHypo] && ((iHypo != 1 && is3Prong[iHypo]) || (iHypo == 1 && is3Prong[iHypo] && (TESTBIT (is3ProngInMass [iHypo], 2 ) || TESTBIT (is3ProngInMass [iHypo], 3 ))))) {
929931 float relativeMomentum = computeRelativeMomentum (track, pVec3Prong, massCharmHypos[iHypo]);
930932 if (relativeMomentum < femtoMaxRelativeMomentum) {
931933 keepEvent[kFemto ] = true ;
@@ -951,7 +953,7 @@ struct HfFilter { // Main struct for HF triggers
951953
952954 tags (keepEvent[kHighPt ], keepEvent[kBeauty ], keepEvent[kFemto ], keepEvent[kDoubleCharm ]);
953955
954- if (!keepEvent[ kHighPt ] && ! keepEvent[ kBeauty ] && !keepEvent[ kFemto ] && !keepEvent[ kDoubleCharm ] ) {
956+ if (!std::accumulate ( keepEvent, keepEvent + kNtriggersHF , 0 ) ) {
955957 hProcessedEvents->Fill (1 );
956958 } else {
957959 for (int iTrigger{0 }; iTrigger < kNtriggersHF ; ++iTrigger) {
0 commit comments