Warning, file /EICrecon/src/factories/fardetectors/FarDetectorTransportationPostML_factory.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #pragma once
0005
0006 #include "algorithms/fardetectors/FarDetectorTransportationPostML.h"
0007 #include "services/algorithms_init/AlgorithmsInit_service.h"
0008 #include "extensions/jana/JOmniFactory.h"
0009
0010 namespace eicrecon {
0011
0012 class FarDetectorTransportationPostML_factory
0013 : public JOmniFactory<FarDetectorTransportationPostML_factory,
0014 FarDetectorTransportationPostMLConfig> {
0015
0016 public:
0017 using AlgoT = eicrecon::FarDetectorTransportationPostML;
0018
0019 private:
0020 std::unique_ptr<AlgoT> m_algo;
0021
0022 PodioInput<edm4eic::Tensor> m_prediction_tensor_input{this};
0023 PodioInput<edm4hep::MCParticle> m_beamelectrons_input{this};
0024
0025 PodioOutput<edm4eic::ReconstructedParticle> m_particle_output{this};
0026
0027 ParameterRef<bool> m_requireBeamElectron{this, "requireBeamElectron",
0028 config().requireBeamElectron};
0029
0030 public:
0031 void Configure() {
0032 m_algo = std::make_unique<AlgoT>(GetPrefix());
0033 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
0034 m_algo->applyConfig(config());
0035 m_algo->init();
0036 }
0037
0038 void ChangeRun(int32_t ) {}
0039
0040 void Process(int32_t , uint64_t ) {
0041 m_algo->process({m_prediction_tensor_input(), m_beamelectrons_input()},
0042 {m_particle_output().get()});
0043 }
0044 };
0045
0046 }