Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /** TRACCC library, part of the ACTS project (R&D line)
0002  *
0003  * (c) 2021-2025 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/primitives.hpp"
0012 #include "traccc/definitions/qualifiers.hpp"
0013 #include "traccc/edm/measurement_collection.hpp"
0014 #include "traccc/edm/silicon_cell_collection.hpp"
0015 #include "traccc/edm/silicon_cluster_collection.hpp"
0016 #include "traccc/geometry/detector_conditions_description.hpp"
0017 #include "traccc/geometry/detector_design_description.hpp"
0018 
0019 namespace traccc::details {
0020 
0021 /// Get the local position of a cell on a module
0022 ///
0023 /// @param cell      The cell to get the position of
0024 /// @param det_descr The (silicon) detector description
0025 /// @return The local position of the cell (upper bound) and optionality the
0026 /// lower bound
0027 ///
0028 template <typename TCell, typename TDesign>
0029 TRACCC_HOST_DEVICE inline vector2 position_from_cell(
0030     const edm::silicon_cell<TCell>& cell,
0031     const traccc::detector_design_description_interface<TDesign>& module_dd);
0032 
0033 /// Function used for calculating the properties of the cluster during
0034 /// measurement creation
0035 ///
0036 /// @param[in] cluster      The silicon cluster to calculate the properties of
0037 /// @param[in] cells        All silicon cells in the event
0038 /// @param[in] det_descr    The detector segmentation description
0039 /// @param[in] det_cond     The detector conditionas data
0040 /// @param[out] mean        The mean position of the cluster/measurement
0041 /// @param[out] var         The variation on the mean position of the
0042 ///                         cluster/measurement
0043 /// @param[out] totalWeight The total weight of the cluster/measurement
0044 ///
0045 template <typename T, typename TDesign>
0046 TRACCC_HOST_DEVICE inline void calc_cluster_properties(
0047     const edm::silicon_cluster<T>& cluster,
0048     const edm::silicon_cell_collection::const_device& cells,
0049     const traccc::detector_design_description_interface<TDesign>& module_dd,
0050     point2& mean, point2& var, scalar& totalWeight);
0051 
0052 /// Function used for calculating the properties of the cluster during
0053 /// measurement creation
0054 ///
0055 /// @param[out] measurement Measurement object to be filled
0056 /// @param[in] cluster   The silicon cluster to turn into a measurement
0057 /// @param[in] index     The index of the cluster/measurement in the collection
0058 /// @param[in] cells     All silicon cells in the event
0059 /// @param[in] det_descr Detector segmentation description
0060 /// @param[in] det_cond  Detector conditions description
0061 ///
0062 template <typename T1, typename T2>
0063 TRACCC_HOST_DEVICE inline void fill_measurement(
0064     edm::measurement<T1>& measurement, const edm::silicon_cluster<T2>& cluster,
0065     unsigned int index, const edm::silicon_cell_collection::const_device& cells,
0066     const detector_design_description::const_device& det_descr,
0067     const detector_conditions_description::const_device& det_cond);
0068 
0069 }  // namespace traccc::details
0070 
0071 // Include the implementation.
0072 #include "traccc/clusterization/impl/measurement_creation.ipp"