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