The ParticleType class for identifying different particle types.
More...
#include <Const.h>
|
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
Definition at line 408 of file Const.h.
◆ ParticleType()
Constructor.
- Parameters
-
pdgCode | the Particle Data Group code that identifies the particle. |
set | Pointer to set this particle belongs to (or NULL if stand-alone). |
index | Index of this particle in 'set'. |
Definition at line 417 of file Const.h.
417 :
int m_index
index in the associated set, -1 if there's no set.
int m_pdgCode
PDG code of the particle.
const ParticleSet * m_set
set this particle belongs to, or NULL if stand-alone.
◆ __repr__()
std::string __repr__ |
( |
| ) |
const |
String for printing in python.
Definition at line 361 of file UnitConst.cc.
362{
363 std::string result = "<type: ";
365 result += ">";
366 return result;
367}
const TParticlePDG * getParticlePDG() const
Accessor for ROOT TParticlePDG object.
◆ getIndex()
This particle's index in the associated set.
In case the particle has no set, -1 is returned.
Definition at line 461 of file Const.h.
◆ getMass()
◆ getParticlePDG()
const TParticlePDG * getParticlePDG |
( |
| ) |
const |
Accessor for ROOT TParticlePDG object.
- Returns
- The TParticlePDG object for this type of particle.
Definition at line 351 of file UnitConst.cc.
352{
354}
static EvtGenDatabasePDG * Instance()
Instance method that loads the EvtGen table.
◆ getPDGCode()
PDG code.
- Returns
- The PDG code of the particle.
Definition at line 473 of file Const.h.
◆ operator ParticleSet()
◆ operator!=()
Test inequality.
Definition at line 435 of file Const.h.
435{ return !((*this) == o); }
◆ operator*()
dummy dereferencing for range-based for.
Definition at line 438 of file Const.h.
◆ operator++() [1/2]
Prefix increment.
Incrementing past the last element of a set will return an invalid particle.
Definition at line 333 of file UnitConst.cc.
334{
337 } else {
339 }
340
341 return *this;
342}
const ParticleType & at(unsigned int index) const
Return particle at given index, or end() if out of range.
int getPDGCode() const
PDG code.
static const ParticleType invalidParticle
Invalid particle, used internally.
◆ operator++() [2/2]
Postfix increment.
Incrementing past the last element of a set will yield an invalid particle.
Definition at line 344 of file UnitConst.cc.
345{
347 ++(*this);
348 return p;
349}
The ParticleType class for identifying different particle types.
◆ operator<()
Comparison operator to be usable in sets.
- Parameters
-
other | the type of the other particle for the comparison. |
Definition at line 328 of file UnitConst.cc.
◆ operator==()
Test equality.
Definition at line 432 of file Const.h.
◆ m_index
index in the associated set, -1 if there's no set.
Definition at line 489 of file Const.h.
◆ m_pdgCode
PDG code of the particle.
Definition at line 487 of file Const.h.
◆ m_set
set this particle belongs to, or NULL if stand-alone.
Definition at line 488 of file Const.h.
The documentation for this class was generated from the following files: