Skip to content

Commit

Permalink
feat: Reintroduce branch stopping on measurement in Core CKF (#3172)
Browse files Browse the repository at this point in the history
After removing this in #3102 I reintroduce this functionality here to reduce the changes to a minimum. After #3102 we see some bigger tack finding changes than expected which I suspect are coming from the fact that we effectively stopped most of the branches when reaching a measurement surface.

Having this callback will also be necessary if we want to allow the user to count holes/outliers/measurements in specific geometry regions by themselves.
  • Loading branch information
andiwand committed May 7, 2024
1 parent 666d7aa commit 320253c
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp
Expand Up @@ -890,9 +890,26 @@ class CombinatorialKalmanFilter {

// Put tipstate back into active tips to continue with it
result.activeTips.emplace_back(currentTip, tipState);
// Record the number of branches on surface
nBranchesOnSurface++;

using BranchStopperResult =
CombinatorialKalmanFilterBranchStopperResult;
BranchStopperResult branchStopperResult =
m_extensions.branchStopper(tipState, trackState);

// Check if need to stop this branch
if (branchStopperResult == BranchStopperResult::Continue) {
// Record the number of branches on surface
nBranchesOnSurface++;
} else {
if (branchStopperResult == BranchStopperResult::StopAndKeep) {
storeLastActiveTip(result);
}

// Remove the tip from list of active tips
result.activeTips.erase(result.activeTips.end() - 1);
}
}

return Result<void>::success();
}

Expand Down

0 comments on commit 320253c

Please sign in to comment.