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/Definitions/Algebra.hpp"
0013 #include "Acts/Geometry/GeometryContext.hpp"
0014 #include "Acts/MagneticField/ConstantBField.hpp"
0015 #include "Acts/MagneticField/MagneticFieldContext.hpp"
0016 #include "Acts/Propagator/Navigator.hpp"
0017 #include "Acts/Propagator/Propagator.hpp"
0018 #include "Acts/Propagator/RiddersPropagator.hpp"
0019 #include "Acts/Propagator/SympyStepper.hpp"
0020 #include "ActsTests/CommonHelpers/PredefinedMaterials.hpp"
0021
0022 #include <utility>
0023
0024 #include "PropagationDatasets.hpp"
0025 #include "PropagationTests.hpp"
0026
0027 namespace {
0028
0029 namespace ds = ActsTests::PropagationDatasets;
0030
0031 using namespace Acts;
0032 using namespace UnitLiterals;
0033
0034 using MagneticField = ConstantBField;
0035 using Stepper = SympyStepper;
0036 using TestPropagator = Propagator<Stepper, Navigator>;
0037 using RiddersPropagator = RiddersPropagator<TestPropagator>;
0038
0039
0040 constexpr auto epsPos = 10_um;
0041 constexpr auto epsDir = 1_mrad;
0042 constexpr auto epsMom = 5_MeV;
0043
0044 const GeometryContext geoCtx;
0045 const MagneticFieldContext magCtx;
0046
0047 inline TestPropagator makePropagator(
0048 double bz, std::shared_ptr<const TrackingGeometry> geo) {
0049 auto magField = std::make_shared<MagneticField>(Vector3(0.0, 0.0, bz));
0050 Stepper stepper(std::move(magField));
0051 return TestPropagator(std::move(stepper), Navigator({std::move(geo)}));
0052 }
0053
0054 }
0055
0056 BOOST_AUTO_TEST_SUITE(PropagationSympyDenseConstant)
0057
0058
0059
0060 BOOST_DATA_TEST_CASE(ForwardBackward,
0061 ds::phi* ds::thetaWithoutBeam* ds::absMomentum*
0062 ds::chargeNonZero* ds::pathLength* ds::magneticField,
0063 phi, theta, p, q, s, bz) {
0064 runForwardBackwardTest(makePropagator(bz, createDenseBlock(geoCtx)), geoCtx,
0065 magCtx, makeParametersCurvilinear(phi, theta, p, q), s,
0066 epsPos, epsDir, epsMom);
0067 }
0068
0069
0070
0071 BOOST_DATA_TEST_CASE(DenseTelescopeCovariance,
0072 ds::absMomentum* ds::chargeNonZero, p, q) {
0073 const double bz = 0_T;
0074 const Material material = ActsTests::makeLiquidArgon();
0075 const double thickness = 1_m;
0076
0077 auto [geo, surfaces] = createDenseTelescope(geoCtx, material, thickness);
0078
0079 auto propagator = makePropagator(bz, std::move(geo));
0080
0081 runDenseForwardTest(propagator, geoCtx, magCtx, p, q, *surfaces.back(),
0082 material, thickness);
0083 }
0084
0085 BOOST_AUTO_TEST_SUITE_END()