File indexing completed on 2026-05-27 07:24:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #include "detray/test/common/build_toy_detector.hpp"
0011 #include "detray/test/cpu/toy_detector_test.hpp"
0012 #include "detray/test/framework/types.hpp"
0013
0014
0015 #include <vecmem/memory/host_memory_resource.hpp>
0016
0017
0018 #include <gtest/gtest.h>
0019
0020 using namespace detray;
0021
0022
0023 GTEST_TEST(detray_detectors, toy_detector) {
0024 using test_algebra = test::algebra;
0025
0026 vecmem::host_memory_resource host_mr;
0027
0028 toy_det_config<test::scalar> toy_cfg{};
0029 toy_cfg.use_material_maps(false).do_check(true);
0030 const auto [toy_det, names] =
0031 build_toy_detector<test_algebra>(host_mr, toy_cfg);
0032
0033 EXPECT_TRUE(toy_detector_test(toy_det, names));
0034
0035 toy_cfg.use_material_maps(true);
0036 const auto [toy_det2, names2] =
0037 build_toy_detector<test_algebra>(host_mr, toy_cfg);
0038
0039 EXPECT_TRUE(toy_detector_test(toy_det2, names2));
0040 }