File indexing completed on 2025-01-18 09:13:08
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <boost/test/unit_test.hpp>
0010
0011 #include "Acts/Plugins/Detray/DetrayConverter.hpp"
0012 #include "Acts/Tests/CommonHelpers/CylindricalDetector.hpp"
0013
0014 #include <vecmem/memory/host_memory_resource.hpp>
0015 #include <vecmem/memory/memory_resource.hpp>
0016
0017 using namespace Acts;
0018 using namespace Acts::Experimental;
0019 using namespace Acts::Test;
0020
0021 GeometryContext tContext;
0022
0023 auto logger =
0024 Acts::getDefaultLogger("DetrayConverterTests", Acts::Logging::INFO);
0025
0026 BOOST_AUTO_TEST_SUITE(DetrayConversion)
0027
0028 BOOST_AUTO_TEST_CASE(DetrayConversion) {
0029
0030 auto detector = buildCylindricalDetector(tContext);
0031
0032 DetrayConverter::Options options;
0033
0034 vecmem::host_memory_resource memoryResource;
0035
0036 auto detrayDetector =
0037 DetrayConverter(std::move(logger))
0038 .convert<>(tContext, *detector, memoryResource, options);
0039
0040 BOOST_CHECK_EQUAL(detrayDetector.volumes().size(), 6u);
0041
0042
0043
0044
0045
0046
0047
0048 BOOST_CHECK_EQUAL(detrayDetector.portals().size(), 35u);
0049 }
0050
0051 BOOST_AUTO_TEST_SUITE_END()