Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-12-04 09:48:33

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #include <boost/test/data/test_case.hpp>
0010 #include <boost/test/unit_test.hpp>
0011 
0012 #include "Acts/Definitions/Algebra.hpp"
0013 #include "Acts/Definitions/TrackParametrization.hpp"
0014 #include "Acts/EventData/ParticleHypothesis.hpp"
0015 #include "Acts/EventData/TransformationHelpers.hpp"
0016 #include "Acts/EventData/detail/CorrectedTransformationFreeToBound.hpp"
0017 #include "Acts/Geometry/GeometryContext.hpp"
0018 #include "Acts/MagneticField/ConstantBField.hpp"
0019 #include "Acts/MagneticField/MagneticFieldContext.hpp"
0020 #include "Acts/Propagator/EigenStepper.hpp"
0021 #include "Acts/Propagator/Propagator.hpp"
0022 #include "Acts/Propagator/VoidNavigator.hpp"
0023 #include "Acts/Propagator/detail/CovarianceEngine.hpp"
0024 #include "Acts/Surfaces/BoundaryTolerance.hpp"
0025 #include "Acts/Surfaces/PerigeeSurface.hpp"
0026 #include "Acts/Surfaces/PlaneSurface.hpp"
0027 #include "Acts/Surfaces/Surface.hpp"
0028 #include "Acts/Utilities/Intersection.hpp"
0029 #include "Acts/Utilities/Result.hpp"
0030 #include "ActsTests/CommonHelpers/FloatComparisons.hpp"
0031 
0032 #include <cmath>
0033 #include <memory>
0034 #include <numbers>
0035 #include <optional>
0036 #include <random>
0037 #include <tuple>
0038 #include <utility>
0039 
0040 namespace bdata = boost::unit_test::data;
0041 
0042 namespace Acts::Test {
0043 
0044 const auto gctx = Acts::GeometryContext::dangerouslyDefaultConstruct();
0045 Acts::MagneticFieldContext mctx;
0046 
0047 using namespace Acts::UnitLiterals;
0048 
0049 using Covariance = BoundMatrix;
0050 using Jacobian = BoundMatrix;
0051 
0052 /// These tests do not test for a correct covariance transport but only for the
0053 /// correct conservation or modification of certain variables. A test suite for
0054 /// the numerical correctness is performed in the integration tests.
0055 BOOST_AUTO_TEST_CASE(covariance_engine_test) {
0056   // Create a test context
0057   GeometryContext tgContext = GeometryContext::dangerouslyDefaultConstruct();
0058 
0059   auto particleHypothesis = ParticleHypothesis::pion();
0060 
0061   // Build a start vector
0062   Vector3 position{1., 2., 3.};
0063   double time = 4.;
0064   Vector3 direction{std::sqrt(5. / 22.), 3. * std::sqrt(2. / 55.),
0065                     7. / std::sqrt(110.)};
0066   double qop = 0.125;
0067   FreeVector parameters, startParameters;
0068   parameters << position[0], position[1], position[2], time, direction[0],
0069       direction[1], direction[2], qop;
0070   startParameters = parameters;
0071 
0072   // Build covariance matrix, jacobians and related components
0073   Covariance covariance = Covariance::Identity();
0074   Jacobian jacobian = 2. * Jacobian::Identity();
0075   FreeMatrix transportJacobian = 3. * FreeMatrix::Identity();
0076   FreeVector derivatives;
0077   derivatives << 9., 10., 11., 12., 13., 14., 15., 16.;
0078   BoundToFreeMatrix boundToFreeJacobian = 4. * BoundToFreeMatrix::Identity();
0079   std::optional<FreeMatrix> additionalFreeCovariance;
0080 
0081   // Covariance transport to curvilinear coordinates
0082   detail::transportCovarianceToCurvilinear(
0083       covariance, jacobian, transportJacobian, derivatives, boundToFreeJacobian,
0084       additionalFreeCovariance, direction);
0085 
0086   // Tests to see that the right components are (un-)changed
0087   BOOST_CHECK_NE(covariance, Covariance::Identity());
0088   BOOST_CHECK_NE(jacobian, 2. * Jacobian::Identity());
0089   BOOST_CHECK_EQUAL(transportJacobian, FreeMatrix::Identity());
0090   BOOST_CHECK_EQUAL(derivatives, FreeVector::Zero());
0091   BOOST_CHECK_NE(boundToFreeJacobian, 4. * BoundToFreeMatrix::Identity());
0092   BOOST_CHECK_EQUAL(direction,
0093                     Vector3(std::sqrt(5. / 22.), 3. * std::sqrt(2. / 55.),
0094                             7. / std::sqrt(110.)));
0095 
0096   // Reset
0097   covariance = Covariance::Identity();
0098   jacobian = 2. * Jacobian::Identity();
0099   transportJacobian = 3. * FreeMatrix::Identity();
0100   derivatives << 9., 10., 11., 12., 13., 14., 15., 16.;
0101   boundToFreeJacobian = 4. * BoundToFreeMatrix::Identity();
0102 
0103   // Repeat transport to surface
0104   FreeToBoundCorrection freeToBoundCorrection(false);
0105   std::shared_ptr<PlaneSurface> surface =
0106       CurvilinearSurface(position, direction).planeSurface();
0107   detail::transportCovarianceToBound(
0108       tgContext, *surface, covariance, jacobian, transportJacobian, derivatives,
0109       boundToFreeJacobian, additionalFreeCovariance, parameters,
0110       freeToBoundCorrection);
0111 
0112   BOOST_CHECK_NE(covariance, Covariance::Identity());
0113   BOOST_CHECK_NE(jacobian, 2. * Jacobian::Identity());
0114   BOOST_CHECK_EQUAL(transportJacobian, FreeMatrix::Identity());
0115   BOOST_CHECK_EQUAL(derivatives, FreeVector::Zero());
0116   BOOST_CHECK_NE(boundToFreeJacobian, 4. * BoundToFreeMatrix::Identity());
0117   BOOST_CHECK_EQUAL(parameters, startParameters);
0118 
0119   // Produce curvilinear parameters without covariance matrix
0120   auto curvPars = detail::curvilinearParameters(parameters, std::nullopt,
0121                                                 particleHypothesis);
0122   BOOST_CHECK(!curvPars.covariance().has_value());
0123   CHECK_CLOSE_ABS(curvPars.position(tgContext), position, 1e-12);
0124   CHECK_CLOSE_ABS(curvPars.direction(), direction, 1e-12);
0125 
0126   // Produce curvilinear parameters with covariance matrix
0127   curvPars =
0128       detail::curvilinearParameters(parameters, covariance, particleHypothesis);
0129   BOOST_CHECK(curvPars.covariance().has_value());
0130   BOOST_CHECK_EQUAL(*curvPars.covariance(), covariance);
0131 
0132   // Produce bound parameters without covariance matrix
0133   auto boundPars = detail::boundParameters(tgContext, *surface, parameters,
0134                                            std::nullopt, particleHypothesis)
0135                        .value();
0136   BOOST_CHECK(!boundPars.covariance().has_value());
0137   BOOST_CHECK_EQUAL(&boundPars.referenceSurface(), surface.get());
0138 
0139   // Produce bound parameters with covariance matrix
0140   boundPars = detail::boundParameters(tgContext, *surface, parameters,
0141                                       covariance, particleHypothesis)
0142                   .value();
0143   BOOST_CHECK(boundPars.covariance().has_value());
0144   BOOST_CHECK_EQUAL(*boundPars.covariance(), covariance);
0145 
0146   // Reset
0147   covariance = Covariance::Identity();
0148   jacobian = 2. * Jacobian::Identity();
0149   transportJacobian = 3. * FreeMatrix::Identity();
0150   derivatives << 9., 10., 11., 12., 13., 14., 15., 16.;
0151   boundToFreeJacobian = 4. * BoundToFreeMatrix::Identity();
0152   freeToBoundCorrection.apply = true;
0153 
0154   // Transport to the surface with free to bound correction
0155   detail::transportCovarianceToBound(
0156       tgContext, *surface, covariance, jacobian, transportJacobian, derivatives,
0157       boundToFreeJacobian, additionalFreeCovariance, parameters,
0158       freeToBoundCorrection);
0159   BOOST_CHECK_NE(covariance, Covariance::Identity());
0160 }
0161 
0162 std::pair<BoundVector, BoundMatrix> boundToBound(const BoundVector& parIn,
0163                                                  const BoundMatrix& covIn,
0164                                                  const Surface& srfA,
0165                                                  const Surface& srfB,
0166                                                  const Vector3& bField) {
0167   Acts::BoundTrackParameters boundParamIn{srfA.getSharedPtr(), parIn, covIn,
0168                                           ParticleHypothesis::pion()};
0169 
0170   auto converted =
0171       detail::boundToBoundConversion(gctx, boundParamIn, srfB, bField).value();
0172 
0173   return {converted.parameters(), converted.covariance().value()};
0174 }
0175 
0176 using propagator_t = Propagator<EigenStepper<>, VoidNavigator>;
0177 
0178 BoundVector localToLocal(const propagator_t& prop, const BoundVector& local,
0179                          const Surface& src, const Surface& dst) {
0180   using PropagatorOptions = typename propagator_t::template Options<>;
0181   PropagatorOptions options{gctx, mctx};
0182   options.stepping.stepTolerance = 1e-10;
0183   options.surfaceTolerance = 1e-10;
0184 
0185   BoundTrackParameters start{src.getSharedPtr(), local, std::nullopt,
0186                              ParticleHypothesis::pion()};
0187 
0188   // The perturbed start can be past the destination
0189   const Intersection3D intersection =
0190       dst.intersect(gctx, start.position(gctx), start.direction(),
0191                     BoundaryTolerance::Infinite())
0192           .closest();
0193   options.direction =
0194       Direction::fromScalarZeroAsPositive(intersection.pathLength());
0195 
0196   auto res = prop.propagate(start, dst, options).value();
0197   auto endParameters = res.endParameters.value();
0198 
0199   BOOST_CHECK_EQUAL(&endParameters.referenceSurface(), &dst);
0200 
0201   // The time is transported along the path to the destination surface, so it
0202   // is part of the comparison against the analytical jacobian.
0203   return endParameters.parameters();
0204 }
0205 
0206 propagator_t makePropagator(const Vector3& bField) {
0207   return propagator_t{EigenStepper<>{std::make_shared<ConstantBField>(bField)},
0208                       VoidNavigator{}};
0209 }
0210 
0211 BoundMatrix numericalBoundToBoundJacobian(const propagator_t& prop,
0212                                           const BoundVector& parA,
0213                                           const Surface& srfA,
0214                                           const Surface& srfB) {
0215   double h = 1e-4;
0216   BoundMatrix J;
0217   for (std::size_t i = 0; i < 6; i++) {
0218     for (std::size_t j = 0; j < 6; j++) {
0219       BoundVector parInitial1 = parA;
0220       BoundVector parInitial2 = parA;
0221       parInitial1[i] -= h;
0222       parInitial2[i] += h;
0223       BoundVector parFinal1 = localToLocal(prop, parInitial1, srfA, srfB);
0224       BoundVector parFinal2 = localToLocal(prop, parInitial2, srfA, srfB);
0225 
0226       J(j, i) = (parFinal2[j] - parFinal1[j]) / (2 * h);
0227     }
0228   }
0229   return J;
0230 }
0231 
0232 unsigned int getNextSeed() {
0233   static unsigned int seed = 10;
0234   return ++seed;
0235 }
0236 
0237 auto makeDist(double a, double b) {
0238   return bdata::random(
0239       (bdata::engine = std::mt19937{}, bdata::seed = getNextSeed(),
0240        bdata::distribution = std::uniform_real_distribution<double>(a, b)));
0241 }
0242 
0243 const auto locDist = makeDist(-5_mm, 5_mm);
0244 const auto bFieldDist = makeDist(0, 3_T);
0245 const auto angleDist = makeDist(-2 * std::numbers::pi, 2 * std::numbers::pi);
0246 const auto posDist = makeDist(-50_mm, 50_mm);
0247 
0248 #define MAKE_SURFACE()                                    \
0249   [&]() {                                                 \
0250     Transform3 transformA = Transform3::Identity();       \
0251     transformA = AngleAxis3(Rx, Vector3::UnitX());        \
0252     transformA = AngleAxis3(Ry, Vector3::UnitY());        \
0253     transformA = AngleAxis3(Rz, Vector3::UnitZ());        \
0254     transformA.translation() << gx, gy, gz;               \
0255     return Surface::makeShared<PlaneSurface>(transformA); \
0256   }()
0257 
0258 BOOST_DATA_TEST_CASE(CovarianceConversionSamePlane,
0259                      (bFieldDist ^ bFieldDist ^ bFieldDist ^ angleDist ^
0260                       angleDist ^ angleDist ^ posDist ^ posDist ^ posDist ^
0261                       locDist ^ locDist) ^
0262                          bdata::xrange(100),
0263                      Bx, By, Bz, Rx, Ry, Rz, gx, gy, gz, l0, l1, index) {
0264   static_cast<void>(index);
0265   const Vector3 bField{Bx, By, Bz};
0266 
0267   auto planeSurfaceA = MAKE_SURFACE();
0268   auto planeSurfaceB = Surface::makeShared<PlaneSurface>(
0269       planeSurfaceA->localToGlobalTransform(gctx));
0270 
0271   BoundMatrix covA;
0272   covA.setZero();
0273   covA.diagonal() << 1, 2, 3, 4, 5, 6;
0274 
0275   BoundVector parA;
0276   parA << l0, l1, std::numbers::pi / 4., std::numbers::pi / 2. * 0.9,
0277       -1 / 1_GeV, 5_ns;
0278 
0279   // identical surface, this should work
0280   auto [parB, covB] =
0281       boundToBound(parA, covA, *planeSurfaceA, *planeSurfaceB, bField);
0282 
0283   // these should be the same because the plane surface are the same
0284   CHECK_CLOSE_ABS(parA, parB, 1e-9);
0285   CHECK_CLOSE_COVARIANCE(covA, covB, 1e-9);
0286 
0287   // now go back
0288   auto [parA2, covA2] =
0289       boundToBound(parB, covB, *planeSurfaceB, *planeSurfaceA, bField);
0290   CHECK_CLOSE_ABS(parA, parA2, 1e-9);
0291   CHECK_CLOSE_COVARIANCE(covA, covA2, 1e-9);
0292 
0293   auto prop = makePropagator(bField);
0294 
0295   BoundMatrix J =
0296       numericalBoundToBoundJacobian(prop, parA, *planeSurfaceA, *planeSurfaceB);
0297   BoundMatrix covC = J * covA * J.transpose();
0298   CHECK_CLOSE_COVARIANCE(covB, covC, 1e-6);
0299 }
0300 
0301 BOOST_DATA_TEST_CASE(CovarianceConversionRotatedPlane,
0302                      (bFieldDist ^ bFieldDist ^ bFieldDist ^ angleDist ^
0303                       angleDist ^ angleDist ^ posDist ^ posDist ^ posDist ^
0304                       locDist ^ locDist ^ angleDist) ^
0305                          bdata::xrange(100),
0306                      Bx, By, Bz, Rx, Ry, Rz, gx, gy, gz, l0, l1, angle, index) {
0307   static_cast<void>(index);
0308   const Vector3 bField{Bx, By, Bz};
0309 
0310   auto planeSurfaceA = MAKE_SURFACE();
0311 
0312   Transform3 transform;
0313   transform = planeSurfaceA->localToGlobalTransform(gctx).rotation();
0314   transform = AngleAxis3(angle, planeSurfaceA->normal(gctx)) * transform;
0315   transform.translation() =
0316       planeSurfaceA->localToGlobalTransform(gctx).translation();
0317   auto planeSurfaceB = Surface::makeShared<PlaneSurface>(transform);
0318 
0319   // sanity check that the normal didn't change
0320   CHECK_CLOSE_ABS(planeSurfaceA->normal(gctx), planeSurfaceB->normal(gctx),
0321                   1e-9);
0322 
0323   BoundMatrix covA;
0324   covA.setZero();
0325   covA.diagonal() << 1, 2, 3, 4, 5, 6;
0326 
0327   BoundVector parA;
0328   parA << l0, l1, std::numbers::pi / 4., std::numbers::pi / 2. * 0.9,
0329       -1 / 1_GeV, 5_ns;
0330 
0331   auto [parB, covB] =
0332       boundToBound(parA, covA, *planeSurfaceA, *planeSurfaceB, bField);
0333   BoundVector exp = parA;
0334   // loc0 and loc1 are rotated
0335   exp.head<2>() = Eigen::Rotation2D<double>(-angle) * parA.head<2>();
0336 
0337   CHECK_CLOSE_ABS(exp, parB, 1e-9);
0338 
0339   // now go back
0340   auto [parA2, covA2] =
0341       boundToBound(parB, covB, *planeSurfaceB, *planeSurfaceA, bField);
0342   CHECK_CLOSE_ABS(parA, parA2, 1e-9);
0343   CHECK_CLOSE_COVARIANCE(covA, covA2, 1e-9);
0344 
0345   auto prop = makePropagator(bField);
0346   BoundMatrix J =
0347       numericalBoundToBoundJacobian(prop, parA, *planeSurfaceA, *planeSurfaceB);
0348   BoundMatrix covC = J * covA * J.transpose();
0349   CHECK_CLOSE_COVARIANCE(covB, covC, 1e-6);
0350 }
0351 
0352 BOOST_DATA_TEST_CASE(CovarianceConversionL0TiltedPlane,
0353                      (bFieldDist ^ bFieldDist ^ bFieldDist ^ angleDist ^
0354                       angleDist ^ angleDist ^ posDist ^ posDist ^ posDist ^
0355                       locDist ^ angleDist) ^
0356                          bdata::xrange(100),
0357                      Bx, By, Bz, Rx, Ry, Rz, gx, gy, gz, l1, angle, index) {
0358   static_cast<void>(index);
0359   const Vector3 bField{Bx, By, Bz};
0360 
0361   auto planeSurfaceA = MAKE_SURFACE();
0362 
0363   // make plane that is slightly rotated
0364   Transform3 transform;
0365   transform = planeSurfaceA->localToGlobalTransform(gctx).rotation();
0366 
0367   // figure out rotation axis along local x
0368   Vector3 axis =
0369       planeSurfaceA->localToGlobalTransform(gctx).rotation() * Vector3::UnitY();
0370   transform = AngleAxis3(angle, axis) * transform;
0371 
0372   transform.translation() =
0373       planeSurfaceA->localToGlobalTransform(gctx).translation();
0374 
0375   auto planeSurfaceB = Surface::makeShared<PlaneSurface>(transform);
0376 
0377   BoundVector parA;
0378   // loc 0 must be zero so we're on the intersection of both surfaces.
0379   parA << 0, l1, std::numbers::pi / 4., std::numbers::pi / 2. * 0.9, -1 / 1_GeV,
0380       5_ns;
0381 
0382   BoundMatrix covA;
0383   covA.setZero();
0384   covA.diagonal() << 1, 2, 3, 4, 5, 6;
0385 
0386   auto [parB, covB] =
0387       boundToBound(parA, covA, *planeSurfaceA, *planeSurfaceB, bField);
0388 
0389   // now go back
0390   auto [parA2, covA2] =
0391       boundToBound(parB, covB, *planeSurfaceB, *planeSurfaceA, bField);
0392   CHECK_CLOSE_ABS(parA, parA2, 1e-9);
0393   CHECK_CLOSE_COVARIANCE(covA, covA2, 1e-7);
0394 
0395   auto prop = makePropagator(bField);
0396   BoundMatrix J =
0397       numericalBoundToBoundJacobian(prop, parA, *planeSurfaceA, *planeSurfaceB);
0398   BoundMatrix covC = J * covA * J.transpose();
0399   CHECK_CLOSE_OR_SMALL((covB.template topLeftCorner<2, 2>()),
0400                        (covC.template topLeftCorner<2, 2>()), 1e-7, 1e-9);
0401   CHECK_CLOSE_OR_SMALL(covB.diagonal(), covC.diagonal(), 1e-7, 1e-9);
0402 }
0403 
0404 BOOST_DATA_TEST_CASE(CovarianceConversionL1TiltedPlane,
0405                      (bFieldDist ^ bFieldDist ^ bFieldDist ^ angleDist ^
0406                       angleDist ^ angleDist ^ posDist ^ posDist ^ posDist ^
0407                       locDist ^ angleDist) ^
0408                          bdata::xrange(100),
0409                      Bx, By, Bz, Rx, Ry, Rz, gx, gy, gz, l0, angle, index) {
0410   static_cast<void>(index);
0411   const Vector3 bField{Bx, By, Bz};
0412 
0413   auto planeSurfaceA = MAKE_SURFACE();
0414 
0415   // make plane that is slightly rotated
0416   Transform3 transform;
0417   transform = planeSurfaceA->localToGlobalTransform(gctx).rotation();
0418 
0419   Vector3 axis =
0420       planeSurfaceA->localToGlobalTransform(gctx).rotation() * Vector3::UnitX();
0421   transform = AngleAxis3(angle, axis) * transform;
0422 
0423   transform.translation() =
0424       planeSurfaceA->localToGlobalTransform(gctx).translation();
0425 
0426   auto planeSurfaceB = Surface::makeShared<PlaneSurface>(transform);
0427 
0428   BoundVector parA;
0429   // loc 1 must be zero so we're on the intersection of both surfaces.
0430   parA << l0, 0, std::numbers::pi / 4., std::numbers::pi / 2. * 0.9, -1 / 1_GeV,
0431       5_ns;
0432 
0433   BoundMatrix covA;
0434   covA.setZero();
0435   covA.diagonal() << 1, 2, 3, 4, 5, 6;
0436 
0437   auto [parB, covB] =
0438       boundToBound(parA, covA, *planeSurfaceA, *planeSurfaceB, bField);
0439 
0440   // now go back
0441   auto [parA2, covA2] =
0442       boundToBound(parB, covB, *planeSurfaceB, *planeSurfaceA, bField);
0443   CHECK_CLOSE_ABS(parA, parA2, 1e-9);
0444   // tolerance is a bit higher here
0445   CHECK_CLOSE_COVARIANCE(covA, covA2, 1e-6);
0446 
0447   auto prop = makePropagator(bField);
0448   BoundMatrix J =
0449       numericalBoundToBoundJacobian(prop, parA, *planeSurfaceA, *planeSurfaceB);
0450   BoundMatrix covC = J * covA * J.transpose();
0451   CHECK_CLOSE_OR_SMALL((covB.template topLeftCorner<2, 2>()),
0452                        (covC.template topLeftCorner<2, 2>()), 1e-6, 1e-9);
0453   CHECK_CLOSE_OR_SMALL(covB.diagonal(), covC.diagonal(), 1e-6, 1e-9);
0454 }
0455 
0456 BOOST_DATA_TEST_CASE(CovarianceConversionPerigee,
0457                      (bFieldDist ^ bFieldDist ^ bFieldDist ^ angleDist ^
0458                       angleDist ^ angleDist ^ posDist ^ posDist ^ posDist ^
0459                       locDist ^ locDist ^ angleDist ^ angleDist ^ angleDist) ^
0460                          bdata::xrange(100),
0461                      Bx, By, Bz, Rx, Ry, Rz, gx, gy, gz, l0, l1, pRx, pRy, pRz,
0462                      index) {
0463   static_cast<void>(index);
0464   const Vector3 bField{Bx, By, Bz};
0465 
0466   auto planeSurfaceA = MAKE_SURFACE();
0467 
0468   BoundVector parA;
0469   parA << l0, l1, std::numbers::pi / 4., std::numbers::pi / 2. * 0.9,
0470       -1 / 1_GeV, 5_ns;
0471 
0472   BoundMatrix covA;
0473   covA.setZero();
0474   covA.diagonal() << 1, 2, 3, 4, 5, 6;
0475 
0476   Vector3 global = planeSurfaceA->localToGlobal(gctx, parA.head<2>());
0477 
0478   Transform3 transform;
0479   transform.setIdentity();
0480   transform.rotate(AngleAxis3(pRx, Vector3::UnitX()));
0481   transform.rotate(AngleAxis3(pRy, Vector3::UnitY()));
0482   transform.rotate(AngleAxis3(pRz, Vector3::UnitZ()));
0483   transform.translation() = global;
0484 
0485   auto perigee = Surface::makeShared<PerigeeSurface>(transform);
0486 
0487   auto [parB, covB] =
0488       boundToBound(parA, covA, *planeSurfaceA, *perigee, bField);
0489 
0490   // now go back
0491   auto [parA2, covA2] =
0492       boundToBound(parB, covB, *perigee, *planeSurfaceA, bField);
0493   CHECK_CLOSE_ABS(parA, parA2, 1e-9);
0494   CHECK_CLOSE_COVARIANCE(covA, covA2, 1e-9);
0495 
0496   auto prop = makePropagator(bField);
0497   BoundMatrix J =
0498       numericalBoundToBoundJacobian(prop, parA, *planeSurfaceA, *perigee);
0499   BoundMatrix covC = J * covA * J.transpose();
0500   CHECK_CLOSE_ABS(covB, covC, 1e-7);
0501 }
0502 
0503 }  // namespace Acts::Test