File indexing completed on 2025-07-01 07:56:32
0001
0002
0003
0004 #pragma once
0005
0006 #include <spdlog/logger.h>
0007 #include "extensions/jana/JOmniFactory.h"
0008
0009 #include "algorithms/reco/TrackClusterMatch.h"
0010 #include "algorithms/reco/TrackClusterMatchConfig.h"
0011 #include "services/geometry/dd4hep/DD4hep_service.h"
0012
0013 namespace eicrecon {
0014 class TrackClusterMatch_factory
0015 : public JOmniFactory<TrackClusterMatch_factory, TrackClusterMatchConfig> {
0016 private:
0017
0018 std::unique_ptr<eicrecon::TrackClusterMatch> m_algo;
0019
0020
0021 PodioInput<edm4eic::TrackSegment> m_tracks{this};
0022 PodioInput<edm4eic::Cluster> m_clusters{this};
0023
0024
0025 PodioOutput<edm4eic::TrackClusterMatch> m_matched_particles{this};
0026
0027
0028 ParameterRef<double> m_matching_distance{this, "matchingDistance", config().matching_distance};
0029
0030 public:
0031 void Configure() {
0032 m_algo = std::make_unique<eicrecon::TrackClusterMatch>(GetPrefix());
0033 m_algo->applyConfig(config());
0034 m_algo->init();
0035 }
0036
0037 void ChangeRun(int32_t ) {}
0038
0039 void Process(int32_t , uint64_t ) {
0040 m_algo->process({m_tracks(), m_clusters()}, {m_matched_particles().get()});
0041 }
0042 };
0043 }