9 #include <boost/test/unit_test.hpp>
37 const std::vector<std::shared_ptr<Acts::Surface>>& sensitives = {})
42 auto bounds = std::make_unique<Acts::CuboidVolumeBounds>(10., 10., 10.);
52 "TestVolumeWithSurfaces", Acts::Transform3::Identity(),
60 portalContainer[ip] =
p;
86 s->assignGeometryId(geoID);
101 BOOST_AUTO_TEST_SUITE(Detector)
106 dCfg.
auxiliary =
"*** Test X * Misconfigued ***";
107 dCfg.
name =
"EmptyCylinder";
111 std::invalid_argument);
115 Acts::Transform3::Identity(),
116 std::make_shared<Acts::RectangleBounds>(5., 5.), 0.1);
118 Acts::Transform3::Identity(),
119 std::make_shared<Acts::RectangleBounds>(5., 5.), 0.1);
121 std::vector<std::shared_ptr<Acts::Surface>> sensitives;
124 dCfg.
builder = std::make_shared<CompBuilder>(sensitives);
128 std::invalid_argument);
134 dCfg.
auxiliary =
"*** Test : Detector ***";
135 dCfg.
name =
"TestDetector";
136 dCfg.
builder = std::make_shared<CompBuilder>();
142 BOOST_CHECK_EQUAL(
detector->name(),
"TestDetector");
143 BOOST_CHECK(
detector->rootVolumes().size() == 1);
149 dCfg.
auxiliary =
"*** Test : Detector ***";
150 dCfg.
name =
"TestDetectorWithSurfaces";
151 dCfg.
builder = std::make_shared<CompBuilder>();
155 Acts::Transform3::Identity(),
156 std::make_shared<Acts::RectangleBounds>(5., 5.), 0.1);
158 Acts::Transform3::Identity(),
159 std::make_shared<Acts::RectangleBounds>(5., 5.), 0.1);
161 std::vector<std::shared_ptr<Acts::Surface>> sensitives;
162 sensitives.push_back(detElement0.surface().getSharedPtr());
164 dCfg.
builder = std::make_shared<CompBuilder>(sensitives);
168 BOOST_CHECK_EQUAL(detector->name(),
"TestDetectorWithSurfaces");
169 BOOST_CHECK(detector->volumes()[0]->surfaces()[0]->geometryId().sensitive() ==
171 BOOST_CHECK(detector->volumes()[0]->surfaces()[1]->geometryId().sensitive() ==
175 BOOST_AUTO_TEST_SUITE_END()