Vector4.hh File Reference

#include "Rivet/Math/MathHeader.hh"
#include "Rivet/Math/MathUtils.hh"
#include "Rivet/Math/VectorN.hh"
#include "Rivet/Math/Vector3.hh"
Include dependency graph for Vector4.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  FourVector
 Specialisation of VectorN to a general (non-momentum) Lorentz 4-vector. More...
class  FourMomentum
 Specialized version of the FourVector with momentum/energy functionality. More...
struct  byEAscending
 Struct for sorting by increasing energy. More...
struct  byEDescending
 Struct for sorting by decreasing energy. More...

Namespaces

namespace  Rivet

Typedefs

typedef FourVector Vector4

Functions

FourVector transform (const LorentzTransform &lt, const FourVector &v4)
double contract (const FourVector &a, const FourVector &b)
 Contract two 4-vectors, with metric signature (+ - - -).
double dot (const FourVector &a, const FourVector &b)
 Contract two 4-vectors, with metric signature (+ - - -).
FourVector multiply (const double a, const FourVector &v)
FourVector multiply (const FourVector &v, const double a)
FourVector operator* (const double a, const FourVector &v)
FourVector operator* (const FourVector &v, const double a)
FourVector operator/ (const FourVector &v, const double a)
FourVector add (const FourVector &a, const FourVector &b)
FourVector operator+ (const FourVector &a, const FourVector &b)
FourVector operator- (const FourVector &a, const FourVector &b)
double invariant (const FourVector &lv)
double angle (const FourVector &a, const FourVector &b)
 Angle (in radians) between spatial parts of two Lorentz vectors.
double angle (const Vector3 &a, const FourVector &b)
 Angle (in radians) between spatial parts of two Lorentz vectors.
double angle (const FourVector &a, const Vector3 &b)
 Angle (in radians) between spatial parts of two Lorentz vectors.
double polarRadius2 (const FourVector &v)
 Calculate transverse length sq. $ \rho^2 $ of a Lorentz vector.
double perp2 (const FourVector &v)
 Synonym for polarRadius2.
double rho2 (const FourVector &v)
 Synonym for polarRadius2.
double polarRadius (const FourVector &v)
 Calculate transverse length $ \rho $ of a Lorentz vector.
double perp (const FourVector &v)
 Synonym for polarRadius.
double rho (const FourVector &v)
 Synonym for polarRadius.
double azimuthalAngle (const FourVector &v, const PhiMapping mapping=ZERO_2PI)
 Calculate azimuthal angle of a Lorentz vector.
double phi (const FourVector &v, const PhiMapping mapping=ZERO_2PI)
 Synonym for azimuthalAngle.
double polarAngle (const FourVector &v)
 Calculate polar angle of a Lorentz vector.
double theta (const FourVector &v)
 Synonym for polarAngle.
double pseudorapidity (const FourVector &v)
 Calculate pseudorapidity of a Lorentz vector.
double eta (const FourVector &v)
 Synonym for pseudorapidity.
FourMomentum multiply (const double a, const FourMomentum &v)
FourMomentum multiply (const FourMomentum &v, const double a)
FourMomentum operator* (const double a, const FourMomentum &v)
FourMomentum operator* (const FourMomentum &v, const double a)
FourMomentum operator/ (const FourMomentum &v, const double a)
FourMomentum add (const FourMomentum &a, const FourMomentum &b)
FourMomentum operator+ (const FourMomentum &a, const FourMomentum &b)
FourMomentum operator- (const FourMomentum &a, const FourMomentum &b)
double mass (const FourMomentum &v)
 Get the mass $ m = \sqrt{E^2 - p^2} $ (the Lorentz self-invariant) of a momentum 4-vector.
double massT (const FourMomentum &v)
 Get the transverse mass $ m_T = m \sin{\theta} $ of a momentum 4-vector.
double mass2 (const FourMomentum &v)
 Get the squared mass $ m^2 = E^2 - p^2 $ (the Lorentz self-invariant) of a momentum 4-vector.
double massT2 (const FourMomentum &v)
 Get the squared transverse mass $ m_T^2 = m^2 \sin^2{\theta} $ of a momentum 4-vector.
double rapidity (const FourMomentum &v)
 Calculate the rapidity of a momentum 4-vector.
double pT2 (const FourMomentum &v)
 Calculate the squared transverse momentum $ p_T^2 $ of a momentum 4-vector.
double pT (const FourMomentum &v)
 Calculate the transverse momentum $ p_T $ of a momentum 4-vector.
double Et2 (const FourMomentum &v)
 Calculate the transverse energy squared, $ E_T^2 = E^2 \sin^2{\theta} $ of a momentum 4-vector.
double Et (const FourMomentum &v)
 Calculate the transverse energy $ E_T = E \sin{\theta} $ of a momentum 4-vector.
Vector3 boostVector (const FourMomentum &v)
 Calculate the velocity boost vector of a momentum 4-vector.
\f$ \Delta R \f$ calculations from 4-vectors

double deltaR (const FourVector &a, const FourVector &b, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter. Use of this scheme option is discouraged in this case since RAPIDITY is only a valid option for vectors whose type is really the FourMomentum derived class.
double deltaR (const FourVector &v, double eta2, double phi2, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.
double deltaR (double eta1, double phi1, const FourVector &v, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.
double deltaR (const FourMomentum &a, const FourMomentum &b, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.
double deltaR (const FourMomentum &v, double eta2, double phi2, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.
double deltaR (double eta1, double phi1, const FourMomentum &v, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.
double deltaR (const FourMomentum &a, const FourVector &b, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.
double deltaR (const FourVector &a, const FourMomentum &b, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.
double deltaR (const FourMomentum &a, const Vector3 &b)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between a three-vector and a four-vector.
double deltaR (const Vector3 &a, const FourMomentum &b)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between a three-vector and a four-vector.
double deltaR (const FourVector &a, const Vector3 &b)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between a three-vector and a four-vector.
double deltaR (const Vector3 &a, const FourVector &b)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between a three-vector and a four-vector.
\f$ \Delta phi \f$ calculations from 4-vectors

double deltaPhi (const FourMomentum &a, const FourMomentum &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const FourMomentum &v, double phi2)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (double phi1, const FourMomentum &v)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const FourVector &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const FourVector &v, double phi2)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (double phi1, const FourVector &v)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const FourVector &a, const FourMomentum &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const FourMomentum &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const FourVector &a, const Vector3 &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const Vector3 &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const FourMomentum &a, const Vector3 &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const Vector3 &a, const FourMomentum &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
\f$ |\Delta eta| \f$ calculations from 4-vectors

double deltaEta (const FourMomentum &a, const FourMomentum &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const FourMomentum &v, double eta2)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (double eta1, const FourMomentum &v)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const FourVector &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const FourVector &v, double eta2)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (double eta1, const FourVector &v)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const FourVector &a, const FourMomentum &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const FourMomentum &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const FourVector &a, const Vector3 &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const Vector3 &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const FourMomentum &a, const Vector3 &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const Vector3 &a, const FourMomentum &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
4-vector string representations

const string toString (const FourVector &lv)
 Render a 4-vector as a string.
std::ostream & operator<< (std::ostream &out, const FourVector &lv)
 Write a 4-vector to an ostream.