File indexing completed on 2025-04-04 08:02:24
0001
0002
0003
0004 #pragma once
0005
0006 #include "algorithms/reco/FarForwardNeutralsReconstruction.h"
0007 #include "algorithms/reco/FarForwardNeutralsReconstructionConfig.h"
0008 #include "services/algorithms_init/AlgorithmsInit_service.h"
0009 #include "extensions/jana/JOmniFactory.h"
0010
0011
0012 namespace eicrecon {
0013
0014 class FarForwardNeutralsReconstruction_factory : public JOmniFactory<FarForwardNeutralsReconstruction_factory,FarForwardNeutralsReconstructionConfig> {
0015
0016 public:
0017 using AlgoT = eicrecon::FarForwardNeutralsReconstruction;
0018 private:
0019 std::unique_ptr<AlgoT> m_algo;
0020 PodioInput<edm4eic::Cluster> m_clusters_hcal_input {this};
0021 PodioOutput<edm4eic::ReconstructedParticle> m_neutrals_output {this};
0022 ParameterRef<std::vector<double>> m_n_scale_corr_coeff_hcal {this, "neutronScaleCorrCoeffHcal", config().neutronScaleCorrCoeffHcal};
0023 ParameterRef<std::vector<double>> m_gamma_scale_corr_coeff_hcal {this, "gammaScaleCorrCoeffHcal", config().gammaScaleCorrCoeffHcal};
0024 ParameterRef<double> m_global_to_proton_rotation {this, "globalToProtonRotation", config().globalToProtonRotation};
0025 ParameterRef<double> m_gamma_zmax {this, "gammaZMax", config().gammaZMax};
0026
0027 ParameterRef<double> m_gamma_max_length {this, "gammaMaxLength", config().gammaMaxLength};
0028 ParameterRef<double> m_gamma_max_width {this, "gammaMaxWidth", config().gammaMaxWidth};
0029
0030 Service<AlgorithmsInit_service> m_algorithmsInit {this};
0031
0032 public:
0033 void Configure() {
0034 m_algo = std::make_unique<AlgoT>(GetPrefix());
0035 m_algo->level((algorithms::LogLevel)logger()->level());
0036
0037 m_algo->applyConfig(config());
0038 m_algo->init();
0039 }
0040
0041 void ChangeRun(int64_t run_number) {
0042 }
0043
0044 void Process(int64_t run_number, uint64_t event_number) {
0045 m_algo->process({m_clusters_hcal_input(),},{m_neutrals_output().get(),});
0046 }
0047 };
0048
0049 }