File indexing completed on 2025-01-18 09:12:30
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/MagneticFieldContext.hpp"
0014 #include "Acts/Propagator/Propagator.hpp"
0015 #include "Acts/Propagator/RiddersPropagator.hpp"
0016 #include "Acts/Propagator/StraightLineStepper.hpp"
0017
0018 #include <limits>
0019
0020 #include "PropagationDatasets.hpp"
0021 #include "PropagationTests.hpp"
0022
0023 namespace {
0024
0025 namespace ds = ActsTests::PropagationDatasets;
0026 using namespace Acts::UnitLiterals;
0027
0028 using Stepper = Acts::StraightLineStepper;
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 constexpr auto epsCov = 0.0125;
0038
0039 const Acts::GeometryContext geoCtx;
0040 const Acts::MagneticFieldContext magCtx;
0041 const Stepper stepper;
0042 const Propagator propagator(stepper);
0043 const RiddersPropagator riddersPropagator(stepper);
0044
0045 }
0046
0047 BOOST_AUTO_TEST_SUITE(PropagationStraightLine)
0048
0049
0050
0051 BOOST_DATA_TEST_CASE(
0052 ForwardBackward,
0053 ds::phi* ds::theta* ds::absMomentum* ds::chargeNonZero* ds::pathLength, phi,
0054 theta, p, q, s) {
0055 runForwardBackwardTest(propagator, geoCtx, magCtx,
0056 makeParametersCurvilinear(phi, theta, p, q), s, epsPos,
0057 epsDir, epsMom);
0058 }
0059
0060
0061
0062
0063 BOOST_DATA_TEST_CASE(ToCylinderAlongZ,
0064 ds::phi* ds::thetaWithoutBeam* ds::absMomentum*
0065 ds::chargeNonZero* ds::pathLength,
0066 phi, theta, p, q, s) {
0067 runToSurfaceTest(propagator, geoCtx, magCtx,
0068 makeParametersCurvilinear(phi, theta, p, q), s,
0069 ZCylinderSurfaceBuilder(), epsPos, epsDir, epsMom);
0070 }
0071
0072 BOOST_DATA_TEST_CASE(
0073 ToDisc,
0074 ds::phi* ds::theta* ds::absMomentum* ds::chargeNonZero* ds::pathLength, phi,
0075 theta, p, q, s) {
0076 runToSurfaceTest(propagator, geoCtx, magCtx,
0077 makeParametersCurvilinear(phi, theta, p, q), s,
0078 DiscSurfaceBuilder(), epsPos, epsDir, epsMom);
0079 }
0080
0081 BOOST_DATA_TEST_CASE(
0082 ToPlane,
0083 ds::phi* ds::theta* ds::absMomentum* ds::chargeNonZero* ds::pathLength, phi,
0084 theta, p, q, s) {
0085 runToSurfaceTest(propagator, geoCtx, magCtx,
0086 makeParametersCurvilinear(phi, theta, p, q), s,
0087 PlaneSurfaceBuilder(), epsPos, epsDir, epsMom);
0088 }
0089
0090
0091 BOOST_DATA_TEST_CASE(ToStrawAlongZ,
0092 ds::phi* ds::thetaWithoutBeam* ds::absMomentum*
0093 ds::chargeNonZero* ds::pathLength,
0094 phi, theta, p, q, s) {
0095 runToSurfaceTest(propagator, geoCtx, magCtx,
0096 makeParametersCurvilinear(phi, theta, p, q), s,
0097 ZStrawSurfaceBuilder(), epsPos, epsDir, epsMom);
0098 }
0099
0100
0101
0102 BOOST_DATA_TEST_CASE(CovarianceCurvilinear,
0103 ds::phi* ds::thetaWithoutBeam* ds::absMomentum*
0104 ds::chargeNonZero* ds::pathLength,
0105 phi, theta, p, q, s) {
0106 runForwardComparisonTest(
0107 propagator, riddersPropagator, geoCtx, magCtx,
0108 makeParametersCurvilinearWithCovariance(phi, theta, p, q), s, epsPos,
0109 epsDir, epsMom, epsCov);
0110 }
0111
0112 BOOST_DATA_TEST_CASE(CovarianceToCylinderAlongZ,
0113 ds::phiWithoutAmbiguity* ds::thetaWithoutBeam*
0114 ds::absMomentum* ds::chargeNonZero* ds::pathLength,
0115 phi, theta, p, q, s) {
0116 runToSurfaceComparisonTest(
0117 propagator, riddersPropagator, geoCtx, magCtx,
0118 makeParametersCurvilinearWithCovariance(phi, theta, p, q), s,
0119 ZCylinderSurfaceBuilder(), epsPos, epsDir, epsMom, epsCov);
0120 }
0121
0122 BOOST_DATA_TEST_CASE(CovarianceToDisc,
0123 ds::phiWithoutAmbiguity* ds::thetaWithoutBeam*
0124 ds::absMomentum* ds::chargeNonZero* ds::pathLength,
0125 phi, theta, p, q, s) {
0126 runToSurfaceComparisonTest(
0127 propagator, riddersPropagator, geoCtx, magCtx,
0128 makeParametersCurvilinearWithCovariance(phi, theta, p, q), s,
0129 DiscSurfaceBuilder(), epsPos, epsDir, epsMom, epsCov);
0130 }
0131
0132 BOOST_DATA_TEST_CASE(CovarianceToPlane,
0133 ds::phi* ds::thetaWithoutBeam* ds::absMomentum*
0134 ds::chargeNonZero* ds::pathLength,
0135 phi, theta, p, q, s) {
0136 runToSurfaceComparisonTest(
0137 propagator, riddersPropagator, geoCtx, magCtx,
0138 makeParametersCurvilinearWithCovariance(phi, theta, p, q), s,
0139 PlaneSurfaceBuilder(), epsPos, epsDir, epsMom, epsCov);
0140 }
0141
0142 BOOST_DATA_TEST_CASE(CovarianceToStrawAlongZ,
0143 ds::phi* ds::thetaWithoutBeam* ds::absMomentum*
0144 ds::chargeNonZero* ds::pathLength,
0145 phi, theta, p, q, s) {
0146
0147
0148 runToSurfaceComparisonTest(
0149 propagator, riddersPropagator, geoCtx, magCtx,
0150 makeParametersCurvilinearWithCovariance(phi, theta, p, q), s,
0151 ZStrawSurfaceBuilder(), epsPos, epsDir, epsMom, 0.125);
0152 }
0153
0154 BOOST_AUTO_TEST_SUITE_END()