Celeritas 0.6.0-dev.115+3b60a5fd
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::PDGNumber Class Reference

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.
 

Detailed Description

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).


The documentation for this class was generated from the following file: