File indexing completed on 2025-07-06 07:55:50
0001
0002
0003
0004
0005 #pragma once
0006
0007 #include "algorithms/calorimetry/CalorimeterTruthClustering.h"
0008 #include "services/algorithms_init/AlgorithmsInit_service.h"
0009 #include "extensions/jana/JOmniFactory.h"
0010
0011 namespace eicrecon {
0012
0013 class CalorimeterTruthClustering_factory : public JOmniFactory<CalorimeterTruthClustering_factory> {
0014 public:
0015 using AlgoT = eicrecon::CalorimeterTruthClustering;
0016
0017 private:
0018 std::unique_ptr<AlgoT> m_algo;
0019
0020 PodioInput<edm4eic::CalorimeterHit> m_rc_hits_input{this};
0021 PodioInput<edm4hep::SimCalorimeterHit> m_mc_hits_input{this};
0022 PodioOutput<edm4eic::ProtoCluster> m_proto_clusters_output{this};
0023
0024 public:
0025 void Configure() {
0026 m_algo = std::make_unique<AlgoT>(GetPrefix());
0027 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
0028 m_algo->init();
0029 }
0030
0031 void ChangeRun(int32_t ) {}
0032
0033 void Process(int32_t , uint64_t ) {
0034 m_algo->process({m_rc_hits_input(), m_mc_hits_input()}, {m_proto_clusters_output().get()});
0035 }
0036 };
0037
0038 }