9 #include <boost/test/unit_test.hpp>
31 using namespace Acts::Test;
32 using namespace Acts::Experimental;
41 std::vector<std::shared_ptr<Acts::Surface>> unpackSurfaces(
42 const std::vector<const Acts::Surface*>& surfaces) {
43 std::vector<std::shared_ptr<Acts::Surface>> uSurfaces;
44 uSurfaces.reserve(surfaces.size());
45 for (
const auto&
s : surfaces) {
63 auto endcapSurfaces = std::make_shared<LayerStructureBuilder::SurfacesHolder>(
64 unpackSurfaces(rSurfaces));
67 lsConfig.
auxiliary =
"*** Endcap with 22 surfaces ***";
68 lsConfig.surfacesProvider = endcapSurfaces;
70 Acts::detail::AxisBoundaryType::Closed,
71 -M_PI, M_PI, 22
u, 1
u)};
76 auto [surfaces0, volumes0, surfacesUpdator0, volumeUpdator0] =
79 BOOST_CHECK(surfaces0.size() == 22
u);
80 BOOST_CHECK(surfacesUpdator0.connected());
81 BOOST_CHECK(volumes0.empty());
82 BOOST_CHECK(volumeUpdator0.connected());
86 lsConfig.auxiliary =
"*** Endcap with 22 surfaces + 1 support disc ***";
87 lsConfig.supports = {LayerSupport{
88 {15., 10., 10., 0., 0.}, Acts::Surface::SurfaceType::Disc, {
binZ,
binR}}};
92 auto [surfaces1, volumes1, surfacesUpdator1, volumeUpdator1] =
95 BOOST_CHECK(surfaces1.size() == 22
u + 1
u);
96 BOOST_CHECK(surfaces1.back()->type() == Acts::Surface::SurfaceType::Disc);
97 BOOST_CHECK(surfacesUpdator1.connected());
98 BOOST_CHECK(volumes1.empty());
99 BOOST_CHECK(volumeUpdator1.connected());
102 "*** Endcap with 22 surfaces + 1 support -> split into 11 planes ***";
103 lsConfig.supports = {LayerSupport{{15., 10., 10., 0., 0.},
104 Acts::Surface::SurfaceType::Disc,
110 auto [surfaces2, volumes2, surfacesUpdator2, volumeUpdator2] =
113 BOOST_CHECK(surfaces2.size() == 22
u + 11
u);
114 BOOST_CHECK(surfaces2.back()->type() == Acts::Surface::SurfaceType::Plane);
115 BOOST_CHECK(surfacesUpdator2.connected());
116 BOOST_CHECK(volumes2.empty());
117 BOOST_CHECK(volumeUpdator2.connected());
126 auto barrelSurfaces = std::make_shared<LayerStructureBuilder::SurfacesHolder>(
127 unpackSurfaces(cSurfaces));
131 lsConfig.
auxiliary =
"*** Barrel with 448 surfaces ***";
132 lsConfig.surfacesProvider = barrelSurfaces;
134 Acts::binZ, Acts::detail::AxisBoundaryType::Bound,
135 -480., 480., 14
u, 1
u},
138 -M_PI, M_PI, 32
u, 1
u)};
143 auto [surfaces0, volumes0, surfacesUpdator0, volumeUpdator0] =
146 BOOST_CHECK(surfaces0.size() == 448
u);
147 BOOST_CHECK(surfacesUpdator0.connected());
148 BOOST_CHECK(volumes0.empty());
149 BOOST_CHECK(volumeUpdator0.connected());
153 lsConfig.auxiliary =
"*** Barrel with 448 surfaces + 1 support cylinder ***";
154 lsConfig.supports = {LayerSupport{{15., 10., 10., 0., 0.},
155 Acts::Surface::SurfaceType::Cylinder,
161 auto [surfaces1, volumes1, surfacesUpdator1, volumeUpdator1] =
164 BOOST_CHECK(surfaces1.size() == 448
u + 1
u);
165 BOOST_CHECK(surfacesUpdator1.connected());
166 BOOST_CHECK(volumes1.empty());
167 BOOST_CHECK(volumeUpdator1.connected());
170 "*** Barrel with 448 surfaces + 1 support -> split into 32 planes ***";
171 lsConfig.supports = {LayerSupport{{15., 10., 10., 0., 0.},
172 Acts::Surface::SurfaceType::Cylinder,
179 auto [surfaces2, volumes2, surfacesUpdator2, volumeUpdator2] =
182 BOOST_CHECK(surfaces2.size() == 448
u + 32
u);
183 BOOST_CHECK(surfacesUpdator2.connected());
184 BOOST_CHECK(volumes2.empty());
185 BOOST_CHECK(volumeUpdator2.connected());
188 BOOST_AUTO_TEST_SUITE_END()