File indexing completed on 2024-09-27 07:03:05
0001
0002
0003
0004 #pragma once
0005
0006 #include <JANA/JEvent.h>
0007 #include <edm4hep/MCParticleCollection.h>
0008 #include <edm4eic/InclusiveKinematicsCollection.h>
0009 #include <edm4eic/ReconstructedParticleCollection.h>
0010 #include <memory>
0011 #include <string>
0012 #include <utility>
0013 #include <vector>
0014
0015 #include "algorithms/reco/TransformBreitFrame.h"
0016 #include "extensions/jana/JOmniFactory.h"
0017 #include "services/algorithms_init/AlgorithmsInit_service.h"
0018
0019 namespace eicrecon {
0020
0021 class TransformBreitFrame_factory : public JOmniFactory<TransformBreitFrame_factory> {
0022
0023 public:
0024
0025 using Algo = eicrecon::TransformBreitFrame;
0026 private:
0027 std::unique_ptr<Algo> m_algo;
0028
0029
0030 PodioInput<edm4hep::MCParticle> m_in_mcpart {this};
0031 PodioInput<edm4eic::InclusiveKinematics> m_in_kine {this};
0032 PodioInput<edm4eic::ReconstructedParticle> m_in_part {this};
0033
0034
0035 PodioOutput<edm4eic::ReconstructedParticle> m_out_part {this};
0036
0037 Service<AlgorithmsInit_service> m_algorithmsInit {this};
0038
0039 public:
0040
0041 void Configure() {
0042 m_algo = std::make_unique<Algo>(GetPrefix());
0043 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
0044 m_algo->init();
0045 }
0046
0047 void ChangeRun(int64_t run_number) {
0048
0049 }
0050
0051 void Process(int64_t run_number, int64_t event_number) {
0052 m_algo->process(
0053 {m_in_mcpart(),m_in_kine(),m_in_part()},
0054 {m_out_part().get()}
0055 );
0056 }
0057
0058 };
0059
0060 }