File indexing completed on 2025-01-18 09:12:29
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/EigenStepper.hpp"
0016 #include "Acts/Propagator/Propagator.hpp"
0017 #include "Acts/Propagator/StraightLineStepper.hpp"
0018
0019 #include <limits>
0020
0021 #include "PropagationDatasets.hpp"
0022 #include "PropagationTests.hpp"
0023
0024 namespace {
0025
0026 namespace ds = ActsTests::PropagationDatasets;
0027 using namespace Acts::UnitLiterals;
0028
0029 using MagneticField = Acts::ConstantBField;
0030 using EigenStepper = Acts::EigenStepper<>;
0031 using EigenPropagator = Acts::Propagator<EigenStepper>;
0032 using StraightLineStepper = Acts::StraightLineStepper;
0033 using StraightLinePropagator = Acts::Propagator<StraightLineStepper>;
0034
0035
0036 constexpr auto epsPos = 1_um;
0037 constexpr auto epsDir = 0.125_mrad;
0038 constexpr auto epsMom = 1_eV;
0039
0040 constexpr auto epsCov = 0.00125;
0041
0042 constexpr auto bz = 2_T;
0043
0044 const Acts::GeometryContext geoCtx;
0045 const Acts::MagneticFieldContext magCtx;
0046 const auto magFieldZero =
0047 std::make_shared<MagneticField>(Acts::Vector3::Zero());
0048 const auto magFieldNonZero =
0049 std::make_shared<MagneticField>(Acts::Vector3::UnitZ() * bz);
0050 const EigenPropagator eigenPropagatorZero{EigenStepper(magFieldZero)};
0051 const EigenPropagator eigenPropagatorNonZero{EigenStepper(magFieldNonZero)};
0052 const StraightLinePropagator straightPropagator{StraightLineStepper()};
0053
0054 }
0055
0056 BOOST_AUTO_TEST_SUITE(PropagationCompareEigenStraightLine)
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080 BOOST_DATA_TEST_CASE(
0081 ChargedZeroMagneticField,
0082 ds::phi* ds::theta* ds::absMomentum* ds::chargeNonZero* ds::pathLength, phi,
0083 theta, p, q, s) {
0084 runForwardComparisonTest(eigenPropagatorZero, straightPropagator, geoCtx,
0085 magCtx, makeParametersCurvilinear(phi, theta, p, q),
0086 s, epsPos, epsDir, epsMom, epsCov);
0087 }
0088
0089
0090
0091
0092
0093
0094 BOOST_AUTO_TEST_SUITE_END()