Class which represents a particle.
More...
#include <particle.h>
|
| | Particle (Eigen::Vector3d &position, Eigen::Vector3d &direction, double energy) |
| | Constructor for the Particle class.
|
| |
| Eigen::Vector3d | getPosition () const |
| | Returns the position of the particle.
|
| |
| Eigen::Vector3d | getDirection () const |
| | Returns the direction of the particle.
|
| |
| double | getEnergy () const |
| | Returns the energy of the particle.
|
| |
| void | move (const double &distance) |
| | Moves the particle by the given distance in the direction of the particle.
|
| |
| void | setDirection (const Eigen::Vector3d &newDirection) |
| | Sets the direction of the particle.
|
| |
| void | rotate (const double &theta, const double &phi) |
| | Rotates the particle by the given angles with respect to the initial direction of the particle, represented by the z axis.
|
| |
| void | setEnergy (const double &newEnergy) |
| | Sets the energy of the particle.
|
| |
| bool | isTerminated () const |
| | Returns whether or not the particle has terminated.
|
| |
| void | terminate () |
| | Terminates the particle.
|
| |
| bool | isPrimary () const |
| | Returns whether or not the particle is primary.
|
| |
| void | setPrimary (bool primary_status) |
| | Sets whether or not the particle is primary.
|
| |
Class which represents a particle.
This class contains the properties of a particle.
Definition at line 36 of file particle.h.
◆ Particle()
| Particle::Particle |
( |
Eigen::Vector3d & | position, |
|
|
Eigen::Vector3d & | direction, |
|
|
double | energy ) |
Constructor for the Particle class.
- Parameters
-
| position | The initial position of the particle. |
| direction | The initial direction of the particle. |
| energy | The initial energy of the particle. |
◆ getDirection()
| Eigen::Vector3d Particle::getDirection |
( |
| ) |
const |
|
inline |
Returns the direction of the particle.
- Returns
- The direction of the particle.
Definition at line 60 of file particle.h.
◆ getEnergy()
| double Particle::getEnergy |
( |
| ) |
const |
|
inline |
Returns the energy of the particle.
- Returns
- The energy of the particle.
Definition at line 67 of file particle.h.
◆ getPosition()
| Eigen::Vector3d Particle::getPosition |
( |
| ) |
const |
|
inline |
Returns the position of the particle.
- Returns
- The position of the particle.
Definition at line 53 of file particle.h.
◆ isPrimary()
| bool Particle::isPrimary |
( |
| ) |
const |
|
inline |
Returns whether or not the particle is primary.
- Returns
- Whether or not the particle is primary.
Definition at line 129 of file particle.h.
◆ isTerminated()
| bool Particle::isTerminated |
( |
| ) |
const |
|
inline |
Returns whether or not the particle has terminated.
- Returns
- Whether or not the particle has terminated.
Definition at line 113 of file particle.h.
◆ move()
| void Particle::move |
( |
const double & | distance | ) |
|
|
inline |
Moves the particle by the given distance in the direction of the particle.
- Parameters
-
| distance | The distance to move the particle by. |
Definition at line 74 of file particle.h.
◆ rotate()
| void Particle::rotate |
( |
const double & | theta, |
|
|
const double & | phi ) |
|
inline |
Rotates the particle by the given angles with respect to the initial direction of the particle, represented by the z axis.
The z
- Parameters
-
| theta | The polar angle to rotate the particle by. |
| phi | The azimuthal to rotate the particle by. |
Definition at line 95 of file particle.h.
◆ setDirection()
| void Particle::setDirection |
( |
const Eigen::Vector3d & | newDirection | ) |
|
|
inline |
Sets the direction of the particle.
- Parameters
-
| newDirection | The new direction of the particle. |
Definition at line 83 of file particle.h.
◆ setEnergy()
| void Particle::setEnergy |
( |
const double & | newEnergy | ) |
|
|
inline |
Sets the energy of the particle.
- Parameters
-
| newEnergy | The new energy of the particle. |
Definition at line 104 of file particle.h.
◆ setPrimary()
| void Particle::setPrimary |
( |
bool | primary_status | ) |
|
|
inline |
Sets whether or not the particle is primary.
- Parameters
-
| primary_status | Whether or not the particle is primary. |
Definition at line 138 of file particle.h.
◆ terminate()
| void Particle::terminate |
( |
| ) |
|
|
inline |
Terminates the particle.
Definition at line 120 of file particle.h.
◆ direction_
| Eigen::Vector3d Particle::direction_ |
|
private |
◆ energy_
| double Particle::energy_ {} |
|
private |
◆ isPrimary_
| bool Particle::isPrimary_ = true |
|
private |
◆ position_
| Eigen::Vector3d Particle::position_ |
|
private |
◆ terminated_
| bool Particle::terminated_ = false |
|
private |
The documentation for this class was generated from the following file: