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-2026 CERN for the benefit of the ACTS project
0004  *
0005  * Mozilla Public License Version 2.0
0006  */
0007 
0008 #pragma once
0009 
0010 // Library include(s).
0011 #include "traccc/clusterization/measurement_creation_algorithm.hpp"
0012 #include "traccc/clusterization/sparse_ccl_algorithm.hpp"
0013 #include "traccc/edm/measurement_collection.hpp"
0014 #include "traccc/edm/silicon_cell_collection.hpp"
0015 #include "traccc/geometry/detector_conditions_description.hpp"
0016 #include "traccc/geometry/detector_design_description.hpp"
0017 #include "traccc/utils/algorithm.hpp"
0018 #include "traccc/utils/messaging.hpp"
0019 
0020 // VecMem include(s).
0021 #include <vecmem/memory/memory_resource.hpp>
0022 
0023 // System include(s).
0024 #include <functional>
0025 #include <variant>
0026 
0027 namespace traccc::host {
0028 
0029 /// Clusterization algorithm, creating measurements from cells
0030 ///
0031 /// This algorithm creates local/2D measurements separately for each detector
0032 /// module from the cells of the modules.
0033 ///
0034 class clusterization_algorithm
0035     : public algorithm<edm::measurement_collection::host(
0036           const edm::silicon_cell_collection::const_view&,
0037           const detector_design_description::const_view&,
0038           const detector_conditions_description::const_view&)>,
0039       public messaging {
0040  public:
0041   using config_type = std::monostate;
0042 
0043   /// Clusterization algorithm constructor
0044   ///
0045   /// @param mr The memory resource to use for the result objects
0046   ///
0047   clusterization_algorithm(
0048       vecmem::memory_resource& mr,
0049       std::unique_ptr<const Logger> logger = getDummyLogger().clone());
0050 
0051   /// Construct measurements for each detector module
0052   ///
0053   /// @param cells_view The cells for every detector module in the event
0054   /// @param dmd_view The detector segmentation description
0055   /// @param dcd_view The detector conditins description
0056   /// @return The measurements reconstructed for every detector module
0057   ///
0058   output_type operator()(
0059       const edm::silicon_cell_collection::const_view& cells_view,
0060       const detector_design_description::const_view& dmd_view,
0061       const detector_conditions_description::const_view& dcd_view)
0062       const override;
0063 
0064  private:
0065   /// @name Sub-algorithms used by this algorithm
0066   /// @{
0067 
0068   /// Per-module cluster creation algorithm
0069   sparse_ccl_algorithm m_cc;
0070 
0071   /// Per-module measurement creation algorithm
0072   measurement_creation_algorithm m_mc;
0073 
0074   /// @}
0075 
0076   /// Reference to the host-accessible memory resource
0077   std::reference_wrapper<vecmem::memory_resource> m_mr;
0078 };  // class clusterization_algorithm
0079 
0080 }  // namespace traccc::host