Skip to content

Commit

Permalink
fix: Use material towards target in CKF (#2318)
Browse files Browse the repository at this point in the history
The CKF did not pick up the material in-between the first surface and the target surface. This PR is trying to fix that.

Note: I had to use a not so nice hack and call the navigation pre step routine before we step towards the target. I don't see an easy way around that.
  • Loading branch information
andiwand committed Jul 26, 2023
1 parent 9cdf2fe commit 8ff2bcd
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 10 deletions.
Binary file modified CI/physmon/reference/performance_amvf_orthogonal_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_seeded_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_truth_estimated_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_truth_smeared_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_orthogonal_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_seeded_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_truth_estimated_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_truth_smeared_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/tracksummary_ckf_orthogonal_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/tracksummary_ckf_seeded_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/tracksummary_ckf_truth_estimated_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/tracksummary_ckf_truth_smeared_hist.root
Binary file not shown.
29 changes: 24 additions & 5 deletions Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,16 @@ class CombinatorialKalmanFilter {
result.result = res.error();
}
result.smoothed = true;

// TODO another ugly control flow hack
navigator.preStep(state, stepper);
}

if (result.smoothed) {
// Update state and stepper with material effects
materialInteractor(navigator.currentSurface(state.navigation),
state, stepper, navigator,
MaterialUpdateStage::FullUpdate);
}

// -> then progress to target/reference surface and built the final
Expand Down Expand Up @@ -768,11 +778,9 @@ class CombinatorialKalmanFilter {
nBranchesOnSurface = 0;
}
}
if (surface->surfaceMaterial() != nullptr) {
// Update state and stepper with material effects
materialInteractor(surface, state, stepper, navigator,
MaterialUpdateStage::FullUpdate);
}
// Update state and stepper with material effects
materialInteractor(surface, state, stepper, navigator,
MaterialUpdateStage::FullUpdate);
} else {
// Neither measurement nor material on surface, this branch is still
// valid. Count the branch on current surface
Expand Down Expand Up @@ -1236,6 +1244,17 @@ class CombinatorialKalmanFilter {
// Set accumulatd path to zero before targeting surface
state.stepping.pathAccumulated = 0.;

// Reset the navigation state
// Set targetSurface to nullptr as it is handled manually in the actor
navigator.resetState(state.navigation, state.geoContext,
stepper.position(state.stepping),
stepper.direction(state.stepping),
state.stepping.navDir, &surface, nullptr);

// Need to consider the material effects of the starting surface
materialInteractor(&surface, state, stepper, navigator,
MaterialUpdateStage::FullUpdate);

// Reset the navigation state to enable propagation towards the target
// surface
navigator.targetReached(state.navigation, false);
Expand Down
10 changes: 5 additions & 5 deletions Examples/Python/tests/root_file_hashes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ test_digitization_example_input[smeared]__measurements.root: 0f42102396b84a7c563
test_digitization_example_input[geometric]__particles.root: 8549ba6e20338004ab8ba299fc65e1ee5071985b46df8f77f887cb6fef56a8ec
test_digitization_example_input[geometric]__measurements.root: 567cb403baaf71e75029d42fae8d10c412cf05536a30d69a8b45de40074fa386
test_ckf_tracks_example[generic-full_seeding]__trackstates_ckf.root: d86c03a97613d6cd0646b25b5fd58a1dccaba704d9af2d88acb651dd54c68106
test_ckf_tracks_example[generic-full_seeding]__tracksummary_ckf.root: b71bdb12af27c1e94c139ee3264823f048e92d23fe34039797ef78679bf89d9d
test_ckf_tracks_example[generic-full_seeding]__tracksummary_ckf.root: 6507785c891ba018b1f188311145f185088d4128eec605a2d51dabef50279b55
test_ckf_tracks_example[generic-full_seeding]__performance_seeding_trees.root: 0e0676ffafdb27112fbda50d1cf627859fa745760f98073261dcf6db3f2f991e
test_ckf_tracks_example[generic-truth_estimated]__trackstates_ckf.root: a69c698efe1d6a25c934f6ee2a6ce66a46846321c3c321f39830db3999d6117a
test_ckf_tracks_example[generic-truth_estimated]__tracksummary_ckf.root: ea69b54988175d4ebb2bef25a273b06520a780c98f38d405e655de9b65bbae7f
test_ckf_tracks_example[generic-truth_estimated]__tracksummary_ckf.root: f1fefc52acc5ee05401046c2d501af5befdc1f8cd2858918e5a734bfeb28db7f
test_ckf_tracks_example[generic-truth_estimated]__performance_seeding.root: 1facb05c066221f6361b61f015cdf0918e94d9f3fce2269ec7b6a4dffeb2bc7e
test_ckf_tracks_example[generic-truth_smeared]__trackstates_ckf.root: 3fa8cc03f5840fb75fb53f3b1ee39021036b22d46f97c41f599269fae4e459b5
test_ckf_tracks_example[generic-truth_smeared]__tracksummary_ckf.root: fa1dd16d2acb9561f5405c7e7eb270a3508c5ef231a27f01a9aba1d8dd832f87
test_ckf_tracks_example[odd-full_seeding]__trackstates_ckf.root: af06990ef8be779d00d0e6ba2496af5c97a3e0487d47e017fdae261066473590
test_ckf_tracks_example[odd-full_seeding]__tracksummary_ckf.root: 2cce165675400e2a830f2c8c03f844ff6f00e3ea17c6278677a3d707a553f46c
test_ckf_tracks_example[odd-full_seeding]__tracksummary_ckf.root: 92734039aa678a8351ff66aa255ae23ba7f459618ce886f052192f8d3ecdd74b
test_ckf_tracks_example[odd-full_seeding]__performance_seeding_trees.root: 43c58577aafe07645e5660c4f43904efadf91d8cda45c5c04c248bbe0f59814f
test_ckf_tracks_example[odd-truth_estimated]__trackstates_ckf.root: 20eabea9f47a9fbee54b1251123ee1610195a07140feedb6825bb935a9ea9acf
test_ckf_tracks_example[odd-truth_estimated]__tracksummary_ckf.root: 3e86a6fc0d598e7869f746f1a3104bc06372f4ce4f2b25eb84e44020394aebce
test_ckf_tracks_example[odd-truth_estimated]__tracksummary_ckf.root: 4cfb6c577da562d201ad9c2339fde41928ea992fc0a69bb20ec38b121b826869
test_ckf_tracks_example[odd-truth_estimated]__performance_seeding.root: 1a36b7017e59f1c08602ef3c2cb0483c51df248f112e3780c66594110719c575
test_ckf_tracks_example[odd-truth_smeared]__trackstates_ckf.root: da5fc4d1d273c249b21b2653e7e66e084159af47919f095778b6959565d1e50a
test_ckf_tracks_example[odd-truth_smeared]__tracksummary_ckf.root: a36d469f019ec3bd093d940a57837ca1acf069f31c226f620b889ffa04c8ac56
test_ckf_tracks_example[odd-truth_smeared]__tracksummary_ckf.root: 9dad542893f4b2b5efd326d89ae2cbe5f7d8895abc87110fb5f82314910f9d0d
test_vertex_fitting_reading[Truth-False-100]__performance_vertexing.root: 76ef6084d758dfdfc0151ddec2170e12d73394424e3dac4ffe46f0f339ec8293
test_vertex_fitting_reading[Iterative-False-100]__performance_vertexing.root: 60372210c830a04f95ceb78c6c68a9b0de217746ff59e8e73053750c837b57eb
test_vertex_fitting_reading[Iterative-True-100]__performance_vertexing.root: e34f217d524a5051dbb04a811d3407df3ebe2cc4bb7f54f6bda0847dbd7b52c3
Expand Down

0 comments on commit 8ff2bcd

Please sign in to comment.