thepeg is hosted by Hepforge, IPPP Durham
 ThePEG  2.2.1
ThePEG::LorentzVector< Value > Class Template Reference

A 4-component Lorentz vector. More...

#include <LorentzVector.h>

Inheritance diagram for ThePEG::LorentzVector< Value >:

## Public Member Functions

template<typename ValueB >
LorentzVector< Value > & operator= (const LorentzVector< ValueB > &b)
Assignment operator.

ThreeVector< Value > vect () const

operator ThreeVector< Value > () const
Cast to the 3-component part.

void setVect (const ThreeVector< Value > &p)
Set the 3-component part.

LorentzVector< Value > conjugate () const
The complex conjugate vector.

Value2 m2 () const
Squared magnitude .

Value2 m2 (const LorentzVector< Value > &a) const
Squared magnitude with another vector.

Value m () const
Magnitude (signed) .

Value2 mt2 () const
Transverse mass squared .

Value mt () const
Transverse mass (signed) .

Value2 perp2 () const
Squared transverse component of the spatial vector .

Value perp () const
Transverse component of the spatial vector .

template<typename U >
Value2 perp2 (const ThreeVector< U > &p) const
Squared transverse component of the spatial vector with respect to the given axis.

template<typename U >
Value perp (const ThreeVector< U > &p) const
Transverse component of the spatial vector with respect to the given axis.

Value2 et2 () const
Transverse energy squared.

Value et () const
Transverse energy (signed).

Value2 et2 (const ThreeVector< double > &v) const
Transverse energy squared with respect to the given axis.

Value et (const ThreeVector< double > &v) const
Transverse energy with respect to the given axis (signed).

double eta () const
Pseudorapidity of spatial part.

double angle (const LorentzVector< Value > &w) const
Spatial angle with another vector.

double rapidity () const
Rapidity .

double rapidity (const Axis &ref) const
Rapidity with respect to another vector.

Boost boostVector () const
Boost from reference frame into this vector's rest frame: .

Boost findBoostToCM () const
Boost from reference frame into this vector's rest frame: .

Value plus () const
Returns the positive light-cone component .

Value minus () const
Returns the negative light-cone component .

bool isNear (const LorentzVector< Value > &w, double epsilon) const
Are two vectors nearby, using Euclidean measure ?

LorentzVector< Value > & transform (const SpinOneLorentzRotation &m)
Rotate the vector. Resets .

LorentzVector< Value > & operator*= (const SpinOneLorentzRotation &m)
Rotate the vector. Resets .

template<typename U >
auto dot (const LorentzVector< U > &a) const -> decltype(this->t() *a.t())
Dot product with metric .

LorentzVector< Value > & boost (double bx, double by, double bz, double gamma=-1.)
Apply boost. More...

LorentzVector< Value > & boost (Boost b, double gamma=-1.)
Apply boost. More...

LorentzVector< Value > & rotateX (double phi)
Apply rotation around the x-axis. More...

LorentzVector< Value > & rotateY (double phi)
Apply rotation around the y-axis. More...

LorentzVector< Value > & rotateZ (double phi)
Apply rotation around the z-axis. More...

LorentzVector< Value > & rotateUz (const Axis &axis)
Rotate the reference frame to a new z-axis.

template<typename U >
LorentzVector< Value > & rotate (double angle, const ThreeVector< U > &axis)
Apply a rotation. More...

Constructors.
LorentzVector ()

LorentzVector (Value x, Value y, Value z, Value t)

LorentzVector (const ThreeVector< Value > &v, Value t)

template<typename U >
LorentzVector (const LorentzVector< U > &v)

Component access methods.
Value x () const

Value y () const

Value z () const

Value t () const

Value e () const

Component set methods.
void setX (Value x)

void setY (Value y)

void setZ (Value z)

void setT (Value t)

void setE (Value e)

Spherical coordinates for the spatial part.
Value2 rho2 () const

Value rho () const

void setRho (Value newRho)

double theta () const
Polar angle.

double cosTheta () const
Cosine of the polar angle.

double phi () const
Azimuthal angle.

Mathematical assignment operators.
LorentzVector< Complex > & operator+= (const LorentzVector< complex< QtyDouble > > &a)

template<typename ValueB >
LorentzVector< Value > & operator+= (const LorentzVector< ValueB > &a)

LorentzVector< Complex > & operator-= (const LorentzVector< complex< QtyDouble > > &a)

template<typename ValueB >
LorentzVector< Value > & operator-= (const LorentzVector< ValueB > &a)

LorentzVector< Value > & operator*= (double a)

LorentzVector< Value > & operator/= (double a)

## Private Types

using Value2 = decltype(sqr(std::declval< Value >()))
Value squared.

## Private Attributes

Vector components
Value theX

Value theY

Value theZ

Value theT

## Detailed Description

### template<typename Value> class ThePEG::LorentzVector< Value >

A 4-component Lorentz vector.

It can be created with any unit type as template parameter. All basic mathematical operations are supported, as well as a subset of the CLHEP LorentzVector functionality.

Definition at line 35 of file LorentzVector.h.

## ◆ boost() [1/2]

template<typename Value>
 LorentzVector& ThePEG::LorentzVector< Value >::boost ( double bx, double by, double bz, double gamma = -1. )
inline

Apply boost.

Parameters
 bx Component x of the boost. by Component y of the boost. bz Component z of the boost. gamma Optional gamma parameter for higher numerical accuracy. The user has to ensure consistency. If not given, it will be calculated as .

Definition at line 354 of file LorentzVector.h.

Referenced by ThePEG::LorentzVector< complex< double > >::boost().

## ◆ boost() [2/2]

template<typename Value>
 LorentzVector& ThePEG::LorentzVector< Value >::boost ( Boost b, double gamma = -1. )
inline

Apply boost.

Parameters
 b Three-vector giving the boost. gamma Optional gamma parameter for higher numerical accuracy. The user has to ensure consistency. If not given, it will be calculated as .

Definition at line 381 of file LorentzVector.h.

## ◆ rotate()

template<typename Value>
template<typename U >
 LorentzVector& ThePEG::LorentzVector< Value >::rotate ( double angle, const ThreeVector< U > & axis )
inline

Apply a rotation.

Parameters
 angle Rotation angle in radians. axis Rotation axis.

Definition at line 456 of file LorentzVector.h.

## ◆ rotateX()

template<typename Value>
 LorentzVector& ThePEG::LorentzVector< Value >::rotateX ( double phi )
inline

Apply rotation around the x-axis.

Parameters

Definition at line 390 of file LorentzVector.h.

## ◆ rotateY()

template<typename Value>
 LorentzVector& ThePEG::LorentzVector< Value >::rotateY ( double phi )
inline

Apply rotation around the y-axis.

Parameters

Definition at line 404 of file LorentzVector.h.

## ◆ rotateZ()

template<typename Value>
 LorentzVector& ThePEG::LorentzVector< Value >::rotateZ ( double phi )
inline

Apply rotation around the z-axis.

Parameters