9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/unit_test.hpp>
32 using namespace Acts::UnitLiterals;
41 const auto loc0 = 0.0;
42 const auto loc1 = 0.0;
44 const auto theta = M_PI / 4;
45 const auto qOverP = 1 / 1_GeV;
48 const auto resLoc0 = 0.0;
49 const auto resLoc1 = 0.0;
50 const auto resPhi = 0.25;
51 const auto resTheta = 0.25;
52 const auto resQOverP = 0.01 / 1_GeV;
53 const auto resTime = 0.01_ns;
58 Surface::makeShared<PlaneSurface>(
Vector3(0, 0, 0), Vector3::UnitX());
59 auto eSurface = Surface::makeShared<PlaneSurface>(
Vector3(distance, 0, 0),
79 eSurface->intersect(geoCtx,
Vector3(0, 0, 0), dir,
true).closest();
83 BOOST_CHECK_EQUAL(
s, distance * std::sqrt(2));
87 eFreeParams.segment<3>(0) = tpos;
89 eFreeParams.segment<3>(4) = dir;
94 sSurface->boundToFreeJacobian(geoCtx, sBoundParams);
97 FreeMatrix transportJac = FreeMatrix::Identity();
104 boundToFreeJac * sBoundCov * boundToFreeJac.transpose();
107 transportJac * sFreeCov * transportJac.transpose();
111 BOOST_TEST_INFO(
"Transform free parameters vector onto surface "
112 << eSurface->name());
116 BOOST_CHECK(freeToBoundCorrection);
119 detail::CorrectedFreeToBoundTransformer(freeToBoundCorrection);
120 auto correctedRes = transformer(eFreeParams, eFreeCov, *eSurface, geoCtx);
122 BOOST_CHECK(correctedRes.has_value());
123 auto correctedValue = correctedRes.value();
124 BoundVector eCorrectedBoundParams = std::get<BoundVector>(correctedValue);
126 std::get<BoundSquareMatrix>(correctedValue);
129 BOOST_CHECK_EQUAL(eCorrectedBoundParams[
eBoundLoc0], loc0);
130 BOOST_CHECK_EQUAL(eCorrectedBoundParams[
eBoundPhi], phi);
133 BOOST_TEST_INFO(
"Corrected Bound Params: \n" << eCorrectedBoundParams);
134 BOOST_TEST_INFO(
"Corrected Bound Covariance: \n" << eCorrectedBoundCov);