File indexing completed on 2026-09-13 08:20:24
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Propagator/EigenStepper.hpp"
0010 #include "Acts/Propagator/Navigator.hpp"
0011 #include "Acts/Propagator/Propagator.hpp"
0012 #include "Acts/TrackFitting/GainMatrixSmoother.hpp"
0013 #include "Acts/TrackFitting/GainMatrixUpdater.hpp"
0014 #include "ActsAlignment/Kernel/Alignment.hpp"
0015 #include "ActsExamples/Alignment/AlignmentAlgorithm.hpp"
0016 #include "ActsExamples/MagneticField/MagneticField.hpp"
0017
0018 namespace {
0019
0020 using Updater = Acts::GainMatrixUpdater;
0021 using Smoother = Acts::GainMatrixSmoother;
0022 using Stepper = Acts::EigenStepper<>;
0023 using Propagator = Acts::Propagator<Stepper, Acts::Navigator>;
0024 using Fitter = Acts::KalmanFitter<Propagator, Acts::VectorMultiTrajectory>;
0025 using Alignment = ActsAlignment::Alignment<Fitter>;
0026
0027 struct AlignmentFunctionImpl
0028 : public ActsExamples::AlignmentAlgorithm::AlignmentFunction {
0029 Alignment align;
0030
0031 explicit AlignmentFunctionImpl(Alignment&& a) : align(std::move(a)) {}
0032
0033 ActsExamples::AlignmentAlgorithm::AlignmentResult operator()(
0034 const std::vector<std::vector<ActsExamples::IndexSourceLink>>&
0035 sourceLinks,
0036 const ActsExamples::TrackParametersContainer& initialParameters,
0037 const ActsAlignment::AlignmentOptions<
0038 ActsExamples::AlignmentAlgorithm::TrackFitterOptions>& options)
0039 const override {
0040 return align.align(sourceLinks, initialParameters, options);
0041 };
0042 };
0043 }
0044
0045 std::shared_ptr<ActsExamples::AlignmentAlgorithm::AlignmentFunction>
0046 ActsExamples::AlignmentAlgorithm::makeAlignmentFunction(
0047 std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry,
0048 std::shared_ptr<const Acts::MagneticFieldProvider> magneticField) {
0049 Stepper stepper(std::move(magneticField));
0050 Acts::Navigator::Config cfg{std::move(trackingGeometry)};
0051 cfg.resolvePassive = false;
0052 cfg.resolveMaterial = true;
0053 cfg.resolveSensitive = true;
0054 Acts::Navigator navigator(cfg);
0055 Propagator propagator(std::move(stepper), std::move(navigator));
0056 Fitter trackFitter(std::move(propagator));
0057 Alignment alignment(std::move(trackFitter));
0058
0059
0060 return std::make_shared<AlignmentFunctionImpl>(std::move(alignment));
0061 }