5#ifndef GENERATORMODULES_GENDATA_H
6#define GENERATORMODULES_GENDATA_H
9#include "GaudiKernel/ServiceHandle.h"
10#include "GaudiKernel/IPartPropSvc.h"
11#include "GaudiKernel/IIncidentSvc.h"
21#include "HepPDT/ParticleData.hh"
22#include "HepPDT/ParticleDataTable.hh"
62 if (
m_ppSvc.retrieve().isFailure()) {
63 std::cerr<<
"GenData: failed to retrieve PartPropSvc\n";
76 return pdt().particle(HepPDT::ParticleID(std::abs(pid)));
80 const HepPDT::ParticleData* particle =
particleData(std::abs(pdgId));
84 return particle->mass().value();
88 const HepPDT::ParticleData* particle =
particleData(std::abs(pdgId));
92 return particle->lifetime();
95 const HepPDT::ParticleData* particle =
particleData(std::abs(pdgId));
99 return particle->name();
Helpers for checking error return status codes and reporting errors.
Property holding a SG store/key/clid from which a ReadHandle is made.
Define macros for attributes used to control the static checker.
const HepPDT::ParticleDataTable & particleTable() const
Get a particle data table.
const ServiceHandle< IPartPropSvc > partPropSvc() const
Access the particle property service.
std::optional< std::string > particleName(int pdgId) const
std::optional< double > particleMass(int pdgId) const
virtual ~GenData()
Virtual destructor.
ServiceHandle< IPartPropSvc > m_ppSvc
Handle on the particle property service.
const HepPDT::ParticleData * particleData(int pid) const
Access an element in the particle data table.
std::optional< double > particleLifetime(int pdgId) const
std::atomic< bool > m_initialized
const HepPDT::ParticleDataTable & pdt() const
Shorter alias to get a particle data table.