Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /** TRACCC library, part of the ACTS project (R&D line)
0002  *
0003  * (c) 2022-2025 CERN for the benefit of the ACTS project
0004  *
0005  * Mozilla Public License Version 2.0
0006  */
0007 
0008 #include "traccc/options/track_matching.hpp"
0009 
0010 #include <format>
0011 
0012 #include "traccc/definitions/common.hpp"
0013 #include "traccc/examples/utils/printable.hpp"
0014 
0015 namespace traccc::opts {
0016 
0017 track_matching::track_matching() : interface("Track Matching Options") {
0018   m_desc.add_options()("track-matching-ratio",
0019                        boost::program_options::value(&m_matching_ratio)
0020                            ->default_value(m_matching_ratio),
0021                        "Minimum track state matching ratio");
0022   m_desc.add_options()("track-double-matching",
0023                        boost::program_options::value(&m_double_matching)
0024                            ->default_value(m_double_matching),
0025                        "Enable double truth-reco matching");
0026 }
0027 
0028 track_matching::operator track_matching_config() const {
0029   return track_matching_config{.matching_ratio = m_matching_ratio,
0030                                .double_matching = m_double_matching};
0031 }
0032 
0033 std::unique_ptr<configuration_printable> track_matching::as_printable() const {
0034   auto cat = std::make_unique<configuration_category>(m_description);
0035 
0036   cat->add_child(std::make_unique<configuration_kv_pair>(
0037       "Matching ratio", std::format("{}", m_matching_ratio)));
0038   cat->add_child(std::make_unique<configuration_kv_pair>(
0039       "Double matching", std::format("{}", m_double_matching)));
0040 
0041   return cat;
0042 }
0043 }  // namespace traccc::opts