Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow Core CKF to skip the start surface #3535

Merged
merged 10 commits into from
Aug 30, 2024
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
15 changes: 15 additions & 0 deletions Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ struct CombinatorialKalmanFilterOptions {

/// Whether to consider energy loss.
bool energyLoss = true;

/// Skip the pre propagation call. This effectively skips the first surface
/// @note This is useful if the first surface should not be considered in a second reverse pass
bool skipPrePropagationUpdate = false;
};

template <typename track_container_t>
Expand Down Expand Up @@ -524,6 +528,9 @@ class CombinatorialKalmanFilter {
/// Whether to consider energy loss.
bool energyLoss = true;

/// Skip the pre propagation call. This effectively skips the first surface
bool skipPrePropagationUpdate = false;

/// Calibration context for the finding run
const CalibrationContext* calibrationContextPtr{nullptr};

Expand All @@ -547,6 +554,12 @@ class CombinatorialKalmanFilter {
return;
}

if (state.stage == PropagatorStage::prePropagation &&
skipPrePropagationUpdate) {
ACTS_VERBOSE("Skip pre-propagation update (first surface)");
return;
}

ACTS_VERBOSE("CombinatorialKalmanFilter step");

assert(!result.activeBranches.empty() && "No active branches");
Expand Down Expand Up @@ -1263,6 +1276,8 @@ class CombinatorialKalmanFilter {
combKalmanActor.targetReached.surface = tfOptions.targetSurface;
combKalmanActor.multipleScattering = tfOptions.multipleScattering;
combKalmanActor.energyLoss = tfOptions.energyLoss;
combKalmanActor.skipPrePropagationUpdate =
tfOptions.skipPrePropagationUpdate;
combKalmanActor.actorLogger = m_actorLogger.get();
combKalmanActor.updaterLogger = m_updaterLogger.get();
combKalmanActor.calibrationContextPtr = &tfOptions.calibrationContext.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ ProcessCode TrackFindingAlgorithm::execute(const AlgorithmContext& ctx) const {
ctx.calibContext, slAccessorDelegate,
extensions, secondPropOptions);
secondOptions.targetSurface = m_cfg.reverseSearch ? nullptr : pSurface.get();
secondOptions.skipPrePropagationUpdate = true;

using Extrapolator = Acts::Propagator<Acts::SympyStepper, Acts::Navigator>;
using ExtrapolatorOptions =
Expand Down Expand Up @@ -542,9 +543,6 @@ ProcessCode TrackFindingAlgorithm::execute(const AlgorithmContext& ctx) const {
ACTS_WARNING("Second track has no reference surface.");
continue;
}
if (secondTrack.nMeasurements() <= 1) {
continue;
}

// TODO a copy of the track should not be necessary but is the
// safest way with the current EDM
Expand All @@ -559,8 +557,7 @@ ProcessCode TrackFindingAlgorithm::execute(const AlgorithmContext& ctx) const {
secondTrackCopy.reverseTrackStates(true);

firstState.previous() =
(*std::next(secondTrackCopy.trackStatesReversed().begin()))
.index();
secondTrackCopy.outermostTrackState().index();

// finalize the track candidate

Expand Down
8 changes: 4 additions & 4 deletions Examples/Python/tests/root_file_hashes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ test_digitization_example_input[smeared]__particles.root: 5fe7dda2933ee6b9615b06
test_digitization_example_input[smeared]__measurements.root: 243c2f69b7b0db9dbeaa7494d4ea0f3dd1691dc90f16e10df6c0491ff4dc7d62
test_digitization_example_input[geometric]__particles.root: 5fe7dda2933ee6b9615b064d192322fe07831133cd998e5ed99a3b992b713a10
test_digitization_example_input[geometric]__measurements.root: 63ec81635979058fb8976f94455bf490cf92b7b142c4a05cc39de6225f5de2fb
test_ckf_tracks_example[generic-full_seeding]__trackstates_ckf.root: c4eb6e58fe2351f41dce134878e523f8b78b875ffd5c87bb094ebb3aa0e8e432
test_ckf_tracks_example[generic-full_seeding]__tracksummary_ckf.root: 4fa859b395e172c613d466a2ea25cdd56ed1ab3cfd857d230f21bc184310d668
test_ckf_tracks_example[generic-full_seeding]__trackstates_ckf.root: b61fa5d207d3d87742a8bae454eb4c97b2ef6613fe38f388f147da104ec7ff84
test_ckf_tracks_example[generic-full_seeding]__tracksummary_ckf.root: 18580d384e3ceb126be9c5d8857e176cff6c7d549155012d87939c91dba87015
test_ckf_tracks_example[generic-full_seeding]__performance_seeding_trees.root: 0e0676ffafdb27112fbda50d1cf627859fa745760f98073261dcf6db3f2f991e
test_ckf_tracks_example[generic-truth_estimated]__trackstates_ckf.root: afc9984f5b1f0b9d42156a1c3917df68144f1c486dd2b9b9a199309aa958cddc
test_ckf_tracks_example[generic-truth_estimated]__tracksummary_ckf.root: e5db2791d9d09d88705c0dbeba666b4df441ecc920b9e400510df2913766e112
test_ckf_tracks_example[generic-truth_estimated]__performance_seeding.root: 1facb05c066221f6361b61f015cdf0918e94d9f3fce2269ec7b6a4dffeb2bc7e
test_ckf_tracks_example[generic-truth_smeared]__trackstates_ckf.root: 47c5e18de310363fdebe79d6c82c3cf5407200f2f06879f79217924d28a67a6e
test_ckf_tracks_example[generic-truth_smeared]__tracksummary_ckf.root: 961aa19995a8a1c64a365c6d72a90eee9809efaaee652b674db287acacfb810c
test_ckf_tracks_example[odd-full_seeding]__trackstates_ckf.root: a7d3aba70ea614964e62a9acde1c7aeb280c68d2d57bd733ecb34ced938dd716
test_ckf_tracks_example[odd-full_seeding]__tracksummary_ckf.root: 3b27644bf25c20e5ed0d25f2273b68a470c63b07677a806cb176d4c91abd153e
test_ckf_tracks_example[odd-full_seeding]__trackstates_ckf.root: 65e17d3747dbf415bcaf31101e23bb48e61d8bc5da817e0fd33a4d03d77d4601
test_ckf_tracks_example[odd-full_seeding]__tracksummary_ckf.root: 2a905c02e3fd3b9f0626ee204294c223d9a05e7774a4234c51114e4e380954b9
test_ckf_tracks_example[odd-full_seeding]__performance_seeding_trees.root: 43c58577aafe07645e5660c4f43904efadf91d8cda45c5c04c248bbe0f59814f
test_ckf_tracks_example[odd-truth_estimated]__trackstates_ckf.root: a1103e9429076d3e5d0b9e3007710d26460ca9c4824c586522adedb19ce9e442
test_ckf_tracks_example[odd-truth_estimated]__tracksummary_ckf.root: a5eecfb6907406286c56db4df19937539cb43e454307bc53bd1eda535526736c
Expand Down
Loading