GenData is a class for particle data access.
More...
#include <GenData.h>
GenData is a class for particle data access.
Definition at line 18 of file GenData.h.
◆ GenData() [1/2]
Definition at line 15 of file GenData.cxx.
ServiceHandle< IPartPropSvc > m_ppSvc
std::string m_service_name
Handle on the particle property service.
◆ GenData() [2/2]
| GenData::GenData |
( |
const std::string & | sname, |
|
|
const std::string & | name ) |
◆ ~GenData()
| virtual GenData::~GenData |
( |
| ) |
|
|
virtualdefault |
◆ particleInfo()
Definition at line 19 of file GenData.cxx.
19 {
20
22 if (
m_ppSvc.retrieve().isFailure()) {
23 std::cerr <<
"GenData: failed to retrieve IPartPropSvc(" <<
m_service_name <<
", " <<
m_name <<
")\n";
24 std::abort();
25 }
27 }
28
30 if (
const HepPDT::ParticleData* particle =
m_ppSvc->PDT()->particle(HepPDT::ParticleID(absPid))) {
34 }
36}
std::atomic< bool > m_initialized
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
◆ particleLifetime()
| std::optional< double > GenData::particleLifetime |
( |
int | pdgId | ) |
const |
Get the lifetime of a particle by PDG ID.
Definition at line 42 of file GenData.cxx.
42 {
44}
ParticleInfo particleInfo(int absPid) const
std::optional< double > lifetime
◆ particleMass()
| std::optional< double > GenData::particleMass |
( |
int | pdgId | ) |
const |
Get the mass of a particle by PDG ID.
Definition at line 38 of file GenData.cxx.
38 {
40}
std::optional< double > mass
◆ particleName()
| std::optional< std::string > GenData::particleName |
( |
int | pdgId | ) |
const |
Get the name of a particle by PDG ID.
Definition at line 46 of file GenData.cxx.
46 {
48}
std::optional< std::string > name
◆ m_initialized
| std::atomic<bool> GenData::m_initialized {false} |
|
mutableprivate |
◆ m_name
| std::string GenData::m_name {"GenData"} |
|
private |
◆ m_ppSvc
◆ m_service_name
| std::string GenData::m_service_name {"PartPropSvc"} |
|
private |
Handle on the particle property service.
Definition at line 46 of file GenData.h.
The documentation for this class was generated from the following files: