OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
OpalParticle Class Reference

#include <OpalParticle.h>

Collaboration diagram for OpalParticle:

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

References charge_m, id_m, mass_m, P_m, R_m, and time_m.

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

References charge_m, id_m, mass_m, P_m, R_m, and time_m.

◆ OpalParticle() [3/6]

OpalParticle::OpalParticle ( )

Definition at line 21 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.

References charge_m, id_m, mass_m, P_m, R_m, and time_m.

◆ 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 29 of file Algorithms/OpalParticle.cpp.

References charge_m, id_m, mass_m, P_m, R_m, and time_m.

◆ OpalParticle() [6/6]

OpalParticle::OpalParticle ( )

Member Function Documentation

◆ getCharge() [1/2]

double OpalParticle::getCharge ( ) const
inline

Get charge in Coulomb.

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

References charge_m.

Referenced by LossDataSink::saveH5().

Here is the caller graph for this function:

◆ 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 157 of file AbstractObjects/OpalParticle.h.

References id_m.

Referenced by LossDataSink::saveH5().

Here is the caller graph for this function:

◆ 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 206 of file AbstractObjects/OpalParticle.h.

References mass_m.

Referenced by LossDataSink::saveH5().

Here is the caller graph for this function:

◆ getMass() [2/2]

double OpalParticle::getMass ( ) const

Get mass in GeV/c^2.

References charge_m, id_m, mass_m, P_m, R_m, and time_m.

◆ getP() [1/2]

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

Get momentum.

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

References P_m.

◆ 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 178 of file AbstractObjects/OpalParticle.h.

References P_m, and X.

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

Here is the caller graph for this function:

◆ 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 182 of file AbstractObjects/OpalParticle.h.

References P_m, and Y.

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

Here is the caller graph for this function:

◆ 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 186 of file AbstractObjects/OpalParticle.h.

References L, and P_m.

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

Here is the caller graph for this function:

◆ 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 190 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

Get time.

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

References time_m.

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

Here is the caller graph for this function:

◆ 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 166 of file AbstractObjects/OpalParticle.h.

References R_m, and X.

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

Here is the caller graph for this function:

◆ 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 170 of file AbstractObjects/OpalParticle.h.

References R_m, and Y.

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

Here is the caller graph for this function:

◆ 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 174 of file AbstractObjects/OpalParticle.h.

References L, and R_m.

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

Here is the caller graph for this function:

◆ 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 161 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 149 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 133 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 137 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 141 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 145 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 153 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 125 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 129 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

◆ id_m

int64_t OpalParticle::id_m
private

◆ mass_m

double OpalParticle::mass_m
private

◆ P_m

Vector_t< double, 3 > OpalParticle::P_m
private

◆ R_m

Vector_t< double, 3 > OpalParticle::R_m
private

◆ time_m

double OpalParticle::time_m
private

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