Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-07 08:04:16

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2026 Derek Anderson
0003 
0004 #pragma once
0005 
0006 #include <string>
0007 
0008 #include "extensions/jana/JOmniFactory.h"
0009 #include "algorithms/particle_flow/ChargedCandidateMaker.h"
0010 
0011 namespace eicrecon {
0012 
0013 class ChargedCandidateMaker_factory : public JOmniFactory<ChargedCandidateMaker_factory, NoConfig> {
0014 
0015 public:
0016   using AlgoT = eicrecon::ChargedCandidateMaker;
0017 
0018 private:
0019   std::unique_ptr<AlgoT> m_algo;
0020 
0021   // input collection
0022   PodioInput<edm4eic::TrackClusterMatch> m_track_cluster_match_input{this};
0023 
0024   // output collection
0025   PodioOutput<edm4eic::ReconstructedParticle> m_charged_candidate_output{this};
0026 
0027 public:
0028   void Configure() {
0029     m_algo = std::make_unique<AlgoT>(GetPrefix());
0030     m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
0031     m_algo->applyConfig(config());
0032     m_algo->init();
0033   }
0034 
0035   void Process(int32_t /*run_number*/, uint64_t /*event_number*/) {
0036     m_algo->process({m_track_cluster_match_input()}, {m_charged_candidate_output().get()});
0037   }
0038 }; // end ChargedCandidateMaker_factory
0039 
0040 } // namespace eicrecon