OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
PartData Class Reference

#include <PartData.h>

Collaboration diagram for PartData:

Public Member Functions

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

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() [1/2]

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() [2/2]

PartData::PartData ( )

Definition at line 32 of file PartData.cpp.

References beta_m, charge_m, gamma_m, and mass_m.

Member Function Documentation

◆ getBeta()

double PartData::getBeta ( ) const
inline

The relativistic beta per particle.

Definition at line 134 of file PartData.h.

References beta_m.

◆ getE()

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.

◆ getGamma()

double PartData::getGamma ( ) const
inline

The relativistic gamma per particle.

Definition at line 138 of file PartData.h.

References gamma_m.

◆ getM()

double PartData::getM ( ) const
inline

The constant mass per particle.

Definition at line 122 of file PartData.h.

References mass_m.

◆ getMomentumTolerance()

double PartData::getMomentumTolerance ( ) const
inline

Get the momentum tolerance.

Definition at line 142 of file PartData.h.

References momentumTolerance_m.

◆ getP()

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.

◆ getQ()

double PartData::getQ ( ) const
inline

The constant charge per particle.

Definition at line 118 of file PartData.h.

References charge_m.

◆ setBeta()

void PartData::setBeta ( double beta)

Set beta.

Definition at line 69 of file PartData.cpp.

References beta_m, and gamma_m.

◆ setE()

void PartData::setE ( double E)

Set reference energy.

Definition at line 57 of file PartData.cpp.

References beta_m, gamma_m, and mass_m.

◆ setGamma()

void PartData::setGamma ( double gamma)

Set gamma.

Definition at line 79 of file PartData.cpp.

References beta_m, and gamma_m.

◆ setM()

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.

◆ setMomentumTolerance()

void PartData::setMomentumTolerance ( double tolerance)

Set the momentum tolerance.

Definition at line 88 of file PartData.cpp.

References momentumTolerance_m.

◆ setP()

void PartData::setP ( double p)

Set reference momentum.

Definition at line 40 of file PartData.cpp.

References beta_m, gamma_m, and mass_m.

Referenced by PartData().

◆ setQ()

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

◆ beta_m

double PartData::beta_m
protected

Definition at line 102 of file PartData.h.

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

◆ charge_m

double PartData::charge_m
protected

Definition at line 100 of file PartData.h.

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

◆ gamma_m

double PartData::gamma_m
protected

Definition at line 103 of file PartData.h.

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

◆ mass_m

double PartData::mass_m
protected

Definition at line 101 of file PartData.h.

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

◆ momentumTolerance_m

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: