9 #include <boost/test/unit_test.hpp>
33 namespace Experimental {
38 std::shared_ptr<DetectorVolume>
dVolume =
nullptr;
61 template <
typename referenced_type>
63 return rt.getSharedPtr();
66 using namespace Acts::Experimental;
74 auto dTransform = Acts::Transform3::Identity();
77 pGenerator,
tContext,
"dummyA", dTransform,
78 std::make_unique<Acts::CuboidVolumeBounds>(1, 1, 1),
81 pGenerator,
tContext,
"dummyB", dTransform,
82 std::make_unique<Acts::CuboidVolumeBounds>(1, 1, 1),
86 auto rectangle = std::make_shared<Acts::RectangleBounds>(10., 100.);
88 Acts::Surface::makeShared<Acts::PlaneSurface>(dTransform,
rectangle);
93 BOOST_CHECK(&(portalA->surface()) ==
surface.get());
98 BOOST_CHECK(portalA == unpackToShared<Portal>(*portalA));
99 BOOST_CHECK(portalA == unpackToShared<const Portal>(*portalA));
102 auto linkToAImpl = std::make_unique<const LinkToVolumeImpl>(
volumeA);
117 portalA->updateDetectorVolume(
tContext, nState);
121 portalA->updateDetectorVolume(
tContext, nState);
126 auto linkToBImpl = std::make_unique<const LinkToVolumeImpl>(
volumeB);
142 portalA->updateDetectorVolume(
tContext, nState);
145 portalA->updateDetectorVolume(
tContext, nState);
149 BOOST_CHECK(portalA ==
portalB);
152 auto linkToAIImpl = std::make_unique<const LinkToVolumeImpl>(
volumeA);
153 auto linkToBIImpl = std::make_unique<const LinkToVolumeImpl>(
volumeB);
167 BOOST_CHECK_THROW(portalAI->fuse(portalBI), std::runtime_error);
170 BOOST_AUTO_TEST_SUITE_END()