Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-27 07:03:05

0001 // Copyright 2023, Wouter Deconinck
0002 // Subject to the terms in the LICENSE file found in the top-level directory.
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 
0012 namespace eicrecon {
0013 
0014 class CalorimeterTruthClustering_factory : public JOmniFactory<CalorimeterTruthClustering_factory> {
0015 public:
0016     using AlgoT = eicrecon::CalorimeterTruthClustering;
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(int64_t run_number) {
0032     }
0033 
0034     void Process(int64_t run_number, uint64_t event_number) {
0035         m_algo->process({m_rc_hits_input(), m_mc_hits_input()},
0036                         {m_proto_clusters_output().get()});
0037     }
0038 };
0039 
0040 } // eicrecon