Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-26 08:22:19

0001 /** TRACCC library, part of the ACTS project (R&D line)
0002  *
0003  * (c) 2022-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/utils/helpers.hpp"
0012 #include "traccc/utils/messaging.hpp"
0013 #include "traccc/utils/seed_matching_config.hpp"
0014 #include "traccc/utils/truth_matching_config.hpp"
0015 
0016 // Project include(s).
0017 #include "traccc/edm/measurement_collection.hpp"
0018 #include "traccc/edm/seed_collection.hpp"
0019 #include "traccc/edm/spacepoint_collection.hpp"
0020 #include "traccc/utils/event_data.hpp"
0021 
0022 // System include(s).
0023 #include <map>
0024 #include <memory>
0025 #include <string>
0026 #include <string_view>
0027 
0028 namespace traccc {
0029 namespace details {
0030 
0031 /// Data members that should not pollute the API of
0032 /// @c traccc::seeding_performance_writer
0033 struct seeding_performance_writer_data;
0034 
0035 }  // namespace details
0036 
0037 class seeding_performance_writer : public messaging {
0038  public:
0039   /// Configuration for the tool
0040   struct config {
0041     /// Output filename.
0042     std::string file_path = "performance_track_seeding.root";
0043     /// Output file mode
0044     std::string file_mode = "RECREATE";
0045 
0046     /// Plot tool configurations.
0047     std::map<std::string, plot_helpers::binning> var_binning = {
0048         {"Eta", plot_helpers::binning("#eta", 40, -4.f, 4.f)},
0049         {"Phi", plot_helpers::binning("#phi", 100, -3.15f, 3.15f)},
0050         {"Pt", plot_helpers::binning("p_{T} [GeV/c]", 40, 0.f, 100.f)},
0051         {"Num", plot_helpers::binning("N", 30, -0.5f, 29.5f)}};
0052 
0053     /// Cut values
0054     truth_matching_config truth_config;
0055     seed_matching_config seed_truth_config;
0056   };
0057 
0058   /// Construct from configuration and log level.
0059   /// @param cfg The configuration
0060   ///
0061   seeding_performance_writer(const config& cfg,
0062                              std::unique_ptr<const traccc::Logger> logger);
0063 
0064   /// Destructor
0065   ~seeding_performance_writer();
0066 
0067   void write(const edm::seed_collection::const_view& seeds_view,
0068              const edm::spacepoint_collection::const_view& spacepoints_view,
0069              const edm::measurement_collection::const_view& measurements_view,
0070              const event_data& evt_data);
0071 
0072   void finalize();
0073 
0074  private:
0075   /// Configuration for the tool
0076   config m_cfg;
0077 
0078   /// Opaque data members for the class
0079   std::unique_ptr<details::seeding_performance_writer_data> m_data;
0080 
0081 };  // class seeding_performance_writer
0082 
0083 }  // namespace traccc