rivet is hosted by Hepforge, IPPP Durham
 Rivet 4.0.0
Rivet::FourVector Class Reference

Specialisation of VectorN to a general (non-momentum) Lorentz 4-vector. More...

#include <Vector4.hh>

Inheritance diagram for Rivet::FourVector:

## Public Types

using EVector = RivetEigen::Matrix< double, N, 1 >
Vector.

## Public Member Functions

template<typename V4TYPE , typename std::enable_if< HasXYZT< V4TYPE >::value, int >::type DUMMY = 0>
FourVector (const V4TYPE &other)

FourVector (const Vector< 4 > &other)

FourVector (const double t, const double x, const double y, const double z)

operator fastjet::PseudoJet () const
Cast operator to FastJet PseudoJet.

double t () const

double t2 () const

FourVectorsetT (const double t)

double x () const

double x2 () const

FourVectorsetX (const double x)

double y () const

double y2 () const

FourVectorsetY (const double y)

double z () const

double z2 () const

FourVectorsetZ (const double z)

double invariant () const

bool isNull () const

double angle (const FourVector &v) const
Angle between this vector and another.

double angle (const Vector3 &v3) const
Angle between this vector and another (3-vector)

Mod-square of the projection of the 3-vector on to the $$x-y$$ plane This is a more efficient function than polarRadius, as it avoids the square root. Use it if you only need the squared value, or e.g. an ordering by magnitude.

double perp2 () const

double rho2 () const

Magnitude of projection of 3-vector on to the $$x-y$$ plane.

double perp () const

double rho () const

Vector3 polarVec () const
Projection of 3-vector on to the $$x-y$$ plane.

Vector3 perpVec () const
Synonym for polarVec.

Vector3 rhoVec () const
Synonym for polarVec.

double azimuthalAngle (const PhiMapping mapping=ZERO_2PI) const
Angle subtended by the 3-vector's projection in x-y and the x-axis.

double phi (const PhiMapping mapping=ZERO_2PI) const
Synonym for azimuthalAngle.

double polarAngle () const
Angle subtended by the 3-vector and the z-axis.

double theta () const
Synonym for polarAngle.

double pseudorapidity () const
Pseudorapidity (defined purely by the 3-vector components)

double eta () const
Synonym for pseudorapidity.

double abspseudorapidity () const
Get the $$|\eta|$$ directly.

double abseta () const
Get the $$|\eta|$$ directly (alias).

Vector3 vector3 () const
Get the spatial part of the 4-vector as a 3-vector.

operator Vector3 () const
Implicit cast to a 3-vector.

double contract (const FourVector &v) const
Contract two 4-vectors, with metric signature (+ - - -).

double dot (const FourVector &v) const
Contract two 4-vectors, with metric signature (+ - - -).

double operator* (const FourVector &v) const
Contract two 4-vectors, with metric signature (+ - - -).

FourVectoroperator*= (double a)
Multiply by a scalar.

FourVectoroperator/= (double a)
Divide by a scalar.

FourVectoroperator+= (const FourVector &v)

FourVectoroperator-= (const FourVector &v)
Subtract from this 4-vector. NB time as well as space components are subtracted.

FourVector operator- () const
Multiply all components (space and time) by -1.

FourVector reverse () const
Multiply space components only by -1.

const doubleget (const size_t index) const

doubleget (const size_t index)

const doubleoperator[] (const size_t index) const

doubleoperator[] (const size_t index)

Vector< N > & set (const size_t index, const double value)
Set indexed value.

constexpr size_t size () const
Vector dimensionality.

bool isZero (double tolerance=1E-5) const
Check for nullness, allowing for numerical precision.

double mod2 () const
Calculate the modulus-squared of a vector. $$\sum_{i=1}^N x_i^2$$.

double mod () const
Calculate the modulus of a vector. $$\sqrt{\sum_{i=1}^N x_i^2}$$.

bool operator== (const Vector< N > &a) const

bool operator!= (const Vector< N > &a) const

## Friends

FourVector multiply (const double a, const FourVector &v)

FourVector multiply (const FourVector &v, const double a)

FourVector add (const FourVector &a, const FourVector &b)

FourVector transform (const LorentzTransform &lt, const FourVector &v4)

## Detailed Description

Specialisation of VectorN to a general (non-momentum) Lorentz 4-vector.

Todo:
Add composite set/mk methods from different coord systems

## ◆ operator fastjet::PseudoJet()

 Rivet::FourVector::operator fastjet::PseudoJet ( ) const

Cast operator to FastJet PseudoJet.

Needed, since otherwise the PseudoJet template constructor assumes the indices [0-3] mean px,py,pz,E... but Rivet uses E,px,py,pz ordering.

The documentation for this class was generated from the following file:
• /Users/chrisg/software/rivet/include/Rivet/Math/Vector4.hh