Skip to content

Commit

Permalink
perf: Use sympy generated transport jacobians for sympy covariance tr…
Browse files Browse the repository at this point in the history
…ansport (acts-project#3650)

Apparently this got lost at some point. Until now we used the Eigen implementation of the jacobian transport even though a sympy version was already preset. I fixed the include and explicitly mentioned the `sympy` namespace.

This popped out of a recent profile I did on the track finding.
  • Loading branch information
andiwand authored and paulgessinger committed Sep 26, 2024
1 parent b58e5b0 commit d548201
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 31 deletions.
9 changes: 5 additions & 4 deletions Core/src/Propagator/detail/SympyCovarianceEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "Acts/Propagator/detail/SympyCovarianceEngine.hpp"

#include "Acts/Propagator/detail/JacobianEngine.hpp"
#include "Acts/Propagator/detail/SympyJacobianEngine.hpp"

#include "codegen/sympy_cov_math.hpp"

Expand Down Expand Up @@ -97,9 +98,9 @@ void sympy::transportCovarianceToBound(
const FreeToBoundCorrection& freeToBoundCorrection) {
// Calculate the full jacobian from local parameters at the start surface to
// current bound parameters
boundToBoundTransportJacobian(geoContext, surface, freeParameters,
boundToFreeJacobian, freeTransportJacobian,
freeToPathDerivatives, fullTransportJacobian);
sympy::boundToBoundTransportJacobian(
geoContext, surface, freeParameters, boundToFreeJacobian,
freeTransportJacobian, freeToPathDerivatives, fullTransportJacobian);

bool correction = false;
if (freeToBoundCorrection) {
Expand Down Expand Up @@ -153,7 +154,7 @@ void sympy::transportCovarianceToCurvilinear(
BoundToFreeMatrix& boundToFreeJacobian, const Vector3& direction) {
// Calculate the full jacobian from local parameters at the start surface to
// current curvilinear parameters
boundToCurvilinearTransportJacobian(
sympy::boundToCurvilinearTransportJacobian(
direction, boundToFreeJacobian, freeTransportJacobian,
freeToPathDerivatives, fullTransportJacobian);

Expand Down
54 changes: 27 additions & 27 deletions Examples/Python/tests/root_file_hashes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ 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: b61fa5d207d3d87742a8bae454eb4c97b2ef6613fe38f388f147da104ec7ff84
test_ckf_tracks_example[generic-full_seeding]__tracksummary_ckf.root: 18580d384e3ceb126be9c5d8857e176cff6c7d549155012d87939c91dba87015
test_ckf_tracks_example[generic-full_seeding]__trackstates_ckf.root: 0e90ce4ef9a7f16ad4dc96be57404ee213b341d955e06a627a2868741d1a81ca
test_ckf_tracks_example[generic-full_seeding]__tracksummary_ckf.root: 4d2e26c352285aed77e46e09ee1977eb34cd82a29b0cb08f162a61ea76f71f17
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]__trackstates_ckf.root: 71a48e6d22be7f01611394ed7bd5a4a498aade6e20deb7efb0d9bd67dd950970
test_ckf_tracks_example[generic-truth_estimated]__tracksummary_ckf.root: 5a973ec1c159681361ac069809e364cef4ec3e0efcafb05689f1175764f438b4
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: 65e17d3747dbf415bcaf31101e23bb48e61d8bc5da817e0fd33a4d03d77d4601
test_ckf_tracks_example[odd-full_seeding]__tracksummary_ckf.root: 2a905c02e3fd3b9f0626ee204294c223d9a05e7774a4234c51114e4e380954b9
test_ckf_tracks_example[generic-truth_smeared]__trackstates_ckf.root: 8bf6b4b9935b6ff09778c0be65c8ac4b6841a4762c6c7c510d30b460393874af
test_ckf_tracks_example[generic-truth_smeared]__tracksummary_ckf.root: 50c7cce3f9f41af3c8fbe85f308e001f1d90e5fe3e0f8633d1de7c4af9a2e902
test_ckf_tracks_example[odd-full_seeding]__trackstates_ckf.root: 9a961d2ceb4039893f4b7ae44e8adf7b49e20946cc54c8a92a8c232efda679bd
test_ckf_tracks_example[odd-full_seeding]__tracksummary_ckf.root: 06af29a7883c581fe00c8c443cb9e864d671d717ee7b2746900b286183586e8e
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
test_ckf_tracks_example[odd-truth_estimated]__trackstates_ckf.root: 67f99798514c816839e8f48428cb26eca231d30c337ffa5553f2e3daf1f76d79
test_ckf_tracks_example[odd-truth_estimated]__tracksummary_ckf.root: 8382954cedafc4d5d020781d79fa52e4ff83713ee3548c5886067a7279f73f99
test_ckf_tracks_example[odd-truth_estimated]__performance_seeding.root: 1a36b7017e59f1c08602ef3c2cb0483c51df248f112e3780c66594110719c575
test_ckf_tracks_example[odd-truth_smeared]__trackstates_ckf.root: 620c05ac64c9d398417edf8261cfd89023e14083b9357e236077f4e5ea4d9c0b
test_ckf_tracks_example[odd-truth_smeared]__tracksummary_ckf.root: 772855a12b7c7ca1170b112e00ae73e4e43b269c2b6bb1f881e761c089255cf5
test_ckf_tracks_example[odd-truth_smeared]__trackstates_ckf.root: 8467143e4fddd3ef4b327a1fe924c819ae099ac4e41d381a259d91a4d4606b68
test_ckf_tracks_example[odd-truth_smeared]__tracksummary_ckf.root: 81062b6e422d665d68409075ea23e346ea8ae7672d4fc2ebf680140c0c456004
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 All @@ -74,23 +74,23 @@ test_exatrkx[cpu-torch]__performance_track_finding.root: 36b3045589c4c17c038dbc8
test_exatrkx[gpu-onnx]__performance_track_finding.root: 9090de10ffb1489d3f1993e2a3081a3038227e3e5c453e98a9a4f33ea3d6d817
test_exatrkx[gpu-torch]__performance_track_finding.root: 36b3045589c4c17c038dbc87943366f4af4440f7eea6887afb763871ac149b05
test_ML_Ambiguity_Solver__performance_ambiML.root: 284ff5c3a08c0b810938e4ac2f8ba8fe2babb17d4c202b624ed69fff731a9006
test_refitting[odd]__trackstates_gsf_refit.root: 33de1e46b05abc450ff89aebc728d7cb85e3f4dc90e5a21fc79a1ed8e9e04d7d
test_refitting[odd]__trackstates_gsf_refit.root: 798a5b2e6d4b6d56e73ad107887f310c9463cc739ca1b69dad4a99d3419943ca
test_refitting[odd]__tracksummary_gsf_refit.root: 16951808df6363d2acb99e385aec35ad723b634403ca0724a552ae9d3a2ae237
test_refitting[generic]__trackstates_gsf_refit.root: ae07a875975a416d323d98b4b16dd3edc5ae672a8993ecb624758a770afdffbd
test_refitting[generic]__tracksummary_gsf_refit.root: bf46a89e429fa77a380d5ee48babb8af2044196eff872825e84c0d4401357114
test_truth_tracking_kalman[generic-False-0.0]__trackstates_kf.root: c2a351bb12b81a69549ca0229d36369cb63cbc53a924f0fd0520879d214b9134
test_truth_tracking_kalman[generic-False-0.0]__tracksummary_kf.root: bf46a89e429fa77a380d5ee48babb8af2044196eff872825e84c0d4401357114
test_truth_tracking_kalman[generic-False-1000.0]__trackstates_kf.root: 0a2428ff260466f7fe4ea44863664afa3c7e34b0dc388e43ee096d132f3acefb
test_refitting[generic]__trackstates_gsf_refit.root: b044574ab5dec9781ca2a1d72095f2393270766365a0e165904ff628191c284a
test_refitting[generic]__tracksummary_gsf_refit.root: 6f8bd054c663197a5f5523e54ebc9695759b671eb14791f964073ed3c8a6f27f
test_truth_tracking_kalman[generic-False-0.0]__trackstates_kf.root: 64a7f26c30f5a70e323dc5d43142a7cc81ad7ef04033095a1ae11d27c41333f0
test_truth_tracking_kalman[generic-False-0.0]__tracksummary_kf.root: 6f8bd054c663197a5f5523e54ebc9695759b671eb14791f964073ed3c8a6f27f
test_truth_tracking_kalman[generic-False-1000.0]__trackstates_kf.root: e69d1aacacecc3d7d6619605cdd179d9fb0e19734f7c35345284f9a0e01f36d1
test_truth_tracking_kalman[generic-False-1000.0]__tracksummary_kf.root: 055a74d2747d360398cc846cc2791204491528896de78cca66b188e3ff530dc1
test_truth_tracking_kalman[generic-True-0.0]__trackstates_kf.root: c2a351bb12b81a69549ca0229d36369cb63cbc53a924f0fd0520879d214b9134
test_truth_tracking_kalman[generic-True-0.0]__tracksummary_kf.root: bf46a89e429fa77a380d5ee48babb8af2044196eff872825e84c0d4401357114
test_truth_tracking_kalman[generic-True-1000.0]__trackstates_kf.root: 0a2428ff260466f7fe4ea44863664afa3c7e34b0dc388e43ee096d132f3acefb
test_truth_tracking_kalman[generic-True-0.0]__trackstates_kf.root: 64a7f26c30f5a70e323dc5d43142a7cc81ad7ef04033095a1ae11d27c41333f0
test_truth_tracking_kalman[generic-True-0.0]__tracksummary_kf.root: 6f8bd054c663197a5f5523e54ebc9695759b671eb14791f964073ed3c8a6f27f
test_truth_tracking_kalman[generic-True-1000.0]__trackstates_kf.root: e69d1aacacecc3d7d6619605cdd179d9fb0e19734f7c35345284f9a0e01f36d1
test_truth_tracking_kalman[generic-True-1000.0]__tracksummary_kf.root: 055a74d2747d360398cc846cc2791204491528896de78cca66b188e3ff530dc1
test_truth_tracking_kalman[odd-False-0.0]__trackstates_kf.root: a34546ba6cfdbecc3bcf6f02ec782ebcc76f332070e7ff8a64207ed815f65c7e
test_truth_tracking_kalman[odd-False-0.0]__tracksummary_kf.root: 7f1bb68b39e52da7a77ea295819fa3776e947568455338738c3a6436c2d7599c
test_truth_tracking_kalman[odd-False-1000.0]__trackstates_kf.root: 0e508f4a6b13dec00a4c55629c90cd055d1aef7dec9c6d86edf55403d20b424d
test_truth_tracking_kalman[odd-False-0.0]__trackstates_kf.root: 22c9f39a8e9569499205c024f7075d4125aca111c0e580c0320d6d93696062d5
test_truth_tracking_kalman[odd-False-0.0]__tracksummary_kf.root: a6da8b8ca2cd0f09fcbae5d08885fa2aee39990f2f329ef659ef3c260141643a
test_truth_tracking_kalman[odd-False-1000.0]__trackstates_kf.root: f79864437024761716ba242813063fca3cb6fad08f5ccd67f810c6b0873c4d86
test_truth_tracking_kalman[odd-False-1000.0]__tracksummary_kf.root: 87eaae3192ab29e2c2542c017071b6477c7237c5b8eaff107e84caed2a5e5b7a
test_truth_tracking_kalman[odd-True-0.0]__trackstates_kf.root: a34546ba6cfdbecc3bcf6f02ec782ebcc76f332070e7ff8a64207ed815f65c7e
test_truth_tracking_kalman[odd-True-0.0]__tracksummary_kf.root: 7f1bb68b39e52da7a77ea295819fa3776e947568455338738c3a6436c2d7599c
test_truth_tracking_kalman[odd-True-1000.0]__trackstates_kf.root: 0e508f4a6b13dec00a4c55629c90cd055d1aef7dec9c6d86edf55403d20b424d
test_truth_tracking_kalman[odd-True-0.0]__trackstates_kf.root: 22c9f39a8e9569499205c024f7075d4125aca111c0e580c0320d6d93696062d5
test_truth_tracking_kalman[odd-True-0.0]__tracksummary_kf.root: a6da8b8ca2cd0f09fcbae5d08885fa2aee39990f2f329ef659ef3c260141643a
test_truth_tracking_kalman[odd-True-1000.0]__trackstates_kf.root: f79864437024761716ba242813063fca3cb6fad08f5ccd67f810c6b0873c4d86
test_truth_tracking_kalman[odd-True-1000.0]__tracksummary_kf.root: 87eaae3192ab29e2c2542c017071b6477c7237c5b8eaff107e84caed2a5e5b7a

0 comments on commit d548201

Please sign in to comment.