File indexing completed on 2025-09-15 08:17:51
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 namespace eicrecon {
0011
0012 class TrackerHitReconstruction_factory
0013 : public JOmniFactory<TrackerHitReconstruction_factory, TrackerHitReconstructionConfig> {
0014
0015 public:
0016 using AlgoT = eicrecon::TrackerHitReconstruction;
0017
0018 private:
0019 std::unique_ptr<AlgoT> m_algo;
0020
0021 PodioInput<edm4eic::RawTrackerHit> m_raw_hits_input{this};
0022 PodioOutput<edm4eic::TrackerHit> m_rec_hits_output{this};
0023
0024 ParameterRef<float> m_timeResolution{this, "timeResolution", config().timeResolution};
0025
0026 Service<DD4hep_service> m_geoSvc{this};
0027
0028 public:
0029 void Configure() {
0030 m_algo = std::make_unique<AlgoT>(GetPrefix());
0031 m_algo->applyConfig(config());
0032 m_algo->init();
0033 }
0034
0035 void Process(int32_t , uint64_t ) {
0036 m_algo->process({m_raw_hits_input()}, {m_rec_hits_output().get()});
0037 }
0038 };
0039
0040 }