File indexing completed on 2025-12-16 09:24:41
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
0026 using namespace Acts;
0027 using namespace UnitLiterals;
0028
0029 using MagneticField = ConstantBField;
0030 using Stepper = SympyStepper;
0031 using TestPropagator = Propagator<Stepper>;
0032 using RiddersPropagator = RiddersPropagator<TestPropagator>;
0033
0034
0035 constexpr auto epsPos = 1_um;
0036 constexpr auto epsDir = 0.125_mrad;
0037 constexpr auto epsMom = 1_eV;
0038
0039 const GeometryContext geoCtx;
0040 const MagneticFieldContext magCtx;
0041
0042 inline TestPropagator makePropagator(double bz) {
0043 auto magField = std::make_shared<MagneticField>(Vector3(0.0, 0.0, bz));
0044 Stepper stepper(std::move(magField));
0045 return TestPropagator(std::move(stepper));
0046 }
0047
0048 }
0049
0050 BOOST_AUTO_TEST_SUITE(PropagationSympyConstant)
0051
0052
0053
0054 BOOST_DATA_TEST_CASE(ForwardBackward,
0055 ds::phi* ds::thetaWithoutBeam* ds::absMomentum*
0056 ds::chargeNonZero* ds::pathLength* ds::magneticField,
0057 phi, theta, p, q, s, bz) {
0058 runForwardBackwardTest(makePropagator(bz), geoCtx, magCtx,
0059 makeParametersCurvilinear(phi, theta, p, q), s, epsPos,
0060 epsDir, epsMom);
0061 }
0062
0063
0064
0065
0066 BOOST_AUTO_TEST_SUITE_END()