Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-26 08:21:58

0001 /** TRACCC library, part of the ACTS project (R&D line)
0002  *
0003  * (c) 2025-2026 CERN for the benefit of the ACTS project
0004  *
0005  * Mozilla Public License Version 2.0
0006  */
0007 
0008 #pragma once
0009 
0010 // Local include(s).
0011 #include "traccc/definitions/primitives.hpp"
0012 #include "traccc/definitions/qualifiers.hpp"
0013 #include "traccc/edm/measurement_collection.hpp"
0014 
0015 namespace traccc::edm {
0016 
0017 /// Get the local position of a measurement as a 2D point
0018 ///
0019 /// @tparam algebra_t The algebra type used to describe the tracks
0020 ///
0021 /// @param meas The measurement to extract the local position from
0022 /// @param pos The 2D point to fill with the local position of the measurement
0023 ///
0024 template <detray::concepts::algebra algebra_t, typename measurement_backend_t>
0025 TRACCC_HOST_DEVICE detray::dpoint2D<algebra_t> get_measurement_local(
0026     const edm::measurement<measurement_backend_t>& meas);
0027 
0028 /// Get the local position of a measurement as a matrix
0029 ///
0030 /// @tparam algebra_t The algebra type used to describe the tracks
0031 /// @tparam size_t The type of the matrix size variable
0032 /// @tparam D The dimension of the matrix
0033 ///
0034 /// @param meas The measurement to extract the local position from
0035 /// @param pos The matrix to fill with the local position of the measurement
0036 ///
0037 template <detray::concepts::algebra algebra_t, typename measurement_backend_t,
0038           std::integral size_t, size_t D>
0039 TRACCC_HOST_DEVICE void get_measurement_local(
0040     const edm::measurement<measurement_backend_t>& meas,
0041     detray::dmatrix<algebra_t, D, 1>& pos);
0042 
0043 /// Get the local position variance of a measurement as a 2D vector
0044 ///
0045 /// @tparam algebra_t The algebra type used to describe the tracks
0046 ///
0047 /// @param meas The measurement to extract the local position from
0048 /// @param pos The 2D vector to fill with the local variance of the measurement
0049 ///
0050 template <detray::concepts::algebra algebra_t, typename measurement_backend_t>
0051 TRACCC_HOST_DEVICE detray::dvector2D<algebra_t> get_measurement_variance(
0052     const edm::measurement<measurement_backend_t>& meas);
0053 
0054 /// Get the covariance of a measurement as a matrix
0055 ///
0056 /// @tparam algebra_t The algebra type used to describe the tracks
0057 /// @tparam size_t The type of the matrix size variable
0058 /// @tparam D The dimension of the matrix
0059 ///
0060 /// @param meas The measurement to extract the covariance from
0061 /// @param cov The matrix to fill with the covariance of the measurement
0062 ///
0063 template <detray::concepts::algebra algebra_t, typename measurement_backend_t,
0064           std::integral size_t, size_t D>
0065 TRACCC_HOST_DEVICE void get_measurement_covariance(
0066     const edm::measurement<measurement_backend_t>& meas,
0067     detray::dmatrix<algebra_t, D, D>& cov);
0068 
0069 }  // namespace traccc::edm
0070 
0071 // Include the implementation.
0072 #include "traccc/edm/impl/measurement_helpers.ipp"