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

The Lorentz5Vector inherits from the LorentzVector class. More...

#include <Lorentz5Vector.h>

Inheritance diagram for ThePEG::Lorentz5Vector< Value >:

Public Types

using Value2 = decltype(sqr(std::declval< Value >()))
 Template argument typedef.
 

Public Member Functions

Value x () const
 Component access.
 
Value y () const
 
Value z () const
 
Value t () const
 
Constructors and destructor.
 Lorentz5Vector ()
 Constructor giving the null vector.
 
 Lorentz5Vector (Value m)
 Constructor giving the invariant length.
 
 Lorentz5Vector (Value x, Value y, Value z, Value t=Value())
 Constructor giving the components x, y, z, t.
 
 Lorentz5Vector (Value x, Value y, Value z, Value t, Value tau)
 Constructor giving the components x, y, z, t and invariant length.
 
 Lorentz5Vector (const ThreeVector< Value > &p, Value e)
 Constructor giving a 3-Vector and a time component.
 
 Lorentz5Vector (Value m, const ThreeVector< Value > &p)
 Constructor giving an invariant length and a 3-Vector component.
 
 Lorentz5Vector (const ThreeVector< Value > &p, Value t, Value tau)
 Constructor giving a 3-Vector, a time component and an invariant length.
 
 Lorentz5Vector (const LorentzVector< Value > &p, Value m)
 Constructor giving a LorentzVector and an invariant length.
 
 Lorentz5Vector (const LorentzVector< Value > &p)
 Copy from HepLorentzVector constructor.
 
template<class U >
 Lorentz5Vector (const Lorentz5Vector< U > &p)
 Construct from value type U convertible to Value.
 
Assignment and set functions.
void setTau (Value a)
 Set invariant length/mass.
 
void setMass (Value a)
 Set invariant length/mass.
 
Lorentz5Vectoroperator= (const LorentzVector< Value > &q)
 Assignment.
 
Rescale functions to make consistent.
void rescaleEnergy ()
 Rescale energy, so that the invariant length/mass of the LorentzVector agrees with the current one.
 
void rescaleRho ()
 Rescale spatial component, so that the invariant length/mass of the LorentzVector agrees with the current one.
 
void rescaleMass ()
 Set the invariant length/mass member, so that it agrees with the invariant length/mass of the LorentzVector.
 
Check consistency.
double massError () const
 Return the relative inconsistency in the mass component.
 
double energyError () const
 Return the relative inconsistency in the energy component.
 
double rhoError () const
 Return the relative inconsistency in the spatial components.
 
- Public Member Functions inherited from ThePEG::LorentzVector< Value >
 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)
 
template<typename ValueB >
LorentzVector< Value > & operator= (const LorentzVector< ValueB > &b)
 Assignment operator.
 
Value x () const
 
Value y () const
 
Value z () const
 
Value t () const
 
Value e () const
 
void setX (Value x)
 
void setY (Value y)
 
void setZ (Value z)
 
void setT (Value t)
 
void setE (Value e)
 
ThreeVector< Value > vect () const
 Access to the 3-component part.
 
 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 \(x^\mu\,x_\mu=t^2 - \vec{x}^2\).
 
Value2 m2 (const LorentzVector< Value > &a) const
 Squared magnitude with another vector.
 
Value m () const
 Magnitude (signed) \(\pm\sqrt{|t^2 - \vec{x}^2|}\).
 
Value2 mt2 () const
 Transverse mass squared \(t^2-z^2\).
 
Value mt () const
 Transverse mass (signed) \(\pm\sqrt{|t^2 - z^2|}\).
 
Value2 perp2 () const
 Squared transverse component of the spatial vector \(x^2+y^2\).
 
Value perp () const
 Transverse component of the spatial vector \(\pm\sqrt{x^2 + y^2}\).
 
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).
 
Value2 rho2 () const
 Radius squared.
 
Value rho () const
 Radius.
 
void setRho (Value newRho)
 Set new radius.
 
double theta () const
 Polar angle.
 
double cosTheta () const
 Cosine of the polar angle.
 
double phi () const
 Azimuthal angle.
 
double eta () const
 Pseudorapidity of spatial part.
 
double angle (const LorentzVector< Value > &w) const
 Spatial angle with another vector.
 
double rapidity () const
 Rapidity \(\frac{1}{2}\ln\frac{t+z}{t-z} \).
 
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: \(\frac{\vec{x}}{t}\).
 
Boost findBoostToCM () const
 Boost from reference frame into this vector's rest frame: \(-\frac{\vec{x}}{t}\).
 
Value plus () const
 Returns the positive light-cone component \(t + z\).
 
Value minus () const
 Returns the negative light-cone component \(t - z\).
 
bool isNear (const LorentzVector< Value > &w, double epsilon) const
 Are two vectors nearby, using Euclidean measure \(t^2 + |\vec{x}|^2\)?
 
LorentzVector< Value > & transform (const SpinOneLorentzRotation &m)
 Rotate the vector. Resets \(x^\mu\rightarrow\mathsf{M}^\mu_\nu x^\nu\).
 
LorentzVector< Value > & operator*= (const SpinOneLorentzRotation &m)
 Rotate the vector. Resets \(x^\mu\rightarrow\mathsf{M}^\mu_\nu x^\nu\).
 
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.
 
LorentzVector< Value > & boost (Boost b, double gamma=-1.)
 Apply boost.
 
LorentzVector< Value > & rotateX (double phi)
 Apply rotation around the x-axis.
 
LorentzVector< Value > & rotateY (double phi)
 Apply rotation around the y-axis.
 
LorentzVector< Value > & rotateZ (double phi)
 Apply rotation around the z-axis.
 
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.
 
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)
 

Access components.

Value mm
 The invariant mass/length member.
 
Value2 mass2 () const
 Mass/invariant length component squared.
 
Value2 tau2 () const
 Mass/invariant length component squared.
 
Value mass () const
 Mass/invariant length component.
 
Value tau () const
 Mass/invariant length component.
 
Value dirPlus () const
 Return the positive negative light-cone components (depending on the value of Direction<0>.
 
Value dirMinus () const
 Return the positive negative light-cone components (depending on the value of Direction<0>.
 
Lorentz5Vectortransform (const LorentzRotation &r)
 Perform a Lorentz transformation.
 

Detailed Description

template<typename Value>
class ThePEG::Lorentz5Vector< Value >

The Lorentz5Vector inherits from the LorentzVector class.

It is templated on the type of the member variables. The Lorentz5Vector class is a LorentzVector with an extra member for the invariant length/mass of the vector. Note that an object of the Lorentz5Vector class may be internally inconsistent in that the invariant length/mass of the LorentzVector class need not be the same as the member variable representing the invariant length/mass. The degree of inconsistency can be accessed with the massError(), energyError() and rhoError() methods and an object can be made consistent using the rescaleMass(), rescaleEnergy() or rescaleRho() methods.

See also
Math

Definition at line 42 of file Lorentz5Vector.h.

Member Typedef Documentation

◆ Value2

template<typename Value >
using ThePEG::Lorentz5Vector< Value >::Value2 = decltype(sqr(std::declval<Value>()))

Template argument typedef.

Definition at line 47 of file Lorentz5Vector.h.

Constructor & Destructor Documentation

◆ Lorentz5Vector() [1/10]

template<typename Value >
ThePEG::Lorentz5Vector< Value >::Lorentz5Vector ( )
inline

Constructor giving the null vector.

Definition at line 65 of file Lorentz5Vector.h.

◆ Lorentz5Vector() [2/10]

template<typename Value >
ThePEG::Lorentz5Vector< Value >::Lorentz5Vector ( Value  m)
inline

Constructor giving the invariant length.

Definition at line 70 of file Lorentz5Vector.h.

◆ Lorentz5Vector() [3/10]

template<typename Value >
ThePEG::Lorentz5Vector< Value >::Lorentz5Vector ( Value  x,
Value  y,
Value  z,
Value  t = Value() 
)
inline

Constructor giving the components x, y, z, t.

The invariant length is set to LorentzVector::mag().

Definition at line 77 of file Lorentz5Vector.h.

References ThePEG::Lorentz5Vector< Value >::rescaleMass().

◆ Lorentz5Vector() [4/10]

template<typename Value >
ThePEG::Lorentz5Vector< Value >::Lorentz5Vector ( Value  x,
Value  y,
Value  z,
Value  t,
Value  tau 
)
inline

Constructor giving the components x, y, z, t and invariant length.

May result in an inconsistent Lorentz5Vector.

Definition at line 84 of file Lorentz5Vector.h.

◆ Lorentz5Vector() [5/10]

template<typename Value >
ThePEG::Lorentz5Vector< Value >::Lorentz5Vector ( const ThreeVector< Value > &  p,
Value  e 
)
inline

Constructor giving a 3-Vector and a time component.

The invariant length is set to LorentzVector::mag().

Definition at line 91 of file Lorentz5Vector.h.

References ThePEG::Lorentz5Vector< Value >::rescaleMass().

◆ Lorentz5Vector() [6/10]

template<typename Value >
ThePEG::Lorentz5Vector< Value >::Lorentz5Vector ( Value  m,
const ThreeVector< Value > &  p 
)
inline

Constructor giving an invariant length and a 3-Vector component.

The time component is set to the corresponding value.

Definition at line 98 of file Lorentz5Vector.h.

◆ Lorentz5Vector() [7/10]

template<typename Value >
ThePEG::Lorentz5Vector< Value >::Lorentz5Vector ( const ThreeVector< Value > &  p,
Value  t,
Value  tau 
)
inline

Constructor giving a 3-Vector, a time component and an invariant length.

May result in an inconsistent Lorentz5Vector.

Definition at line 105 of file Lorentz5Vector.h.

◆ Lorentz5Vector() [8/10]

template<typename Value >
ThePEG::Lorentz5Vector< Value >::Lorentz5Vector ( const LorentzVector< Value > &  p,
Value  m 
)
inline

Constructor giving a LorentzVector and an invariant length.

May result in an inconsistent Lorentz5Vector.

Definition at line 112 of file Lorentz5Vector.h.

◆ Lorentz5Vector() [9/10]

template<typename Value >
ThePEG::Lorentz5Vector< Value >::Lorentz5Vector ( const LorentzVector< Value > &  p)
inline

Copy from HepLorentzVector constructor.

The invariant length is set to LorentzVector::mag().

Definition at line 119 of file Lorentz5Vector.h.

References ThePEG::Lorentz5Vector< Value >::rescaleMass().

◆ Lorentz5Vector() [10/10]

template<typename Value >
template<class U >
ThePEG::Lorentz5Vector< Value >::Lorentz5Vector ( const Lorentz5Vector< U > &  p)
inline

Construct from value type U convertible to Value.

Definition at line 126 of file Lorentz5Vector.h.

Member Function Documentation

◆ dirMinus()

template<typename Value >
Value ThePEG::Lorentz5Vector< Value >::dirMinus ( ) const
inline

Return the positive negative light-cone components (depending on the value of Direction<0>.

Definition at line 248 of file Lorentz5Vector.h.

References ThePEG::LorentzVector< Value >::minus(), ThePEG::Direction< I >::neg(), and ThePEG::LorentzVector< Value >::plus().

◆ dirPlus()

template<typename Value >
Value ThePEG::Lorentz5Vector< Value >::dirPlus ( ) const
inline

Return the positive negative light-cone components (depending on the value of Direction<0>.

Definition at line 237 of file Lorentz5Vector.h.

References ThePEG::LorentzVector< Value >::minus(), ThePEG::LorentzVector< Value >::plus(), and ThePEG::Direction< I >::pos().

◆ energyError()

template<typename Value >
double ThePEG::Lorentz5Vector< Value >::energyError ( ) const
inline

Return the relative inconsistency in the energy component.

Definition at line 192 of file Lorentz5Vector.h.

References ThePEG::Lorentz5Vector< Value >::mass2(), and ThePEG::Math::relativeError().

Referenced by ThePEG::Particle::energyError().

◆ mass()

◆ mass2()

◆ massError()

template<typename Value >
double ThePEG::Lorentz5Vector< Value >::massError ( ) const
inline

Return the relative inconsistency in the mass component.

Definition at line 184 of file Lorentz5Vector.h.

References ThePEG::Lorentz5Vector< Value >::mass2(), and ThePEG::Math::relativeError().

Referenced by ThePEG::Particle::massError().

◆ operator=()

template<typename Value >
Lorentz5Vector & ThePEG::Lorentz5Vector< Value >::operator= ( const LorentzVector< Value > &  q)
inline

Assignment.

The invariant length is kept fixed. May result in an inconsistent Lorentz5Vector.

Definition at line 146 of file Lorentz5Vector.h.

References ThePEG::LorentzVector< Value >::operator=().

◆ rescaleEnergy()

template<typename Value >
void ThePEG::Lorentz5Vector< Value >::rescaleEnergy ( )
inline

Rescale energy, so that the invariant length/mass of the LorentzVector agrees with the current one.

Definition at line 158 of file Lorentz5Vector.h.

References ThePEG::Lorentz5Vector< Value >::mass2().

Referenced by ThePEG::Particle::rescaleEnergy(), ThePEG::Particle::set3Momentum(), and ThePEG::Particle::setLifeLength().

◆ rescaleMass()

template<typename Value >
void ThePEG::Lorentz5Vector< Value >::rescaleMass ( )
inline

Set the invariant length/mass member, so that it agrees with the invariant length/mass of the LorentzVector.

Definition at line 174 of file Lorentz5Vector.h.

References ThePEG::LorentzVector< Value >::m(), and ThePEG::Lorentz5Vector< Value >::mm.

Referenced by ThePEG::Lorentz5Vector< Value >::Lorentz5Vector(), and ThePEG::Particle::rescaleMass().

◆ rescaleRho()

template<typename Value >
void ThePEG::Lorentz5Vector< Value >::rescaleRho ( )
inline

Rescale spatial component, so that the invariant length/mass of the LorentzVector agrees with the current one.

Definition at line 166 of file Lorentz5Vector.h.

References ThePEG::Lorentz5Vector< Value >::mass2(), and ThePEG::LorentzVector< Value >::setRho().

Referenced by ThePEG::Particle::rescaleRho().

◆ rhoError()

template<typename Value >
double ThePEG::Lorentz5Vector< Value >::rhoError ( ) const
inline

Return the relative inconsistency in the spatial components.

Definition at line 200 of file Lorentz5Vector.h.

References ThePEG::Lorentz5Vector< Value >::mass2(), and ThePEG::Math::relativeError().

Referenced by ThePEG::Particle::rhoError().

◆ setMass()

template<typename Value >
void ThePEG::Lorentz5Vector< Value >::setMass ( Value  a)
inline

Set invariant length/mass.

Definition at line 140 of file Lorentz5Vector.h.

References ThePEG::Lorentz5Vector< Value >::mm.

Referenced by ThePEG::Particle::mass().

◆ setTau()

template<typename Value >
void ThePEG::Lorentz5Vector< Value >::setTau ( Value  a)
inline

Set invariant length/mass.

Definition at line 135 of file Lorentz5Vector.h.

References ThePEG::Lorentz5Vector< Value >::mm.

Referenced by ThePEG::Particle::lifeTime().

◆ t()

template<typename Value >
Value ThePEG::Lorentz5Vector< Value >::t ( ) const
inline

Definition at line 55 of file Lorentz5Vector.h.

◆ tau()

template<typename Value >
Value ThePEG::Lorentz5Vector< Value >::tau ( ) const
inline

Mass/invariant length component.

m() gives the same calculated from the LorentzVector

Definition at line 231 of file Lorentz5Vector.h.

References ThePEG::Lorentz5Vector< Value >::mass().

◆ tau2()

template<typename Value >
Value2 ThePEG::Lorentz5Vector< Value >::tau2 ( ) const
inline

Mass/invariant length component squared.

m2() gives the same calculated from the LorentzVector

Definition at line 218 of file Lorentz5Vector.h.

References ThePEG::Lorentz5Vector< Value >::mass2().

◆ transform()

template<typename Value >
Lorentz5Vector & ThePEG::Lorentz5Vector< Value >::transform ( const LorentzRotation r)
inline

◆ x()

template<typename Value >
Value ThePEG::Lorentz5Vector< Value >::x ( ) const
inline

◆ y()

template<typename Value >
Value ThePEG::Lorentz5Vector< Value >::y ( ) const
inline

Definition at line 53 of file Lorentz5Vector.h.

◆ z()

template<typename Value >
Value ThePEG::Lorentz5Vector< Value >::z ( ) const
inline

Definition at line 54 of file Lorentz5Vector.h.

Member Data Documentation

◆ mm


The documentation for this class was generated from the following file: