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

#include <OpalParticle.h>

Collaboration diagram for OpalParticle:
Collaboration graph

Public Types

enum  { X , Y , L , INVALID }
 
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.
 
 OpalParticle (int64_t id, Vector_t< double, 3 > const &R, Vector_t< double, 3 > const &P, double time, double q, double m)
 
 OpalParticle ()
 
void setX (double)
 Set the horizontal position in m.
 
void setPx (double)
 Set the horizontal momentum.
 
void setY (double)
 Set the vertical displacement in m.
 
void setPy (double)
 Set the vertical momentum.
 
void setZ (double)
 Set longitudinal position in m.
 
void setPz (double)
 Set the longitudinal momentum.
 
void setR (Vector_t< double, 3 > const &)
 Set position in m.
 
void setP (Vector_t< double, 3 > const &)
 Set momentum.
 
void setTime (double t)
 Set the time.
 
int64_t getId () const
 Get the id of the particle.
 
double operator[] (unsigned int) const
 Get coordinate.
 
double getX () const
 Get horizontal position in m.
 
double getPx () const
 Get horizontal momentum (no dimension).
 
double getY () const
 Get vertical displacement in m.
 
double getPy () const
 Get vertical momentum (no dimension).
 
double getZ () const
 Get longitudinal displacement c*t in m.
 
double getPz () const
 Get relative momentum error (no dimension).
 
const Vector_t< double, 3 > & getR () const
 Get position in m.
 
const Vector_t< double, 3 > & getP () const
 Get momentum.
 
double getTime () const
 Get time.
 
double getCharge () const
 Get charge in Coulomb.
 
double getMass () const
 Get mass in GeV/c^2.
 
 OpalParticle (std::size_t id, double x, double px, double y, double py, double z, double pz, double time, double q, double m)
 Constructor.
 
 OpalParticle (std::size_t id, Vector_t< double, 3 > const &R, Vector_t< double, 3 > const &P, double time, double q, double m)
 
 OpalParticle ()
 
void setX (double)
 Set the horizontal position in m.
 
void setPx (double)
 Set the horizontal momentum.
 
void setY (double)
 Set the vertical displacement in m.
 
void setPy (double)
 Set the vertical momentum.
 
void setZ (double)
 Set longitudinal position in m.
 
void setPz (double)
 Set the longitudinal momentum.
 
void setR (Vector_t< double, 3 > const &)
 Set position in m.
 
void setP (Vector_t< double, 3 > const &)
 Set momentum.
 
void setTime (double t)
 Set the time.
 
int64_t getId () const
 Get the id of the particle.
 
double operator[] (unsigned int) const
 Get coordinate.
 
double getX () const
 Get horizontal position in m.
 
double getPx () const
 Get horizontal momentum (no dimension).
 
double getY () const
 Get vertical displacement in m.
 
double getPy () const
 Get vertical momentum (no dimension).
 
double getZ () const
 Get longitudinal displacement c*t in m.
 
double getPz () const
 Get relative momentum error (no dimension).
 
const Vector_t< double, 3 > & getR () const
 Get position in m.
 
const Vector_t< double, 3 > & getP () const
 Get momentum.
 
double getTime () const
 Get time.
 
double getCharge () const
 Get charge in Coulomb.
 
double getMass () const
 Get mass in GeV/c^2.
 

Private Attributes

int64_t id_m
 
Vector_t< double, 3 > R_m
 
Vector_t< double, 3 > P_m
 
double time_m
 
double charge_m
 
double mass_m
 

Detailed Description

Definition at line 28 of file AbstractObjects/OpalParticle.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
INVALID 

Definition at line 31 of file AbstractObjects/OpalParticle.h.

◆ anonymous enum

anonymous enum
Enumerator
INVALID 

Definition at line 27 of file Algorithms/OpalParticle.h.

Constructor & Destructor Documentation

◆ OpalParticle() [1/6]

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 22 of file AbstractObjects/OpalParticle.cpp.

◆ OpalParticle() [2/6]

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

Definition at line 27 of file AbstractObjects/OpalParticle.cpp.

◆ OpalParticle() [3/6]

OpalParticle::OpalParticle ( )

Definition at line 20 of file AbstractObjects/OpalParticle.cpp.

◆ OpalParticle() [4/6]

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

Constructor.

Definition at line 23 of file Algorithms/OpalParticle.cpp.

◆ OpalParticle() [5/6]

OpalParticle::OpalParticle ( std::size_t  id,
Vector_t< double, 3 > const &  R,
Vector_t< double, 3 > const &  P,
double  time,
double  q,
double  m 
)

Definition at line 28 of file Algorithms/OpalParticle.cpp.

◆ OpalParticle() [6/6]

OpalParticle::OpalParticle ( )

Member Function Documentation

◆ getCharge() [1/2]

double OpalParticle::getCharge ( ) const
inline

Get charge in Coulomb.

Definition at line 164 of file AbstractObjects/OpalParticle.h.

References charge_m.

Referenced by LossDataSink::computeSetStatistics(), and LossDataSink::saveH5().

◆ getCharge() [2/2]

double OpalParticle::getCharge ( ) const

Get charge in Coulomb.

◆ getId() [1/2]

int64_t OpalParticle::getId ( ) const
inline

Get the id of the particle.

Definition at line 139 of file AbstractObjects/OpalParticle.h.

References id_m.

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

◆ getId() [2/2]

int64_t OpalParticle::getId ( ) const

Get the id of the particle.

◆ getMass() [1/2]

double OpalParticle::getMass ( ) const
inline

Get mass in GeV/c^2.

Definition at line 166 of file AbstractObjects/OpalParticle.h.

References mass_m.

Referenced by LossDataSink::computeSetStatistics(), and LossDataSink::saveH5().

◆ getMass() [2/2]

double OpalParticle::getMass ( ) const

Get mass in GeV/c^2.

◆ getP() [1/2]

const Vector_t< double, 3 > & OpalParticle::getP ( ) const
inline

Get momentum.

Definition at line 160 of file AbstractObjects/OpalParticle.h.

References P_m.

Referenced by LossDataSink::computeSetStatistics().

◆ getP() [2/2]

const Vector_t< double, 3 > & OpalParticle::getP ( ) const

Get momentum.

◆ getPx() [1/2]

double OpalParticle::getPx ( ) const
inline

Get horizontal momentum (no dimension).

Definition at line 152 of file AbstractObjects/OpalParticle.h.

References P_m, and X.

Referenced by LossDataSink::computeSetStatistics(), LossDataSink::saveASCII(), and LossDataSink::saveH5().

◆ getPx() [2/2]

double OpalParticle::getPx ( ) const

Get horizontal momentum (no dimension).

◆ getPy() [1/2]

double OpalParticle::getPy ( ) const
inline

Get vertical momentum (no dimension).

Definition at line 154 of file AbstractObjects/OpalParticle.h.

References P_m, and Y.

Referenced by LossDataSink::computeSetStatistics(), LossDataSink::saveASCII(), and LossDataSink::saveH5().

◆ getPy() [2/2]

double OpalParticle::getPy ( ) const

Get vertical momentum (no dimension).

◆ getPz() [1/2]

double OpalParticle::getPz ( ) const
inline

Get relative momentum error (no dimension).

Definition at line 156 of file AbstractObjects/OpalParticle.h.

References L, and P_m.

Referenced by LossDataSink::computeSetStatistics(), LossDataSink::saveASCII(), and LossDataSink::saveH5().

◆ getPz() [2/2]

double OpalParticle::getPz ( ) const

Get relative momentum error (no dimension).

◆ getR() [1/2]

const Vector_t< double, 3 > & OpalParticle::getR ( ) const
inline

Get position in m.

Definition at line 158 of file AbstractObjects/OpalParticle.h.

References R_m.

◆ getR() [2/2]

const Vector_t< double, 3 > & OpalParticle::getR ( ) const

Get position in m.

◆ getTime() [1/2]

double OpalParticle::getTime ( ) const
inline

◆ getTime() [2/2]

double OpalParticle::getTime ( ) const

Get time.

◆ getX() [1/2]

double OpalParticle::getX ( ) const
inline

Get horizontal position in m.

Definition at line 146 of file AbstractObjects/OpalParticle.h.

References R_m, and X.

Referenced by LossDataSink::computeSetStatistics(), LossDataSink::saveASCII(), and LossDataSink::saveH5().

◆ getX() [2/2]

double OpalParticle::getX ( ) const

Get horizontal position in m.

◆ getY() [1/2]

double OpalParticle::getY ( ) const
inline

Get vertical displacement in m.

Definition at line 148 of file AbstractObjects/OpalParticle.h.

References R_m, and Y.

Referenced by LossDataSink::computeSetStatistics(), LossDataSink::saveASCII(), and LossDataSink::saveH5().

◆ getY() [2/2]

double OpalParticle::getY ( ) const

Get vertical displacement in m.

◆ getZ() [1/2]

double OpalParticle::getZ ( ) const
inline

Get longitudinal displacement c*t in m.

Definition at line 150 of file AbstractObjects/OpalParticle.h.

References L, and R_m.

Referenced by LossDataSink::computeSetStatistics(), LossDataSink::saveASCII(), and LossDataSink::saveH5().

◆ getZ() [2/2]

double OpalParticle::getZ ( ) const

Get longitudinal displacement c*t in m.

◆ operator[]() [1/2]

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

Get coordinate.

Definition at line 141 of file AbstractObjects/OpalParticle.h.

References P_m, and R_m.

◆ operator[]() [2/2]

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

Get coordinate.

◆ setP() [1/2]

void OpalParticle::setP ( Vector_t< double, 3 > const &  P)
inline

Set momentum.

Definition at line 135 of file AbstractObjects/OpalParticle.h.

References P_m.

◆ setP() [2/2]

void OpalParticle::setP ( Vector_t< double, 3 > const &  )

Set momentum.

◆ setPx() [1/2]

void OpalParticle::setPx ( double  val)
inline

Set the horizontal momentum.

Definition at line 127 of file AbstractObjects/OpalParticle.h.

References P_m, and X.

◆ setPx() [2/2]

void OpalParticle::setPx ( double  )

Set the horizontal momentum.

◆ setPy() [1/2]

void OpalParticle::setPy ( double  val)
inline

Set the vertical momentum.

Definition at line 129 of file AbstractObjects/OpalParticle.h.

References P_m, and Y.

◆ setPy() [2/2]

void OpalParticle::setPy ( double  )

Set the vertical momentum.

◆ setPz() [1/2]

void OpalParticle::setPz ( double  val)
inline

Set the longitudinal momentum.

Definition at line 131 of file AbstractObjects/OpalParticle.h.

References L, and P_m.

◆ setPz() [2/2]

void OpalParticle::setPz ( double  )

Set the longitudinal momentum.

◆ setR() [1/2]

void OpalParticle::setR ( Vector_t< double, 3 > const &  R)
inline

Set position in m.

Definition at line 133 of file AbstractObjects/OpalParticle.h.

References R_m.

◆ setR() [2/2]

void OpalParticle::setR ( Vector_t< double, 3 > const &  )

Set position in m.

◆ setTime() [1/2]

void OpalParticle::setTime ( double  t)
inline

Set the time.

Definition at line 137 of file AbstractObjects/OpalParticle.h.

References time_m.

◆ setTime() [2/2]

void OpalParticle::setTime ( double  t)

Set the time.

◆ setX() [1/2]

void OpalParticle::setX ( double  val)
inline

Set the horizontal position in m.

Definition at line 121 of file AbstractObjects/OpalParticle.h.

References R_m, and X.

◆ setX() [2/2]

void OpalParticle::setX ( double  )

Set the horizontal position in m.

◆ setY() [1/2]

void OpalParticle::setY ( double  val)
inline

Set the vertical displacement in m.

Definition at line 123 of file AbstractObjects/OpalParticle.h.

References R_m, and Y.

◆ setY() [2/2]

void OpalParticle::setY ( double  )

Set the vertical displacement in m.

◆ setZ() [1/2]

void OpalParticle::setZ ( double  val)
inline

Set longitudinal position in m.

Definition at line 125 of file AbstractObjects/OpalParticle.h.

References L, and R_m.

◆ setZ() [2/2]

void OpalParticle::setZ ( double  )

Set longitudinal position in m.

Member Data Documentation

◆ charge_m

double OpalParticle::charge_m
private

Definition at line 117 of file AbstractObjects/OpalParticle.h.

Referenced by getCharge().

◆ id_m

int64_t OpalParticle::id_m
private

Definition at line 113 of file AbstractObjects/OpalParticle.h.

Referenced by getId().

◆ mass_m

double OpalParticle::mass_m
private

Definition at line 118 of file AbstractObjects/OpalParticle.h.

Referenced by getMass().

◆ P_m

Vector_t< double, 3 > OpalParticle::P_m
private

Definition at line 115 of file AbstractObjects/OpalParticle.h.

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

◆ R_m

Vector_t< double, 3 > OpalParticle::R_m
private

Definition at line 114 of file AbstractObjects/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 AbstractObjects/OpalParticle.h.

Referenced by getTime(), and setTime().


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