9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
28 using boost::test_tools::output_test_stream;
29 namespace utf = boost::unit_test;
53 BOOST_AUTO_TEST_SUITE(Surfaces)
69 std::shared_ptr<const Acts::PlanarBounds>
p =
70 std::make_shared<const RectangleBounds>(5., 10.);
78 std::shared_ptr<const Acts::PlanarBounds> pPlanarBound =
79 std::make_shared<const RectangleBounds>(5., 10.);
99 Vector2 localPosition{0.1, 3.0};
112 unitary << 1, 0, 0, 0, 1, 0, 0, 0, 1;
115 BOOST_CHECK_EQUAL(referenceFrame, unitary);
117 auto normal = surface.Surface::normal(
tgContext,
121 BOOST_CHECK_EQUAL(
zero, normal);
136 std::shared_ptr<const Acts::PlanarBounds> pPlanarBound =
137 std::make_shared<const RectangleBounds>(5., 10.);
145 Surface::makeShared<PlaneSurface>(pTransform1, pPlanarBound);
149 DetectorElementStub detElement1{pTransform1, pPlanarBound, 0.2, pMaterial};
150 DetectorElementStub detElement2{pTransform1, pPlanarBound, 0.3, pMaterial};
151 DetectorElementStub detElement3{pTransform2, pPlanarBound, 0.3, pMaterial};
153 SurfaceStub surface1(detElement1);
154 SurfaceStub surface2(detElement1);
155 SurfaceStub surface3(detElement2);
156 SurfaceStub surface4(detElement3);
157 SurfaceStub surface5(detElement1);
158 surface5.assignSurfaceMaterial(pMaterial);
160 BOOST_CHECK(surface1 == surface2);
168 BOOST_CHECK(surface1 != surface4);
170 BOOST_CHECK(surface1 != surface5);
172 BOOST_CHECK(surface1 != *planeSurface);
174 const auto surfacePtr = Surface::makeShared<const SurfaceStub>(detElement1);
175 const auto sharedSurfacePtr = surfacePtr->getSharedPtr();
176 BOOST_CHECK(*surfacePtr == *sharedSurfacePtr);
178 BOOST_AUTO_TEST_SUITE_END()