OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
ParticleProperties Class Reference

#include <ParticleProperties.h>

Collaboration diagram for ParticleProperties:
Collaboration graph

Static Public Member Functions

static ParticleType getParticleType (const std::string &str)
 
static std::string getParticleTypeString (const ParticleType &type)
 
static double getParticleMass (const ParticleType &type)
 
static double getParticleCharge (const ParticleType &type)
 
static double getParticleChargeInCoulomb (const ParticleType &type)
 
static double getParticleLifetime (const ParticleType &type)
 Return the mean rest-frame lifetime [s]. Throws if the particle is stable.
 
static double getParticleAnomaly (const ParticleType &type)
 

Static Private Attributes

static const BiMap< ParticleType, std::string > bmParticleType_s
 
static const std::map< ParticleType, double > particleMass_m
 
static const std::map< ParticleType, double > particleCharge_m
 
static const std::map< ParticleType, double > particleLifetime_m
 

Detailed Description

Definition at line 48 of file ParticleProperties.h.

Member Function Documentation

◆ getParticleAnomaly()

double ParticleProperties::getParticleAnomaly ( const ParticleType type)
static

Return the magnetic moment anomaly G = (g-2)/2. Zero for species that are spin-0, not yet tabulated, or unsupported.

Definition at line 58 of file ParticleProperties.cpp.

References Physics::a_e, Physics::a_mu, Physics::a_p, ANTIPROTON, ELECTRON, MUON, POSITRON, and PROTON.

Referenced by Beam::update().

◆ getParticleCharge()

double ParticleProperties::getParticleCharge ( const ParticleType type)
static

Definition at line 40 of file ParticleProperties.cpp.

References particleCharge_m.

Referenced by getParticleChargeInCoulomb(), and Beam::update().

◆ getParticleChargeInCoulomb()

double ParticleProperties::getParticleChargeInCoulomb ( const ParticleType type)
static

Definition at line 44 of file ParticleProperties.cpp.

References getParticleCharge(), and Physics::q_e.

Here is the call graph for this function:

◆ getParticleLifetime()

double ParticleProperties::getParticleLifetime ( const ParticleType type)
static

Return the mean rest-frame lifetime [s]. Throws if the particle is stable.

Definition at line 48 of file ParticleProperties.cpp.

References getParticleTypeString(), and particleLifetime_m.

Here is the call graph for this function:

◆ getParticleMass()

double ParticleProperties::getParticleMass ( const ParticleType type)
static

Definition at line 36 of file ParticleProperties.cpp.

References particleMass_m.

Referenced by Beam::update().

◆ getParticleType()

◆ getParticleTypeString()

std::string ParticleProperties::getParticleTypeString ( const ParticleType type)
static

Member Data Documentation

◆ bmParticleType_s

const BiMap< ParticleType, std::string > ParticleProperties::bmParticleType_s
staticprivate
Initial value:
= []() {
bimap.insert(ParticleType::UNNAMED, "UNNAMED");
bimap.insert(ParticleType::PHOTON, "PHOTON");
bimap.insert(ParticleType::ELECTRON, "ELECTRON");
bimap.insert(ParticleType::POSITRON, "POSITRON");
bimap.insert(ParticleType::MUON, "MUON");
bimap.insert(ParticleType::PION, "PION");
bimap.insert(ParticleType::PROTON, "PROTON");
bimap.insert(ParticleType::ANTIPROTON, "ANTIPROTON");
bimap.insert(ParticleType::DEUTERON, "DEUTERON");
bimap.insert(ParticleType::HMINUS, "HMINUS");
bimap.insert(ParticleType::HYDROGEN, "HYDROGEN");
bimap.insert(ParticleType::H2P, "H2P");
bimap.insert(ParticleType::H3P, "H3P");
bimap.insert(ParticleType::ALPHA, "ALPHA");
bimap.insert(ParticleType::CARBON, "CARBON");
bimap.insert(ParticleType::XENON, "XENON");
bimap.insert(ParticleType::URANIUM, "URANIUM");
return bimap;
}()
Simple bidirectional map with lookup in both directions.
Definition BiMap.h:28
void insert(const Left &left, const Right &right)
Insert or overwrite a left/right association.
Definition BiMap.h:99

Definition at line 73 of file ParticleProperties.h.

Referenced by getParticleType(), and getParticleTypeString().

◆ particleCharge_m

const std::map< ParticleType, double > ParticleProperties::particleCharge_m
staticprivate

◆ particleLifetime_m

const std::map< ParticleType, double > ParticleProperties::particleLifetime_m
staticprivate
Initial value:
= {
constexpr double tau_mu
Muon mean lifetime at rest [s] (PDG)
Definition Physics.h:132
constexpr double tau_pi
Charged pion mean lifetime at rest [s] (PDG)
Definition Physics.h:141

Definition at line 123 of file ParticleProperties.h.

Referenced by getParticleLifetime().

◆ particleMass_m

const std::map< ParticleType, double > ParticleProperties::particleMass_m
staticprivate
Initial value:
= {
constexpr double m_xe
The xenon-129 (fully-stripped) rest mass in GeV.
Definition Physics.h:147
constexpr double m_alpha
The alpha particle rest mass in GeV.
Definition Physics.h:150
constexpr double m_u
The uranium-238 (fully-stripped) rest mass in GeV.
Definition Physics.h:126
constexpr double m_pi
The charged pion rest mass in GeV (PDG)
Definition Physics.h:138
constexpr double m_p
The proton rest mass in GeV.
Definition Physics.h:105
constexpr double m_h3p
The H3+ rest mass in GeV.
Definition Physics.h:159
constexpr double m_h2p
The H2+ rest mass in GeV.
Definition Physics.h:156
constexpr double m_e
The electron rest mass in GeV.
Definition Physics.h:93
constexpr double m_hm
The H- rest mass in GeV.
Definition Physics.h:123
constexpr double m_h
The hydrogen atom rest mass in GeV.
Definition Physics.h:153
constexpr double m_mu
The muon rest mass in GeV.
Definition Physics.h:129
constexpr double m_c
The carbon-12 (fully-stripped) rest mass in GeV.
Definition Physics.h:120
constexpr double m_d
The deuteron rest mass in GeV.
Definition Physics.h:144

Definition at line 95 of file ParticleProperties.h.

Referenced by getParticleMass().


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