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/LGADChargeSharing.h"
0009 #include <iostream>
0010
0011 namespace eicrecon {
0012
0013 class LGADChargeSharing_factory : public JOmniFactory<LGADChargeSharing_factory, LGADChargeSharingConfig> {
0014 public:
0015 using AlgoT = eicrecon::LGADChargeSharing;
0016
0017 private:
0018 std::unique_ptr<AlgoT> m_algo;
0019
0020 PodioInput<edm4hep::SimTrackerHit> m_in_sim_track{this};
0021
0022 PodioOutput<edm4hep::SimTrackerHit> m_out_reco_particles{this};
0023
0024 ParameterRef<double> m_sigma_sharingx{this, "sigmaSharingX", config().sigma_sharingx};
0025 ParameterRef<double> m_sigma_sharingy{this, "sigmaSharingY", config().sigma_sharingy};
0026
0027 Service<AlgorithmsInit_service> m_algorithmsInit{this};
0028
0029 public:
0030 void Configure() {
0031 m_algo = std::make_unique<eicrecon::LGADChargeSharing>(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 }