File indexing completed on 2025-07-12 07:52:59
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <boost/test/data/test_case.hpp>
0010 #include <boost/test/unit_test.hpp>
0011
0012 #include "Acts/Geometry/GeometryContext.hpp"
0013 #include "Acts/MagneticField/ConstantBField.hpp"
0014 #include "Acts/MagneticField/MagneticFieldContext.hpp"
0015 #include "Acts/Propagator/Propagator.hpp"
0016 #include "Acts/Propagator/RiddersPropagator.hpp"
0017 #include "Acts/Propagator/SympyStepper.hpp"
0018
0019 #include "PropagationDatasets.hpp"
0020 #include "PropagationTests.hpp"
0021
0022 namespace {
0023
0024 namespace ds = ActsTests::PropagationDatasets;
0025 using namespace Acts::UnitLiterals;
0026
0027 using MagneticField = Acts::ConstantBField;
0028 using Stepper = Acts::SympyStepper;
0029 using Propagator = Acts::Propagator<Stepper>;
0030 using RiddersPropagator = Acts::RiddersPropagator<Propagator>;
0031
0032
0033 constexpr auto epsPos = 1_um;
0034 constexpr auto epsDir = 0.125_mrad;
0035 constexpr auto epsMom = 1_eV;
0036
0037 const Acts::GeometryContext geoCtx;
0038 const Acts::MagneticFieldContext magCtx;
0039
0040 inline Propagator makePropagator(double bz) {
0041 auto magField = std::make_shared<MagneticField>(Acts::Vector3(0.0, 0.0, bz));
0042 Stepper stepper(std::move(magField));
0043 return Propagator(std::move(stepper));
0044 }
0045
0046 }
0047
0048 BOOST_AUTO_TEST_SUITE(PropagationSympyConstant)
0049
0050
0051
0052 BOOST_DATA_TEST_CASE(ForwardBackward,
0053 ds::phi* ds::thetaWithoutBeam* ds::absMomentum*
0054 ds::chargeNonZero* ds::pathLength* ds::magneticField,
0055 phi, theta, p, q, s, bz) {
0056 runForwardBackwardTest(makePropagator(bz), geoCtx, magCtx,
0057 makeParametersCurvilinear(phi, theta, p, q), s, epsPos,
0058 epsDir, epsMom);
0059 }
0060
0061
0062
0063
0064 BOOST_AUTO_TEST_SUITE_END()