Back to home page

EIC code displayed by LXR

 
 

    


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

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 :
0020         public JOmniFactory<MC2SmearedParticle_factory> {
0021 
0022 private:
0023     using AlgoT = eicrecon::MC2SmearedParticle;
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>();
0032         m_algo->init(logger());
0033     }
0034 
0035     void ChangeRun(int64_t run_number) {
0036     }
0037 
0038     void Process(int64_t run_number, uint64_t event_number) {
0039         m_rc_particles_output() = m_algo->produce(m_mc_particles_input());
0040     }
0041 };
0042 
0043 } // eicrecon