File indexing completed on 2026-11-26 09:30:12
0001
0002
0003
0004 #pragma once
0005
0006 #include <edm4eic/TrackParametersCollection.h>
0007 #include <edm4eic/TrackSeedCollection.h>
0008 #include <edm4eic/TrackerHitCollection.h>
0009 #include <cstdint>
0010 #include <memory>
0011
0012 #include "algorithms/tracking/B0TrackSeeding.h"
0013 #include "algorithms/tracking/B0TrackSeedingConfig.h"
0014 #include "extensions/jana/JOmniFactory.h"
0015 #include "services/geometry/acts/ACTSGeo_service.h"
0016
0017 namespace eicrecon {
0018
0019 class B0TrackSeeding_factory : public JOmniFactory<B0TrackSeeding_factory, B0TrackSeedingConfig> {
0020
0021 private:
0022 using AlgoT = eicrecon::B0TrackSeeding;
0023 std::unique_ptr<AlgoT> m_algo;
0024
0025 PodioInput<edm4eic::TrackerHit> m_hits_input{this};
0026 PodioOutput<edm4eic::TrackSeed> m_seeds_output{this};
0027 PodioOutput<edm4eic::TrackParameters> m_trackparams_output{this};
0028
0029 ParameterRef<float> m_minPt{this, "minPt", config().minPt, "min momentum across the field, GeV"};
0030 ParameterRef<float> m_hitErrorScale{this, "hitErrorScale", config().hitErrorScale,
0031 "scale of the hit position errors in the triplet slope cut"};
0032
0033 Service<ACTSGeo_service> m_ACTSGeoSvc{this};
0034
0035 public:
0036 void Configure() {
0037 m_algo = std::make_unique<AlgoT>(GetPrefix());
0038 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
0039 m_algo->applyConfig(config());
0040 m_algo->init();
0041 }
0042
0043 void Process(int32_t , uint64_t ) {
0044 m_algo->process({m_hits_input()}, {m_seeds_output().get(), m_trackparams_output().get()});
0045 }
0046 };
0047
0048 }