File indexing completed on 2025-10-19 07:59:27
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <boost/test/unit_test.hpp>
0010
0011 #include "ActsPlugins/Detray/DetrayConverter.hpp"
0012 #include "ActsTests/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 Experimental;
0019 using namespace ActsPlugins;
0020
0021 GeometryContext tContext;
0022
0023 auto logger = getDefaultLogger("DetrayConverterTests", Logging::INFO);
0024
0025 namespace ActsTests {
0026
0027 BOOST_AUTO_TEST_SUITE(DetraySuite)
0028
0029 BOOST_AUTO_TEST_CASE(DetrayConversion) {
0030
0031 auto detector = buildCylindricalDetector(tContext);
0032
0033 DetrayConverter::Options options;
0034
0035 vecmem::host_memory_resource memoryResource;
0036
0037 auto detrayDetector =
0038 DetrayConverter(std::move(logger))
0039 .convert<>(tContext, *detector, memoryResource, options);
0040
0041 BOOST_CHECK_EQUAL(detrayDetector.volumes().size(), 6u);
0042
0043
0044
0045
0046
0047
0048
0049 BOOST_CHECK_EQUAL(detrayDetector.portals().size(), 35u);
0050 }
0051
0052 BOOST_AUTO_TEST_SUITE_END()
0053
0054 }