EpIC 1.1.0
Monte Carlo generator for exclusive processes
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
EPIC::ParticleType Class Reference

Definition of enumeration values for particle types. More...

#include <ParticleType.h>

Inheritance diagram for EPIC::ParticleType:

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)
 

Detailed Description

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.

Member Enumeration Documentation

◆ Type

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

Constructor & Destructor Documentation

◆ ParticleType() [1/3]

EPIC::ParticleType::ParticleType ( )

Default constructor.

◆ ParticleType() [2/3]

EPIC::ParticleType::ParticleType ( Type  type)

Assignment constructor.

Parameters
typeType to be assigned.

◆ ParticleType() [3/3]

EPIC::ParticleType::ParticleType ( const ParticleType other)

Copy constructor.

Parameters
otherObject to be copied.

Member Function Documentation

◆ fromString()

static ParticleType::Type EPIC::ParticleType::fromString ( const std::string &  str)
static

Get type from string.

Parameters
String.
Returns
Associated type.

◆ getCharge()

int EPIC::ParticleType::getCharge ( ) const

Get charge of associated particle.

◆ getMass()

double EPIC::ParticleType::getMass ( ) const

Get mass of associated particle.

◆ getType()

ParticleType::Type EPIC::ParticleType::getType ( ) const

Get type being assigned to a declared object of this class.

◆ operator Type()

EPIC::ParticleType::operator Type ( ) const

Automatic cast to enum.

◆ setType()

void EPIC::ParticleType::setType ( Type  type)

Assign type to a declared object of this class.


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