You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PROCESS_SWITCH(femtoUniversePairTaskTrackCascadeExtended, processSameEventBitmask, "Enable processing same event for track - cascade using bitmask for PID", false);
if (!pairCleanerCasc.isCleanPair(p1, p2, parts)) {
586
-
// mark for rejection the cascades that share a daughter with other cascades
587
-
cascDuplicates.insert(p1.globalIndex());
588
-
cascDuplicates.insert(p2.globalIndex());
588
+
// mark for rejection the cascade that share a daughter with the other cascade and has a better cosPA value
589
+
auto groupedCasc1 = cascs.sliceBy(perFDPartsCasc, p1.globalIndex());
590
+
auto groupedCasc2 = cascs.sliceBy(perFDPartsCasc, p2.globalIndex());
591
+
if (groupedCasc1.size() <= 0 || groupedCasc2.size() <= 0) {
592
+
LOGF(warning, "Either cascade1 (%u) or cascade2 (%u) list is empty", groupedCasc1.size(), groupedCasc2.size()); // this should never happen but just for a sanity check
593
+
return;
594
+
}
595
+
if (std::abs(groupedCasc1.begin().cpaCasc() - 1) < std::abs(groupedCasc2.begin().cpaCasc() - 1)) {
596
+
cascDuplicates.insert(p1.globalIndex());
597
+
} else {
598
+
cascDuplicates.insert(p2.globalIndex());
599
+
}
589
600
}
590
601
};
591
602
592
-
auto pairProcessFunc = [&](auto& p1, auto& p2) -> void {
603
+
auto pairProcessFunc = [&](auto& p1, auto& p2) -> bool {
593
604
if (cascDuplicates.contains(p1.globalIndex()) || cascDuplicates.contains(p2.globalIndex()))
594
-
return;
605
+
returnfalse;
595
606
if (!invMCascade(p1.mLambda(), p1.mAntiLambda(), confCascType1))
596
-
return;
607
+
returnfalse;
597
608
if (!invMCascade(p2.mLambda(), p2.mAntiLambda(), confCascType2))
598
-
return;
599
-
if (confIsCPR.value) {
600
-
if (pairCloseRejectionCasc.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
PROCESS_SWITCH(femtoUniversePairTaskTrackCascadeExtended, processSameEventCascBitmask, "Enable processing same event for cascade - cascade using bitmask for PID", false);
0 commit comments