CepGen 1.2.5
Central exclusive processes event generator
|
Container for a particle's 4-momentum, along with useful methods to ease the development of any matrix element level generator. More...
#include <CepGen/Physics/Momentum.h>
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 &) const |
Vector product of the 3-momentum with another 3-momentum. | |
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 |
Unary inverse operator. | |
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. | |
Momentum | operator* (double c) const |
Multiply all components of a 4-momentum by a scalar. | |
Momentum & | operator*= (double c) |
Multiply all 4-momentum coordinates by a scalar. | |
operator Vector () const | |
Cast the 4-momentum object into a 4-dimensional vector. | |
Momentum & | betaGammaBoost (double gamma, double betagamma) |
Forward \(\beta-\gamma\) boost. | |
Momentum & | lorentzBoost (const Momentum &p) |
Forward Lorentz boost. | |
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) | |
double | px () const |
Momentum along the \(x\)-axis (in GeV) | |
Momentum & | setPy (double py) |
Set the momentum along the \(y\)-axis (in GeV) | |
double | py () const |
Momentum along the \(y\)-axis (in GeV) | |
Momentum & | setPz (double pz) |
Set the longitudinal momentum (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\)) | |
Momentum | transverse () const |
Transverse coordinates of a momentum. | |
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 |
Tranverse energy component (in GeV) | |
double | energyT2 () const |
Squared tranverse 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. | |
double | mass () const |
Mass (in GeV) as computed from its energy and momentum. | |
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. | |
double | deltaEta (const Momentum &) const |
Pseudorapidity distance between two momenta. | |
double | deltaPhi (const Momentum &) const |
Azimutal 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 the transverse components by an angle phi (and reflect the y coordinate) | |
Momentum & | rotateThetaPhi (double theta, double phi) |
Rotate the particle's momentum by a polar/azimuthal angle. | |
Momentum & | mirrorX () |
Apply a \( x\rightarrow -x\) transformation. | |
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. | |
Friends | |
Momentum | operator* (double, const Momentum &) |
Left-multiply all 4-momentum coordinates by a scalar. | |
std::ostream & | operator<< (std::ostream &, const Momentum &) |
Human-readable format for a particle's momentum. | |
4-momentum for a particle
Definition at line 33 of file Momentum.h.
|
explicit |
Definition at line 45 of file Momentum.cpp.
|
explicit |
Definition at line 49 of file Momentum.cpp.
Definition at line 54 of file Momentum.cpp.
double beta | ( | ) | const |
Definition at line 265 of file Momentum.cpp.
Momentum & betaGammaBoost | ( | double | gamma, |
double | betagamma | ||
) |
Definition at line 297 of file Momentum.cpp.
Momentum & computeEnergyFromMass | ( | double | on_shell_mass | ) |
[in] | on_shell_mass | Specify on-shell mass to constrain energy |
Definition at line 186 of file Momentum.cpp.
Momentum & computePzFromMass | ( | double | on_shell_mass | ) |
[in] | on_shell_mass | Specify on-shell mass to constrain longitudinal momentum |
Definition at line 188 of file Momentum.cpp.
double crossProduct | ( | const Momentum & | mom | ) | const |
Definition at line 152 of file Momentum.cpp.
double deltaEta | ( | const Momentum & | oth | ) | const |
Definition at line 251 of file Momentum.cpp.
double deltaPhi | ( | const Momentum & | oth | ) | const |
Definition at line 253 of file Momentum.cpp.
double deltaPt | ( | const Momentum & | oth | ) | const |
Definition at line 257 of file Momentum.cpp.
double deltaR | ( | const Momentum & | oth | ) | const |
Definition at line 259 of file Momentum.cpp.
double energy | ( | ) | const |
Definition at line 136 of file Momentum.h.
double energy2 | ( | ) | const |
Definition at line 138 of file Momentum.h.
double energyT | ( | ) | const |
Definition at line 218 of file Momentum.cpp.
double energyT2 | ( | ) | const |
Definition at line 213 of file Momentum.cpp.
double eta | ( | ) | const |
Definition at line 240 of file Momentum.cpp.
double fourProduct | ( | const Momentum & | mom | ) | const |
Definition at line 145 of file Momentum.cpp.
|
static |
Definition at line 69 of file Momentum.cpp.
|
static |
Definition at line 73 of file Momentum.cpp.
|
static |
Definition at line 77 of file Momentum.cpp.
|
static |
Definition at line 93 of file Momentum.cpp.
|
static |
Definition at line 82 of file Momentum.cpp.
|
static |
Definition at line 84 of file Momentum.cpp.
|
static |
Definition at line 88 of file Momentum.cpp.
double gamma | ( | ) | const |
Definition at line 295 of file Momentum.cpp.
double gamma2 | ( | ) | const |
Definition at line 280 of file Momentum.cpp.
Definition at line 304 of file Momentum.cpp.
double mass | ( | ) | const |
Definition at line 222 of file Momentum.cpp.
double mass2 | ( | ) | const |
Definition at line 220 of file Momentum.cpp.
double massT | ( | ) | const |
Definition at line 226 of file Momentum.cpp.
double massT2 | ( | ) | const |
Definition at line 224 of file Momentum.cpp.
Momentum & mirrorX | ( | ) |
Definition at line 196 of file Momentum.h.
Momentum & mirrorY | ( | ) |
Definition at line 201 of file Momentum.h.
Momentum & mirrorZ | ( | ) |
Definition at line 206 of file Momentum.h.
operator Vector | ( | ) | const |
Definition at line 211 of file Momentum.cpp.
bool operator!= | ( | const Momentum & | oth | ) | const |
Definition at line 43 of file Momentum.h.
Definition at line 122 of file Momentum.cpp.
double operator* | ( | const Momentum & | mom | ) | const |
Definition at line 120 of file Momentum.cpp.
Momentum operator* | ( | double | c | ) | const |
Definition at line 127 of file Momentum.cpp.
double operator*= | ( | const Momentum & | ) |
Momentum & operator*= | ( | double | c | ) |
Definition at line 129 of file Momentum.cpp.
Definition at line 100 of file Momentum.cpp.
Definition at line 104 of file Momentum.cpp.
Momentum operator- | ( | ) | const |
Definition at line 109 of file Momentum.cpp.
Definition at line 111 of file Momentum.cpp.
Definition at line 115 of file Momentum.cpp.
bool operator== | ( | const Momentum & | oth | ) | const |
Definition at line 63 of file Momentum.cpp.
double p | ( | ) | const |
Definition at line 130 of file Momentum.h.
double p2 | ( | ) | const |
Definition at line 132 of file Momentum.h.
double phi | ( | ) | const |
Definition at line 230 of file Momentum.cpp.
double pt | ( | ) | const |
Definition at line 232 of file Momentum.cpp.
double pt2 | ( | ) | const |
Definition at line 234 of file Momentum.cpp.
std::array< double, 5 > pVector | ( | ) | const |
Definition at line 204 of file Momentum.cpp.
double px | ( | ) | const |
Definition at line 112 of file Momentum.h.
double py | ( | ) | const |
Definition at line 116 of file Momentum.h.
double pz | ( | ) | const |
Definition at line 120 of file Momentum.h.
double rapidity | ( | ) | const |
Definition at line 246 of file Momentum.cpp.
Momentum & rotatePhi | ( | double | phi, |
double | sign | ||
) |
Definition at line 324 of file Momentum.cpp.
Momentum & rotateThetaPhi | ( | double | theta, |
double | phi | ||
) |
Definition at line 330 of file Momentum.cpp.
Momentum & setEnergy | ( | double | e | ) |
Definition at line 171 of file Momentum.cpp.
Momentum & setMass | ( | double | m | ) |
Definition at line 176 of file Momentum.cpp.
Momentum & setMass2 | ( | double | m2 | ) |
Definition at line 178 of file Momentum.cpp.
Momentum & setP | ( | double | px, |
double | py, | ||
double | pz | ||
) |
Definition at line 182 of file Momentum.cpp.
Momentum & setP | ( | double | px, |
double | py, | ||
double | pz, | ||
double | e | ||
) |
Definition at line 180 of file Momentum.cpp.
Momentum & setPx | ( | double | px | ) |
Definition at line 156 of file Momentum.cpp.
Momentum & setPy | ( | double | py | ) |
Definition at line 161 of file Momentum.cpp.
Momentum & setPz | ( | double | pz | ) |
Definition at line 166 of file Momentum.cpp.
double theta | ( | ) | const |
Definition at line 228 of file Momentum.cpp.
double threeProduct | ( | const Momentum & | mom | ) | const |
Definition at line 138 of file Momentum.cpp.
Momentum transverse | ( | ) | const |
Definition at line 236 of file Momentum.cpp.
Momentum & truncate | ( | double | tolerance = 1.e-10 | ) |
Definition at line 197 of file Momentum.cpp.
Definition at line 134 of file Momentum.cpp.
|
friend |
Definition at line 353 of file Momentum.cpp.