From 943b0096935b261e76e554cbe3532ee7dda30c80 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Thu, 28 Mar 2024 19:39:41 +0100 Subject: [PATCH] refactor!: Refactor `Surface::boundToFreeJacobian` to use free instead of bound vector (#2811) This avoid free->bound->free roundtrips and aligns the interface with `freeToBoundJacobian` related issues - https://github.com/acts-project/acts/issues/2810 blocked by - https://github.com/acts-project/acts/pull/2789 - https://github.com/acts-project/acts/pull/2782 - https://github.com/acts-project/acts/pull/2781 --- Core/include/Acts/Propagator/EigenStepper.hpp | 2 +- Core/include/Acts/Propagator/EigenStepper.ipp | 17 +++---- .../Acts/Propagator/StraightLineStepper.hpp | 2 +- Core/include/Acts/Surfaces/DiscSurface.hpp | 6 +-- Core/include/Acts/Surfaces/LineSurface.hpp | 6 +-- Core/include/Acts/Surfaces/Surface.hpp | 6 +-- Core/include/Acts/Surfaces/SurfaceConcept.hpp | 6 +-- .../Acts/TrackFitting/detail/GsfActor.hpp | 3 +- Core/src/Propagator/StraightLineStepper.cpp | 17 +++---- .../Propagator/detail/CovarianceEngine.cpp | 2 +- Core/src/Propagator/detail/JacobianEngine.cpp | 9 +--- Core/src/Surfaces/DiscSurface.cpp | 43 ++++++++-------- Core/src/Surfaces/LineSurface.cpp | 34 +++++-------- Core/src/Surfaces/Surface.cpp | 10 ++-- Examples/Python/tests/root_file_hashes.txt | 50 +++++++++---------- .../CorrectedTransformFreeToBoundTests.cpp | 4 +- .../BoundToCurvilinearConversionTests.cpp | 5 +- .../Core/Propagator/JacobianEngineTests.cpp | 4 +- 18 files changed, 100 insertions(+), 126 deletions(-) diff --git a/Core/include/Acts/Propagator/EigenStepper.hpp b/Core/include/Acts/Propagator/EigenStepper.hpp index cfe9450db25..dfa7300d381 100644 --- a/Core/include/Acts/Propagator/EigenStepper.hpp +++ b/Core/include/Acts/Propagator/EigenStepper.hpp @@ -92,7 +92,7 @@ class EigenStepper { // set the covariance transport flag to true and copy covTransport = true; cov = BoundSquareMatrix(*par.covariance()); - jacToGlobal = surface.boundToFreeJacobian(gctx, par.parameters()); + jacToGlobal = surface.boundToFreeJacobian(gctx, pars); } } diff --git a/Core/include/Acts/Propagator/EigenStepper.ipp b/Core/include/Acts/Propagator/EigenStepper.ipp index 5df825fe86d..8f366266e71 100644 --- a/Core/include/Acts/Propagator/EigenStepper.ipp +++ b/Core/include/Acts/Propagator/EigenStepper.ipp @@ -29,17 +29,17 @@ void Acts::EigenStepper::resetState(State& state, const BoundSquareMatrix& cov, const Surface& surface, const double stepSize) const { + FreeVector freeParams = detail::transformBoundToFreeParameters( + surface, state.geoContext, boundParams); + // Update the stepping state - update(state, - detail::transformBoundToFreeParameters(surface, state.geoContext, - boundParams), - boundParams, cov, surface); + state.pars = freeParams; + state.cov = cov; state.stepSize = ConstrainedStep(stepSize); state.pathAccumulated = 0.; // Reinitialize the stepping jacobian - state.jacToGlobal = - surface.boundToFreeJacobian(state.geoContext, boundParams); + state.jacToGlobal = surface.boundToFreeJacobian(state.geoContext, freeParams); state.jacobian = BoundMatrix::Identity(); state.jacTransport = FreeMatrix::Identity(); state.derivative = FreeVector::Zero(); @@ -107,13 +107,12 @@ auto Acts::EigenStepper::curvilinearState(State& state, template void Acts::EigenStepper::update(State& state, const FreeVector& freeParams, - const BoundVector& boundParams, + const BoundVector& /*boundParams*/, const Covariance& covariance, const Surface& surface) const { state.pars = freeParams; state.cov = covariance; - state.jacToGlobal = - surface.boundToFreeJacobian(state.geoContext, boundParams); + state.jacToGlobal = surface.boundToFreeJacobian(state.geoContext, freeParams); } template diff --git a/Core/include/Acts/Propagator/StraightLineStepper.hpp b/Core/include/Acts/Propagator/StraightLineStepper.hpp index 906b1d6f60c..30e2b4aa2cc 100644 --- a/Core/include/Acts/Propagator/StraightLineStepper.hpp +++ b/Core/include/Acts/Propagator/StraightLineStepper.hpp @@ -86,7 +86,7 @@ class StraightLineStepper { // set the covariance transport flag to true and copy covTransport = true; cov = BoundSquareMatrix(*par.covariance()); - jacToGlobal = surface.boundToFreeJacobian(gctx, par.parameters()); + jacToGlobal = surface.boundToFreeJacobian(gctx, pars); } } diff --git a/Core/include/Acts/Surfaces/DiscSurface.hpp b/Core/include/Acts/Surfaces/DiscSurface.hpp index d55fc2c6181..242da300367 100644 --- a/Core/include/Acts/Surfaces/DiscSurface.hpp +++ b/Core/include/Acts/Surfaces/DiscSurface.hpp @@ -234,17 +234,17 @@ class DiscSurface : public RegularSurface { /// hence the calculation is done here. /// /// @param gctx The current geometry context object, e.g. alignment - /// @param boundParams is the bound parameters vector + /// @param parameters is the free parameters vector /// /// @return Jacobian from local to global BoundToFreeMatrix boundToFreeJacobian( - const GeometryContext& gctx, const BoundVector& boundParams) const final; + const GeometryContext& gctx, const FreeVector& parameters) const final; /// Calculate the jacobian from global to local which the surface knows best, /// hence the calculation is done here. /// /// @param gctx The current geometry context object, e.g. alignment - /// @param parameters is the free parameters + /// @param parameters is the free parameters vector /// /// @return Jacobian from global to local FreeToBoundMatrix freeToBoundJacobian( diff --git a/Core/include/Acts/Surfaces/LineSurface.hpp b/Core/include/Acts/Surfaces/LineSurface.hpp index 80dabf068d0..422a6b8d349 100644 --- a/Core/include/Acts/Surfaces/LineSurface.hpp +++ b/Core/include/Acts/Surfaces/LineSurface.hpp @@ -121,17 +121,17 @@ class LineSurface : public Surface { /// hence the calculation is done here. /// /// @param gctx The current geometry context object, e.g. alignment - /// @param boundParams is the bound parameters vector + /// @param parameters is the free parameters vector /// /// @return Jacobian from local to global BoundToFreeMatrix boundToFreeJacobian( - const GeometryContext& gctx, const BoundVector& boundParams) const final; + const GeometryContext& gctx, const FreeVector& parameters) const final; /// Calculate the derivative of path length at the geometry constraint or /// point-of-closest-approach w.r.t. free parameters /// /// @param gctx The current geometry context object, e.g. alignment - /// @param parameters is the free parameters + /// @param parameters is the free parameters vector /// /// @return Derivative of path length w.r.t. free parameters FreeToPathMatrix freeToPathDerivative( diff --git a/Core/include/Acts/Surfaces/Surface.hpp b/Core/include/Acts/Surfaces/Surface.hpp index ffddfbdb35b..bc31ebe66f9 100644 --- a/Core/include/Acts/Surfaces/Surface.hpp +++ b/Core/include/Acts/Surfaces/Surface.hpp @@ -326,11 +326,11 @@ class Surface : public virtual GeometryObject, /// "Acts/EventData/detail/coordinate_transformations.hpp" /// /// @param gctx The current geometry context object, e.g. alignment - /// @param boundParams is the bound parameters vector + /// @param parameters is the free parameters vector /// /// @return Jacobian from local to global virtual BoundToFreeMatrix boundToFreeJacobian( - const GeometryContext& gctx, const BoundVector& boundParams) const; + const GeometryContext& gctx, const FreeVector& parameters) const; /// Calculate the jacobian from global to local which the surface knows best, /// hence the calculation is done here. @@ -343,7 +343,7 @@ class Surface : public virtual GeometryObject, /// "Acts/EventData/detail/coordinate_transformations.hpp" /// /// @param gctx The current geometry context object, e.g. alignment - /// @param parameters is the free parameters + /// @param parameters is the free parameters vector /// /// @return Jacobian from global to local virtual FreeToBoundMatrix freeToBoundJacobian( diff --git a/Core/include/Acts/Surfaces/SurfaceConcept.hpp b/Core/include/Acts/Surfaces/SurfaceConcept.hpp index d510e2aa3ce..9aea7ad5d1d 100644 --- a/Core/include/Acts/Surfaces/SurfaceConcept.hpp +++ b/Core/include/Acts/Surfaces/SurfaceConcept.hpp @@ -68,11 +68,7 @@ concept SurfaceConcept = requires(S s, const S cs, S s2, const S cs2, } -> std::same_as; { - cs.boundToFreeJacobian(gctx, BoundVector{}) - } -> std::same_as; - - { - cs.boundToFreeJacobian(gctx, BoundVector{}) + cs.boundToFreeJacobian(gctx, FreeVector{}) } -> std::same_as; { diff --git a/Core/include/Acts/TrackFitting/detail/GsfActor.hpp b/Core/include/Acts/TrackFitting/detail/GsfActor.hpp index ca022bc8bc0..fe4f0244a58 100644 --- a/Core/include/Acts/TrackFitting/detail/GsfActor.hpp +++ b/Core/include/Acts/TrackFitting/detail/GsfActor.hpp @@ -529,7 +529,8 @@ struct GsfActor { } auto& cmp = *res; - cmp.jacToGlobal() = surface.boundToFreeJacobian(state.geoContext, pars); + cmp.jacToGlobal() = + surface.boundToFreeJacobian(state.geoContext, cmp.pars()); cmp.pathAccumulated() = state.stepping.pathAccumulated; cmp.jacobian() = Acts::BoundMatrix::Identity(); cmp.derivative() = Acts::FreeVector::Zero(); diff --git a/Core/src/Propagator/StraightLineStepper.cpp b/Core/src/Propagator/StraightLineStepper.cpp index ec66b8b864f..0b8049ef100 100644 --- a/Core/src/Propagator/StraightLineStepper.cpp +++ b/Core/src/Propagator/StraightLineStepper.cpp @@ -33,13 +33,12 @@ StraightLineStepper::curvilinearState(State& state, bool transportCov) const { } void StraightLineStepper::update(State& state, const FreeVector& freeParams, - const BoundVector& boundParams, + const BoundVector& /*boundParams*/, const Covariance& covariance, const Surface& surface) const { state.pars = freeParams; state.cov = covariance; - state.jacToGlobal = - surface.boundToFreeJacobian(state.geoContext, boundParams); + state.jacToGlobal = surface.boundToFreeJacobian(state.geoContext, freeParams); } void StraightLineStepper::update(State& state, const Vector3& uposition, @@ -70,17 +69,17 @@ void StraightLineStepper::resetState(State& state, const BoundSquareMatrix& cov, const Surface& surface, const double stepSize) const { + FreeVector freeParams = detail::transformBoundToFreeParameters( + surface, state.geoContext, boundParams); + // Update the stepping state - update(state, - detail::transformBoundToFreeParameters(surface, state.geoContext, - boundParams), - boundParams, cov, surface); + state.pars = freeParams; + state.cov = cov; state.stepSize = ConstrainedStep(stepSize); state.pathAccumulated = 0.; // Reinitialize the stepping jacobian - state.jacToGlobal = - surface.boundToFreeJacobian(state.geoContext, boundParams); + state.jacToGlobal = surface.boundToFreeJacobian(state.geoContext, freeParams); state.jacobian = BoundMatrix::Identity(); state.jacTransport = FreeMatrix::Identity(); state.derivative = FreeVector::Zero(); diff --git a/Core/src/Propagator/detail/CovarianceEngine.cpp b/Core/src/Propagator/detail/CovarianceEngine.cpp index 792d7830679..8668a1e60b6 100644 --- a/Core/src/Propagator/detail/CovarianceEngine.cpp +++ b/Core/src/Propagator/detail/CovarianceEngine.cpp @@ -209,7 +209,7 @@ Acts::Result detail::boundToBoundConversion( if (boundParameters.covariance().has_value()) { Acts::BoundToFreeMatrix boundToFreeJacobian = - sourceSurface.boundToFreeJacobian(gctx, boundParameters.parameters()); + sourceSurface.boundToFreeJacobian(gctx, freePars); Acts::FreeMatrix freeTransportJacobian = FreeMatrix::Identity(); diff --git a/Core/src/Propagator/detail/JacobianEngine.cpp b/Core/src/Propagator/detail/JacobianEngine.cpp index 1b98b070b70..a9483200fba 100644 --- a/Core/src/Propagator/detail/JacobianEngine.cpp +++ b/Core/src/Propagator/detail/JacobianEngine.cpp @@ -198,15 +198,8 @@ Result detail::reinitializeJacobians( if (!lpResult.ok()) { return lpResult.error(); } - // Transform from free to bound parameters - Result boundParameters = detail::transformFreeToBoundParameters( - freeParameters, surface, geoContext); - if (!boundParameters.ok()) { - return boundParameters.error(); - } // Reset the jacobian from local to global - boundToFreeJacobian = - surface.boundToFreeJacobian(geoContext, *boundParameters); + boundToFreeJacobian = surface.boundToFreeJacobian(geoContext, freeParameters); return Result::success(); } diff --git a/Core/src/Surfaces/DiscSurface.cpp b/Core/src/Surfaces/DiscSurface.cpp index c6b17e898b0..38219f5b2a7 100644 --- a/Core/src/Surfaces/DiscSurface.cpp +++ b/Core/src/Surfaces/DiscSurface.cpp @@ -19,12 +19,10 @@ #include "Acts/Surfaces/SurfaceError.hpp" #include "Acts/Surfaces/detail/FacesHelper.hpp" #include "Acts/Surfaces/detail/PlanarHelper.hpp" -#include "Acts/Utilities/Helpers.hpp" #include "Acts/Utilities/Intersection.hpp" #include "Acts/Utilities/JacobianHelpers.hpp" #include "Acts/Utilities/ThrowAssert.hpp" -#include #include #include #include @@ -211,32 +209,32 @@ Acts::Vector2 Acts::DiscSurface::localCartesianToPolar( } Acts::BoundToFreeMatrix Acts::DiscSurface::boundToFreeJacobian( - const GeometryContext& gctx, const BoundVector& boundParams) const { - // Transform from bound to free parameters - FreeVector freeParams = - detail::transformBoundToFreeParameters(*this, gctx, boundParams); + const GeometryContext& gctx, const FreeVector& parameters) const { // The global position - const Vector3 position = freeParams.segment<3>(eFreePos0); + const Vector3 position = parameters.segment<3>(eFreePos0); // The direction - const Vector3 direction = freeParams.segment<3>(eFreeDir0); + const Vector3 direction = parameters.segment<3>(eFreeDir0); assert(isOnSurface(gctx, position, direction, BoundaryCheck(false))); - // special polar coordinates for the Disc - double lrad = boundParams[eBoundLoc0]; - double lphi = boundParams[eBoundLoc1]; - double lcphi = std::cos(lphi); - double lsphi = std::sin(lphi); - // retrieve the reference frame - const auto rframe = referenceFrame(gctx, position, direction); + // The measurement frame of the surface + RotationMatrix3 rframeT = + referenceFrame(gctx, position, direction).transpose(); + // calculate the transformation to local coordinates + const Vector3 posLoc = transform(gctx).inverse() * position; + const double lr = perp(posLoc); + const double lphi = phi(posLoc); + const double lcphi = std::cos(lphi); + const double lsphi = std::sin(lphi); + // rotate into the polar coorindates + auto lx = rframeT.block<1, 3>(0, 0); + auto ly = rframeT.block<1, 3>(1, 0); // Initialize the jacobian from local to global BoundToFreeMatrix jacToGlobal = BoundToFreeMatrix::Zero(); // the local error components - rotated from reference frame - jacToGlobal.block<3, 1>(eFreePos0, eBoundLoc0) = - lcphi * rframe.block<3, 1>(0, 0) + lsphi * rframe.block<3, 1>(0, 1); + jacToGlobal.block<3, 1>(eFreePos0, eBoundLoc0) = lcphi * lx + lsphi * ly; jacToGlobal.block<3, 1>(eFreePos0, eBoundLoc1) = - lrad * - (lcphi * rframe.block<3, 1>(0, 1) - lsphi * rframe.block<3, 1>(0, 0)); + lr * (lcphi * ly - lsphi * lx); // the time component jacToGlobal(eFreeTime, eBoundTime) = 1; // the momentum components @@ -250,6 +248,7 @@ Acts::FreeToBoundMatrix Acts::DiscSurface::freeToBoundJacobian( const GeometryContext& gctx, const FreeVector& parameters) const { using VectorHelpers::perp; using VectorHelpers::phi; + // The global position const auto position = parameters.segment<3>(eFreePos0); // The direction @@ -258,9 +257,9 @@ Acts::FreeToBoundMatrix Acts::DiscSurface::freeToBoundJacobian( RotationMatrix3 rframeT = referenceFrame(gctx, position, direction).transpose(); // calculate the transformation to local coordinates - const Vector3 pos_loc = transform(gctx).inverse() * position; - const double lr = perp(pos_loc); - const double lphi = phi(pos_loc); + const Vector3 posLoc = transform(gctx).inverse() * position; + const double lr = perp(posLoc); + const double lphi = phi(posLoc); const double lcphi = std::cos(lphi); const double lsphi = std::sin(lphi); // rotate into the polar coorindates diff --git a/Core/src/Surfaces/LineSurface.cpp b/Core/src/Surfaces/LineSurface.cpp index 6e7e71220fb..58cb9d524ff 100644 --- a/Core/src/Surfaces/LineSurface.cpp +++ b/Core/src/Surfaces/LineSurface.cpp @@ -197,30 +197,22 @@ Acts::SurfaceMultiIntersection Acts::LineSurface::intersect( } Acts::BoundToFreeMatrix Acts::LineSurface::boundToFreeJacobian( - const GeometryContext& gctx, const BoundVector& boundParams) const { - // Transform from bound to free parameters - FreeVector freeParams = - detail::transformBoundToFreeParameters(*this, gctx, boundParams); + const GeometryContext& gctx, const FreeVector& parameters) const { // The global position - Vector3 position = freeParams.segment<3>(eFreePos0); + Vector3 position = parameters.segment<3>(eFreePos0); // The direction - Vector3 direction = freeParams.segment<3>(eFreeDir0); - // retrieve the reference frame - auto rframe = referenceFrame(gctx, position, direction); + Vector3 direction = parameters.segment<3>(eFreeDir0); assert(isOnSurface(gctx, position, direction, BoundaryCheck(false))); - // Initialize the jacobian from local to global - BoundToFreeMatrix jacToGlobal = BoundToFreeMatrix::Zero(); + // retrieve the reference frame + auto rframe = referenceFrame(gctx, position, direction); + + Vector2 local = *globalToLocal(gctx, position, direction, + std::numeric_limits::max()); - // the local error components - given by the reference frame - jacToGlobal.topLeftCorner<3, 2>() = rframe.topLeftCorner<3, 2>(); - // the time component - jacToGlobal(eFreeTime, eBoundTime) = 1; - // the momentum components - jacToGlobal.block<3, 2>(eFreeDir0, eBoundPhi) = - sphericalToFreeDirectionJacobian(direction); - jacToGlobal(eFreeQOverP, eBoundQOverP) = 1; + BoundToFreeMatrix jacToGlobal = + Surface::boundToFreeJacobian(gctx, parameters); // For the derivative of global position with bound angles, refer the // following white paper: @@ -239,10 +231,8 @@ Acts::BoundToFreeMatrix Acts::LineSurface::boundToFreeJacobian( dDThetaY -= rframe.block<3, 1>(0, 0) * (rframe.block<3, 1>(0, 0).dot(dDThetaY)); // set the jacobian components for global d/ phi/Theta - jacToGlobal.block<3, 1>(eFreePos0, eBoundPhi) = - dDPhiY * boundParams[eBoundLoc0] * ipdn; - jacToGlobal.block<3, 1>(eFreePos0, eBoundTheta) = - dDThetaY * boundParams[eBoundLoc0] * ipdn; + jacToGlobal.block<3, 1>(eFreePos0, eBoundPhi) = dDPhiY * local.x() * ipdn; + jacToGlobal.block<3, 1>(eFreePos0, eBoundTheta) = dDThetaY * local.x() * ipdn; return jacToGlobal; } diff --git a/Core/src/Surfaces/Surface.cpp b/Core/src/Surfaces/Surface.cpp index 9e051085f21..7846200b616 100644 --- a/Core/src/Surfaces/Surface.cpp +++ b/Core/src/Surfaces/Surface.cpp @@ -272,14 +272,10 @@ Acts::RotationMatrix3 Acts::Surface::referenceFrame( } Acts::BoundToFreeMatrix Acts::Surface::boundToFreeJacobian( - const GeometryContext& gctx, const BoundVector& boundParams) const { - // Transform from bound to free parameters - FreeVector freeParams = - detail::transformBoundToFreeParameters(*this, gctx, boundParams); - // The global position - const Vector3 position = freeParams.segment<3>(eFreePos0); + const GeometryContext& gctx, const FreeVector& parameters) const { + const Vector3 position = parameters.segment<3>(eFreePos0); // The direction - const Vector3 direction = freeParams.segment<3>(eFreeDir0); + const Vector3 direction = parameters.segment<3>(eFreeDir0); // retrieve the reference frame const auto rframe = referenceFrame(gctx, position, direction); diff --git a/Examples/Python/tests/root_file_hashes.txt b/Examples/Python/tests/root_file_hashes.txt index 19df6b49cba..2c54bb27aa7 100644 --- a/Examples/Python/tests/root_file_hashes.txt +++ b/Examples/Python/tests/root_file_hashes.txt @@ -23,16 +23,16 @@ test_truth_tracking_kalman[generic-0.0]__performance_track_finder.root: ada9cda2 test_truth_tracking_kalman[generic-1000.0]__trackstates_fitter.root: 476e0dca91e5168f0574b86aea797dc22900fd456b3c3fb24d5f571b4be804fc test_truth_tracking_kalman[generic-1000.0]__tracksummary_fitter.root: fc82abfc4e3016cda806e743a270bf78b6d4cc404cd52145ea1eabed85d32feb test_truth_tracking_kalman[generic-1000.0]__performance_track_finder.root: ada9cda2ec3c648b144bdaa081d6eff923c80f3d484c4196006e847428cf67a8 -test_truth_tracking_kalman[odd-0.0]__trackstates_fitter.root: cad01486e071ffdb614d15934354a1b17f2bfa95dd5d440215f606d8a79afe17 -test_truth_tracking_kalman[odd-0.0]__tracksummary_fitter.root: f42d1cd850b78909b07cd6e412ae03c6e1ea8c99a02000892dd957319f0a825c +test_truth_tracking_kalman[odd-0.0]__trackstates_fitter.root: 56eeee0a03a2ba23fddc1dc56b935e4040803800c68f0f2cca1a35b40a74edb2 +test_truth_tracking_kalman[odd-0.0]__tracksummary_fitter.root: 010eb33b0d99bafc06f63dc6385aa315c15f0ba9f698fc56c05737162ca686bb test_truth_tracking_kalman[odd-0.0]__performance_track_finder.root: 39aec6316cceb90e314e16b02947faa691c18f57c3a851a25e547a8fc05a4593 test_truth_tracking_kalman[odd-1000.0]__trackstates_fitter.root: 72c79be1458c4f9c9a1661778c900f0875d257f2d391c4183a698825448919a1 test_truth_tracking_kalman[odd-1000.0]__tracksummary_fitter.root: 3d424dec9b172f253c8c4ffbda470f678fd1081a3d36dcfea517ab0f94995ae4 test_truth_tracking_kalman[odd-1000.0]__performance_track_finder.root: 39aec6316cceb90e314e16b02947faa691c18f57c3a851a25e547a8fc05a4593 -test_truth_tracking_gsf[generic]__trackstates_gsf.root: a0194b6c4262a20394f00797ba856146338e39e8fbcf782e8057386e851a3304 +test_truth_tracking_gsf[generic]__trackstates_gsf.root: d4160a87b2f0f21cb19b8e3b0d07f97c343c830a535de4d33a186d5179ab5f06 test_truth_tracking_gsf[generic]__tracksummary_gsf.root: c110627dd7015c20b302273b5cba49f64a51e3450a722b064be1605f85a6bd6b -test_truth_tracking_gsf[odd]__trackstates_gsf.root: 3dd8e4e4925e734d96a4f73dfd6bf52be1e76e5995876ca512d2afc8f17c68c6 -test_truth_tracking_gsf[odd]__tracksummary_gsf.root: 5bb244fd9171d15b6470aed9c6ef2e28974b749a41a2d53e1a6a9b6353ae208f +test_truth_tracking_gsf[odd]__trackstates_gsf.root: 3024647ef4b65859d1b5cf4a838dd8f24c4a6986fb1d34969b7033434a3dfb02 +test_truth_tracking_gsf[odd]__tracksummary_gsf.root: 84310dd790f3f43b5cf9cee0b08c4deed389171f4caaaa00412f62f7e9944e3b test_particle_gun__particles.root: 7eec62018b6944fea565dad75aa41ef87d1f2737b2a814fbab189817ac8180fe test_material_mapping__material-map_tracks.root: b1138566d8d51579dce07f80166f05986942cf78c76b36875aea9b4b8b9bb957 test_material_mapping__propagation-material.root: 2ec28ec8c10860ce0ca03b0b8abbfc9b52cef779d0113fddfe05949a8c362ec0 @@ -44,22 +44,22 @@ test_digitization_example_input[smeared]__particles.root: 7eec62018b6944fea565da test_digitization_example_input[smeared]__measurements.root: 0c168d371d0130c68d1ee44bd77eeeb3cf702a77c2afbf12bed8354b61a29262 test_digitization_example_input[geometric]__particles.root: 7eec62018b6944fea565dad75aa41ef87d1f2737b2a814fbab189817ac8180fe test_digitization_example_input[geometric]__measurements.root: 0c6d88b4de3ee7365103b8f0d6be6b4db3d7b7f2a59d3db58a1e5f89fa8130b3 -test_ckf_tracks_example[generic-full_seeding]__trackstates_ckf.root: aced52d6f9ae94ce0a1eb051e85818eac63e2190ac9813f5b7cfaf76ef701bc7 -test_ckf_tracks_example[generic-full_seeding]__tracksummary_ckf.root: 77369733cff95d2fc27e132ed63036f7733dcad984936617df12e83c0c1d702a +test_ckf_tracks_example[generic-full_seeding]__trackstates_ckf.root: 75f429d8f1ee8198cf75bc3b685e2fee9354175893168279c14e67b6e6ab01c2 +test_ckf_tracks_example[generic-full_seeding]__tracksummary_ckf.root: 92a47dcc7caa490e960fa71db088d1a53fa016f5ccf2d3765de3376ca509b103 test_ckf_tracks_example[generic-full_seeding]__performance_seeding_trees.root: 0e0676ffafdb27112fbda50d1cf627859fa745760f98073261dcf6db3f2f991e -test_ckf_tracks_example[generic-truth_estimated]__trackstates_ckf.root: cc304bbd280d3ae25e56b30436154157d65878882d368d99d62d0b0ec2d3a096 -test_ckf_tracks_example[generic-truth_estimated]__tracksummary_ckf.root: 6dd63359b91b8ddbbb41e173ac3acd64ea30750526c325c87b22113442c7af41 +test_ckf_tracks_example[generic-truth_estimated]__trackstates_ckf.root: 2e772b7ab018667330b3633de81f898f5f65d01bdf9b20a243921454d5cbe843 +test_ckf_tracks_example[generic-truth_estimated]__tracksummary_ckf.root: e19a572abb138f5d6ce0716724fd10dcee62ac33a9749c27d62702355e86aa2d test_ckf_tracks_example[generic-truth_estimated]__performance_seeding.root: 1facb05c066221f6361b61f015cdf0918e94d9f3fce2269ec7b6a4dffeb2bc7e -test_ckf_tracks_example[generic-truth_smeared]__trackstates_ckf.root: 8e4e1096c5ab7b5095be05ca12b2b89a0ce0a09911e5d8b0f21ae92e5598d74c -test_ckf_tracks_example[generic-truth_smeared]__tracksummary_ckf.root: 576cbc7315e631d98b1a9c4fe8fb935dbc1539fc201a3a62363bf03f62457271 -test_ckf_tracks_example[odd-full_seeding]__trackstates_ckf.root: b6f5a20982d7a721b076bcf1fd44a359285932a4679600beac6fb27663d7e7d4 -test_ckf_tracks_example[odd-full_seeding]__tracksummary_ckf.root: 19df90dcc7f4597bc8d64e84f260a54d21f85af20a1d6a0e84b0eaab669aa031 +test_ckf_tracks_example[generic-truth_smeared]__trackstates_ckf.root: 5da4629bd647b5fff6b947fbd248e0ff97f6930ad727cc7b29c1252fe6c0d0e1 +test_ckf_tracks_example[generic-truth_smeared]__tracksummary_ckf.root: b58061b03e462d2b344fabcd45465e47b12c9c6ce4a39e5a23ae641c280e15b1 +test_ckf_tracks_example[odd-full_seeding]__trackstates_ckf.root: 8e9d52e4caf4b603b2e77d17ba4769b8839ab1222d95228424e8cfd9dab656ed +test_ckf_tracks_example[odd-full_seeding]__tracksummary_ckf.root: 3f8e7b86c061b385580d9261cb1f32b463773a42c9ad4117a9edb5bef3fcdbc4 test_ckf_tracks_example[odd-full_seeding]__performance_seeding_trees.root: 43c58577aafe07645e5660c4f43904efadf91d8cda45c5c04c248bbe0f59814f -test_ckf_tracks_example[odd-truth_estimated]__trackstates_ckf.root: 787b46d715fb96a9d5112be1f64f063197736c3cbc2ef2c76328478f1989d3c5 -test_ckf_tracks_example[odd-truth_estimated]__tracksummary_ckf.root: 8479a2bbf23311491445a55101ddc4f32a7a8a03d2a39934561a48324615ceff +test_ckf_tracks_example[odd-truth_estimated]__trackstates_ckf.root: e3e6516c462c5cbfe49329173560b4b254e90c225d8cb7ed87135a3fc8e365b9 +test_ckf_tracks_example[odd-truth_estimated]__tracksummary_ckf.root: 1cc1f57a9b8c910b7c1da5c43e6c6098e06b4d51b6237445affdf89a53b7a6e6 test_ckf_tracks_example[odd-truth_estimated]__performance_seeding.root: 1a36b7017e59f1c08602ef3c2cb0483c51df248f112e3780c66594110719c575 -test_ckf_tracks_example[odd-truth_smeared]__trackstates_ckf.root: 8b8b20097b615fd2eb32036ec77a8afecba8a43a05191f011fa84b220349403f -test_ckf_tracks_example[odd-truth_smeared]__tracksummary_ckf.root: d631a6f71c8a7f0d34789fba21ca3e9896bad2578abbe7969c64ae4605494c1e +test_ckf_tracks_example[odd-truth_smeared]__trackstates_ckf.root: b8026ab0be3feb71538c918656d424406d3ad16241e5421ddb7c536c703ce9fc +test_ckf_tracks_example[odd-truth_smeared]__tracksummary_ckf.root: 6734320133c935f46d98476a4a6a4a3b6403a613c299088e07a3a01678da6bb6 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 @@ -85,19 +85,19 @@ test_exatrkx[cpu-torch]__performance_track_finding.root: 21f0d417885131c677cd1b9 test_exatrkx[gpu-onnx]__performance_track_finding.root: 4845dc9f62e287e20c80d479e246eb69d01b279964cfdff83543bea0ea9afbed test_exatrkx[gpu-torch]__performance_track_finding.root: 21f0d417885131c677cd1b92154718fb83511b91081c5ebaa003f453ceb4d38a test_ML_Ambiguity_Solver__performance_ambiML.root: 284ff5c3a08c0b810938e4ac2f8ba8fe2babb17d4c202b624ed69fff731a9006 -test_truth_tracking_kalman[generic-False-0.0]__trackstates_fitter.root: 1944014ac5b5ec45ad0b2b286e35ad8e62bef6acd8495f3162750e189c296c5c -test_truth_tracking_kalman[generic-False-0.0]__tracksummary_fitter.root: e65c85c9982ce24de41499a336a6fcaef4b5741546f1d56682ae2c4569e32423 +test_truth_tracking_kalman[generic-False-0.0]__trackstates_fitter.root: fbc92b8f4e209b40261c3b85034c53c25dd0286592573fb0cf9759c513a5d377 +test_truth_tracking_kalman[generic-False-0.0]__tracksummary_fitter.root: d462f8c625b837cb6e20299dcf1aca403b3cd874b8adaad592826f56259b6d33 test_truth_tracking_kalman[generic-False-1000.0]__trackstates_fitter.root: a9d66e4f2f1c5a7b4b84d2a5b94c96c2c72242f99af99185da2dd7da4a218456 test_truth_tracking_kalman[generic-False-1000.0]__tracksummary_fitter.root: a9e5efcfd449cdcf3a7642c7af2ba25ccdd93def564d051680020a55e5aa438f -test_truth_tracking_kalman[generic-True-0.0]__trackstates_fitter.root: 1944014ac5b5ec45ad0b2b286e35ad8e62bef6acd8495f3162750e189c296c5c -test_truth_tracking_kalman[generic-True-0.0]__tracksummary_fitter.root: e65c85c9982ce24de41499a336a6fcaef4b5741546f1d56682ae2c4569e32423 +test_truth_tracking_kalman[generic-True-0.0]__trackstates_fitter.root: fbc92b8f4e209b40261c3b85034c53c25dd0286592573fb0cf9759c513a5d377 +test_truth_tracking_kalman[generic-True-0.0]__tracksummary_fitter.root: d462f8c625b837cb6e20299dcf1aca403b3cd874b8adaad592826f56259b6d33 test_truth_tracking_kalman[generic-True-1000.0]__trackstates_fitter.root: a9d66e4f2f1c5a7b4b84d2a5b94c96c2c72242f99af99185da2dd7da4a218456 test_truth_tracking_kalman[generic-True-1000.0]__tracksummary_fitter.root: a9e5efcfd449cdcf3a7642c7af2ba25ccdd93def564d051680020a55e5aa438f -test_truth_tracking_kalman[odd-False-0.0]__trackstates_fitter.root: 27313362aa97069a93e61e086e0e4d20c52b31b1157e17189bdbd04b27761e14 -test_truth_tracking_kalman[odd-False-0.0]__tracksummary_fitter.root: 0b3a759639ee7a6b42f68565fade729ebdc35751a097a4c7051502119e042c45 +test_truth_tracking_kalman[odd-False-0.0]__trackstates_fitter.root: 0a0ad1f9d737f8866035e971765df703fd0d2f274f63884c806a8f9bc3e26988 +test_truth_tracking_kalman[odd-False-0.0]__tracksummary_fitter.root: c513453f072051c70c8e60171454148e75d4ab708287a71a0557f81593530ad1 test_truth_tracking_kalman[odd-False-1000.0]__trackstates_fitter.root: 47879e0488fd7aebcfbc2b800dc295a8615559bc8be51da0595f37ce80b35e4d test_truth_tracking_kalman[odd-False-1000.0]__tracksummary_fitter.root: 3488f9e188faf706b312e0156a5d6c4a871163ed46cd6f35a1dc90f11aa3e93e -test_truth_tracking_kalman[odd-True-0.0]__trackstates_fitter.root: 27313362aa97069a93e61e086e0e4d20c52b31b1157e17189bdbd04b27761e14 -test_truth_tracking_kalman[odd-True-0.0]__tracksummary_fitter.root: 0b3a759639ee7a6b42f68565fade729ebdc35751a097a4c7051502119e042c45 +test_truth_tracking_kalman[odd-True-0.0]__trackstates_fitter.root: 0a0ad1f9d737f8866035e971765df703fd0d2f274f63884c806a8f9bc3e26988 +test_truth_tracking_kalman[odd-True-0.0]__tracksummary_fitter.root: c513453f072051c70c8e60171454148e75d4ab708287a71a0557f81593530ad1 test_truth_tracking_kalman[odd-True-1000.0]__trackstates_fitter.root: 47879e0488fd7aebcfbc2b800dc295a8615559bc8be51da0595f37ce80b35e4d test_truth_tracking_kalman[odd-True-1000.0]__tracksummary_fitter.root: 3488f9e188faf706b312e0156a5d6c4a871163ed46cd6f35a1dc90f11aa3e93e diff --git a/Tests/UnitTests/Core/EventData/CorrectedTransformFreeToBoundTests.cpp b/Tests/UnitTests/Core/EventData/CorrectedTransformFreeToBoundTests.cpp index 661c064604c..06047847bad 100644 --- a/Tests/UnitTests/Core/EventData/CorrectedTransformFreeToBoundTests.cpp +++ b/Tests/UnitTests/Core/EventData/CorrectedTransformFreeToBoundTests.cpp @@ -55,8 +55,6 @@ BOOST_AUTO_TEST_CASE(CorrectedFreeToBoundTrackParameters) { // construct two parallel plane surfaces with normal in x direction ActsScalar distance = 10_mm; - auto sSurface = - Surface::makeShared(Vector3(0, 0, 0), Vector3::UnitX()); auto eSurface = Surface::makeShared(Vector3(distance, 0, 0), Vector3::UnitX()); @@ -93,7 +91,7 @@ BOOST_AUTO_TEST_CASE(CorrectedFreeToBoundTrackParameters) { // the jacobian from local to global at the starting position BoundToFreeMatrix boundToFreeJac = - sSurface->boundToFreeJacobian(geoCtx, sBoundParams); + eSurface->boundToFreeJacobian(geoCtx, eFreeParams); // the transport jacobian without B field FreeMatrix transportJac = FreeMatrix::Identity(); diff --git a/Tests/UnitTests/Core/Propagator/BoundToCurvilinearConversionTests.cpp b/Tests/UnitTests/Core/Propagator/BoundToCurvilinearConversionTests.cpp index 6ad015e9f2c..3ce13f94ab8 100644 --- a/Tests/UnitTests/Core/Propagator/BoundToCurvilinearConversionTests.cpp +++ b/Tests/UnitTests/Core/Propagator/BoundToCurvilinearConversionTests.cpp @@ -197,6 +197,9 @@ void test_bound_to_curvilinear(const std::vector &test_data_list, } } + FreeVector free_param_vec = Acts::detail::transformBoundToFreeParameters( + *surface, geoCtx, param_vec); + Vector3 direction{cos(param_vec[2]) * sin(param_vec[3]), sin(param_vec[2]) * sin(param_vec[3]), cos(param_vec[3])}; Vector3 position(surface->localToGlobal( @@ -222,7 +225,7 @@ void test_bound_to_curvilinear(const std::vector &test_data_list, // compute Jacobian for bound to curvilinear covariance transformation Acts::BoundMatrix b2c; Acts::detail::boundToCurvilinearTransportJacobian( - direction, surface->boundToFreeJacobian(geoCtx, params.parameters()), + direction, surface->boundToFreeJacobian(geoCtx, free_param_vec), Acts::FreeMatrix::Identity(), computeFreeToPathDerivatives( direction, params.parameters()[eBoundQOverP], diff --git a/Tests/UnitTests/Core/Propagator/JacobianEngineTests.cpp b/Tests/UnitTests/Core/Propagator/JacobianEngineTests.cpp index 3062658cadb..2561b83e564 100644 --- a/Tests/UnitTests/Core/Propagator/JacobianEngineTests.cpp +++ b/Tests/UnitTests/Core/Propagator/JacobianEngineTests.cpp @@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE(jacobian_engine_to_bound) { FreeToPathMatrix freeToPathDerivatives = pSurface->freeToPathDerivative(tgContext, freeParameters); BoundToFreeMatrix boundToFreeJacobian = - pSurface->boundToFreeJacobian(tgContext, boundParameters); + pSurface->boundToFreeJacobian(tgContext, freeParameters); // (1) curvilinear/bound to bound transport jacobian // a) test without actual transport into the same surface @@ -265,7 +265,7 @@ BOOST_AUTO_TEST_CASE(jacobian_engine_to_free) { FreeMatrix noTransportJacobian = FreeMatrix::Identity(); BoundToFreeMatrix boundToFreeJacobian = - pSurface->boundToFreeJacobian(tgContext, boundParameters); + pSurface->boundToFreeJacobian(tgContext, freeParameters); // (1) bound to free BoundToFreeMatrix b2fTransportJacobian = detail::boundToFreeTransportJacobian(