Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-28 07:02:58

0001 // Created by Dmitry Romanov
0002 // Subject to the terms in the LICENSE file found in the top-level directory.
0003 //
0004 
0005 #pragma once
0006 
0007 #include <edm4eic/TrackParametersCollection.h>
0008 #include <edm4hep/MCParticleCollection.h>
0009 #include <spdlog/logger.h>
0010 #include <memory>
0011 #include <random>
0012 
0013 #include "ActsGeometryProvider.h"
0014 #include "TrackParamTruthInitConfig.h"
0015 #include "algorithms/interfaces/ParticleSvc.h"
0016 #include "algorithms/interfaces/WithPodConfig.h"
0017 
0018 namespace eicrecon {
0019     class TrackParamTruthInit: public WithPodConfig<TrackParamTruthInitConfig> {
0020 
0021     public:
0022 
0023         void init(std::shared_ptr<const ActsGeometryProvider> geo_svc, const std::shared_ptr<spdlog::logger> logger);
0024 
0025         std::unique_ptr<edm4eic::TrackParametersCollection>
0026             produce(const edm4hep::MCParticleCollection* parts);
0027 
0028     private:
0029         std::shared_ptr<spdlog::logger> m_log;
0030         std::shared_ptr<const ActsGeometryProvider> m_geoSvc;
0031 
0032         const algorithms::ParticleSvc& m_particleSvc = algorithms::ParticleSvc::instance();
0033 
0034         std::default_random_engine generator; // TODO: need something more appropriate here
0035         std::uniform_int_distribution<int> m_uniformIntDist{-1, 1}; // defaults to min=-1, max=1
0036         std::normal_distribution<double> m_normDist;
0037 
0038     };
0039 }   // namespace eicrecon