File indexing completed on 2025-01-18 09:55:44
0001
0002
0003
0004 #pragma once
0005
0006 #include <memory>
0007
0008 #include "algorithms/tracking/ActsToTracks.h"
0009 #include "extensions/jana/JOmniFactory.h"
0010
0011 namespace eicrecon {
0012
0013 class ActsToTracks_factory
0014 : public JOmniFactory<ActsToTracks_factory> {
0015 public:
0016 using AlgoT = eicrecon::ActsToTracks;
0017
0018 private:
0019 std::unique_ptr<AlgoT> m_algo;
0020
0021 PodioInput<edm4eic::Measurement2D> m_measurements_input {this};
0022 Input<ActsExamples::Trajectories> m_acts_trajectories_input {this};
0023 PodioInput<edm4eic::MCRecoTrackerHitAssociation> m_raw_hit_assocs_input {this};
0024 PodioOutput<edm4eic::Trajectory> m_trajectories_output {this};
0025 PodioOutput<edm4eic::TrackParameters> m_parameters_output {this};
0026 PodioOutput<edm4eic::Track> m_tracks_output {this};
0027 PodioOutput<edm4eic::MCRecoTrackParticleAssociation> m_track_assocs_output {this};
0028
0029 public:
0030 void Configure() {
0031 m_algo = std::make_unique<AlgoT>(this->GetPrefix());
0032 m_algo->level((algorithms::LogLevel)logger()->level());
0033 m_algo->init();
0034 };
0035
0036 void ChangeRun(int64_t run_number) {};
0037
0038 void Process(int64_t run_number, uint64_t event_number) {
0039 std::vector<gsl::not_null<const ActsExamples::Trajectories *>> acts_trajectories_input;
0040 for (auto acts_traj : m_acts_trajectories_input()) {
0041 acts_trajectories_input.push_back(acts_traj);
0042 }
0043 m_algo->process(
0044 {
0045 m_measurements_input(),
0046 acts_trajectories_input,
0047 m_raw_hit_assocs_input(),
0048 },
0049 {
0050 m_trajectories_output().get(),
0051 m_parameters_output().get(),
0052 m_tracks_output().get(),
0053 m_track_assocs_output().get(),
0054 }
0055 );
0056 }
0057 };
0058
0059 }