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

#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...
 
double getMomentumTolerance () const
 Get the momentum tolerance. More...
 
void setQ (double q)
 Set reference charge expressed in proton charges. More...
 
void setM (double m)
 Set reference mass expressed in eV/c^2. 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 setMomentumTolerance (double tolerance)
 Set the momentum tolerance. More...
 

Protected Attributes

double charge_m
 
double mass_m
 
double beta_m
 
double gamma_m
 
double momentumTolerance_m = 1e-2
 

Detailed Description

Class PartData

Particle reference data. This class encapsulates the reference data for a beam: [UL] [LI]charge per particle expressed in proton charges, [LI]mass per particle expressed in eV, [LI]reference momentum per particle expressed in eV. [LI]momentumTolerance Fractional tolerance to deviations in the distribution compared to the reference data at initialisation If negative, no tolerance checking is done. [/UL] The copy constructor, destructor, and assignment operator generated by the compiler perform the correct operation. For speed reasons they are not implemented.

Definition at line 38 of file PartData.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 25 of file PartData.cpp.

References charge_m, mass_m, and setP().

Here is the call graph for this function:

PartData::PartData ( )

Definition at line 32 of file PartData.cpp.

References beta_m, charge_m, gamma_m, and mass_m.

Member Function Documentation

double PartData::getBeta ( ) const
inline
double PartData::getE ( ) const
inline

The constant reference Energy per particle.

Definition at line 130 of file PartData.h.

References gamma_m, and mass_m.

Referenced by PartBunchBase< T, Dim >::getE().

double PartData::getGamma ( ) const
inline
double PartData::getM ( ) const
inline
double PartData::getMomentumTolerance ( ) const
inline

Get the momentum tolerance.

Definition at line 142 of file PartData.h.

References momentumTolerance_m.

Referenced by PartBunchBase< T, Dim >::getMomentumTolerance().

double PartData::getP ( ) const
inline

The constant reference momentum per particle.

Definition at line 126 of file PartData.h.

References beta_m, gamma_m, and mass_m.

Referenced by Tracker::applyDrift(), Tracker::applyTransform(), ParallelTTracker::execute(), PartBunchBase< T, Dim >::getP(), Beam::print(), and ThickTracker::visitMultipole().

double PartData::getQ ( ) const
inline
void PartData::setBeta ( double  beta)

Set beta.

Definition at line 69 of file PartData.cpp.

References beta_m, gamma_m, and sqrt().

Here is the call graph for this function:

void PartData::setE ( double  E)

Set reference energy.

Definition at line 57 of file PartData.cpp.

References beta_m, gamma_m, mass_m, and sqrt().

Referenced by Beam::update().

Here is the call graph for this function:

void PartData::setGamma ( double  gamma)

Set gamma.

Definition at line 79 of file PartData.cpp.

References beta_m, gamma_m, and sqrt().

Referenced by Beam::update().

Here is the call graph for this function:

void PartData::setM ( double  m)
inline

Set reference mass expressed in eV/c^2.

Definition at line 110 of file PartData.h.

References mass_m.

void PartData::setMomentumTolerance ( double  tolerance)

Set the momentum tolerance.

Definition at line 88 of file PartData.cpp.

References momentumTolerance_m.

Referenced by Beam::update().

void PartData::setP ( double  p)

Set reference momentum.

Definition at line 40 of file PartData.cpp.

References beta_m, Physics::e, gamma_m, mass_m, and sqrt().

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

Here is the call graph for this function:

void PartData::setQ ( double  q)
inline

Set reference charge expressed in proton charges.

Definition at line 114 of file PartData.h.

References charge_m.

Member Data Documentation

double PartData::beta_m
protected

Definition at line 102 of file PartData.h.

Referenced by getBeta(), getP(), PartData(), setBeta(), setE(), setGamma(), and setP().

double PartData::charge_m
protected

Definition at line 100 of file PartData.h.

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

double PartData::gamma_m
protected

Definition at line 103 of file PartData.h.

Referenced by getE(), getGamma(), getP(), PartData(), setBeta(), setE(), setGamma(), and setP().

double PartData::mass_m
protected

Definition at line 101 of file PartData.h.

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

double PartData::momentumTolerance_m = 1e-2
protected

Definition at line 104 of file PartData.h.

Referenced by getMomentumTolerance(), and setMomentumTolerance().


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