ThePEG is hosted by Hepforge, IPPP Durham
ThePEG  2.1.4
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
 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).
 
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 >
BinaryOpTraits< Value, U >::MulT dot (const LorentzVector< U > &a) const
 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
 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.
 
Mathematical assignment operators.
template<typename ValueB >
LorentzVector< Value > & operator+= (const LorentzVector< ValueB > &a)
 
template<typename ValueB >
LorentzVector< Value > & operator-= (const LorentzVector< ValueB > &a)
 
LorentzVector< Value > & operator*= (double a)
 
LorentzVector< Value > & operator/= (double a)
 

Private Types

typedef BinaryOpTraits< Value, Value >::MulT Value2
 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.

Member Function Documentation

◆ boost() [1/2]

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

Apply boost.

Parameters
bxComponent x of the boost.
byComponent y of the boost.
bzComponent z of the boost.
gammaOptional gamma parameter for higher numerical accuracy. The user has to ensure consistency. If not given, it will be calculated as $\gamma=1/\sqrt{1-\beta^2}$.

Definition at line 355 of file LorentzVector.h.

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

◆ boost() [2/2]

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

Apply boost.

Parameters
bThree-vector giving the boost.
gammaOptional gamma parameter for higher numerical accuracy. The user has to ensure consistency. If not given, it will be calculated as $\gamma=1/\sqrt{1-\beta^2}$.

Definition at line 382 of file LorentzVector.h.

◆ rotate()

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

Apply a rotation.

Parameters
angleRotation angle in radians.
axisRotation axis.

Definition at line 457 of file LorentzVector.h.

◆ rotateX()

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

Apply rotation around the x-axis.

Parameters
phiAngle in radians.

Definition at line 391 of file LorentzVector.h.

◆ rotateY()

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

Apply rotation around the y-axis.

Parameters
phiAngle in radians.

Definition at line 405 of file LorentzVector.h.

◆ rotateZ()

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

Apply rotation around the z-axis.

Parameters
phiAngle in radians.

Definition at line 419 of file LorentzVector.h.


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