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.
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)
\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)
 Comparison to give a sorting by decreasing pT.
bool cmpMomByAscPt (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing pT.
bool cmpMomByP (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by decreasing 3-momentum magnitude |p|.
bool cmpMomByAscP (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing 3-momentum magnitude |p|.
bool cmpMomByEt (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by decreasing transverse energy.
bool cmpMomByAscEt (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing transverse energy.
bool cmpMomByE (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by decreasing energy.
bool cmpMomByAscE (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing energy.
bool cmpMomByEta (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing eta (pseudorapidity)
bool cmpMomByAscPseudorapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByDescEta (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by decreasing eta (pseudorapidity)
bool cmpMomByDescPseudorapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAbsEta (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing absolute eta (pseudorapidity)
bool cmpMomByAscAbsPseudorapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByDescAbsEta (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing absolute eta (pseudorapidity)
bool cmpMomByDescAbsPseudorapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByRap (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing rapidity.
bool cmpMomByAscRapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByDescRap (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by decreasing rapidity.
bool cmpMomByDescRapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAbsRap (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing absolute rapidity.
bool cmpMomByAscAbsRapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByDescAbsRap (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by decreasing absolute rapidity.
bool cmpMomByDescAbsRapidity (const FourMomentum &a, const FourMomentum &b)
template<typename MOMS , typename CMP >
MOMS & sortBy (MOMS &pbs, const CMP &cmp)
 Sort a container of momenta by cmp and return by reference for non-const inputs.
template<typename MOMS , typename CMP >
MOMS sortBy (const MOMS &pbs, const CMP &cmp)
 Sort a container of momenta by cmp and return by value for const inputs.
template<typename MOMS >
MOMS & sortByPt (MOMS &pbs)
 Sort a container of momenta by pT (decreasing) and return by reference for non-const inputs.
template<typename MOMS >
MOMS sortByPt (const MOMS &pbs)
 Sort a container of momenta by pT (decreasing) and return by value for const inputs.
template<typename MOMS >
MOMS & sortByE (MOMS &pbs)
 Sort a container of momenta by E (decreasing) and return by reference for non-const inputs.
template<typename MOMS >
MOMS sortByE (const MOMS &pbs)
 Sort a container of momenta by E (decreasing) and return by value for const inputs.
template<typename MOMS >
MOMS & sortByEt (MOMS &pbs)
 Sort a container of momenta by Et (decreasing) and return by reference for non-const inputs.
template<typename MOMS >
MOMS sortByEt (const MOMS &pbs)
 Sort a container of momenta by Et (decreasing) and return by value for const inputs.
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.