Hammer
1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
|
4-momentum class More...
#include <FourMomentum.hh>
Public Member Functions | |
FourMomentum () | |
default constructor More... | |
FourMomentum (const std::array< double, 4 > &other) | |
constructor from an array of numbers More... | |
FourMomentum (const double E, const double px, const double py, const double pz) | |
constructor from specific components More... | |
FourMomentum & | setE (double E) |
set the 4-momentum energy More... | |
FourMomentum & | setPx (double px) |
set the 4-momentum momentum x component More... | |
FourMomentum & | setPy (double py) |
set the 4-momentum momentum y component More... | |
FourMomentum & | setPz (double pz) |
set the 4-momentum momentum z component More... | |
double | E () const |
returns the energy More... | |
double | px () const |
returns the momentum x component More... | |
double | py () const |
returns the momentum y component More... | |
double | pz () const |
returns the momentum z component More... | |
double | mass () const |
returns the invariant mass if the invariant mass squared is negative returns \( - \sqrt{|m^2|} \) More... | |
double | mass2 () const |
returns the squared invariant mass More... | |
double | p () const |
returns the absolute value of the 3-momentum More... | |
double | p2 () const |
returns the squared 3-momentum More... | |
double | pt () const |
returns the transverse momentum More... | |
double | rapidity () const |
returns the rapidity (along the z-axis) More... | |
double | phi () const |
returns the azimuthal angle More... | |
double | eta () const |
returns the pseudorapidity (along the z-axis) More... | |
double | theta () const |
returns the polar angle (along the z-axis) More... | |
std::array< double, 3 > | pVec () const |
returns the spatial 3-vector as an array More... | |
double | dot (const FourMomentum &v) const |
contracts the 4-momentum with another More... | |
FourMomentum & | operator*= (double a) |
multiplies the components by a constant More... | |
FourMomentum & | operator/= (double a) |
divides the components by a constant More... | |
FourMomentum & | operator+= (const FourMomentum &v) |
adds the another 4-momentum to itself More... | |
FourMomentum & | operator-= (const FourMomentum &v) |
subtract the 4-momentum by another More... | |
FourMomentum | operator- () const |
construct a copy of itself with all the signs of the components flipped More... | |
FourMomentum | PFlip () const |
construct a copy of itself with all the signs of the spatial components flipped More... | |
double | gamma () const |
returns the \( \gamma = 1/\sqrt{1-\beta^2} \) for the Lorentz transformation to the rest frame More... | |
double | beta () const |
returns the value of the boost to the rest frame More... | |
std::array< double, 3 > | boostVector () const |
returns the boost 3-vector More... | |
FourMomentum & | boostToRestFrameOf (const FourMomentum &v) |
returns a boosted 4-vector More... | |
FourMomentum & | boostFromRestFrameOf (const FourMomentum &v) |
FourMomentum & | boostToRestFrameOf (const std::array< double, 3 > &v) |
Static Public Member Functions | |
static FourMomentum | fromPM (double px, double py, double pz, double mass) |
builder method based on 3-momentum and invariant mass More... | |
static FourMomentum | fromPtEtaPhiM (double pt, double eta, double phi, double mass) |
builder method based on collider-friendly variables More... | |
static FourMomentum | fromEtaPhiME (double eta, double phi, double mass, double E) |
builder method based on collider-friendly variables More... | |
Private Member Functions | |
void | boostBy (const std::array< double, 3 > &v) |
Private Attributes | |
std::array< double, 4 > | _vec |
the contents of the 4-momentum in the notation \( (E, p_x, p_y, p_z) \). More... | |
4-momentum class
Defines a 4-momentum and its basic properties and operations
Definition at line 30 of file FourMomentum.hh.
Hammer::FourMomentum::FourMomentum | ( | ) |
default constructor
Definition at line 24 of file FourMomentum.cc.
Hammer::FourMomentum::FourMomentum | ( | const std::array< double, 4 > & | other | ) |
constructor from an array of numbers
[in] | other | the array, defined as \( \left(E, p_x, p_y, p_z \right) \) |
Hammer::FourMomentum::FourMomentum | ( | const double | E, |
const double | px, | ||
const double | py, | ||
const double | pz | ||
) |
constructor from specific components
[in] | E | the energy |
[in] | px | the x momentum component |
[in] | py | the y momentum component |
[in] | pz | the z momentum component |
double Hammer::FourMomentum::beta | ( | ) | const |
returns the value of the boost to the rest frame
|
private |
[in] | v |
FourMomentum& Hammer::FourMomentum::boostFromRestFrameOf | ( | const FourMomentum & | v | ) |
[in] | v |
FourMomentum& Hammer::FourMomentum::boostToRestFrameOf | ( | const FourMomentum & | v | ) |
returns a boosted 4-vector
[in] | v |
FourMomentum& Hammer::FourMomentum::boostToRestFrameOf | ( | const std::array< double, 3 > & | v | ) |
[in] | v |
std::array<double, 3> Hammer::FourMomentum::boostVector | ( | ) | const |
returns the boost 3-vector
double Hammer::FourMomentum::dot | ( | const FourMomentum & | v | ) | const |
contracts the 4-momentum with another
[in] | v | the other 4-momentum |
double Hammer::FourMomentum::E | ( | ) | const |
returns the energy
double Hammer::FourMomentum::eta | ( | ) | const |
returns the pseudorapidity (along the z-axis)
|
static |
builder method based on collider-friendly variables
[in] | eta | the pseudorapidity |
[in] | phi | the azimuthal angle |
[in] | mass | the invariant mass |
[in] | E | the energy |
|
static |
builder method based on 3-momentum and invariant mass
[in] | px | the x momentum component |
[in] | py | the y momentum component |
[in] | pz | the z momentum component |
[in] | mass | the invariant mass |
|
static |
builder method based on collider-friendly variables
[in] | pt | the transverse momentum |
[in] | eta | the pseudorapidity |
[in] | phi | the azimuthal angle |
[in] | mass | the invariant mass |
double Hammer::FourMomentum::gamma | ( | ) | const |
returns the \( \gamma = 1/\sqrt{1-\beta^2} \) for the Lorentz transformation to the rest frame
double Hammer::FourMomentum::mass | ( | ) | const |
returns the invariant mass if the invariant mass squared is negative returns \( - \sqrt{|m^2|} \)
double Hammer::FourMomentum::mass2 | ( | ) | const |
returns the squared invariant mass
FourMomentum& Hammer::FourMomentum::operator*= | ( | double | a | ) |
multiplies the components by a constant
[in] | a | the real constant |
FourMomentum& Hammer::FourMomentum::operator+= | ( | const FourMomentum & | v | ) |
adds the another 4-momentum to itself
[in] | v | the other 4-momentum |
FourMomentum Hammer::FourMomentum::operator- | ( | ) | const |
construct a copy of itself with all the signs of the components flipped
FourMomentum& Hammer::FourMomentum::operator-= | ( | const FourMomentum & | v | ) |
subtract the 4-momentum by another
[in] | v | the other 4-momentum |
FourMomentum& Hammer::FourMomentum::operator/= | ( | double | a | ) |
divides the components by a constant
[in] | a | the real constant |
double Hammer::FourMomentum::p | ( | ) | const |
returns the absolute value of the 3-momentum
double Hammer::FourMomentum::p2 | ( | ) | const |
returns the squared 3-momentum
FourMomentum Hammer::FourMomentum::PFlip | ( | ) | const |
construct a copy of itself with all the signs of the spatial components flipped
double Hammer::FourMomentum::phi | ( | ) | const |
returns the azimuthal angle
double Hammer::FourMomentum::pt | ( | ) | const |
returns the transverse momentum
std::array<double, 3> Hammer::FourMomentum::pVec | ( | ) | const |
returns the spatial 3-vector as an array
double Hammer::FourMomentum::px | ( | ) | const |
returns the momentum x component
double Hammer::FourMomentum::py | ( | ) | const |
returns the momentum y component
double Hammer::FourMomentum::pz | ( | ) | const |
returns the momentum z component
double Hammer::FourMomentum::rapidity | ( | ) | const |
returns the rapidity (along the z-axis)
FourMomentum& Hammer::FourMomentum::setE | ( | double | E | ) |
set the 4-momentum energy
[in] | E | the new energy |
FourMomentum& Hammer::FourMomentum::setPx | ( | double | px | ) |
set the 4-momentum momentum x component
[in] | px | the new momentum x component |
FourMomentum& Hammer::FourMomentum::setPy | ( | double | py | ) |
set the 4-momentum momentum y component
[in] | py | the new momentum y component |
FourMomentum& Hammer::FourMomentum::setPz | ( | double | pz | ) |
set the 4-momentum momentum z component
[in] | pz | the new momentum z component |
double Hammer::FourMomentum::theta | ( | ) | const |
returns the polar angle (along the z-axis)
|
private |
the contents of the 4-momentum in the notation \( (E, p_x, p_y, p_z) \).
Definition at line 222 of file FourMomentum.hh.