File indexing completed on 2025-04-03 08:49:44
0001
0002
0003
0004 #pragma once
0005
0006 #include "extensions/jana/JOmniFactory.h"
0007
0008 #include "algorithms/digi/LGADPulseDigitization.h"
0009 #include <iostream>
0010
0011 namespace eicrecon {
0012
0013 class LGADPulseDigitization_factory
0014 : public JOmniFactory<LGADPulseDigitization_factory, LGADPulseDigitizationConfig> {
0015 public:
0016 using AlgoT = eicrecon::LGADPulseDigitization;
0017
0018 private:
0019 std::unique_ptr<AlgoT> m_algo;
0020
0021 PodioInput<edm4hep::RawTimeSeries> m_in_sim_track{this};
0022
0023 PodioOutput<edm4eic::RawTrackerHit> m_out_reco_particles{this};
0024
0025 ParameterRef<double> m_t_thres{this, "tThreshold", config().t_thres};
0026
0027 Service<AlgorithmsInit_service> m_algorithmsInit{this};
0028
0029 public:
0030 void Configure() {
0031 m_algo = std::make_unique<eicrecon::LGADPulseDigitization>(GetPrefix());
0032 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
0033 m_algo->applyConfig(config());
0034 m_algo->init();
0035 }
0036
0037 void ChangeRun(int64_t run_number) {}
0038
0039 void Process(int64_t run_number, uint64_t event_number) {
0040 m_algo->process({m_in_sim_track()}, {m_out_reco_particles().get()});
0041 }
0042 };
0043 }