@@ -594,33 +594,33 @@ struct FemtoUniversePairTaskTrackV0Extended {
594594 }
595595 };
596596
597- auto pairProcessFunc = [&](auto & p1, auto & p2) -> void {
597+ auto pairProcessFunc = [&](auto & p1, auto & p2) -> bool {
598598 if (v0Duplicates.contains (p1.globalIndex ()) || v0Duplicates.contains (p2.globalIndex ()))
599- return ;
599+ return false ;
600600 // Lambda invariant mass cut for p1
601601 if (!invMLambda (p1.mLambda (), p1.mAntiLambda ()))
602- return ;
602+ return false ;
603603 // Lambda invariant mass cut for p2
604604 if (!invMLambda (p2.mLambda (), p2.mAntiLambda ()))
605- return ;
605+ return false ;
606606
607607 const auto & posChild1 = parts.iteratorAt (p1.globalIndex () - 2 - parts.begin ().globalIndex ());
608608 const auto & negChild1 = parts.iteratorAt (p1.globalIndex () - 1 - parts.begin ().globalIndex ());
609609 // / p1 daughters that do not pass this condition are not selected
610610 if constexpr (std::experimental::is_detected<hasSigma, typename PartType::iterator>::value) {
611611 if (!isParticleTPC (posChild1, V0ChildTable[ConfV0Selection.confV0Type1 ][0 ]) || !isParticleTPC (negChild1, V0ChildTable[ConfV0Selection.confV0Type1 ][1 ]))
612- return ;
612+ return false ;
613613 if (!isParticleTOF (posChild1, V0ChildTable[ConfV0Selection.confV0Type1 ][0 ]) || !isParticleTOF (negChild1, V0ChildTable[ConfV0Selection.confV0Type1 ][1 ]))
614- return ;
614+ return false ;
615615 } else {
616616 if ((posChild1.pidCut () & (1u << V0ChildTable[ConfV0Selection.confV0Type1 ][0 ])) == 0 || (negChild1.pidCut () & (1u << V0ChildTable[ConfV0Selection.confV0Type1 ][1 ])) == 0 )
617- return ;
617+ return false ;
618618 if (ConfV0Selection.confUseStrangenessTOF ) {
619619 if (((ConfV0Selection.confV0Type1 == 0 ) && (p1.pidCut () & 3 ) != 3 ) || ((ConfV0Selection.confV0Type1 == 1 ) && (p1.pidCut () & 12 ) != 12 ) || ((ConfV0Selection.confV0Type1 == 2 ) && (p1.pidCut () & 48 ) != 48 ))
620- return ;
620+ return false ;
621621 } else {
622622 if ((posChild1.pidCut () & (8u << V0ChildTable[ConfV0Selection.confV0Type1 ][0 ])) == 0 || (negChild1.pidCut () & (8u << V0ChildTable[ConfV0Selection.confV0Type1 ][1 ])) == 0 )
623- return ;
623+ return false ;
624624 }
625625 }
626626
@@ -629,33 +629,34 @@ struct FemtoUniversePairTaskTrackV0Extended {
629629 // / p2 daughters that do not pass this condition are not selected
630630 if constexpr (std::experimental::is_detected<hasSigma, typename PartType::iterator>::value) {
631631 if (!isParticleTPC (posChild2, V0ChildTable[ConfV0Selection.confV0Type2 ][0 ]) || !isParticleTPC (negChild2, V0ChildTable[ConfV0Selection.confV0Type2 ][1 ]))
632- return ;
632+ return false ;
633633 if (!isParticleTOF (posChild2, V0ChildTable[ConfV0Selection.confV0Type2 ][0 ]) || !isParticleTOF (negChild2, V0ChildTable[ConfV0Selection.confV0Type2 ][1 ]))
634- return ;
634+ return false ;
635635 } else {
636636 if ((posChild2.pidCut () & (1u << V0ChildTable[ConfV0Selection.confV0Type2 ][0 ])) == 0 || (negChild2.pidCut () & (1u << V0ChildTable[ConfV0Selection.confV0Type2 ][1 ])) == 0 )
637- return ;
637+ return false ;
638638 if (ConfV0Selection.confUseStrangenessTOF ) {
639639 if (((ConfV0Selection.confV0Type2 == 0 ) && (p2.pidCut () & 3 ) != 3 ) || ((ConfV0Selection.confV0Type2 == 1 ) && (p2.pidCut () & 12 ) != 12 ) || ((ConfV0Selection.confV0Type2 == 2 ) && (p2.pidCut () & 48 ) != 48 ))
640- return ;
640+ return false ;
641641 } else {
642642 if ((posChild2.pidCut () & (8u << V0ChildTable[ConfV0Selection.confV0Type2 ][0 ])) == 0 || (negChild2.pidCut () & (8u << V0ChildTable[ConfV0Selection.confV0Type2 ][1 ])) == 0 )
643- return ;
643+ return false ;
644644 }
645645 }
646646
647647 if (confIsCPR.value ) {
648648 if (confRectV0V0CPR && pairCloseRejectionV0.isClosePair <true >(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
649- return ;
649+ return false ;
650650 } else if (!confRectV0V0CPR && pairCloseRejectionV0.isClosePair <false >(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
651- return ;
651+ return false ;
652652 }
653653 }
654654
655655 if constexpr (std::is_same<PartType, FemtoRecoParticles>::value)
656656 sameEventCont.setPair <true >(p1, p2, multCol, confUse3D);
657657 else
658658 sameEventCont.setPair <false >(p1, p2, multCol, confUse3D);
659+ return true ;
659660 };
660661
661662 v0Duplicates.clear ();
@@ -664,7 +665,8 @@ struct FemtoUniversePairTaskTrackV0Extended {
664665 }
665666 // / Now build the combinations for V0s
666667 for (const auto & [p1, p2] : combinations (CombinationsStrictlyUpperIndexPolicy (groupPartsTwo, groupPartsTwo))) {
667- pairProcessFunc (p1, p2);
668+ if (!pairProcessFunc (p1, p2))
669+ pairProcessFunc (p2, p1);
668670 }
669671 }
670672
0 commit comments