Celeritas 0.6.0-dev.115+3b60a5fd
|
Type-safe particle identifier. More...
#include <PDGNumber.hh>
Public Member Functions | |
constexpr | PDGNumber ()=default |
Construct with an invalid/unassigned value of zero. | |
constexpr | PDGNumber (int val) |
Construct with the PDG value. | |
constexpr | operator bool () const |
True if value is nonzero. | |
constexpr int | unchecked_get () const |
Get the PDG value. | |
int | get () const |
Get the PDG value. | |
Type-safe particle identifier.
The Particle Data Group specifies a coding to uniquely identify standard-model particle types in "Monte Carlo Particle Numbering Scheme" section of (pdg). These coded identifiers should generally not be treated like numbers: this class prevents unintentional arithmetic and conversion.
PDG numbers should only be used in host setup code (they should be converted to ParticleId for use during runtime).