File indexing completed on 2026-05-08 08:37:55
0001
0002
0003
0004 #pragma once
0005
0006 #include <algorithms/algorithm.h>
0007 #include <edm4eic/TrackParametersCollection.h>
0008 #include <edm4eic/TrackSeedCollection.h>
0009 #include <edm4hep/EventHeaderCollection.h>
0010 #include <edm4hep/MCParticleCollection.h>
0011 #include <memory>
0012 #include <string>
0013 #include <string_view>
0014
0015 #include "ActsGeometryProvider.h"
0016 #include "TrackParamTruthInitConfig.h"
0017 #include "algorithms/interfaces/ActsSvc.h"
0018 #include "algorithms/interfaces/UniqueIDGenSvc.h"
0019 #include "services/particle/ParticleSvc.h"
0020 #include "algorithms/interfaces/WithPodConfig.h"
0021
0022 namespace eicrecon {
0023
0024 using TrackParamTruthInitAlgorithm = algorithms::Algorithm<
0025 algorithms::Input<edm4hep::EventHeaderCollection, edm4hep::MCParticleCollection>,
0026 algorithms::Output<edm4eic::TrackSeedCollection, edm4eic::TrackParametersCollection>>;
0027
0028 class TrackParamTruthInit : public TrackParamTruthInitAlgorithm,
0029 public WithPodConfig<TrackParamTruthInitConfig> {
0030
0031 public:
0032 TrackParamTruthInit(std::string_view name)
0033 : TrackParamTruthInitAlgorithm{name,
0034 {"inputMCParticles"},
0035 {"outputTrackParameters"},
0036 "create track seeds from truth information"} {}
0037
0038 void init() final {};
0039
0040 void process(const Input& input, const Output& output) const final;
0041
0042 private:
0043 const algorithms::ActsSvc& m_actsSvc{algorithms::ActsSvc::instance()};
0044 std::shared_ptr<const ActsGeometryProvider> m_geoSvc{m_actsSvc.acts_geometry_provider()};
0045
0046 const algorithms::ParticleSvc& m_particleSvc = algorithms::ParticleSvc::instance();
0047 const algorithms::UniqueIDGenSvc& m_uid = algorithms::UniqueIDGenSvc::instance();
0048 };
0049
0050 }