File indexing completed on 2025-12-13 09:26:11
0001
0002
0003
0004
0005 #pragma once
0006
0007 #include <JANA/JEvent.h>
0008 #include <edm4eic/Measurement2DCollection.h>
0009 #include <memory>
0010 #include <string>
0011 #include <utility>
0012 #include <vector>
0013
0014 #include "algorithms/interfaces/WithPodConfig.h"
0015 #include "algorithms/tracking/TrackerMeasurementFromHits.h"
0016 #include "extensions/jana/JOmniFactory.h"
0017 #include "services/geometry/acts/ACTSGeo_service.h"
0018 #include "services/geometry/dd4hep/DD4hep_service.h"
0019
0020 namespace eicrecon {
0021
0022 class TrackerMeasurementFromHits_factory
0023 : public JOmniFactory<TrackerMeasurementFromHits_factory, NoConfig> {
0024
0025 private:
0026 using AlgoT = eicrecon::TrackerMeasurementFromHits;
0027 std::unique_ptr<AlgoT> m_algo;
0028
0029 PodioInput<edm4eic::TrackerHit> m_hits_input{this};
0030 PodioOutput<edm4eic::Measurement2D> m_measurements_output{this};
0031
0032 Service<DD4hep_service> m_DD4hepSvc{this};
0033 Service<ACTSGeo_service> m_ACTSGeoSvc{this};
0034
0035 public:
0036 void Configure() {
0037 m_algo = std::make_unique<AlgoT>(GetPrefix());
0038 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
0039 m_algo->applyConfig(config());
0040 m_algo->init();
0041 }
0042
0043 void Process(int32_t , uint64_t ) {
0044 m_algo->process({m_hits_input()}, {m_measurements_output().get()});
0045 }
0046 };
0047
0048 }