Warning, file /acts/Tests/IntegrationTests/PropagationCompareHelixEigenConstant.cpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
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/HelixStepper.hpp"
0017 #include "Acts/Propagator/Propagator.hpp"
0018
0019 #include <utility>
0020
0021 #include "PropagationDatasets.hpp"
0022 #include "PropagationTests.hpp"
0023
0024 namespace {
0025
0026 namespace ds = ActsTests::PropagationDatasets;
0027
0028 using namespace Acts;
0029 using namespace UnitLiterals;
0030
0031 using MagneticField = ConstantBField;
0032 using HelixPropagator = Propagator<HelixStepper>;
0033 using EigenStepper = EigenStepper<>;
0034 using EigenPropagator = Propagator<EigenStepper>;
0035
0036
0037
0038 constexpr auto epsPos = 1_um;
0039 constexpr auto epsTime = 1_um;
0040 constexpr auto epsDir = 0.125_mrad;
0041 constexpr auto epsMom = 1_eV;
0042 constexpr auto epsCov = 0.025;
0043
0044
0045
0046
0047
0048
0049
0050 struct TargetReached : public SurfaceReached {
0051 TargetReached() : SurfaceReached(-1_cm) {}
0052 };
0053
0054 const auto geoCtx = GeometryContext::dangerouslyDefaultConstruct();
0055 const MagneticFieldContext magCtx;
0056
0057 inline std::pair<HelixPropagator, EigenPropagator> makePropagators(double bz) {
0058 auto field = std::make_shared<MagneticField>(Vector3(0.0, 0.0, bz));
0059 return {HelixPropagator(HelixStepper(field)),
0060 EigenPropagator(EigenStepper(field))};
0061 }
0062
0063 }
0064
0065 BOOST_AUTO_TEST_SUITE(PropagationCompareHelixEigenConstant)
0066
0067 BOOST_DATA_TEST_CASE(Forward,
0068 ds::phi* ds::thetaWithoutBeam* ds::absMomentum*
0069 ds::chargeNonZero* ds::pathLength* ds::magneticField,
0070 phi, theta, p, q, s, bz) {
0071 auto [helixPropagator, eigenPropagator] = makePropagators(bz);
0072 runForwardComparisonTest(
0073 helixPropagator, eigenPropagator, geoCtx, magCtx,
0074 makeParametersCurvilinearWithCovariance(phi, theta, p, q), s, epsPos,
0075 epsTime, epsDir, epsMom, epsCov);
0076 }
0077
0078 BOOST_DATA_TEST_CASE(ToCylinderAlongZ,
0079 ds::phi* ds::thetaWithoutBeam* ds::absMomentum*
0080 ds::chargeNonZero* ds::pathLength* ds::magneticField,
0081 phi, theta, p, q, s, bz) {
0082 auto [helixPropagator, eigenPropagator] = makePropagators(bz);
0083 runToSurfaceComparisonTest(
0084 helixPropagator, eigenPropagator, geoCtx, magCtx,
0085 makeParametersCurvilinearWithCovariance(phi, theta, p, q), s,
0086 ZCylinderSurfaceBuilder(), epsPos, epsTime, epsDir, epsMom, epsCov);
0087 }
0088
0089 BOOST_DATA_TEST_CASE(
0090 ToDisc,
0091 ds::phiWithoutAmbiguity* ds::thetaWithoutBeam* ds::absMomentum*
0092 ds::chargeNonZero* ds::pathLength* ds::magneticField,
0093 phi, theta, p, q, s, bz) {
0094 auto [helixPropagator, eigenPropagator] = makePropagators(bz);
0095 runToSurfaceComparisonTest(
0096 helixPropagator, eigenPropagator, geoCtx, magCtx,
0097 makeParametersCurvilinearWithCovariance(phi, theta, p, q), s,
0098 DiscSurfaceBuilder(), epsPos, epsTime, epsDir, epsMom, epsCov,
0099 TargetReached());
0100 }
0101
0102 BOOST_DATA_TEST_CASE(ToPlane,
0103 ds::phi* ds::thetaWithoutBeam* ds::absMomentum*
0104 ds::chargeNonZero* ds::pathLength* ds::magneticField,
0105 phi, theta, p, q, s, bz) {
0106 auto [helixPropagator, eigenPropagator] = makePropagators(bz);
0107 runToSurfaceComparisonTest(
0108 helixPropagator, eigenPropagator, geoCtx, magCtx,
0109 makeParametersCurvilinearWithCovariance(phi, theta, p, q), s,
0110 PlaneSurfaceBuilder(), epsPos, epsTime, epsDir, epsMom, epsCov,
0111 TargetReached());
0112 }
0113
0114 BOOST_DATA_TEST_CASE(ToStrawAlongZ,
0115 ds::phi* ds::thetaWithoutBeam* ds::absMomentum*
0116 ds::chargeNonZero* ds::pathLength* ds::magneticField,
0117 phi, theta, p, q, s, bz) {
0118 auto [helixPropagator, eigenPropagator] = makePropagators(bz);
0119 runToSurfaceComparisonTest(
0120 helixPropagator, eigenPropagator, geoCtx, magCtx,
0121 makeParametersCurvilinearWithCovariance(phi, theta, p, q), s,
0122 ZStrawSurfaceBuilder(), epsPos, epsTime, epsDir, epsMom, epsCov);
0123 }
0124
0125 BOOST_AUTO_TEST_SUITE_END()