File indexing completed on 2025-06-08 07:53:31
0001
0002
0003
0004 #pragma once
0005
0006 #include "algorithms/tracking/TracksToParticles.h"
0007 #include <edm4eic/MCRecoParticleAssociation.h>
0008 #include <edm4eic/ReconstructedParticle.h>
0009 #include <edm4eic/Track.h>
0010 #include <edm4hep/MCParticleCollection.h>
0011 #include <edm4hep/ParticleID.h>
0012 #include <memory>
0013
0014 namespace eicrecon {
0015
0016 class TracksToParticles_factory : public JOmniFactory<TracksToParticles_factory, NoConfig> {
0017 public:
0018 using AlgoT = eicrecon::TracksToParticles;
0019
0020 private:
0021 std::unique_ptr<AlgoT> m_algo;
0022
0023 PodioInput<edm4eic::Track> m_tracks_input{this};
0024 PodioInput<edm4eic::MCRecoTrackParticleAssociation> m_trackassocs_input{this};
0025 PodioOutput<edm4eic::ReconstructedParticle> m_recoparticles_output{this};
0026 PodioOutput<edm4eic::MCRecoParticleAssociation> m_recoassocs_output{this};
0027
0028 public:
0029 void Configure() {
0030 m_algo = std::make_unique<AlgoT>(this->GetPrefix());
0031 m_algo->level((algorithms::LogLevel)logger()->level());
0032 m_algo->applyConfig(config());
0033 m_algo->init();
0034 };
0035
0036 void ChangeRun(int32_t ){};
0037
0038 void Process(int32_t , uint64_t ) {
0039 m_algo->process({m_tracks_input(), m_trackassocs_input()},
0040 {m_recoparticles_output().get(), m_recoassocs_output().get()});
0041 }
0042 };
0043
0044 }