Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-27 07:54:15

0001 // Created by Dmitry Romanov
0002 // Subject to the terms in the LICENSE file found in the top-level directory.
0003 //
0004 
0005 #pragma once
0006 
0007 #include <JANA/JEvent.h>
0008 #include <edm4eic/ReconstructedParticleCollection.h>
0009 #include <memory>
0010 #include <string>
0011 #include <utility>
0012 #include <vector>
0013 
0014 #include "algorithms/reco/MC2ReconstructedParticle.h"
0015 #include "extensions/jana/JOmniFactory.h"
0016 
0017 namespace eicrecon {
0018 
0019 class MC2ReconstructedParticle_factory
0020     : public JOmniFactory<MC2ReconstructedParticle_factory, NoConfig> {
0021 
0022 private:
0023   using AlgoT = eicrecon::MC2ReconstructedParticle;
0024   std::unique_ptr<AlgoT> m_algo;
0025 
0026   PodioInput<edm4hep::MCParticle> m_mc_particles_input{this};
0027   PodioOutput<edm4eic::ReconstructedParticle> m_rc_particles_output{this};
0028 
0029 public:
0030   void Configure() {
0031     m_algo = std::make_unique<AlgoT>(GetPrefix());
0032     m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
0033     m_algo->applyConfig(config());
0034     m_algo->init();
0035   }
0036 
0037   void Process(int32_t /* run_number */, uint64_t /* event_number */) {
0038     m_algo->process({m_mc_particles_input()}, {m_rc_particles_output().get()});
0039   }
0040 };
0041 
0042 } // namespace eicrecon