File indexing completed on 2025-10-13 09:14:56
0001
0002
0003
0004 #pragma once
0005
0006 #include "algorithms/tracking/LGADHitClustering.h"
0007 #include "extensions/jana/JOmniFactory.h"
0008 #include "services/geometry/dd4hep/DD4hep_service.h"
0009
0010 namespace eicrecon {
0011
0012 class LGADHitClustering_factory
0013 : public JOmniFactory<LGADHitClustering_factory, LGADHitClusteringConfig> {
0014 private:
0015 std::unique_ptr<eicrecon::LGADHitClustering> m_algo;
0016
0017 PodioInput<edm4eic::TrackerHit> m_hits_input{this};
0018 PodioOutput<edm4eic::Measurement2D> m_clusters_output{this};
0019
0020 ParameterRef<std::string> m_readout{this, "readout", config().readout};
0021 ParameterRef<double> m_deltaT{this, "deltaT", config().deltaT};
0022 ParameterRef<bool> m_useAve{this, "useAve", config().useAve};
0023
0024 public:
0025 void Configure() {
0026 m_algo = std::make_unique<eicrecon::LGADHitClustering>(GetPrefix());
0027 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
0028 m_algo->applyConfig(config());
0029 m_algo->init();
0030 }
0031
0032 void ChangeRun(int32_t ) {}
0033
0034 void Process(int32_t , uint64_t ) {
0035 m_algo->process({m_hits_input()}, {m_clusters_output().get()});
0036 }
0037 };
0038
0039 }