Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-06-06 08:35:12

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/MC2SmearedParticle.h"
0015 #include "extensions/jana/JOmniFactory.h"
0016 
0017 namespace eicrecon {
0018 
0019 class MC2SmearedParticle_factory : public JOmniFactory<MC2SmearedParticle_factory> {
0020 
0021 private:
0022   using AlgoT = eicrecon::MC2SmearedParticle;
0023   std::unique_ptr<AlgoT> m_algo;
0024 
0025   PodioInput<edm4hep::MCParticle> m_mc_particles_input{this};
0026   PodioOutput<edm4eic::ReconstructedParticle> m_rc_particles_output{this};
0027 
0028 public:
0029   void Configure() {
0030     m_algo = std::make_unique<AlgoT>();
0031     m_algo->init(logger());
0032   }
0033 
0034   void ChangeRun(int32_t /* run_number */) {}
0035 
0036   void Process(int32_t /* run_number */, uint64_t /* event_number */) {
0037     m_rc_particles_output() = m_algo->produce(m_mc_particles_input());
0038   }
0039 };
0040 
0041 } // namespace eicrecon