OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Public Member Functions | Protected Attributes | List of all members
PartData Class Reference

Particle reference data. More...

#include <PartData.h>

Public Member Functions

 PartData (double charge, double mass, double momentum)
 Constructor. More...
 
 PartData ()
 
double getQ () const
 The constant charge per particle. More...
 
double getM () const
 The constant mass per particle. More...
 
double getP () const
 The constant reference momentum per particle. More...
 
double getE () const
 The constant reference Energy per particle. More...
 
double getBeta () const
 The relativistic beta per particle. More...
 
double getGamma () const
 The relativistic gamma per particle. More...
 
void setP (double p)
 Set reference momentum. More...
 
void setE (double E)
 Set reference energy. More...
 
void setBeta (double beta)
 Set beta. More...
 
void setGamma (double gamma)
 Set gamma. More...
 
void setM (double m)
 Set reference mass expressed in eV/c^2. More...
 
void setQ (double q)
 Set reference charge expressed in proton charges,
More...
 

Protected Attributes

double charge
 
double mass
 
double beta
 
double gamma
 

Detailed Description

Particle reference data.

Definition at line 35 of file PartData.h.

Constructor & Destructor Documentation

◆ PartData() [1/2]

PartData::PartData ( double  charge,
double  mass,
double  momentum 
)

Constructor.

Definition at line 29 of file PartData.cpp.

References charge, mass, and setP().

Here is the call graph for this function:

◆ PartData() [2/2]

PartData::PartData ( )

Definition at line 36 of file PartData.cpp.

References beta, charge, gamma, and mass.

Member Function Documentation

◆ getBeta()

double PartData::getBeta ( ) const
inline

The relativistic beta per particle.

Definition at line 124 of file PartData.h.

References beta.

Referenced by Tracker::applyDrift(), Tracker::applyTransform(), ParallelCyclotronTracker::visitCyclotron(), and ParallelCyclotronTracker::visitRing().

◆ getE()

double PartData::getE ( ) const
inline

The constant reference Energy per particle.

Definition at line 119 of file PartData.h.

References gamma, and mass.

◆ getGamma()

double PartData::getGamma ( ) const
inline

◆ getM()

double PartData::getM ( ) const
inline

◆ getP()

double PartData::getP ( ) const
inline

The constant reference momentum per particle.

Definition at line 114 of file PartData.h.

References beta, gamma, and mass.

Referenced by Tracker::applyDrift(), Tracker::applyTransform(), ParallelTTracker::execute(), Beam::print(), and ThickTracker::visitMultipole().

◆ getQ()

double PartData::getQ ( ) const
inline

◆ setBeta()

void PartData::setBeta ( double  beta)

Set beta.

Definition at line 73 of file PartData.cpp.

References beta, gamma, and sqrt().

Here is the call graph for this function:

◆ setE()

void PartData::setE ( double  E)

Set reference energy.

Definition at line 61 of file PartData.cpp.

References beta, gamma, mass, and sqrt().

Referenced by Beam::update().

Here is the call graph for this function:

◆ setGamma()

void PartData::setGamma ( double  gamma)

Set gamma.

Definition at line 83 of file PartData.cpp.

References beta, gamma, and sqrt().

Referenced by Beam::update().

Here is the call graph for this function:

◆ setM()

void PartData::setM ( double  m)
inline

Set reference mass expressed in eV/c^2.

Definition at line 86 of file PartData.h.

References mass.

◆ setP()

void PartData::setP ( double  p)

Set reference momentum.

Definition at line 44 of file PartData.cpp.

References beta, Physics::e, gamma, mass, and sqrt().

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

Here is the call graph for this function:

◆ setQ()

void PartData::setQ ( double  q)
inline

Set reference charge expressed in proton charges,

Definition at line 89 of file PartData.h.

References charge.

Member Data Documentation

◆ beta

double PartData::beta
protected

◆ charge

double PartData::charge
protected

Definition at line 94 of file PartData.h.

Referenced by getQ(), PartData(), and setQ().

◆ gamma

double PartData::gamma
protected

◆ mass

double PartData::mass
protected

Definition at line 95 of file PartData.h.

Referenced by getE(), getM(), getP(), PartData(), setE(), setM(), and setP().


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