Belle II Software
release-08-01-10
|
The ParticleType class for identifying different particle types. More...
#include <Const.h>
Public Member Functions | |
ParticleType (int pdgCode, const ParticleSet *set=nullptr, int index=-1) | |
Constructor. More... | |
ParticleType (const ParticleType &)=default | |
Copy constructor | |
ParticleType & | operator= (const ParticleType &)=default |
Assignment Operator. | |
bool | operator< (const ParticleType &other) const |
Comparison operator to be usable in sets. More... | |
bool | operator== (const ParticleType &o) const |
Test equality. | |
bool | operator!= (const ParticleType &o) const |
Test inequality. | |
ParticleType & | operator* () |
dummy dereferencing for range-based for. | |
ParticleType & | operator++ () |
Prefix increment. More... | |
ParticleType | operator++ (int) |
Postfix increment. More... | |
operator ParticleSet () const | |
Conversion of ParticleType to ParticleSet. | |
int | getIndex () const |
This particle's index in the associated set. More... | |
const TParticlePDG * | getParticlePDG () const |
Accessor for ROOT TParticlePDG object. More... | |
int | getPDGCode () const |
PDG code. More... | |
double | getMass () const |
Particle mass. More... | |
std::string | __repr__ () const |
String for printing in python. | |
Private Attributes | |
int | m_pdgCode |
PDG code of the particle. | |
const ParticleSet * | m_set |
set this particle belongs to, or NULL if stand-alone. | |
int | m_index |
index in the associated set, -1 if there's no set. | |
The ParticleType class for identifying different particle types.
Particle Data Group (PDG) codes are used for specifying types, for a detailed explanation and tables please refer to: https://pdg.web.cern.ch/pdg/2012/mcdata/mc_particle_id_contents.html
|
inlineexplicit |
|
inline |
double getMass | ( | void | ) | const |
const TParticlePDG * getParticlePDG | ( | ) | const |
Accessor for ROOT TParticlePDG object.
Definition at line 351 of file UnitConst.cc.
|
inline |
Const::ParticleType & operator++ | ( | ) |
Prefix increment.
Incrementing past the last element of a set will return an invalid particle.
Definition at line 333 of file UnitConst.cc.
Const::ParticleType operator++ | ( | int | ) |
Postfix increment.
Incrementing past the last element of a set will yield an invalid particle.
Definition at line 344 of file UnitConst.cc.
bool operator< | ( | const ParticleType & | other | ) | const |
Comparison operator to be usable in sets.
other | the type of the other particle for the comparison. |
Definition at line 328 of file UnitConst.cc.