Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-07 08:28:08

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2026 Subhadip Pal
0003 
0004 #pragma once
0005 
0006 #include "algorithms/particle_flow/CaloRemnantCombiner.h"
0007 #include "extensions/jana/JOmniFactory.h"
0008 #include "services/algorithms_init/AlgorithmsInit_service.h"
0009 
0010 namespace eicrecon {
0011 
0012 class CaloRemnantCombiner_factory
0013     : public JOmniFactory<CaloRemnantCombiner_factory, CaloRemnantCombinerConfig> {
0014 
0015 public:
0016   using AlgoT = eicrecon::CaloRemnantCombiner;
0017 
0018 private:
0019   // Underlying algorithm
0020   std::unique_ptr<AlgoT> m_algo;
0021 
0022   // Declare inputs
0023   PodioInput<edm4eic::Cluster> m_in_ecal_clusters{this};
0024   PodioInput<edm4eic::Cluster> m_in_hcal_clusters{this};
0025 
0026   // Declare outputs
0027   PodioOutput<edm4eic::ReconstructedParticle> m_out_neutral_candidates{this};
0028 
0029   // Declare parameters
0030   ParameterRef<double> m_ecalDeltaR{this, "ecalDeltaR", config().ecalDeltaR};
0031   ParameterRef<double> m_hcalDeltaR{this, "hcalDeltaR", config().hcalDeltaR};
0032 
0033 public:
0034   void Configure() {
0035     m_algo = std::make_unique<AlgoT>(GetPrefix());
0036     m_algo->applyConfig(config());
0037     m_algo->init();
0038   }
0039 
0040   void Process(int32_t /* run_number */, uint64_t /* event_number */) {
0041     m_algo->process({m_in_ecal_clusters(), m_in_hcal_clusters()},
0042                     {m_out_neutral_candidates().get()});
0043   }
0044 };
0045 } // namespace eicrecon