File indexing completed on 2025-01-18 09:55:44
0001
0002
0003
0004
0005 #pragma once
0006
0007 #include <ActsExamples/EventData/Trajectories.hpp>
0008 #include <JANA/JEvent.h>
0009 #include <edm4eic/TrackSegmentCollection.h>
0010 #include <memory>
0011 #include <string>
0012 #include <utility>
0013 #include <vector>
0014
0015 #include "algorithms/tracking/TrackProjector.h"
0016 #include "extensions/jana/JOmniFactory.h"
0017
0018 namespace eicrecon {
0019
0020 class TrackProjector_factory :
0021 public JOmniFactory<TrackProjector_factory> {
0022
0023 private:
0024 using AlgoT = eicrecon::TrackProjector;
0025 std::unique_ptr<AlgoT> m_algo;
0026
0027 Input<ActsExamples::Trajectories> m_acts_trajectories_input {this};
0028 PodioOutput<edm4eic::TrackSegment> m_segments_output {this};
0029
0030 Service<ACTSGeo_service> m_ACTSGeoSvc {this};
0031
0032 public:
0033 void Configure() {
0034 m_algo = std::make_unique<AlgoT>();
0035 m_algo->init(m_ACTSGeoSvc().actsGeoProvider(), logger());
0036 }
0037
0038 void ChangeRun(int64_t run_number) {
0039 }
0040
0041 void Process(int64_t run_number, uint64_t event_number) {
0042 m_segments_output() = m_algo->execute(m_acts_trajectories_input());
0043 }
0044 };
0045
0046 }