File indexing completed on 2024-09-27 07:03:05
0001
0002
0003
0004 #pragma once
0005
0006 #include "algorithms/tracking/TrackerHitReconstruction.h"
0007 #include "services/geometry/dd4hep/DD4hep_service.h"
0008 #include "extensions/jana/JOmniFactory.h"
0009
0010
0011 namespace eicrecon {
0012
0013 class TrackerHitReconstruction_factory :
0014 public JOmniFactory<TrackerHitReconstruction_factory, TrackerHitReconstructionConfig> {
0015
0016 TrackerHitReconstruction m_algo;
0017
0018 PodioInput<edm4eic::RawTrackerHit> m_raw_hits_input {this};
0019 PodioOutput<edm4eic::TrackerHit> m_rec_hits_output {this};
0020
0021 ParameterRef<float> m_timeResolution {this, "timeResolution", config().timeResolution};
0022
0023 Service<DD4hep_service> m_geoSvc {this};
0024
0025 public:
0026 void Configure() {
0027 m_algo.applyConfig(config());
0028 m_algo.init(m_geoSvc().converter(), logger());
0029 }
0030
0031 void ChangeRun(int64_t run_number) {
0032 }
0033
0034 void Process(int64_t run_number, uint64_t event_number) {
0035 m_rec_hits_output() = m_algo.process(*m_raw_hits_input());
0036 }
0037 };
0038
0039 }