|
|
|||
File indexing completed on 2026-07-26 08:22:02
0001 /** TRACCC library, part of the ACTS project (R&D line) 0002 * 0003 * (c) 2026 CERN for the benefit of the ACTS project 0004 * 0005 * Mozilla Public License Version 2.0 0006 */ 0007 0008 #pragma once 0009 0010 // Project include(s). 0011 #include "traccc/definitions/qualifiers.hpp" 0012 0013 // Detray include(s). 0014 #include <detray/definitions/algebra.hpp> 0015 0016 // System include(s). 0017 #include <array> 0018 0019 namespace traccc::utils { 0020 0021 /// Convert an algebra specific 2D point to a float array of size 2 0022 /// 0023 /// @tparam ALGEBRA_TYPE The algebra type of the input point 0024 /// @param point The input 2D point to be converted 0025 /// @return An @c std::array of size 2 containing the converted float values 0026 /// 0027 template <detray::concepts::algebra ALGEBRA_TYPE> 0028 TRACCC_HOST_DEVICE std::array<float, 2u> to_float_array( 0029 const detray::dpoint2D<ALGEBRA_TYPE>& point); 0030 0031 /// Convert an algebra specific 3D point to a float array of size 3 0032 /// 0033 /// @tparam ALGEBRA_TYPE The algebra type of the input point 0034 /// @param point The input 3D point to be converted 0035 /// @return An @c std::array of size 3 containing the converted float values 0036 /// 0037 template <detray::concepts::algebra ALGEBRA_TYPE> 0038 TRACCC_HOST_DEVICE std::array<float, 3u> to_float_array( 0039 const detray::dpoint3D<ALGEBRA_TYPE>& point); 0040 0041 /// Convert a float array of size 2 to an algebra specific 2D point 0042 /// 0043 /// @tparam ALGEBRA_TYPE The algebra type of the output point 0044 /// @param arr The input @c std::array of size 2 containing the float values 0045 /// @return A 2D point of type @c detray::dpoint2D with the converted values 0046 /// 0047 template <detray::concepts::algebra ALGEBRA_TYPE> 0048 TRACCC_HOST_DEVICE detray::dpoint2D<ALGEBRA_TYPE> to_dpoint2D( 0049 const std::array<float, 2u>& arr); 0050 0051 /// Convert a float array of size 3 to an algebra specific 3D point 0052 /// 0053 /// @tparam ALGEBRA_TYPE The algebra type of the output point 0054 /// @param arr The input @c std::array of size 3 containing the float values 0055 /// @return A 3D point of type @c detray::dpoint3D with the converted values 0056 /// 0057 template <detray::concepts::algebra ALGEBRA_TYPE> 0058 TRACCC_HOST_DEVICE detray::dpoint3D<ALGEBRA_TYPE> to_dpoint3D( 0059 const std::array<float, 3u>& arr); 0060 0061 } // namespace traccc::utils 0062 0063 // Implementation include(s). 0064 #include "traccc/utils/impl/detray_conversion.ipp"
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|