Skip to content

Commit

Permalink
refactor!: Remove CovarianceTransport (#2781)
Browse files Browse the repository at this point in the history
This seems not to be used anywhere other than benchmarks

Breaking as this is part of the public interface
  • Loading branch information
andiwand authored Dec 16, 2023
1 parent 66908fc commit 7c9479d
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 470 deletions.
1 change: 0 additions & 1 deletion Core/src/Propagator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
target_sources(
ActsCore
PRIVATE
CovarianceTransport.cpp
EigenStepperError.cpp
MultiStepperError.cpp
PropagatorError.cpp
Expand Down
120 changes: 0 additions & 120 deletions Core/src/Propagator/CovarianceTransport.cpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
19 changes: 2 additions & 17 deletions Plugins/EDM4hep/src/EDM4hepUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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<Acts::BoundSquareMatrix>(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];
Expand Down
1 change: 0 additions & 1 deletion Tests/Benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
92 changes: 0 additions & 92 deletions Tests/Benchmarks/CovarianceTransportBenchmark.cpp

This file was deleted.

1 change: 0 additions & 1 deletion Tests/UnitTests/Core/Propagator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading

0 comments on commit 7c9479d

Please sign in to comment.