GenData is a class for particle data access.
More...
#include <GenData.h>
GenData is a class for particle data access.
Definition at line 30 of file GenData.h.
◆ GenData()
◆ ~GenData()
| virtual GenData::~GenData |
( |
| ) |
|
|
inlinevirtual |
◆ particleData()
| const HepPDT::ParticleData * GenData::particleData |
( |
int | pid | ) |
const |
|
inlineprivate |
Access an element in the particle data table.
Definition at line 39 of file GenData.h.
39 {
41 if (
m_ppSvc.retrieve().isFailure()) {
42 std::cerr<< "GenData: failed to retrieve PartPropSvc\n";
43 std::abort();
44 }
46 }
47 const int absPid = std::abs(pid);
48 return m_ppSvc->PDT()->particle(HepPDT::ParticleID(absPid));
49 }
ServiceHandle< IPartPropSvc > m_ppSvc
Handle on the particle property service.
std::atomic< bool > m_initialized
◆ particleLifetime()
| std::optional< double > GenData::particleLifetime |
( |
int | pdgId | ) |
const |
|
inline |
Definition at line 57 of file GenData.h.
57 {
59 return particle ? std::optional<double>{
particle->lifetime()} : std::nullopt;
60 }
const HepPDT::ParticleData * particleData(int pid) const
Access an element in the particle data table.
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
◆ particleMass()
| std::optional< double > GenData::particleMass |
( |
int | pdgId | ) |
const |
|
inline |
Definition at line 52 of file GenData.h.
52 {
54 return particle ? std::optional<double>{
particle->mass().value()} : std::nullopt;
55 }
◆ particleName()
| std::optional< std::string > GenData::particleName |
( |
int | pdgId | ) |
const |
|
inline |
◆ m_initialized
| std::atomic<bool> GenData::m_initialized {false} |
|
mutableprivate |
◆ m_ppSvc
| ServiceHandle<IPartPropSvc> GenData::m_ppSvc {"PartPropSvc", "GenData"} |
|
private |
Handle on the particle property service.
Definition at line 70 of file GenData.h.
70{"PartPropSvc", "GenData"};
The documentation for this class was generated from the following file: