Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-27 07:24:20

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 // Detray test include(s)
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 // VecMem include(s).
0015 #include <vecmem/memory/host_memory_resource.hpp>
0016 
0017 // GTest include(s)
0018 #include <gtest/gtest.h>
0019 
0020 using namespace detray;
0021 
0022 // This test check the building of the tml based toy geometry
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 }