Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-01 07:56:14

0001 // Copyright 2023, Christopher Dilks
0002 // Subject to the terms in the LICENSE file found in the top-level directory.
0003 
0004 #pragma once
0005 
0006 #include <spdlog/spdlog.h>
0007 
0008 #include <edm4hep/MCParticleCollection.h>
0009 #include <edm4hep/utils/vector_utils.h>
0010 
0011 namespace benchmarks {
0012 
0013   class ChargedParticle {
0014 
0015     public:
0016 
0017       ChargedParticle(std::shared_ptr<spdlog::logger> log) : m_log(log) {};
0018       ~ChargedParticle() {}
0019 
0020       // accessors
0021       double GetMomentum() { return m_momentum; };
0022       double GetEta()      { return m_eta;      };
0023       int    GetPDG()      { return m_pdg;      };
0024 
0025       // set info from a single MCParticle
0026       void SetSingleParticle(const edm4hep::MCParticle& mc_part);
0027       // set info from a (thrown) MCParticle of a collection
0028       void SetSingleParticle(const edm4hep::MCParticleCollection& mc_parts);
0029 
0030     private:
0031 
0032       // members
0033       double m_momentum;
0034       double m_eta;
0035       int    m_pdg = 0;
0036 
0037       // logger
0038       std::shared_ptr<spdlog::logger> m_log;
0039 
0040   };
0041 
0042 }