9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
22 namespace utf = boost::unit_test;
33 BOOST_AUTO_TEST_SUITE(Surfaces)
41 auto pTransform = std::make_shared<const Transform3D>(translation);
42 const double radius{2.0}, halfz{20.};
47 auto pLineBounds = std::make_shared<const LineBounds>(2., 10.0);
52 std::make_shared<const HomogeneousSurfaceMaterial>(properties);
68 "All LineSurface constructors are callable without problem");
75 auto pTransform = std::make_shared<const Transform3D>(translation);
77 Vector3D referencePosition{0., 1., 2.};
82 auto pLineBounds = std::make_shared<const LineBounds>(2., 10.0);
86 BOOST_CHECK_EQUAL(bounds,
LineBounds(2., 10.0));
92 BOOST_CHECK(line.globalToLocal(
tgContext, gpos,
mom, localPosition));
93 const Vector2D expectedResult{0, -2};
97 const Vector3D direction{0., 1., 2.};
99 auto intersection = line.intersectionEstimate(
tgContext, {0., 0., 0.},
100 direction.normalized(), bcheck);
101 BOOST_CHECK(
bool(intersection));
102 Vector3D expectedIntersection(0, 1., 2.);
107 const Vector3D insidePosition{0., 2.5, 0.};
108 BOOST_CHECK(line.isOnSurface(
tgContext, insidePosition,
mom,
110 const Vector3D outsidePosition{100., 100., 200.};
111 BOOST_CHECK(!line.isOnSurface(
tgContext, outsidePosition,
mom,
true));
114 Vector3D returnedGlobalPosition{0., 0., 0.};
118 returnedGlobalPosition);
119 const Vector3D expectedGlobalPosition{0, 1, 0};
123 Vector3D globalPosition{0., 0., 0.};
124 auto returnedRotationMatrix =
126 double v0 = std::cos(std::atan(2. / 3.));
127 double v1 = std::sin(std::atan(2. / 3.));
129 expectedRotationMatrix << -
v1, 0., v0, v0, 0.,
v1, 0., 1., -0.;
136 boost::test_tools::output_test_stream output;
137 output << line.name();
138 BOOST_CHECK(output.is_equal(
"Acts::LineSurface"));
145 auto any3DVector = normalVector;
153 auto pTransform = std::make_shared<const Transform3D>(translation);
156 BOOST_CHECK(assignedLine != originalLine);
157 assignedLine = originalLine;
158 BOOST_CHECK(assignedLine == originalLine);
161 BOOST_AUTO_TEST_SUITE_END()