class Rivet::Vector3

Rivet::Vector3

Three-dimensional specialisation of Vector.

#include <Vector3.hh>

Inherits from Rivet::Vector< 3 >

Inherited by Rivet::ThreeMomentum

Public Types

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

Public Functions

Name
Vector3()
template <typename V3TYPE >
Vector3(const V3TYPE & other)
Vector3(const Vector< 3 > & other)
Vector3(double x, double y, double z)
~Vector3()
doublex() const
doublex2() const
Vector3 &setX(double x)
doubley() const
doubley2() const
Vector3 &setY(double y)
doublez() const
doublez2() const
Vector3 &setZ(double z)
doubledot(const Vector3 & v) const
Dot-product with another vector.
Vector3cross(const Vector3 & v) const
Cross-product with another vector.
doubleangle(const Vector3 & v) const
Angle in radians to another vector.
Vector3unitVec() const
Unit-normalized version of this vector.
Vector3unit() const
Synonym for unitVec.
Vector3polarVec() const
Polar projection of this vector into the x-y plane.
Vector3perpVec() const
Synonym for polarVec.
Vector3rhoVec() const
Synonym for polarVec.
doublepolarRadius2() const
Square of the polar radius (.
doubleperp2() const
Synonym for polarRadius2.
doublerho2() const
Synonym for polarRadius2.
doublepolarRadius() const
Polar radius.
doubleperp() const
Synonym for polarRadius.
doublerho() const
Synonym for polarRadius.
doubleazimuthalAngle(const PhiMapping mapping =ZERO_2PI) const
Angle subtended by the vector’s projection in x-y and the x-axis.
doublephi(const PhiMapping mapping =ZERO_2PI) const
Synonym for azimuthalAngle.
doubletanTheta() const
Tangent of the polar angle.
doublepolarAngle() const
Angle subtended by the vector and the z-axis.
doubletheta() const
Synonym for polarAngle.
doublepseudorapidity() const
Purely geometric approximation to rapidity.
doubleeta() const
Synonym for pseudorapidity.
doubleabseta() const
Convenience shortcut for fabs(eta())
Vector3 &operator*=(const double a)
In-place scalar multiplication operator.
Vector3 &operator/=(const double a)
In-place scalar division operator.
Vector3 &operator+=(const Vector3 & v)
In-place addition operator.
Vector3 &operator-=(const Vector3 & v)
In-place subtraction operator.
Vector3operator-() const
In-place negation operator.
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
Vector3mkX()
Vector3mkY()
Vector3mkZ()

Friends

Name
classMatrix3
Vector3multiply(const double a, const Vector3 & v)
Unbound scalar-product function.
Vector3multiply(const Vector3 & v, const double a)
Unbound scalar-product function.
Vector3add(const Vector3 & a, const Vector3 & b)
Unbound vector addition function.
Vector3subtract(const Vector3 & a, const Vector3 & b)
Unbound vector subtraction function.

Additional inherited members

Public Functions inherited from Rivet::Vector< 3 >

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

Public Types Documentation

using EVector

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

Vector.

Public Functions Documentation

function Vector3

inline Vector3()

function Vector3

template <typename V3TYPE >
inline Vector3(
    const V3TYPE & other
)

function Vector3

inline Vector3(
    const Vector< 3 > & other
)

function Vector3

inline Vector3(
    double x,
    double y,
    double z
)

function ~Vector3

inline ~Vector3()

function x

inline double x() const

function x2

inline double x2() const

function setX

inline Vector3 & setX(
    double x
)

function y

inline double y() const

function y2

inline double y2() const

function setY

inline Vector3 & setY(
    double y
)

function z

inline double z() const

function z2

inline double z2() const

function setZ

inline Vector3 & setZ(
    double z
)

function dot

inline double dot(
    const Vector3 & v
) const

Dot-product with another vector.

function cross

inline Vector3 cross(
    const Vector3 & v
) const

Cross-product with another vector.

function angle

inline double angle(
    const Vector3 & v
) const

Angle in radians to another vector.

function unitVec

inline Vector3 unitVec() const

Unit-normalized version of this vector.

function unit

inline Vector3 unit() const

Synonym for unitVec.

function polarVec

inline Vector3 polarVec() const

Polar projection of this vector into the x-y plane.

function perpVec

inline Vector3 perpVec() const

Synonym for polarVec.

function rhoVec

inline Vector3 rhoVec() const

Synonym for polarVec.

function polarRadius2

inline double polarRadius2() const

Square of the polar radius (.

function perp2

inline double perp2() const

Synonym for polarRadius2.

function rho2

inline double rho2() const

Synonym for polarRadius2.

function polarRadius

inline double polarRadius() const

Polar radius.

function perp

inline double perp() const

Synonym for polarRadius.

function rho

inline double rho() const

Synonym for polarRadius.

function azimuthalAngle

inline double azimuthalAngle(
    const PhiMapping mapping =ZERO_2PI
) const

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

Note: Returns zero in the case of a vector with null x and y components.

Todo: Would it be better to return NaN in the null-perp case? Or throw?!

function phi

inline double phi(
    const PhiMapping mapping =ZERO_2PI
) const

Synonym for azimuthalAngle.

function tanTheta

inline double tanTheta() const

Tangent of the polar angle.

function polarAngle

inline double polarAngle() const

Angle subtended by the vector and the z-axis.

function theta

inline double theta() const

Synonym for polarAngle.

function pseudorapidity

inline double pseudorapidity() const

Purely geometric approximation to rapidity.

eta = -ln[ tan(theta/2) ]

Also invariant under z-boosts, equal to y for massless particles.

Implemented using the tan half-angle formula tan(theta/2) = sin(theta) / [1 + cos(theta)] = pT / (p + pz)

function eta

inline double eta() const

Synonym for pseudorapidity.

function abseta

inline double abseta() const

Convenience shortcut for fabs(eta())

function operator*=

inline Vector3 & operator*=(
    const double a
)

In-place scalar multiplication operator.

function operator/=

inline Vector3 & operator/=(
    const double a
)

In-place scalar division operator.

function operator+=

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

In-place addition operator.

function operator-=

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

In-place subtraction operator.

function operator-

inline Vector3 operator-() const

In-place negation operator.

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

function mkX

static inline Vector3 mkX()

function mkY

static inline Vector3 mkY()

function mkZ

static inline Vector3 mkZ()

Friends

friend Matrix3

friend class Matrix3(
    Matrix3 
);

friend multiply

friend Vector3 multiply(
    const double a,

    const Vector3 & v
);

Unbound scalar-product function.

friend multiply

friend Vector3 multiply(
    const Vector3 & v,

    const double a
);

Unbound scalar-product function.

friend add

friend Vector3 add(
    const Vector3 & a,

    const Vector3 & b
);

Unbound vector addition function.

friend subtract

friend Vector3 subtract(
    const Vector3 & a,

    const Vector3 & b
);

Unbound vector subtraction function.


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