File indexing completed on 2026-01-09 09:26:48
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Definitions/Direction.hpp"
0010 #include "Acts/EventData/TrackParameters.hpp"
0011 #include "Acts/Propagator/AtlasStepper.hpp"
0012 #include "Acts/Propagator/EigenStepper.hpp"
0013 #include "Acts/Propagator/Navigator.hpp"
0014 #include "Acts/Propagator/Propagator.hpp"
0015 #include "Acts/Propagator/StraightLineStepper.hpp"
0016 #include "Acts/Propagator/SympyStepper.hpp"
0017 #include "Acts/Utilities/Logger.hpp"
0018 #include "ActsExamples/Propagation/PropagationAlgorithm.hpp"
0019 #include "ActsExamples/Propagation/PropagatorInterface.hpp"
0020 #include "ActsPython/Utilities/Helpers.hpp"
0021 #include "ActsPython/Utilities/Macros.hpp"
0022
0023 #include <algorithm>
0024 #include <array>
0025 #include <map>
0026 #include <memory>
0027 #include <optional>
0028 #include <string>
0029 #include <tuple>
0030 #include <utility>
0031 #include <vector>
0032
0033 #include <pybind11/pybind11.h>
0034 #include <pybind11/stl.h>
0035
0036 namespace Acts {
0037 class MagneticFieldProvider;
0038 }
0039
0040 namespace py = pybind11;
0041 using namespace Acts;
0042 using namespace ActsExamples;
0043
0044 namespace {
0045
0046 template <typename stepper_t, typename navigator_t>
0047 void addConcretePropagator(py::module_& m, const std::string& prefix) {
0048 using propagator_t = Propagator<stepper_t, navigator_t>;
0049
0050 using prop_if_t = ConcretePropagator<propagator_t>;
0051 py::class_<prop_if_t, PropagatorInterface, std::shared_ptr<prop_if_t>>(
0052 m, (prefix + "ConcretePropagator").c_str())
0053 .def(py::init<propagator_t>());
0054 }
0055
0056 }
0057
0058 namespace ActsPython {
0059 void addPropagation(py::module& mex) {
0060 ACTS_PYTHON_DECLARE_ALGORITHM(
0061 PropagationAlgorithm, mex, "PropagationAlgorithm", propagatorImpl,
0062 sterileLogger, debugOutput, energyLoss, multipleScattering,
0063 recordMaterialInteractions, ptLoopers, maxStepSize, covarianceTransport,
0064 inputTrackParameters, outputSummaryCollection, outputMaterialCollection);
0065
0066 py::class_<PropagatorInterface, std::shared_ptr<PropagatorInterface>>(
0067 mex, "PropagatorInterface");
0068
0069
0070 { addConcretePropagator<EigenStepper<>, Navigator>(mex, "Eigen"); }
0071
0072
0073 { addConcretePropagator<AtlasStepper, Navigator>(mex, "Atlas"); }
0074
0075
0076 { addConcretePropagator<SympyStepper, Navigator>(mex, "Sympy"); }
0077
0078
0079 {
0080 addConcretePropagator<StraightLineStepper, Navigator>(mex, "StraightLine");
0081 }
0082 }
0083
0084 }