class Rivet::FourVector

Rivet::FourVector

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

#include <Vector4.hh>

Inherits from Rivet::Vector< 4 >

Inherited by Rivet::FourMomentum

Public Types

Name
using Eigen::Matrix< double, N, 1 >EVector
Vector.

Public Functions

Name
FourVector()
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)
virtual~FourVector()
doublet() const
doublet2() const
FourVector &setT(const double t)
doublex() const
doublex2() const
FourVector &setX(const double x)
doubley() const
doubley2() const
FourVector &setY(const double y)
doublez() const
doublez2() const
FourVector &setZ(const double z)
doubleinvariant() const
boolisNull() const
doubleangle(const FourVector & v) const
Angle between this vector and another.
doubleangle(const Vector3 & v3) const
Angle between this vector and another (3-vector)
doublepolarRadius2() const
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.
doubleperp2() const
Synonym for polarRadius2.
doublerho2() const
Synonym for polarRadius2.
doublepolarRadius() const
Magnitude of projection of 3-vector on to the ( x-y ) plane.
doubleperp() const
Synonym for polarRadius.
doublerho() const
Synonym for polarRadius.
Vector3polarVec() const
Projection of 3-vector on to the ( x-y ) plane.
Vector3perpVec() const
Synonym for polarVec.
Vector3rhoVec() const
Synonym for polarVec.
doubleazimuthalAngle(const PhiMapping mapping =ZERO_2PI) const
Angle subtended by the 3-vector’s projection in x-y and the x-axis.
doublephi(const PhiMapping mapping =ZERO_2PI) const
Synonym for azimuthalAngle.
doublepolarAngle() const
Angle subtended by the 3-vector and the z-axis.
doubletheta() const
Synonym for polarAngle.
doublepseudorapidity() const
Pseudorapidity (defined purely by the 3-vector components)
doubleeta() const
Synonym for pseudorapidity.
doubleabspseudorapidity() const
Get the (
doubleabseta() const
Get the (
Vector3vector3() const
Get the spatial part of the 4-vector as a 3-vector.
operator Vector3() const
Implicit cast to a 3-vector.
doublecontract(const FourVector & v) const
Contract two 4-vectors, with metric signature (+ - - -).
doubledot(const FourVector & v) const
Contract two 4-vectors, with metric signature (+ - - -).
doubleoperator*(const FourVector & v) const
Contract two 4-vectors, with metric signature (+ - - -).
FourVector &operator*=(double a)
Multiply by a scalar.
FourVector &operator/=(double a)
Divide by a scalar.
FourVector &operator+=(const FourVector & v)
Add to this 4-vector.
FourVector &operator-=(const FourVector & v)
Subtract from this 4-vector. NB time as well as space components are subtracted.
FourVectoroperator-() const
Multiply all components (space and time) by -1.
FourVectorreverse() const
Multiply space components only by -1.
const double &get(const size_t index) const
double &get(const size_t index)
const double &operator[](const size_t index) const
Direct access to vector elements by index.
double &operator[](const size_t index)
Direct access to vector elements by index.
Vector< N > &set(const size_t index, const double value)
Set indexed value.
constexpr size_tsize() const
Vector dimensionality.
boolisZero(double tolerance =1E-5) const
Check for nullness, allowing for numerical precision.
doublemod2() const
Calculate the modulus-squared of a vector. ( \sum_{i=1}^N x_i^2 ).
doublemod() const
Calculate the modulus of a vector. ( \sqrt{\sum_{i=1}^N x_i^2} ).
booloperator==(const Vector< N > & a) const
booloperator!=(const Vector< N > & a) const

Friends

Name
FourVectormultiply(const double a, const FourVector & v)
FourVectormultiply(const FourVector & v, const double a)
FourVectoradd(const FourVector & a, const FourVector & b)
FourVectortransform(const LorentzTransform & lt, const FourVector & v4)

Additional inherited members

Public Functions inherited from Rivet::Vector< 4 >

Name
Vector()
Vector(const Vector< N > & other)

Detailed Description

class Rivet::FourVector;

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

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

Public Types Documentation

using EVector

using Rivet::Vector< N >::EVector =  Eigen::Matrix<double,N,1>;

Vector.

Public Functions Documentation

function FourVector

inline FourVector()

function FourVector

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

function FourVector

inline FourVector(
    const Vector< 4 > & other
)

function FourVector

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

function ~FourVector

inline virtual ~FourVector()

function t

inline double t() const

function t2

inline double t2() const

function setT

inline FourVector & setT(
    const double t
)

function x

inline double x() const

function x2

inline double x2() const

function setX

inline FourVector & setX(
    const double x
)

function y

inline double y() const

function y2

inline double y2() const

function setY

inline FourVector & setY(
    const double y
)

function z

inline double z() const

function z2

inline double z2() const

function setZ

inline FourVector & setZ(
    const double z
)

function invariant

inline double invariant() const

function isNull

inline bool isNull() const

function angle

inline double angle(
    const FourVector & v
) const

Angle between this vector and another.

function angle

inline double angle(
    const Vector3 & v3
) const

Angle between this vector and another (3-vector)

function polarRadius2

inline double polarRadius2() const

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.

function perp2

inline double perp2() const

Synonym for polarRadius2.

function rho2

inline double rho2() const

Synonym for polarRadius2.

function polarRadius

inline double polarRadius() const

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

function perp

inline double perp() const

Synonym for polarRadius.

function rho

inline double rho() const

Synonym for polarRadius.

function polarVec

inline Vector3 polarVec() const

Projection of 3-vector on to the ( x-y ) plane.

function perpVec

inline Vector3 perpVec() const

Synonym for polarVec.

function rhoVec

inline Vector3 rhoVec() const

Synonym for polarVec.

function azimuthalAngle

inline double azimuthalAngle(
    const PhiMapping mapping =ZERO_2PI
) const

Angle subtended by the 3-vector’s projection in x-y and the x-axis.

function phi

inline double phi(
    const PhiMapping mapping =ZERO_2PI
) const

Synonym for azimuthalAngle.

function polarAngle

inline double polarAngle() const

Angle subtended by the 3-vector and the z-axis.

function theta

inline double theta() const

Synonym for polarAngle.

function pseudorapidity

inline double pseudorapidity() const

Pseudorapidity (defined purely by the 3-vector components)

function eta

inline double eta() const

Synonym for pseudorapidity.

function abspseudorapidity

inline double abspseudorapidity() const

Get the ( |\eta| ) directly.

function abseta

inline double abseta() const

Get the ( |\eta| ) directly (alias).

function vector3

inline Vector3 vector3() const

Get the spatial part of the 4-vector as a 3-vector.

function operator Vector3

inline operator Vector3() const

Implicit cast to a 3-vector.

function contract

inline double contract(
    const FourVector & v
) const

Contract two 4-vectors, with metric signature (+ - - -).

function dot

inline double dot(
    const FourVector & v
) const

Contract two 4-vectors, with metric signature (+ - - -).

function operator*

inline double operator*(
    const FourVector & v
) const

Contract two 4-vectors, with metric signature (+ - - -).

function operator*=

inline FourVector & operator*=(
    double a
)

Multiply by a scalar.

function operator/=

inline FourVector & operator/=(
    double a
)

Divide by a scalar.

function operator+=

inline FourVector & operator+=(
    const FourVector & v
)

Add to this 4-vector.

function operator-=

inline FourVector & operator-=(
    const FourVector & v
)

Subtract from this 4-vector. NB time as well as space components are subtracted.

function operator-

inline FourVector operator-() const

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

function reverse

inline FourVector reverse() const

Multiply space components only by -1.

function get

inline const double & get(
    const size_t index
) const

function get

inline double & get(
    const size_t index
)

function operator[]

inline const double & operator[](
    const size_t index
) const

Direct access to vector elements by index.

function operator[]

inline double & operator[](
    const size_t index
)

Direct access to vector elements by index.

function set

inline Vector< N > & set(
    const size_t index,
    const double value
)

Set indexed value.

function size

inline constexpr size_t size() const

Vector dimensionality.

function isZero

inline bool isZero(
    double tolerance =1E-5
) const

Check for nullness, allowing for numerical precision.

function mod2

inline double mod2() const

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

function mod

inline double mod() const

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

function operator==

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

function operator!=

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

Friends

friend multiply

friend FourVector multiply(
    const double a,

    const FourVector & v
);

friend multiply

friend FourVector multiply(
    const FourVector & v,

    const double a
);

friend add

friend FourVector add(
    const FourVector & a,

    const FourVector & b
);

friend transform

friend FourVector transform(
    const LorentzTransform & lt,

    const FourVector & v4
);

Updated on 2022-08-07 at 20:17:17 +0100