rivet is hosted by Hepforge, IPPP Durham
Vector4.hh File Reference
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  FourMomentum::byEAscending
 Struct for sorting by increasing energy. More...
struct  FourMomentum::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.
double abspseudorapidity (const FourVector &v)
 Calculate absolute pseudorapidity of a Lorentz vector.
double abseta (const FourVector &v)
 Synonym for absolute 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 mass2 (const FourMomentum &v)
 Get the squared mass $ m^2 = E^2 - p^2 $ (the Lorentz self-invariant) of a momentum 4-vector.
double rapidity (const FourMomentum &v)
 Calculate the rapidity of a momentum 4-vector.
double rap (const FourMomentum &v)
 Calculate the rapidity of a momentum 4-vector.
double absrapidity (const FourMomentum &v)
 Calculate the absolute rapidity of a momentum 4-vector.
double absrap (const FourMomentum &v)
 Calculate the absolute 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 vectors.
double deltaPhi (const FourMomentum &v, double phi2)
 Calculate the difference in azimuthal angle between two vectors.
double deltaPhi (double phi1, const FourMomentum &v)
 Calculate the difference in azimuthal angle between two vectors.
double deltaPhi (const FourVector &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two vectors.
double deltaPhi (const FourVector &v, double phi2)
 Calculate the difference in azimuthal angle between two vectors.
double deltaPhi (double phi1, const FourVector &v)
 Calculate the difference in azimuthal angle between two vectors.
double deltaPhi (const FourVector &a, const FourMomentum &b)
 Calculate the difference in azimuthal angle between two vectors.
double deltaPhi (const FourMomentum &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two vectors.
double deltaPhi (const FourVector &a, const Vector3 &b)
 Calculate the difference in azimuthal angle between two vectors.
double deltaPhi (const Vector3 &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two vectors.
double deltaPhi (const FourMomentum &a, const Vector3 &b)
 Calculate the difference in azimuthal angle between two vectors.
double deltaPhi (const Vector3 &a, const FourMomentum &b)
 Calculate the difference in azimuthal angle between two vectors.
\f$ |\Delta eta| \f$ calculations from 4-vectors
double deltaEta (const FourMomentum &a, const FourMomentum &b)
 Calculate the difference in pseudorapidity between two vectors.
double deltaEta (const FourMomentum &v, double eta2)
 Calculate the difference in pseudorapidity between two vectors.
double deltaEta (double eta1, const FourMomentum &v)
 Calculate the difference in pseudorapidity between two vectors.
double deltaEta (const FourVector &a, const FourVector &b)
 Calculate the difference in pseudorapidity between two vectors.
double deltaEta (const FourVector &v, double eta2)
 Calculate the difference in pseudorapidity between two vectors.
double deltaEta (double eta1, const FourVector &v)
 Calculate the difference in pseudorapidity between two vectors.
double deltaEta (const FourVector &a, const FourMomentum &b)
 Calculate the difference in pseudorapidity between two vectors.
double deltaEta (const FourMomentum &a, const FourVector &b)
 Calculate the difference in pseudorapidity between two vectors.
double deltaEta (const FourVector &a, const Vector3 &b)
 Calculate the difference in pseudorapidity between two vectors.
double deltaEta (const Vector3 &a, const FourVector &b)
 Calculate the difference in pseudorapidity between two vectors.
double deltaEta (const FourMomentum &a, const Vector3 &b)
 Calculate the difference in pseudorapidity between two vectors.
double deltaEta (const Vector3 &a, const FourMomentum &b)
 Calculate the difference in pseudorapidity between two vectors.
\f$ |\Delta y| \f$ calculations from 4-momentum vectors
double deltaRap (const FourMomentum &a, const FourMomentum &b)
 Calculate the difference in rapidity between two 4-momentum vectors.
double deltaRap (const FourMomentum &v, double y2)
 Calculate the difference in rapidity between two 4-momentum vectors.
double deltaRap (double y1, const FourMomentum &v)
 Calculate the difference in rapidity between two 4-momentum vectors.
4-vector comparison functions (for sorting)
bool cmpMomByPt (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscPt (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByP (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscP (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByEt (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscEt (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByE (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscE (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByDescPseudorapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscPseudorapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByDescAbsPseudorapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscAbsPseudorapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByDescRapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscRapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByDescAbsRapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscAbsRapidity (const FourMomentum &a, const FourMomentum &b)
4-vector string representations
std::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.