File indexing completed on 2025-10-13 08:23:46
0001
0002
0003
0004 #pragma once
0005
0006 #include "algorithms/reco/LGADHitCalibration.h"
0007 #include "extensions/jana/JOmniFactory.h"
0008 #include "services/geometry/dd4hep/DD4hep_service.h"
0009
0010 namespace eicrecon {
0011
0012 class LGADHitCalibration_factory
0013 : public JOmniFactory<LGADHitCalibration_factory, LGADHitCalibrationConfig> {
0014 private:
0015 std::unique_ptr<eicrecon::LGADHitCalibration> m_algo;
0016
0017 PodioInput<edm4eic::RawTrackerHit> m_raw_hits_input{this};
0018 PodioOutput<edm4eic::TrackerHit> m_rec_hits_output{this};
0019
0020 ParameterRef<double> m_c_slope{this, "cSlope", config().c_slope};
0021 ParameterRef<double> m_c_intercept{this, "cIntercept", config().c_intercept};
0022 ParameterRef<double> m_t_slope{this, "tSlope", config().t_slope};
0023 ParameterRef<double> m_t_intercept{this, "tIntercept", config().t_intercept};
0024
0025 public:
0026 void Configure() {
0027 m_algo = std::make_unique<eicrecon::LGADHitCalibration>(GetPrefix());
0028 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
0029 m_algo->applyConfig(config());
0030 m_algo->init();
0031 }
0032
0033 void ChangeRun(int32_t ) {}
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 }