Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-13 08:54:51

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