Back to home page

EIC code displayed by LXR

 
 

    


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

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/detector.hpp"
0013 #include "detray/definitions/algebra.hpp"
0014 #include "detray/definitions/units.hpp"
0015 #include "detray/navigation/caching_navigator.hpp"
0016 #include "detray/propagator/line_stepper.hpp"
0017 #include "detray/propagator/propagation_config.hpp"
0018 
0019 // Detray test include(s)
0020 #include "detray/test/common/track_generators.hpp"
0021 #include "detray/test/framework/types.hpp"
0022 
0023 namespace detray {
0024 
0025 // some useful type declarations
0026 using metadata_t = test::toy_metadata;
0027 using test_algebra = metadata_t::algebra_type;
0028 using scalar = dscalar<test_algebra>;
0029 using point3 = dpoint3D<test_algebra>;
0030 using detector_host_t = detector<metadata_t, host_container_types>;
0031 using detector_device_t = detector<metadata_t, device_container_types>;
0032 
0033 using intersection_t =
0034     intersection2D<typename detector_device_t::surface_type, test_algebra>;
0035 
0036 using navigator_host_t = caching_navigator<detector_host_t>;
0037 using navigator_device_t = caching_navigator<detector_device_t>;
0038 using stepper_t = line_stepper<test_algebra>;
0039 
0040 // detector configuration
0041 constexpr std::size_t n_brl_layers{4u};
0042 constexpr std::size_t n_edc_layers{3u};
0043 
0044 // geometry navigation configurations
0045 constexpr unsigned int theta_steps{100u};
0046 constexpr unsigned int phi_steps{100u};
0047 
0048 constexpr scalar pos_diff_tolerance{1e-3f};
0049 
0050 // dummy propagator state
0051 template <typename navigation_t>
0052 struct prop_state {
0053   using context_t = typename navigation_t::detector_type::geometry_context;
0054   stepper_t::state m_stepping;
0055   navigation_t m_navigation;
0056   context_t m_context{};
0057 
0058   constexpr context_t& context() { return m_context; }
0059   constexpr navigation_t& navigation() { return m_navigation; }
0060   constexpr stepper_t::state& stepping() { return m_stepping; }
0061 };
0062 
0063 /// test function for navigator with single state
0064 void navigator_test(
0065     typename detector_host_t::view_type det_data, propagation::config& prop_cfg,
0066     vecmem::data::vector_view<free_track_parameters<test_algebra>>& tracks_data,
0067     vecmem::data::jagged_vector_view<dindex>& volume_records_data,
0068     vecmem::data::jagged_vector_view<point3>& position_records_data);
0069 
0070 }  // namespace detray