EpIC 1.1.0
Monte Carlo generator for exclusive processes
|
Definition of enumeration values for particle types. More...
#include <ParticleType.h>
Public Types | |
enum | Type { UNDEFINED = 0 , ELECTRON = 11 , POSITRON = -11 , MUON_MINUS = 13 , MUON_PLUS = -13 , TAU_MINUS = 15 , TAU_PLUS = -15 , PHOTON = 22 , PI0 = 111 , PROTON = 2212 } |
Public Member Functions | |
ParticleType () | |
ParticleType (Type type) | |
ParticleType (const ParticleType &other) | |
operator Type () const | |
std::string | toString () const |
double | getMass () const |
int | getCharge () const |
ParticleType::Type | getType () const |
void | setType (Type type) |
Static Public Member Functions | |
static ParticleType::Type | fromString (const std::string &str) |
Definition of enumeration values for particle types.
This class defines a set of enumeration values that are used to distinguish between particle types. In addition, a declared object of this class is always associated to one type (see ParticleType::m_type), so member functions can act on it.
Definition of enumerate values corresponding to particle types. According to PDG codes: http://pdg.lbl.gov/2007/reviews/montecarlorpp.pdf
Enumerator | |
---|---|
UNDEFINED | Undefined type. |
ELECTRON | electron |
POSITRON | positron |
MUON_MINUS | muon - |
MUON_PLUS | muon + |
TAU_MINUS | tau - |
TAU_PLUS | tau + |
PHOTON | gamma |
PI0 | pi0 |
PROTON | proton |
EPIC::ParticleType::ParticleType | ( | ) |
Default constructor.
EPIC::ParticleType::ParticleType | ( | Type | type | ) |
Assignment constructor.
type | Type to be assigned. |
EPIC::ParticleType::ParticleType | ( | const ParticleType & | other | ) |
Copy constructor.
other | Object to be copied. |
|
static |
Get type from string.
String. |
int EPIC::ParticleType::getCharge | ( | ) | const |
Get charge of associated particle.
double EPIC::ParticleType::getMass | ( | ) | const |
Get mass of associated particle.
ParticleType::Type EPIC::ParticleType::getType | ( | ) | const |
Get type being assigned to a declared object of this class.
EPIC::ParticleType::operator Type | ( | ) | const |
Automatic cast to enum.
void EPIC::ParticleType::setType | ( | Type | type | ) |
Assign type to a declared object of this class.