@@ -395,36 +395,70 @@ struct femtoUniversePairTaskTrackV0Extended {
395395 }
396396 }
397397
398- // / Now build the combinations
399- for (auto & [p1, p2] : combinations (CombinationsStrictlyUpperIndexPolicy (groupPartsTwo, groupPartsTwo))) {
400- // Lambda invariant mass cut for p1
401- if (!invMLambda (p1.mLambda (), p1.mAntiLambda ()))
402- continue ;
403- // Lambda invariant mass cut for p2
404- if (!invMLambda (p2.mLambda (), p2.mAntiLambda ()))
405- continue ;
406- // track cleaning
407- if (!pairCleanerV0.isCleanPair (p1, p2, parts)) {
408- continue ;
409- }
410- if (ConfIsCPR.value ) {
411- if (pairCloseRejectionV0.isClosePair (p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) {
398+ if (ConfV0Type1 == ConfV0Type2) {
399+ // / Now build the combinations for identical V0s
400+ for (auto & [p1, p2] : combinations (CombinationsStrictlyUpperIndexPolicy (groupPartsTwo, groupPartsTwo))) {
401+ // Lambda invariant mass cut for p1
402+ if (!invMLambda (p1.mLambda (), p1.mAntiLambda ()))
403+ continue ;
404+ // Lambda invariant mass cut for p2
405+ if (!invMLambda (p2.mLambda (), p2.mAntiLambda ()))
406+ continue ;
407+ // track cleaning
408+ if (!pairCleanerV0.isCleanPair (p1, p2, parts)) {
412409 continue ;
413410 }
411+ if (ConfIsCPR.value ) {
412+ if (pairCloseRejectionV0.isClosePair (p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) {
413+ continue ;
414+ }
415+ }
416+ const auto & posChild1 = parts.iteratorAt (p1.index () - 2 );
417+ const auto & negChild1 = parts.iteratorAt (p1.index () - 1 );
418+ // / Daughters that do not pass this condition are not selected
419+ if (!IsParticleTPC (posChild1, V0ChildTable[ConfV0Type1][0 ]) || !IsParticleTPC (negChild1, V0ChildTable[ConfV0Type1][1 ]))
420+ continue ;
421+
422+ const auto & posChild2 = parts.iteratorAt (p2.index () - 2 );
423+ const auto & negChild2 = parts.iteratorAt (p2.index () - 1 );
424+ // / Daughters that do not pass this condition are not selected
425+ if (!IsParticleTPC (posChild2, V0ChildTable[ConfV0Type2][0 ]) || !IsParticleTPC (negChild2, V0ChildTable[ConfV0Type2][1 ]))
426+ continue ;
427+
428+ sameEventCont.setPair <false >(p1, p2, multCol, ConfUse3D);
414429 }
415- const auto & posChild1 = parts.iteratorAt (p1.index () - 2 );
416- const auto & negChild1 = parts.iteratorAt (p1.index () - 1 );
417- // / Daughters that do not pass this condition are not selected
418- if (!IsParticleTPC (posChild1, V0ChildTable[ConfV0Type1][0 ]) || !IsParticleTPC (negChild1, V0ChildTable[ConfV0Type1][1 ]))
419- continue ;
430+ } else {
431+ // / Now build the combinations for not identical identical V0s
432+ for (auto & [p1, p2] : combinations (CombinationsFullIndexPolicy (groupPartsTwo, groupPartsTwo))) {
433+ // Lambda invariant mass cut for p1
434+ if (!invMLambda (p1.mLambda (), p1.mAntiLambda ()))
435+ continue ;
436+ // Lambda invariant mass cut for p2
437+ if (!invMLambda (p2.mLambda (), p2.mAntiLambda ()))
438+ continue ;
439+ // track cleaning
440+ if (!pairCleanerV0.isCleanPair (p1, p2, parts)) {
441+ continue ;
442+ }
443+ if (ConfIsCPR.value ) {
444+ if (pairCloseRejectionV0.isClosePair (p1, p2, parts, magFieldTesla, femtoUniverseContainer::EventType::same)) {
445+ continue ;
446+ }
447+ }
448+ const auto & posChild1 = parts.iteratorAt (p1.index () - 2 );
449+ const auto & negChild1 = parts.iteratorAt (p1.index () - 1 );
450+ // / Daughters that do not pass this condition are not selected
451+ if (!IsParticleTPC (posChild1, V0ChildTable[ConfV0Type1][0 ]) || !IsParticleTPC (negChild1, V0ChildTable[ConfV0Type1][1 ]))
452+ continue ;
420453
421- const auto & posChild2 = parts.iteratorAt (p2.index () - 2 );
422- const auto & negChild2 = parts.iteratorAt (p2.index () - 1 );
423- // / Daughters that do not pass this condition are not selected
424- if (!IsParticleTPC (posChild2, V0ChildTable[ConfV0Type2][0 ]) || !IsParticleTPC (negChild2, V0ChildTable[ConfV0Type2][1 ]))
425- continue ;
454+ const auto & posChild2 = parts.iteratorAt (p2.index () - 2 );
455+ const auto & negChild2 = parts.iteratorAt (p2.index () - 1 );
456+ // / Daughters that do not pass this condition are not selected
457+ if (!IsParticleTPC (posChild2, V0ChildTable[ConfV0Type2][0 ]) || !IsParticleTPC (negChild2, V0ChildTable[ConfV0Type2][1 ]))
458+ continue ;
426459
427- sameEventCont.setPair <false >(p1, p2, multCol, ConfUse3D);
460+ sameEventCont.setPair <false >(p1, p2, multCol, ConfUse3D);
461+ }
428462 }
429463 }
430464
0 commit comments