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

#include <OpalParticle.h>

Collaboration diagram for OpalParticle:
Collaboration graph
[legend]

Public Types

enum  { X , Y , L , INVALID }
 

Public Member Functions

 OpalParticle (int64_t id, double x, double px, double y, double py, double z, double pz, double time, double q, double m)
 Constructor. More...
 
 OpalParticle (int64_t id, Vector_t const &R, Vector_t const &P, double time, double q, double m)
 
 OpalParticle ()
 
void setX (double)
 Set the horizontal position in m. More...
 
void setPx (double)
 Set the horizontal momentum. More...
 
void setY (double)
 Set the vertical displacement in m. More...
 
void setPy (double)
 Set the vertical momentum. More...
 
void setZ (double)
 Set longitudinal position in m. More...
 
void setPz (double)
 Set the longitudinal momentum. More...
 
void setR (Vector_t const &)
 Set position in m. More...
 
void setP (Vector_t const &)
 Set momentum. More...
 
void setTime (double t)
 Set the time. More...
 
int64_t getId () const
 Get the id of the particle. More...
 
double operator[] (unsigned int) const
 Get coordinate. More...
 
double getX () const
 Get horizontal position in m. More...
 
double getPx () const
 Get horizontal momentum (no dimension). More...
 
double getY () const
 Get vertical displacement in m. More...
 
double getPy () const
 Get vertical momentum (no dimension). More...
 
double getZ () const
 Get longitudinal displacement c*t in m. More...
 
double getPz () const
 Get relative momentum error (no dimension). More...
 
const Vector_tgetR () const
 Get position in m. More...
 
const Vector_tgetP () const
 Get momentum. More...
 
double getTime () const
 Get time. More...
 
double getCharge () const
 Get charge in Coulomb. More...
 
double getMass () const
 Get mass in GeV/c^2. More...
 

Private Attributes

int64_t id_m
 
Vector_t R_m
 
Vector_t P_m
 
double time_m
 
double charge_m
 
double mass_m
 

Detailed Description

Definition at line 23 of file OpalParticle.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
INVALID 

Definition at line 28 of file OpalParticle.h.

Constructor & Destructor Documentation

◆ OpalParticle() [1/3]

OpalParticle::OpalParticle ( int64_t  id,
double  x,
double  px,
double  y,
double  py,
double  z,
double  pz,
double  time,
double  q,
double  m 
)

Constructor.

Definition at line 25 of file OpalParticle.cpp.

◆ OpalParticle() [2/3]

OpalParticle::OpalParticle ( int64_t  id,
Vector_t const &  R,
Vector_t const &  P,
double  time,
double  q,
double  m 
)

Definition at line 39 of file OpalParticle.cpp.

◆ OpalParticle() [3/3]

OpalParticle::OpalParticle ( )

Definition at line 21 of file OpalParticle.cpp.

Member Function Documentation

◆ getCharge()

double OpalParticle::getCharge ( ) const
inline

Get charge in Coulomb.

Definition at line 243 of file OpalParticle.h.

References charge_m.

Referenced by DistributionMoments::computeStatistics(), and LossDataSink::saveH5().

◆ getId()

int64_t OpalParticle::getId ( ) const
inline

Get the id of the particle.

Definition at line 176 of file OpalParticle.h.

References id_m.

Referenced by DistributionMoments::isParticleExcluded(), LossDataSink::saveASCII(), and LossDataSink::saveH5().

◆ getMass()

double OpalParticle::getMass ( ) const
inline

Get mass in GeV/c^2.

Definition at line 249 of file OpalParticle.h.

References mass_m.

Referenced by DistributionMoments::computeMeans(), DistributionMoments::computeStatistics(), and LossDataSink::saveH5().

◆ getP()

const Vector_t & OpalParticle::getP ( ) const
inline

◆ getPx()

double OpalParticle::getPx ( ) const
inline

◆ getPy()

double OpalParticle::getPy ( ) const
inline

◆ getPz()

double OpalParticle::getPz ( ) const
inline

Get relative momentum error (no dimension).

Definition at line 219 of file OpalParticle.h.

References L, and P_m.

Referenced by Tracker::applyTransform(), LossDataSink::computeSetStatistics(), PartBunchBase< T, Dim >::maximumAmplitudes(), LossDataSink::saveASCII(), and LossDataSink::saveH5().

◆ getR()

const Vector_t & OpalParticle::getR ( ) const
inline

Get position in m.

Definition at line 225 of file OpalParticle.h.

References R_m.

Referenced by PartBunchBase< T, Dim >::push_back(), and PartBunchBase< T, Dim >::setParticle().

◆ getTime()

double OpalParticle::getTime ( ) const
inline

◆ getX()

double OpalParticle::getX ( ) const
inline

◆ getY()

double OpalParticle::getY ( ) const
inline

◆ getZ()

double OpalParticle::getZ ( ) const
inline

◆ operator[]()

double OpalParticle::operator[] ( unsigned int  i) const
inline

Get coordinate.

Definition at line 182 of file OpalParticle.h.

References P_m, PAssert_LT, and R_m.

◆ setP()

void OpalParticle::setP ( Vector_t const &  P)
inline

Set momentum.

Definition at line 164 of file OpalParticle.h.

References P_m.

◆ setPx()

void OpalParticle::setPx ( double  val)
inline

Set the horizontal momentum.

Definition at line 140 of file OpalParticle.h.

References P_m, and X.

Referenced by Tracker::applyThinMultipole(), Tracker::applyThinSBend(), and Tracker::applyTransform().

◆ setPy()

void OpalParticle::setPy ( double  val)
inline

Set the vertical momentum.

Definition at line 146 of file OpalParticle.h.

References P_m, and Y.

Referenced by Tracker::applyThinMultipole(), Tracker::applyThinSBend(), and Tracker::applyTransform().

◆ setPz()

void OpalParticle::setPz ( double  val)
inline

Set the longitudinal momentum.

Definition at line 152 of file OpalParticle.h.

References L, and P_m.

◆ setR()

void OpalParticle::setR ( Vector_t const &  R)
inline

Set position in m.

Definition at line 158 of file OpalParticle.h.

References Attrib::Distribution::R, and R_m.

◆ setTime()

void OpalParticle::setTime ( double  t)
inline

Set the time.

Definition at line 170 of file OpalParticle.h.

References time_m.

◆ setX()

void OpalParticle::setX ( double  val)
inline

Set the horizontal position in m.

Definition at line 122 of file OpalParticle.h.

References R_m, and X.

Referenced by Tracker::applyDrift(), and Tracker::applyTransform().

◆ setY()

void OpalParticle::setY ( double  val)
inline

Set the vertical displacement in m.

Definition at line 128 of file OpalParticle.h.

References R_m, and Y.

Referenced by Tracker::applyDrift(), and Tracker::applyTransform().

◆ setZ()

void OpalParticle::setZ ( double  val)
inline

Set longitudinal position in m.

Definition at line 134 of file OpalParticle.h.

References L, and R_m.

Referenced by Tracker::applyDrift(), and Tracker::applyTransform().

Member Data Documentation

◆ charge_m

double OpalParticle::charge_m
private

Definition at line 117 of file OpalParticle.h.

Referenced by getCharge().

◆ id_m

int64_t OpalParticle::id_m
private

Definition at line 113 of file OpalParticle.h.

Referenced by getId().

◆ mass_m

double OpalParticle::mass_m
private

Definition at line 118 of file OpalParticle.h.

Referenced by getMass().

◆ P_m

Vector_t OpalParticle::P_m
private

Definition at line 115 of file OpalParticle.h.

Referenced by getP(), getPx(), getPy(), getPz(), operator[](), setP(), setPx(), setPy(), and setPz().

◆ R_m

Vector_t OpalParticle::R_m
private

Definition at line 114 of file OpalParticle.h.

Referenced by getR(), getX(), getY(), getZ(), operator[](), setR(), setX(), setY(), and setZ().

◆ time_m

double OpalParticle::time_m
private

Definition at line 116 of file OpalParticle.h.

Referenced by getTime(), and setTime().


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