MARLEY (Model of Argon Reaction Low Energy Yields)
v1.2.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
|
Momentum four-vector for a simulated particle. More...
#include <Particle.hh>
Public Member Functions | |
Particle (int pdg_code, double E, double px, double py, double pz, double m) | |
Particle (int pdg_code, double E, double px, double py, double pz, double m, int q) | |
Particle (int pdg_code, double m) | |
Particle (int pdg_code, double m, int q) | |
Particle (int pdg_code, double px, double py, double pz, double m) | |
Particle (int pdg_code, double px, double py, double pz, double m, int q) | |
double | charge () const |
Get the particle's charge in units of the proton charge. | |
void | clear () |
Resets all data members to zero. | |
void | from_json (const marley::JSON &json) |
Replaces the existing object contents with new ones loaded from a JSON representation of a Particle. | |
double | kinetic_energy () const |
Get the particle's kinetic energy (MeV) | |
double | mass () const |
Get the particle's mass (MeV) | |
double | momentum_magnitude () const |
Get the magnitude of the particle's 3-momentum (MeV) | |
int | pdg_code () const |
Get the Particle Data Group code for this particle. | |
void | print (std::ostream &out) const |
Print information about this particle to a std::ostream. More... | |
double | px () const |
Get the x component of the particle's 3-momentum (MeV) | |
double | py () const |
Get the y component of the particle's 3-momentum (MeV) | |
double | pz () const |
Get the z component of the particle's 3-momentum (MeV) | |
void | read (std::istream &in) |
Read in this particle from a std::istream. Any previous contents of this particle will be deleted. | |
void | set_charge (int q) |
Set the particle's charge. More... | |
void | set_mass (double m) |
Set the particle's mass. More... | |
void | set_px (double px) |
Set the x component of the particle's 3-momentum. More... | |
void | set_py (double py) |
Set the y component of the particle's 3-momentum. More... | |
void | set_pz (double pz) |
Set the z component of the particle's 3-momentum. More... | |
void | set_total_energy (double Etot) |
Set the particle's total energy. More... | |
marley::JSON | to_json () const |
Create a JSON representation of this Particle. | |
double | total_energy () const |
Get the particle's total energy (MeV) | |
Protected Attributes | |
int | charge_ = 0 |
Electric charge (net charge in the case of atoms) expressed as an integer multiple of the proton charge. More... | |
double | four_momentum_ [4] |
momentum 4-vector for this particle (MeV) More... | |
double | mass_ = 0. |
mass (MeV) | |
int | pdg_code_ = 0 |
Particle Data Group code identifying this particle More... | |
Momentum four-vector for a simulated particle.
marley::Particle::Particle | ( | int | pdg_code, |
double | m | ||
) |
pdg_code | Particle Data Group code |
m | mass (MeV) |
marley::Particle::Particle | ( | int | pdg_code, |
double | m, | ||
int | q | ||
) |
pdg_code | Particle Data Group code |
m | mass (MeV) |
q | charge in units of the proton charge |
marley::Particle::Particle | ( | int | pdg_code, |
double | px, | ||
double | py, | ||
double | pz, | ||
double | m | ||
) |
pdg_code | Particle Data Group code |
px | 3-momentum x component (MeV) |
py | 3-momentum y component (MeV) |
pz | 3-momentum z component (MeV) |
m | mass (MeV) |
marley::Particle::Particle | ( | int | pdg_code, |
double | px, | ||
double | py, | ||
double | pz, | ||
double | m, | ||
int | q | ||
) |
pdg_code | Particle Data Group code |
px | 3-momentum x component (MeV) |
py | 3-momentum y component (MeV) |
pz | 3-momentum z component (MeV) |
m | mass (MeV) |
q | charge in units of the proton charge |
marley::Particle::Particle | ( | int | pdg_code, |
double | E, | ||
double | px, | ||
double | py, | ||
double | pz, | ||
double | m | ||
) |
pdg_code | Particle Data Group code |
E | total energy (MeV) |
px | 3-momentum x component (MeV) |
py | 3-momentum y component (MeV) |
pz | 3-momentum z component (MeV) |
m | mass (MeV) |
marley::Particle::Particle | ( | int | pdg_code, |
double | E, | ||
double | px, | ||
double | py, | ||
double | pz, | ||
double | m, | ||
int | q | ||
) |
pdg_code | Particle Data Group code |
E | total energy (MeV) |
px | 3-momentum x component (MeV) |
py | 3-momentum y component (MeV) |
pz | 3-momentum z component (MeV) |
m | mass (MeV) |
q | charge in units of the proton charge |
void marley::Particle::print | ( | std::ostream & | out | ) | const |
Print information about this particle to a std::ostream.
|
inline |
Set the particle's charge.
q | charge in units of the proton charge |
|
inline |
Set the particle's mass.
m | mass (MeV) |
|
inline |
Set the x component of the particle's 3-momentum.
px | 3-momentum x component (MeV) |
|
inline |
Set the y component of the particle's 3-momentum.
py | 3-momentum y component (MeV) |
|
inline |
Set the z component of the particle's 3-momentum.
pz | 3-momentum z component (MeV) |
|
inline |
Set the particle's total energy.
Etot | total energy (MeV) |
|
protected |
Electric charge (net charge in the case of atoms) expressed as an integer multiple of the proton charge.
This class member allows a marley::Particle to represent an atom or ion. The charge_ data member was added because the 2014 PDG codes do not include a prescription for representing ionization states of atoms.
|
protected |
momentum 4-vector for this particle (MeV)
The order of the components is (E, px, py, pz)
|
protected |
Particle Data Group code identifying this particle
See the full list of PDG codes for details.