Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-26 07:06:31

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2022 Whitney Armstrong
0003 
0004 #ifndef IParticleSvc_H
0005 #define IParticleSvc_H
0006 
0007 #include <GaudiKernel/IService.h>
0008 #include <unordered_map>
0009 
0010 namespace Jug::Base {
0011 
0012   /** Simple particle data.
0013    *
0014    */
0015   struct ParticleData {
0016     int         pdgCode;
0017     int         charge;
0018     double      mass; //std::string name;
0019   };
0020 } // namespace Jug::Base
0021 
0022 /** Particle interface.
0023  *
0024  * \ingroup base
0025  */
0026 class GAUDI_API IParticleSvc : virtual public IService {
0027 public:
0028   using Particle    = Jug::Base::ParticleData;
0029   using ParticleMap = std::map<int, Particle>;
0030 
0031 public:
0032   /// InterfaceID
0033   DeclareInterfaceID(IParticleSvc, 1, 0);
0034   virtual ~IParticleSvc() {}
0035 
0036   virtual ParticleMap particleMap() const = 0;
0037   virtual Particle    particle(int pdg) const = 0;
0038 };
0039 
0040 #endif  // IParticleSvc_H