Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-22 08:48:39

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2024 Minjung Kim, Barak Schmookler
0003 #pragma once
0004 
0005 #include <Acts/EventData/VectorMultiTrajectory.hpp>
0006 #include <Acts/EventData/VectorTrackContainer.hpp>
0007 #include <Acts/Utilities/Logger.hpp>
0008 #include <algorithms/algorithm.h>
0009 #include <memory>
0010 #include <string>
0011 #include <string_view>
0012 
0013 #include "Acts/AmbiguityResolution/GreedyAmbiguityResolution.hpp"
0014 #include "AmbiguitySolverConfig.h"
0015 #include "algorithms/interfaces/WithPodConfig.h"
0016 
0017 namespace eicrecon {
0018 
0019 using AmbiguitySolverAlgorithm = algorithms::Algorithm<
0020     algorithms::Input<Acts::ConstVectorMultiTrajectory, Acts::ConstVectorTrackContainer>,
0021     algorithms::Output<Acts::ConstVectorMultiTrajectory*, Acts::ConstVectorTrackContainer*>>;
0022 
0023 /*Reco Track Filtering Based on Greedy ambiguity resolution solver adopted from ACTS*/
0024 class AmbiguitySolver : public AmbiguitySolverAlgorithm,
0025                         public WithPodConfig<eicrecon::AmbiguitySolverConfig> {
0026 public:
0027   AmbiguitySolver(std::string_view name)
0028       : AmbiguitySolverAlgorithm{name,
0029                                  {"inputActsTrackStates", "inputActsTracks"},
0030                                  {"outputActsTrackStates", "outputActsTracks"},
0031                                  "Greedy ambiguity resolution for tracks"} {}
0032 
0033   void init() final;
0034   void process(const Input&, const Output&) const final;
0035 
0036 private:
0037   Acts::GreedyAmbiguityResolution::Config m_acts_cfg;
0038   std::unique_ptr<Acts::GreedyAmbiguityResolution> m_core;
0039   /// Private access to the logging instance
0040   std::shared_ptr<const Acts::Logger> m_acts_logger{nullptr};
0041   const Acts::Logger& acts_logger() const { return *m_acts_logger; }
0042 };
0043 
0044 } // namespace eicrecon