9 #include <boost/test/unit_test.hpp>
30 BOOST_AUTO_TEST_SUITE(Detector)
36 Acts::Transform3::Identity(), {100., 400., M_PI, 0., 0., 0.}, 1
u);
37 BOOST_CHECK(singleSupport.size() == 1
u);
38 BOOST_CHECK(singleSupport[0
u]->
type() ==
39 Acts::Surface::SurfaceType::Cylinder);
44 Acts::Transform3::Identity(), {100., 400., M_PI, 0., 0., 0.}, 32
u);
45 BOOST_CHECK(splitSupport.size() == 32
u);
46 for (
const auto& ss : splitSupport) {
47 BOOST_CHECK(ss->type() == Acts::Surface::SurfaceType::Plane);
51 auto splitSectoralSupport =
53 Acts::Transform3::Identity(),
54 {100., 400., 0.25 * M_PI, 0.75 * M_PI, 0., 0.}, 128
u);
55 BOOST_CHECK(splitSectoralSupport.size() == 128
u);
56 for (
const auto& ss : splitSectoralSupport) {
57 BOOST_CHECK(ss->type() == Acts::Surface::SurfaceType::Plane);
64 Acts::Transform3::Identity(), {100., 400., M_PI, 0.}, 1
u);
65 BOOST_CHECK(singleSupport.size() == 1
u);
66 BOOST_CHECK(singleSupport[0
u]->
type() == Acts::Surface::SurfaceType::Disc);
70 Acts::Transform3::Identity(), {100., 400., M_PI, 0.}, 32
u);
71 BOOST_CHECK(splitSupport.size() == 32
u);
72 for (
const auto& ss : splitSupport) {
73 BOOST_CHECK(ss->type() == Acts::Surface::SurfaceType::Plane);
77 auto splitSectoralSupport =
79 Acts::Transform3::Identity(), {100., 400., 0.5 * M_PI, 0.}, 16
u);
80 BOOST_CHECK(splitSectoralSupport.size() == 16
u);
81 for (
const auto& ss : splitSectoralSupport) {
82 BOOST_CHECK(ss->type() == Acts::Surface::SurfaceType::Plane);
87 std::vector<std::shared_ptr<Acts::Surface>> lSurfaces;
88 std::vector<size_t> assignToAll;
99 std::array<Acts::ActsScalar, 5u> sValues = {10, 5, 5, 0., 0.};
102 lSurfaces, assignToAll, lExtent, Acts::Surface::SurfaceType::Cylinder,
103 sValues, std::nullopt, 1
u);
104 BOOST_CHECK(lSurfaces.size() == 1
u);
105 BOOST_CHECK(assignToAll.size() == 1
u);
106 BOOST_CHECK(assignToAll[0
u] == 0
u);
116 lSurfaces, assignToAll, lExtent, Acts::Surface::SurfaceType::Cylinder,
117 sValues, std::nullopt, 16
u);
118 BOOST_CHECK(lSurfaces.size() == 16
u);
119 BOOST_CHECK(assignToAll.empty());
123 std::vector<std::shared_ptr<Acts::Surface>> lSurfaces;
124 std::vector<size_t> assignToAll;
135 std::array<Acts::ActsScalar, 5u> sValues = {-10, 10, 20, 0., 0.};
138 lSurfaces, assignToAll, lExtent, Acts::Surface::SurfaceType::Disc,
139 sValues, std::nullopt, 1
u);
140 BOOST_CHECK(lSurfaces.size() == 1
u);
141 BOOST_CHECK(assignToAll.size() == 1
u);
142 BOOST_CHECK(assignToAll[0
u] == 0
u);
153 lSurfaces, assignToAll, lExtent, Acts::Surface::SurfaceType::Disc,
154 sValues, std::nullopt, 16
u);
155 BOOST_CHECK(lSurfaces.size() == 16
u);
156 BOOST_CHECK(assignToAll.empty());
160 std::vector<std::shared_ptr<Acts::Surface>> lSurfaces;
161 std::vector<size_t> assignToAll;
167 std::array<Acts::ActsScalar, 5u> sValues = {-10, 10, 20, 0., 0.};
176 lSurfaces, assignToAll, lExtent, Acts::Surface::SurfaceType::Cylinder,
177 sValues, std::nullopt, 1
u),
187 lSurfaces, assignToAll, lExtent, Acts::Surface::SurfaceType::Cone,
188 sValues, std::nullopt, 1
u),
189 std::invalid_argument);
192 BOOST_AUTO_TEST_SUITE_END()