Container for a particle's 4-momentum, along with useful methods to ease the development of any matrix element level generator. More...
#include <include/CepGen/Physics/Momentum.h>
Public Types | |
enum | coord_t { X = 0 , Y = 1 , Z = 2 , E = 3 } |
Public Member Functions | |
Momentum (double x=0., double y=0., double z=0., double t=-1.) | |
Build a 4-momentum using its 3-momentum coordinates and its energy. | |
Momentum (double *p) | |
Build a 4-momentum using its 3-momentum coordinates and its energy. | |
Momentum (const Vector &) | |
Build a 4-momentum using its 3-momentum coordinates and its energy. | |
bool | operator== (const Momentum &) const |
Equality operator. | |
bool | operator!= (const Momentum &oth) const |
Inequality operator. | |
double | threeProduct (const Momentum &) const |
Scalar product of the 3-momentum with another 3-momentum. | |
double | fourProduct (const Momentum &) const |
Scalar product of the 4-momentum with another 4-momentum. | |
double | crossProduct (const Momentum &, coord_t) const |
Vector product of the 3-momentum with another 3-momentum. | |
Momentum | operator+ () const |
Unary trivial operator. | |
Momentum | operator- () const |
Unary inverse operator. | |
Momentum | operator* (double) const |
Multiply all components of a 4-momentum by a scalar. | |
Momentum & | operator*= (double) |
Multiply all 4-momentum coordinates by a scalar. | |
Momentum | operator/ (double) const |
Divide all components of a 4-momentum by a scalar. | |
Momentum & | operator/= (double) |
Divide all 4-momentum coordinates by a scalar. | |
Momentum | operator+ (const Momentum &) const |
Compute the 4-vector sum of two 4-momenta. | |
Momentum & | operator+= (const Momentum &) |
Add a 4-momentum through a 4-vector sum. | |
Momentum | operator- (const Momentum &) const |
Compute the inverse per-coordinate 4-vector. | |
Momentum & | operator-= (const Momentum &) |
Subtract a 4-momentum through a 4-vector sum. | |
double | operator* (const Momentum &) const |
Scalar product of two 3-momenta. | |
Momentum | operator% (const Momentum &) const |
Vector product of two 3-momenta. | |
double | operator*= (const Momentum &) |
Scalar product of the 3-momentum with another 3-momentum. | |
operator Vector () const | |
Cast the 4-momentum object into a 4-dimensional vector. | |
Momentum & | setP (double px, double py, double pz, double e) |
Set all the components of the 4-momentum (in GeV) | |
Momentum & | setP (double px, double py, double pz) |
Set all the components of the 3-momentum (in GeV) | |
Momentum & | setPx (double px) |
Set the momentum along the \(x\)-axis (in GeV) | |
Momentum & | setPy (double py) |
Set the momentum along the \(y\)-axis (in GeV) | |
Momentum & | setPz (double pz) |
Set the longitudinal momentum (in GeV) | |
double | px () const |
Momentum along the \(x\)-axis (in GeV) | |
double | py () const |
Momentum along the \(y\)-axis (in GeV) | |
double | pz () const |
Longitudinal momentum (in GeV) | |
double | pt () const |
Transverse momentum (in GeV) | |
double | pt2 () const |
Squared transverse momentum (in GeV \(^2\)) | |
std::array< double, 5 > | pVector () const |
5-vector of double precision floats (in GeV) | |
double | p () const |
3-momentum norm (in GeV) | |
double | p2 () const |
Squared 3-momentum norm (in GeV \(^2\)) | |
Momentum & | setEnergy (double) |
Set the energy (in GeV) | |
double | energy () const |
Energy (in GeV) | |
double | energy2 () const |
Squared energy (in GeV \(^2\)) | |
double | energyT () const |
Transverse energy component (in GeV) | |
double | energyT2 () const |
Squared transverse energy component (in GeV \(^2\)) | |
Momentum & | setMass2 (double) |
Compute the energy from the mass. | |
double | mass2 () const |
Squared mass (in GeV \(^2\)) as computed from its energy and momentum. | |
Momentum & | setMass (double) |
Compute the energy from the mass Mass (in GeV) as computed from its energy and momentum. | |
double | mass () const |
double | massT2 () const |
Squared transverse mass (in GeV \(^2\)) | |
double | massT () const |
Transverse mass (in GeV) | |
double | theta () const |
Polar angle (angle with respect to the longitudinal direction) | |
double | phi () const |
Azimuthal angle (angle in the transverse plane) | |
double | eta () const |
Pseudo-rapidity. | |
double | rapidity () const |
Rapidity. | |
Momentum | transverse (coord_t=Z) const |
Transverse coordinates of a momentum. | |
Momentum | longitudinal (coord_t=Z) const |
Longitudinal component of a momentum. | |
Momentum & | betaGammaBoost (double gamma, double beta_gamma) |
Forward \(\beta-\gamma\) boost. | |
Momentum & | lorentzBoost (const Momentum &p) |
Forward Lorentz boost. | |
double | deltaEta (const Momentum &) const |
Pseudo-rapidity distance between two momenta. | |
double | deltaPhi (const Momentum &) const |
Azimuthal angle opening between two momenta. | |
double | deltaPt (const Momentum &) const |
Transverse momentum distance between two momenta. | |
double | deltaR (const Momentum &) const |
Angular distance between two momenta. | |
double | beta () const |
Beta scalar value. | |
double | gamma2 () const |
Squared gamma scalar value. | |
double | gamma () const |
Gamma scalar value. | |
Momentum & | computeEnergyFromMass (double on_shell_mass) |
Compute the mass from 4-momentum. | |
Momentum & | computePzFromMass (double on_shell_mass) |
Compute the longitudinal coordinate from energy-mass-transverse momentum constraints. | |
Momentum & | truncate (double tolerance=1.e-10) |
Apply a threshold to all values with a given tolerance. | |
Momentum & | rotatePhi (double phi, double sign) |
Rotate transverse components (+ reflect the y coordinate) | |
Momentum & | rotateThetaPhi (double theta, double phi) |
Rotate the particle's momentum by a polar/azimuthal angle Apply an \( x\rightarrow -x\) transformation. | |
Momentum & | mirrorX () |
Momentum & | mirrorY () |
Apply a \( y\rightarrow -y\) transformation. | |
Momentum & | mirrorZ () |
Apply a \( z\rightarrow -z\) transformation. | |
Static Public Member Functions | |
static Momentum | fromPtEtaPhiE (double pt, double eta, double phi, double e=-1.) |
Build a 3-momentum from its three pseudo-cylindrical coordinates. | |
static Momentum | fromPtEtaPhiM (double pt, double eta, double phi, double m) |
Build a 3-momentum from its three pseudo-cylindrical coordinates. | |
static Momentum | fromPThetaPhiE (double p, double theta, double phi, double e=-1.) |
Build a 4-momentum from its scalar momentum, and its polar and azimuthal angles. | |
static Momentum | fromPxPyPzE (double px, double py, double pz, double e) |
Build a 4-momentum from its four momentum and energy coordinates. | |
static Momentum | fromPxPyPzM (double px, double py, double pz, double m) |
Build a 4-momentum from its three momentum coordinates and mass. | |
static Momentum | fromPxPyYM (double px, double py, double rap, double m) |
Build a 4-momentum from its transverse momentum, rapidity and mass. | |
static Momentum | fromPtYPhiM (double pt, double rap, double phi, double m) |
Build a 4-momentum from its transverse momentum, azimuthal angle, rapidity and mass. | |
static Momentum | fromPtYPhiE (double pt, double rap, double phi, double e) |
Build a 4-momentum from its transverse momentum, azimuthal angle, rapidity and energy. | |
Friends | |
Momentum | operator* (double, const Momentum &) |
Left-multiply all 4-momentum coordinates by a scalar. | |
std::ostream & | operator<< (std::ostream &, const Momentum &) |
Human-readable printout of a momentum. | |
Definition at line 30 of file Momentum.h.
enum coord_t |
Enumerator | |
---|---|
X | |
Y | |
Z | |
E |
Definition at line 39 of file Momentum.h.
|
explicit |
|
explicit |
double beta | ( | ) | const |
Momentum & betaGammaBoost | ( | double | gamma, |
double | beta_gamma ) |
Momentum & computeEnergyFromMass | ( | double | on_shell_mass | ) |
[in] | on_shell_mass | Specify on-shell mass (in GeV) to constrain energy |
Momentum & computePzFromMass | ( | double | on_shell_mass | ) |
[in] | on_shell_mass | Specify on-shell mass (in GeV) to constrain longitudinal momentum |
double deltaEta | ( | const Momentum & | ) | const |
double deltaPhi | ( | const Momentum & | ) | const |
double deltaPt | ( | const Momentum & | ) | const |
double deltaR | ( | const Momentum & | ) | const |
double energy | ( | ) | const |
Definition at line 107 of file Momentum.h.
double energy2 | ( | ) | const |
Definition at line 108 of file Momentum.h.
double energyT | ( | ) | const |
double energyT2 | ( | ) | const |
double eta | ( | ) | const |
double fourProduct | ( | const Momentum & | ) | const |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
double gamma | ( | ) | const |
double gamma2 | ( | ) | const |
double mass | ( | ) | const |
double mass2 | ( | ) | const |
double massT | ( | ) | const |
double massT2 | ( | ) | const |
Momentum & mirrorX | ( | ) |
Definition at line 151 of file Momentum.h.
Momentum & mirrorY | ( | ) |
Definition at line 156 of file Momentum.h.
Momentum & mirrorZ | ( | ) |
Definition at line 161 of file Momentum.h.
operator Vector | ( | ) | const |
bool operator!= | ( | const Momentum & | oth | ) | const |
Definition at line 41 of file Momentum.h.
double operator* | ( | const Momentum & | ) | const |
Momentum operator* | ( | double | ) | const |
double operator*= | ( | const Momentum & | ) |
Momentum & operator*= | ( | double | ) |
Momentum operator+ | ( | ) | const |
Momentum operator- | ( | ) | const |
Momentum operator/ | ( | double | ) | const |
Momentum & operator/= | ( | double | ) |
bool operator== | ( | const Momentum & | ) | const |
double p | ( | ) | const |
Definition at line 104 of file Momentum.h.
double p2 | ( | ) | const |
Definition at line 105 of file Momentum.h.
double phi | ( | ) | const |
double pt | ( | ) | const |
double pt2 | ( | ) | const |
std::array< double, 5 > pVector | ( | ) | const |
double px | ( | ) | const |
Definition at line 97 of file Momentum.h.
double py | ( | ) | const |
Definition at line 98 of file Momentum.h.
double pz | ( | ) | const |
Definition at line 99 of file Momentum.h.
double rapidity | ( | ) | const |
Momentum & rotatePhi | ( | double | phi, |
double | sign ) |
Momentum & rotateThetaPhi | ( | double | theta, |
double | phi ) |
Momentum & setEnergy | ( | double | ) |
Momentum & setMass | ( | double | ) |
Momentum & setMass2 | ( | double | ) |
Momentum & setP | ( | double | px, |
double | py, | ||
double | pz ) |
Momentum & setP | ( | double | px, |
double | py, | ||
double | pz, | ||
double | e ) |
Momentum & setPx | ( | double | px | ) |
Momentum & setPy | ( | double | py | ) |
Momentum & setPz | ( | double | pz | ) |
double theta | ( | ) | const |
double threeProduct | ( | const Momentum & | ) | const |
Momentum & truncate | ( | double | tolerance = 1.e-10 | ) |
|
friend |