From 7c9479d3c88b36bc89f19a8a8db12a946ed4ef78 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Sat, 16 Dec 2023 11:37:21 +0100 Subject: [PATCH] refactor!: Remove `CovarianceTransport` (#2781) This seems not to be used anywhere other than benchmarks Breaking as this is part of the public interface --- Core/src/Propagator/CMakeLists.txt | 1 - Core/src/Propagator/CovarianceTransport.cpp | 120 --------- .../Acts/Plugins/EDM4hep/EDM4hepUtil.hpp | 1 - Plugins/EDM4hep/src/EDM4hepUtil.cpp | 19 +- Tests/Benchmarks/CMakeLists.txt | 1 - .../CovarianceTransportBenchmark.cpp | 92 ------- .../UnitTests/Core/Propagator/CMakeLists.txt | 1 - .../Propagator/CovarianceTransportTests.cpp | 237 ------------------ 8 files changed, 2 insertions(+), 470 deletions(-) delete mode 100644 Core/src/Propagator/CovarianceTransport.cpp delete mode 100644 Tests/Benchmarks/CovarianceTransportBenchmark.cpp delete mode 100644 Tests/UnitTests/Core/Propagator/CovarianceTransportTests.cpp diff --git a/Core/src/Propagator/CMakeLists.txt b/Core/src/Propagator/CMakeLists.txt index df3d22a2251..4e1f1d8aca0 100644 --- a/Core/src/Propagator/CMakeLists.txt +++ b/Core/src/Propagator/CMakeLists.txt @@ -1,7 +1,6 @@ target_sources( ActsCore PRIVATE - CovarianceTransport.cpp EigenStepperError.cpp MultiStepperError.cpp PropagatorError.cpp diff --git a/Core/src/Propagator/CovarianceTransport.cpp b/Core/src/Propagator/CovarianceTransport.cpp deleted file mode 100644 index 92cd2d6054a..00000000000 --- a/Core/src/Propagator/CovarianceTransport.cpp +++ /dev/null @@ -1,120 +0,0 @@ -// This file is part of the Acts project. -// -// Copyright (C) 2021 CERN for the benefit of the Acts project -// -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#include "Acts/Propagator/CovarianceTransport.hpp" - -#include "Acts/Propagator/detail/JacobianEngine.hpp" - -Acts::CovarianceCache::CovarianceCache(const GeometryContext& gctx, - const Surface& surface, - const Vector3& position, - const BoundVector& boundParameters, - const BoundSquareMatrix& boundCovariance) - : applyTransport(true), atSurface(&surface), atPosition(position) { - covariance.template emplace(boundCovariance); - boundToFreeJacobian = surface.boundToFreeJacobian(gctx, boundParameters); -} - -Acts::CovarianceCache::CovarianceCache(const Vector3& position, - const Vector3& direction, - const BoundSquareMatrix& boundCovariance) - : applyTransport(true), atPosition(position) { - covariance.emplace(boundCovariance); - boundToFreeJacobian = detail::curvilinearToFreeJacobian(direction); -} - -Acts::CovarianceCache::CovarianceCache(const FreeVector& freeParameters, - const FreeSquareMatrix& freeCovariance) - : applyTransport(true), atPosition(freeParameters.segment<3>(eFreePos0)) { - covariance.emplace(freeCovariance); - anglesToDirectionJacobian = - detail::anglesToDirectionJacobian(freeParameters.segment<3>(eFreeDir0)); - directionToAnglesJacobian = - detail::directionToAnglesJacobian(freeParameters.segment<3>(eFreeDir0)); -} - -std::tuple -Acts::transportCovarianceToBound(const GeometryContext& gctx, - const Surface& surface, - const FreeVector& freeParameters, - CovarianceCache& cCache) { - if (cCache.boundToFreeJacobian.has_value()) { - // Create the full transport jacobian: bound/curvilinear to bound - const auto ftJacobian = detail::boundToBoundTransportJacobian( - gctx, freeParameters, cCache.boundToFreeJacobian.value(), - cCache.freeTransportJacobian, cCache.freeToPathDerivatives, surface); - // Perform the transport - const auto& covariance = std::get(cCache.covariance); - BoundSquareMatrix newCovariance = - ftJacobian * covariance * ftJacobian.transpose(); - return {newCovariance, ftJacobian}; - } else { - // Create the full transport jacobian: free to bound - const auto ftJacobian = detail::freeToBoundTransportJacobian( - gctx, freeParameters, cCache.directionToAnglesJacobian.value(), - cCache.anglesToDirectionJacobian.value(), cCache.freeTransportJacobian, - cCache.freeToPathDerivatives, surface); - // Perform the transport - const auto& covariance = std::get(cCache.covariance); - BoundSquareMatrix newCovariance = - ftJacobian * covariance * ftJacobian.transpose(); - return {newCovariance, ftJacobian}; - } -} - -std::tuple -Acts::transportCovarianceToCurvilinear(const Vector3& direction, - CovarianceCache& cCache) { - if (cCache.boundToFreeJacobian.has_value()) { - // Create the full transport jacobian: bound/curvilinear to - // curvilinear - auto ftJacobian = detail::boundToCurvilinearTransportJacobian( - direction, cCache.boundToFreeJacobian.value(), - cCache.freeTransportJacobian, cCache.freeToPathDerivatives); - // Perform the transport - const auto& covariance = std::get(cCache.covariance); - BoundSquareMatrix newCovariance = - ftJacobian * covariance * ftJacobian.transpose(); - return {newCovariance, ftJacobian}; - } else { - // Create the full transport jacobian: free to curvilinear - const auto ftJacobian = detail::freeToCurvilinearTransportJacobian( - direction, cCache.directionToAnglesJacobian.value(), - cCache.anglesToDirectionJacobian.value(), cCache.freeTransportJacobian, - cCache.freeToPathDerivatives); - // Perform the transport - const auto& covariance = std::get(cCache.covariance); - BoundSquareMatrix newCovariance = - ftJacobian * covariance * ftJacobian.transpose(); - return {newCovariance, ftJacobian}; - } -} - -std::tuple -Acts::transportCovarianceToFree(CovarianceCache& cCache) { - if (cCache.boundToFreeJacobian.has_value()) { - // Create the full transport jacobian: bound/curvilinear to free - const auto ftJacobian = detail::boundToFreeTransportJacobian( - cCache.boundToFreeJacobian.value(), cCache.freeTransportJacobian); - // Perform the transport - const auto& covariance = std::get(cCache.covariance); - FreeSquareMatrix newCovariance = - ftJacobian * covariance * ftJacobian.transpose(); - return {newCovariance, ftJacobian}; - } else { - // Create the full transport jacobian: free to free - const auto ftJacobian = detail::freeToFreeTransportJacobian( - cCache.directionToAnglesJacobian.value(), - cCache.anglesToDirectionJacobian.value(), cCache.freeTransportJacobian); - // Perform the transport - const auto& covariance = std::get(cCache.covariance); - FreeSquareMatrix newCovariance = - ftJacobian * covariance * ftJacobian.transpose(); - return {newCovariance, ftJacobian}; - } -} diff --git a/Plugins/EDM4hep/include/Acts/Plugins/EDM4hep/EDM4hepUtil.hpp b/Plugins/EDM4hep/include/Acts/Plugins/EDM4hep/EDM4hepUtil.hpp index d3a8db38d47..0ee893415b7 100644 --- a/Plugins/EDM4hep/include/Acts/Plugins/EDM4hep/EDM4hepUtil.hpp +++ b/Plugins/EDM4hep/include/Acts/Plugins/EDM4hep/EDM4hepUtil.hpp @@ -18,7 +18,6 @@ #include "Acts/EventData/detail/TransformationBoundToFree.hpp" #include "Acts/EventData/detail/TransformationFreeToBound.hpp" #include "Acts/Geometry/GeometryContext.hpp" -#include "Acts/Propagator/CovarianceTransport.hpp" #include "Acts/Surfaces/PerigeeSurface.hpp" #include "Acts/Surfaces/Surface.hpp" #include "Acts/Utilities/Logger.hpp" diff --git a/Plugins/EDM4hep/src/EDM4hepUtil.cpp b/Plugins/EDM4hep/src/EDM4hepUtil.cpp index 13c7f01d1ba..3e0361020ab 100644 --- a/Plugins/EDM4hep/src/EDM4hepUtil.cpp +++ b/Plugins/EDM4hep/src/EDM4hepUtil.cpp @@ -8,6 +8,7 @@ #include "Acts/Plugins/EDM4hep/EDM4hepUtil.hpp" +#include "Acts/Definitions/Algebra.hpp" #include "Acts/Definitions/Units.hpp" #include "Acts/EventData/MultiTrajectory.hpp" #include "Acts/EventData/MultiTrajectoryHelpers.hpp" @@ -144,25 +145,9 @@ Parameters convertTrackParametersToEdm4hep(const Acts::GeometryContext& gctx, // Only run covariance conversion if we have a covariance input if (params.covariance()) { - auto boundToFree = - refSurface->boundToFreeJacobian(gctx, params.parameters()); - Acts::FreeMatrix freeCov = - boundToFree * params.covariance().value() * boundToFree.transpose(); - - // ensure we have free pars - if (!freePars.has_value()) { - freePars = makeFreePars(); - } - - Acts::CovarianceCache covCache{freePars.value(), freeCov}; - auto [varNewCov, varNewJac] = Acts::transportCovarianceToBound( - gctx, *refSurface, freePars.value(), covCache); - auto targetCov = std::get(varNewCov); - Acts::ActsSquareMatrix<6> J = jacobianToEdm4hep( targetPars[eBoundTheta], targetPars[eBoundQOverP], Bz); - Acts::ActsSquareMatrix<6> cIn = targetCov.template topLeftCorner<6, 6>(); - result.covariance = J * cIn * J.transpose(); + result.covariance = J * params.covariance().value() * J.transpose(); } result.values[0] = targetPars[Acts::eBoundLoc0]; diff --git a/Tests/Benchmarks/CMakeLists.txt b/Tests/Benchmarks/CMakeLists.txt index a08cb4d0a9b..e452add9ed2 100644 --- a/Tests/Benchmarks/CMakeLists.txt +++ b/Tests/Benchmarks/CMakeLists.txt @@ -23,7 +23,6 @@ endmacro() add_benchmark(AtlasStepper AtlasStepperBenchmark.cpp) add_benchmark(BoundaryCheck BoundaryCheckBenchmark.cpp) add_benchmark(BinUtility BinUtilityBenchmark.cpp) -add_benchmark(CovarianceTransport CovarianceTransportBenchmark.cpp) add_benchmark(EigenStepper EigenStepperBenchmark.cpp) add_benchmark(SolenoidField SolenoidFieldBenchmark.cpp) add_benchmark(SurfaceIntersection SurfaceIntersectionBenchmark.cpp) diff --git a/Tests/Benchmarks/CovarianceTransportBenchmark.cpp b/Tests/Benchmarks/CovarianceTransportBenchmark.cpp deleted file mode 100644 index ce6152468bb..00000000000 --- a/Tests/Benchmarks/CovarianceTransportBenchmark.cpp +++ /dev/null @@ -1,92 +0,0 @@ -// This file is part of the Acts project. -// -// Copyright (C) 2021 CERN for the benefit of the Acts project -// -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#include "Acts/Definitions/Algebra.hpp" -#include "Acts/Definitions/TrackParametrization.hpp" -#include "Acts/Geometry/GeometryContext.hpp" -#include "Acts/Propagator/CovarianceTransport.hpp" -#include "Acts/Surfaces/PlaneSurface.hpp" -#include "Acts/Tests/CommonHelpers/BenchmarkTools.hpp" -#include "Acts/Utilities/Logger.hpp" - -#include - -int main(int argc, char* argv[]) { - using namespace Acts; - - std::size_t iterations = 3; - std::size_t runs = 1000; - if (argc >= 2) { - iterations = std::stoi(argv[1]); - } - if (argc >= 3) { - runs = std::stoi(argv[2]); - } - - // Create a test context - GeometryContext tgContext = GeometryContext(); - - Vector3 position{1., 2., 3.}; - ActsScalar time = 4.; - ActsScalar qop = 0.125; - Vector3 direction = Vector3(5., 6., 7.).normalized(); - auto planeSurface = Surface::makeShared(position, direction); - auto otherSurface = Surface::makeShared( - position, Vector3(6., 7., 8.).normalized()); - - // Free & bound parameters - FreeVector freeParameters; - freeParameters << position[0], position[1], position[2], time, direction[0], - direction[1], direction[2], qop; - - BoundVector boundParameters; - boundParameters << 0., 0., VectorHelpers::phi(direction), - VectorHelpers::theta(direction), qop, time; - - std::minstd_rand rng; - std::uniform_real_distribution uniform(0.5, 0.95); - - unsigned int sillyCounter = 0; - - ACTS_LOCAL_LOGGER( - getDefaultLogger("CovarianceTransport", Acts::Logging::Level(0))); - - const auto cov_transport_bound_bound = Acts::Test::microBenchmark( - [&] { - BoundSquareMatrix boundCovariance = - uniform(rng) * BoundSquareMatrix::Identity(); - boundCovariance(eBoundLoc0, eBoundPhi) = 0.076; - boundCovariance(eBoundPhi, eBoundLoc0) = 0.076; - boundCovariance(eBoundLoc0, eBoundQOverP) = -0.022; - boundCovariance(eBoundQOverP, eBoundLoc0) = -0.022; - boundCovariance(eBoundLoc1, eBoundTheta) = -0.007; - boundCovariance(eBoundTheta, eBoundLoc1) = -0.007; - - CovarianceCache covCache(tgContext, *planeSurface, position, - boundParameters, boundCovariance); - - // Transport bound to another bound surface - auto covJacAtBound = transportCovarianceToBound( - tgContext, *otherSurface, freeParameters, covCache); - - // Mimic access to the result - const auto& variantCovariance = std::get<0>(covJacAtBound); - const auto& variantJacobian = std::get<1>(covJacAtBound); - - const auto& covariance = std::get(variantCovariance); - const auto& jacobian = std::get(variantJacobian); - - if (covariance(eBoundLoc0, eBoundLoc0) > 0 && - jacobian(eBoundLoc0, eBoundLoc1) > 0.) { - ++sillyCounter; - } - }, - iterations, runs); - - ACTS_INFO("Execution stats: " << cov_transport_bound_bound); -} diff --git a/Tests/UnitTests/Core/Propagator/CMakeLists.txt b/Tests/UnitTests/Core/Propagator/CMakeLists.txt index e3ba11aff87..4a9925f1b8a 100644 --- a/Tests/UnitTests/Core/Propagator/CMakeLists.txt +++ b/Tests/UnitTests/Core/Propagator/CMakeLists.txt @@ -2,7 +2,6 @@ add_unittest(AtlasStepper AtlasStepperTests.cpp) add_unittest(Auctioneer AuctioneerTests.cpp) add_unittest(ConstrainedStep ConstrainedStepTests.cpp) add_unittest(CovarianceEngine CovarianceEngineTests.cpp) -add_unittest(CovarianceTransport CovarianceTransportTests.cpp) add_unittest(DirectNavigator DirectNavigatorTests.cpp) add_unittest(Extrapolator ExtrapolatorTests.cpp) add_unittest(Jacobian JacobianTests.cpp) diff --git a/Tests/UnitTests/Core/Propagator/CovarianceTransportTests.cpp b/Tests/UnitTests/Core/Propagator/CovarianceTransportTests.cpp deleted file mode 100644 index 018934849d0..00000000000 --- a/Tests/UnitTests/Core/Propagator/CovarianceTransportTests.cpp +++ /dev/null @@ -1,237 +0,0 @@ -// This file is part of the Acts project. -// -// Copyright (C) 2021 CERN for the benefit of the Acts project -// -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#include - -#include "Acts/Definitions/Algebra.hpp" -#include "Acts/Definitions/TrackParametrization.hpp" -#include "Acts/Geometry/GeometryContext.hpp" -#include "Acts/Propagator/CovarianceTransport.hpp" -#include "Acts/Surfaces/PlaneSurface.hpp" -#include "Acts/Surfaces/Surface.hpp" -#include "Acts/Utilities/Helpers.hpp" - -#include -#include -#include -#include - -namespace Acts { -namespace Test { - -BOOST_AUTO_TEST_CASE(covariance_transport_invalid) { - CovarianceCache covCache; - BOOST_CHECK(!covCache.applyTransport); -} - -BOOST_AUTO_TEST_CASE(covariance_transport_bound_start) { - // Create a test context - GeometryContext tgContext = GeometryContext(); - - Vector3 position{1., 2., 3.}; - ActsScalar time = 4.; - ActsScalar qop = 0.125; - Vector3 direction = Vector3(5., 6., 7.).normalized(); - auto planeSurface = Surface::makeShared(position, direction); - auto otherSurface = Surface::makeShared( - position, Vector3(6., 7., 8.).normalized()); - - // Free & bound parameters - FreeVector freeParameters; - freeParameters << position[0], position[1], position[2], time, direction[0], - direction[1], direction[2], qop; - - BoundVector boundParameters; - boundParameters << 0., 0., VectorHelpers::phi(direction), - VectorHelpers::theta(direction), qop, time; - - BoundSquareMatrix boundCovariance = 8. * BoundSquareMatrix::Identity(); - - CovarianceCache covCache(tgContext, *planeSurface, position, boundParameters, - boundCovariance); - // Test that the transport should be applied now - BOOST_CHECK(covCache.applyTransport); - // Test that the set covariance is 5x5 and what it has been set - BOOST_CHECK_EQUAL(std::get(covCache.covariance), - boundCovariance); - BOOST_CHECK_THROW(std::get(covCache.covariance), - std::bad_variant_access); - // Test that the bound to free jacobian has a value - BOOST_CHECK(covCache.boundToFreeJacobian.has_value()); - BOOST_CHECK(!covCache.boundToFreeJacobian.value().isApprox( - BoundToFreeMatrix::Zero())); - // Test that the free transport jacobian, derivative is properly set up - BOOST_CHECK_EQUAL(covCache.freeTransportJacobian, FreeMatrix::Identity()); - BOOST_CHECK_EQUAL(covCache.freeToPathDerivatives, FreeVector::Zero()); - // Check that the surface is set - BOOST_CHECK_EQUAL(covCache.atSurface, planeSurface.get()); - BOOST_CHECK_EQUAL(covCache.atPosition, position); - - // Transport bound to the same bound surface - auto covJacAtBound = transportCovarianceToBound(tgContext, *planeSurface, - freeParameters, covCache); - BOOST_CHECK(boundCovariance.isApprox( - std::get(covCache.covariance))); - BOOST_CHECK_THROW(std::get(covCache.covariance), - std::bad_variant_access); - - auto variantCovariance = std::get<0>(covJacAtBound); - auto variantJacobian = std::get<1>(covJacAtBound); - BOOST_CHECK_THROW(std::get(variantCovariance), - std::bad_variant_access); - - // Transport bound to curvilinear on the same place - auto covJacAtCurv = transportCovarianceToCurvilinear(direction, covCache); - BOOST_CHECK(boundCovariance.isApprox( - std::get(covCache.covariance))); - BOOST_CHECK_THROW(std::get(covCache.covariance), - std::bad_variant_access); - - variantCovariance = std::get<0>(covJacAtCurv); - variantJacobian = std::get<1>(covJacAtCurv); - BOOST_CHECK_THROW(std::get(variantCovariance), - std::bad_variant_access); - - // Transport bound to Free on the same place - auto covJacAtFree = transportCovarianceToFree(covCache); - variantCovariance = std::get<0>(covJacAtFree); - variantJacobian = std::get<1>(covJacAtFree); - BOOST_CHECK_THROW(std::get(variantCovariance), - std::bad_variant_access); - - // Transport bound to another bound surface - covJacAtBound = transportCovarianceToBound(tgContext, *otherSurface, - freeParameters, covCache); - - variantCovariance = std::get<0>(covJacAtBound); - variantJacobian = std::get<1>(covJacAtBound); - BOOST_CHECK_THROW(std::get(variantCovariance), - std::bad_variant_access); -} - -BOOST_AUTO_TEST_CASE(covariance_transport_curvilinear_start) { - // Create a test context - GeometryContext tgContext = GeometryContext(); - - Vector3 position{1., 2., 3.}; - Vector3 direction = Vector3(5., 6., 7.).normalized(); - ActsScalar time = 4.; - ActsScalar qop = 0.125; - - // Free & bound parameters - FreeVector freeParameters; - freeParameters << position[0], position[1], position[2], time, direction[0], - direction[1], direction[2], qop; - - auto planeSurface = Surface::makeShared(position, direction); - - BoundSquareMatrix boundCovariance = 8. * BoundSquareMatrix::Identity(); - - CovarianceCache covCache(position, direction, boundCovariance); - // Test that the transport should be applied now - BOOST_CHECK(covCache.applyTransport); - // Test that the set covariance is 5x5 and what it has been set - BOOST_CHECK_EQUAL(std::get(covCache.covariance), - boundCovariance); - BOOST_CHECK_THROW(std::get(covCache.covariance), - std::bad_variant_access); - - // Test that the bound to free jacobian has a value - BOOST_CHECK(covCache.boundToFreeJacobian.has_value()); - BOOST_CHECK(!covCache.boundToFreeJacobian.value().isApprox( - BoundToFreeMatrix::Zero())); - // Test that the free transport jacobian, derivative is properly set up - BOOST_CHECK_EQUAL(covCache.freeTransportJacobian, FreeMatrix::Identity()); - BOOST_CHECK_EQUAL(covCache.freeToPathDerivatives, FreeVector::Zero()); - // Check that the surface is set - BOOST_CHECK_EQUAL(covCache.atSurface, nullptr); - BOOST_CHECK_EQUAL(covCache.atPosition, position); - - // Transport bound to the same bound surface - auto covJacAtBound = transportCovarianceToBound(tgContext, *planeSurface, - freeParameters, covCache); - auto variantCovariance = std::get<0>(covJacAtBound); - auto variantJacobian = std::get<1>(covJacAtBound); - BOOST_CHECK_THROW(std::get(variantCovariance), - std::bad_variant_access); - - // Transport bound to curvilinear on the same place - auto covJacAtCurv = transportCovarianceToCurvilinear(direction, covCache); - variantCovariance = std::get<0>(covJacAtCurv); - variantJacobian = std::get<1>(covJacAtCurv); - BOOST_CHECK_THROW(std::get(variantCovariance), - std::bad_variant_access); - - // Transport bound to Free on the same place - auto covJacAtFree = transportCovarianceToFree(covCache); - variantCovariance = std::get<0>(covJacAtFree); - variantJacobian = std::get<1>(covJacAtFree); - BOOST_CHECK_THROW(std::get(variantCovariance), - std::bad_variant_access); -} - -BOOST_AUTO_TEST_CASE(covariance_transport_free_start) { - // Create a test context - GeometryContext tgContext = GeometryContext(); - - // Some start parameters - Vector3 position{1., 2., 3.}; - ActsScalar time = 4.; - Vector3 direction = Vector3(5., 6., 7.).normalized(); - - auto planeSurface = Surface::makeShared(position, direction); - - ActsScalar qop = 0.125; - FreeVector freeParameters; - freeParameters << position[0], position[1], position[2], time, direction[0], - direction[1], direction[2], qop; - - FreeSquareMatrix freeCovariance = 8. * FreeSquareMatrix::Identity(); - - CovarianceCache covCache(freeParameters, freeCovariance); - BOOST_CHECK(covCache.applyTransport); - // Test that the set covariance is 5x5 and what it has been set - BOOST_CHECK_THROW(std::get(covCache.covariance), - std::bad_variant_access); - BOOST_CHECK_EQUAL(std::get(covCache.covariance), - freeCovariance); - // Test that the bound to free jacobian has NO value - BOOST_CHECK(!covCache.boundToFreeJacobian.has_value()); - // Test that the free transport jacobian, derivative is properly set up - BOOST_CHECK_EQUAL(covCache.freeTransportJacobian, FreeMatrix::Identity()); - BOOST_CHECK_EQUAL(covCache.freeToPathDerivatives, FreeVector::Zero()); - // Check that the surface is NOT set - BOOST_CHECK_EQUAL(covCache.atSurface, nullptr); - BOOST_CHECK_EQUAL(covCache.atPosition, position); - - // Transport bound to the same bound surface - auto covJacAtBound = transportCovarianceToBound(tgContext, *planeSurface, - freeParameters, covCache); - - auto variantCovariance = std::get<0>(covJacAtBound); - auto variantJacobian = std::get<1>(covJacAtBound); - BOOST_CHECK_THROW(std::get(variantCovariance), - std::bad_variant_access); - - // Transport bound to curvilinear on the same place - auto covJacAtCurv = transportCovarianceToCurvilinear(direction, covCache); - variantCovariance = std::get<0>(covJacAtCurv); - variantJacobian = std::get<1>(covJacAtCurv); - BOOST_CHECK_THROW(std::get(variantCovariance), - std::bad_variant_access); - - // Transport bound to Free on the same place - auto covJacAtFree = transportCovarianceToFree(covCache); - variantCovariance = std::get<0>(covJacAtFree); - variantJacobian = std::get<1>(covJacAtFree); - BOOST_CHECK_THROW(std::get(variantCovariance), - std::bad_variant_access); -} - -} // namespace Test -} // namespace Acts