Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-17 07:50:54

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2026 Derek Anderson
0003 
0004 #pragma once
0005 
0006 #include <edm4eic/EDM4eicVersion.h>
0007 
0008 #include "algorithms/particle_flow/TrackProtoClusterMatchPromoter.h"
0009 #include "extensions/jana/JOmniFactory.h"
0010 
0011 namespace eicrecon {
0012 
0013 class TrackProtoClusterMatchPromoter_factory
0014     : public JOmniFactory<TrackProtoClusterMatchPromoter_factory> {
0015 
0016 public:
0017   using AlgoT = eicrecon::TrackProtoClusterMatchPromoter;
0018 
0019 private:
0020   std::unique_ptr<AlgoT> m_algo;
0021 
0022   // input collections
0023 #if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
0024   PodioInput<edm4eic::TrackProtoClusterLink> m_track_proto_link_input{this};
0025 #elif EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 4, 0)
0026   PodioInput<edm4eic::TrackProtoClusterMatch> m_track_proto_match_input{this};
0027 #endif
0028   PodioInput<edm4eic::ProtoCluster> m_proto_input{this};
0029   PodioInput<edm4eic::Cluster> m_clust_input{this};
0030 
0031   // output collection
0032   PodioOutput<edm4eic::TrackClusterMatch> m_track_clust_match_output{this};
0033 
0034 public:
0035   void Configure() {
0036     m_algo = std::make_unique<AlgoT>(GetPrefix());
0037     m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
0038     m_algo->init();
0039   }
0040 
0041   void Process(int32_t /*run_number*/, uint64_t /*event_number*/) {
0042 #if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
0043     m_algo->process({m_track_proto_link_input(), m_proto_input(), m_clust_input()},
0044 #elif EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 4, 0)
0045     m_algo->process({m_track_proto_match_input(), m_proto_input(), m_clust_input()},
0046 #else
0047     m_algo->process({m_proto_input(), m_clust_input()},
0048 #endif
0049                     {m_track_clust_match_output().get()});
0050   }
0051 }; // end TrackProtoClusterMatchPromoter_factory
0052 
0053 } // namespace eicrecon