Back to home page

EIC code displayed by LXR

 
 

    


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

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 #pragma once
0010 
0011 // Project include(s)
0012 #include "detray/core/detail/multi_store.hpp"
0013 #include "detray/definitions/algebra.hpp"
0014 #include "detray/geometry/mask.hpp"
0015 #include "detray/geometry/shapes.hpp"
0016 
0017 // Detray test include(s)
0018 #include "detray/test/framework/types.hpp"
0019 
0020 // Vecmem include(s)
0021 #include <vecmem/containers/data/jagged_vector_buffer.hpp>
0022 #include <vecmem/containers/device_vector.hpp>
0023 #include <vecmem/containers/jagged_device_vector.hpp>
0024 #include <vecmem/utils/cuda/copy.hpp>
0025 
0026 namespace detray {
0027 
0028 using test_algebra = test::algebra;
0029 using point3 = dpoint3D<test_algebra>;
0030 using transform3 = dtransform3D<test_algebra>;
0031 const int n_points = 1000;
0032 
0033 using annulus = mask<annulus2D, test_algebra>;
0034 using cylinder = mask<cylinder2D, test_algebra>;
0035 using rectangle = mask<rectangle2D, test_algebra>;
0036 using ring = mask<ring2D, test_algebra>;
0037 using single = mask<single3D<>, test_algebra>;
0038 using trapezoid = mask<trapezoid2D, test_algebra>;
0039 
0040 /// Enumerate different mask types for convenience
0041 enum class mask_id : unsigned int {
0042   e_rectangle2D = 0u,
0043   e_trapezoid2D = 1u,
0044   e_ring2D = 2u,
0045   e_cylinder2D = 3u,
0046   e_single3D = 4u,
0047   e_annulus2D = 5u,
0048 };
0049 
0050 using host_store_type =
0051     regular_multi_store<mask_id, empty_context, dtuple, vecmem::vector,
0052                         rectangle, trapezoid, ring, cylinder, single, annulus>;
0053 
0054 using device_store_type =
0055     regular_multi_store<mask_id, empty_context, dtuple, vecmem::device_vector,
0056                         rectangle, trapezoid, ring, cylinder, single, annulus>;
0057 
0058 /// test function for mask store
0059 void mask_test(typename host_store_type::view_type store_data,
0060                vecmem::data::vector_view<point3> input_point3_data,
0061                vecmem::data::jagged_vector_view<int> output_data);
0062 
0063 }  // namespace detray