boca::LorentzVectorBase< Value_ > Class Template Reference

Lorentz Vector. More...

#include <LorentzVectorBase.hh>

Inheritance diagram for boca::LorentzVectorBase< Value_ >:
[legend]
Collaboration diagram for boca::LorentzVectorBase< Value_ >:
[legend]

Public Member Functions

boca::Angle Rapidity (Vector3< double > const &vector) const
 Rapidity with respect to another vector. More...
 
template<typename Value_2_ >
boca::Angle DeltaRapTo (LorentzVectorBase< Value_2_ > const &vector) const
 Difference in Rapidity to a vector \(\Delta y\). More...
 
template<typename Value_2_ >
boca::Angle DeltaRTo (LorentzVectorBase< Value_2_ > const &vector) const
 Difference in agular space to a vector \(\Delta R = \sqrt{ (\Delta y)^2 + (\Delta \phi)^2}\) to vector. More...
 
Constructor
constexpr LorentzVectorBase ()
 Default constructor. More...
 
constexpr LorentzVectorBase (Value_ x, Value_ y, Value_ z, Value_ t)
 Constructor accepting the components x, y, z, t. More...
 
constexpr LorentzVectorBase (Vector3< Value_ > const &vector3, Value_ const &t)
 Constructor accepting a 3-Vector and a scalar component. More...
 
template<typename Value_2 >
constexpr LorentzVectorBase (LorentzVectorBase< Value_2 > const &lorentz_vector)
 Copy constructor with casting. More...
 
Setter
void SetVectT (Vector3< Value_ > const &spatial, Value_ t)
 Set components. More...
 
void SetRho (Value_ rho)
 Set spatial magnitude. More...
 
void SetMag (Value_ magnitude)
 Set Nergy according to spatial component and magnitude \(e = \sqrt{ m^2 + \rho^2}\). More...
 
void SetVectMag (Vector3< Value_ > const &spatial, Value_ magnitude)
 Copy spatial coordinates, and set \(e = \sqrt{ m^2 + \rho^2}\). More...
 
void SetPerpEtaPhiMag (Value_ const &perp, boca::Angle const &eta, boca::Angle const &phi, Value_ const &mag)
 Set perp, \(\eta\), \(\phi\) and magnitude. More...
 
void SetPerpEtaPhiT (Value_ const &perp, boca::Angle const &eta, boca::Angle const &phi, Value_ const &t)
 Set perp, \(\eta\), \(\phi\) and time. More...
 
Accessors and Getter
constexpr Vector3< Value_ > const & Spatial () const
 Getter for the spatial components. More...
 
Vector3< Value_ > & Spatial ()
 Accessor for the spatial components. More...
 
Value_ & Scalar ()
 Accessor for the scalar. More...
 
Value_ & T ()
 Getter for the spatial components. More...
 
constexpr Value_ const & Scalar () const
 Getter for the scalar component. More...
 
constexpr Value_ const & T () const
 Getter for the scalar component. More...
 
Angles
boca::Angle Rapidity () const
 Rapidity \(y = \frac{1}{2} \ln\frac{t + z}{t - z}\). More...
 
boca::Angle Rap () const
 Rapidity \(y = \frac{1}{2} \ln\frac{t + z}{t - z}\). More...
 
Magnitudes
constexpr ValueSquare Rho2 () const
 Square of the spatial radius \(\rho^2 = x^2 + y^2\). More...
 
constexpr Value_ Rho () const
 spatial radius \(\rho = \sqrt{x^2 + y^2 + z^2}\) More...
 
constexpr ValueSquare Mag2 () const
 Square of the magnitude \(m^2 = t^2 - \rho^2\). More...
 
constexpr Value_ Mag () const
 Magnitude \(m = \sqrt{t^2 - \rho^2}\). More...
 
constexpr ValueSquare MagT2 () const
 Square of the transvere magnitude \(m_T^2 = m^2 + x^2 + y^2\). More...
 
constexpr Value_ MagT () const
 Transvere magnitude \(m_T = \sqrt{m^2 + x^2 + y^2}\). More...
 
constexpr ValueSquare ScalarT2 () const
 transvere scalar square \(e_T^2 = e^2 \frac{p_T^2}{\rho^2}\) More...
 
constexpr Value_ ScalarT () const
 transvere scalar square \(e_T = e \frac{p_T}{\rho}\) More...
 
template<typename Value , typename = OnlyIfNotQuantity<Value>>
constexpr ValueSquare ScalarT2 (Vector3< Value > const &vector) const
 Transverse scalar squared towards a vector. More...
 
template<typename Value , typename = OnlyIfNotQuantity<Value>>
constexpr Value_ ScalarT (Vector3< Value > const &vector) const
 Transverse scalar towards a vector. More...
 
constexpr double Beta () const
 Relative velocity \(\beta = \frac{\rho}{t}\). More...
 
constexpr double Gamma () const
 Lorentz factor \(\gamma = \frac{1}{\sqrt{1-\beta^2}}\). More...
 
constexpr Value_ Plus () const
 Positive light cone component \(p = t + z\). More...
 
constexpr Value_ Minus () const
 Negative light cone component \(m = t - z\). More...
 
Vectors
constexpr Vector3< double > BoostVector () const
 Spatial components divided by the time component. More...
 
constexpr Vector3< double > BoostIntoRestFrame () const
 
constexpr LorentzVectorBase< Value_ > Boosted (Vector3< double > const &boost) const
 Boosted Lorentz vector. More...
 
Rotation
LorentzVectorBase< Value_ > & Boost (Vector3< double > const &boost)
 Boost this Lorentz vector. More...
 
Products
template<typename Value_2 >
constexpr LorentzVectorBase< ValueProduct< Value_2 > > Scale (Value_2 const &scalar) const
 Scale. More...
 
template<typename Value_2 >
constexpr ValueProduct< Value_2 > Dot (LorentzVectorBase< Value_2 > const &lorentz_vector) const
 Scalar dot product with a lorentz vector. More...
 
template<typename Value_2 >
constexpr ValueProduct< Value_2 > Euclidean (LorentzVectorBase< Value_2 > const &lorentz_vector) const
 Euclidean product with a lorentz vector. More...
 

Protected Types

template<typename Value_2 >
using OnlyIfNotQuantity = typename std::enable_if< !IsQuantity< Value_2 >::value >::type
 

Protected Attributes

Value_ scalar_
 time or energy component More...
 

Operators

constexpr bool operator< (LorentzVectorBase const &lorentz_vector) const
 Less than comparison. More...
 
constexpr bool operator== (LorentzVectorBase const &lorentz_vector) const
 Equality comparison. More...
 
template<typename Value_2 , typename = OnlyIfNotOrSameQuantity<Value_2>>
LorentzVectorBaseoperator+= (LorentzVectorBase< Value_2 > const &lorentz_vector)
 Additions. More...
 
template<typename Value_2 , typename = OnlyIfNotOrSameQuantity<Value_2>>
LorentzVectorBaseoperator-= (LorentzVectorBase< Value_2 > const &lorentz_vector)
 Subtractions. More...
 
template<typename Value_2 , typename = OnlyIfNotQuantity<Value_2>>
LorentzVectorBaseoperator*= (Value_2 scalar)
 Product with scalar. More...
 
template<typename Value_2 , typename = OnlyIfNotQuantity<Value_2>>
LorentzVectorBaseoperator/= (Value_2 scalar)
 Divison by scalar. More...
 
template<typename Value_2 >
constexpr LorentzVectorBase< ValueQuotient< Value_2 > > operator/ (Value_2 const &scalar) const
 Divison by scalar. More...
 
constexpr LorentzVectorBase operator- () const
 Unary minus. More...
 
Value_ const & operator[] (LorentzDim lorentz_dim) const
 components by index. More...
 
Value_ & operator[] (LorentzDim lorentz_dim)
 components by index. More...
 
auto & operator<< (std::ostream &stream, LorentzVectorBase< Value_ > const &lorentz_vector)
 Output stream operator. More...
 

Iterators

using Dimension = LorentzDim
 
constexpr ConstIterator< Vector3, Value_ > begin () const
 
constexpr ConstIterator< Vector3, Value_ > end () const
 
Iterator< Vector3, Value_ > begin ()
 
Iterator< Vector3, Value_ > end ()
 

Detailed Description

template<typename Value_>
class boca::LorentzVectorBase< Value_ >

Lorentz Vector.

Member Typedef Documentation

template<typename Value_>
using boca::LorentzVectorBase< Value_ >::Dimension = LorentzDim
template<typename Value_>
template<typename Value_2 >
using boca::LorentzVectorBase< Value_ >::OnlyIfNotQuantity = typename std::enable_if < !IsQuantity<Value_2>::value >::type
protected

Constructor & Destructor Documentation

template<typename Value_>
constexpr boca::LorentzVectorBase< Value_ >::LorentzVectorBase ( )
inline

Default constructor.

template<typename Value_>
constexpr boca::LorentzVectorBase< Value_ >::LorentzVectorBase ( Value_  x,
Value_  y,
Value_  z,
Value_  t 
)
inline

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

template<typename Value_>
constexpr boca::LorentzVectorBase< Value_ >::LorentzVectorBase ( Vector3< Value_ > const &  vector3,
Value_ const &  t 
)
inline

Constructor accepting a 3-Vector and a scalar component.

template<typename Value_>
template<typename Value_2 >
constexpr boca::LorentzVectorBase< Value_ >::LorentzVectorBase ( LorentzVectorBase< Value_2 > const &  lorentz_vector)
inline

Copy constructor with casting.

Member Function Documentation

template<typename Value_>
constexpr ConstIterator<Vector3, Value_> boca::LorentzVectorBase< Value_ >::begin ( ) const
inline
template<typename Value_>
Iterator<Vector3, Value_> boca::LorentzVectorBase< Value_ >::begin ( )
inline
template<typename Value_>
constexpr double boca::LorentzVectorBase< Value_ >::Beta ( ) const
inline

Relative velocity \(\beta = \frac{\rho}{t}\).

template<typename Value_>
LorentzVectorBase<Value_>& boca::LorentzVectorBase< Value_ >::Boost ( Vector3< double > const &  boost)
inline

Boost this Lorentz vector.

template<typename Value_>
constexpr LorentzVectorBase<Value_> boca::LorentzVectorBase< Value_ >::Boosted ( Vector3< double > const &  boost) const
inline

Boosted Lorentz vector.

template<typename Value_>
constexpr Vector3<double> boca::LorentzVectorBase< Value_ >::BoostIntoRestFrame ( ) const
inline

Boost from reference frame into this vector's rest frame: \(-\frac{\vec{x}}{t}\).

template<typename Value_>
constexpr Vector3<double> boca::LorentzVectorBase< Value_ >::BoostVector ( ) const
inline

Spatial components divided by the time component.

template<typename Value_>
template<typename Value_2_ >
boca::Angle boca::LorentzVectorBase< Value_ >::DeltaRapTo ( LorentzVectorBase< Value_2_ > const &  vector) const
inline

Difference in Rapidity to a vector \(\Delta y\).

template<typename Value_>
template<typename Value_2_ >
boca::Angle boca::LorentzVectorBase< Value_ >::DeltaRTo ( LorentzVectorBase< Value_2_ > const &  vector) const
inline

Difference in agular space to a vector \(\Delta R = \sqrt{ (\Delta y)^2 + (\Delta \phi)^2}\) to vector.

template<typename Value_>
template<typename Value_2 >
constexpr ValueProduct<Value_2> boca::LorentzVectorBase< Value_ >::Dot ( LorentzVectorBase< Value_2 > const &  lorentz_vector) const
inline

Scalar dot product with a lorentz vector.

template<typename Value_>
constexpr ConstIterator<Vector3, Value_> boca::LorentzVectorBase< Value_ >::end ( ) const
inline
template<typename Value_>
Iterator<Vector3, Value_> boca::LorentzVectorBase< Value_ >::end ( )
inline
template<typename Value_>
template<typename Value_2 >
constexpr ValueProduct<Value_2> boca::LorentzVectorBase< Value_ >::Euclidean ( LorentzVectorBase< Value_2 > const &  lorentz_vector) const
inline

Euclidean product with a lorentz vector.

template<typename Value_>
constexpr double boca::LorentzVectorBase< Value_ >::Gamma ( ) const
inline

Lorentz factor \(\gamma = \frac{1}{\sqrt{1-\beta^2}}\).

template<typename Value_>
constexpr Value_ boca::LorentzVectorBase< Value_ >::Mag ( ) const
inline

Magnitude \(m = \sqrt{t^2 - \rho^2}\).

If the square of the magnitude is negative \(-\sqrt{-m^2}\) is returned

template<typename Value_>
constexpr ValueSquare boca::LorentzVectorBase< Value_ >::Mag2 ( ) const
inline

Square of the magnitude \(m^2 = t^2 - \rho^2\).

template<typename Value_>
constexpr Value_ boca::LorentzVectorBase< Value_ >::MagT ( ) const
inline

Transvere magnitude \(m_T = \sqrt{m^2 + x^2 + y^2}\).

template<typename Value_>
constexpr ValueSquare boca::LorentzVectorBase< Value_ >::MagT2 ( ) const
inline

Square of the transvere magnitude \(m_T^2 = m^2 + x^2 + y^2\).

template<typename Value_>
constexpr Value_ boca::LorentzVectorBase< Value_ >::Minus ( ) const
inline

Negative light cone component \(m = t - z\).

Beware of alternative definition \(m = \frac{t - z}{\sqrt 2}\)

template<typename Value_>
template<typename Value_2 , typename = OnlyIfNotQuantity<Value_2>>
LorentzVectorBase& boca::LorentzVectorBase< Value_ >::operator*= ( Value_2  scalar)
inline

Product with scalar.

template<typename Value_>
template<typename Value_2 , typename = OnlyIfNotOrSameQuantity<Value_2>>
LorentzVectorBase& boca::LorentzVectorBase< Value_ >::operator+= ( LorentzVectorBase< Value_2 > const &  lorentz_vector)
inline

Additions.

template<typename Value_>
constexpr LorentzVectorBase boca::LorentzVectorBase< Value_ >::operator- ( ) const
inline

Unary minus.

template<typename Value_>
template<typename Value_2 , typename = OnlyIfNotOrSameQuantity<Value_2>>
LorentzVectorBase& boca::LorentzVectorBase< Value_ >::operator-= ( LorentzVectorBase< Value_2 > const &  lorentz_vector)
inline

Subtractions.

template<typename Value_>
template<typename Value_2 >
constexpr LorentzVectorBase<ValueQuotient<Value_2> > boca::LorentzVectorBase< Value_ >::operator/ ( Value_2 const &  scalar) const
inline

Divison by scalar.

template<typename Value_>
template<typename Value_2 , typename = OnlyIfNotQuantity<Value_2>>
LorentzVectorBase& boca::LorentzVectorBase< Value_ >::operator/= ( Value_2  scalar)
inline

Divison by scalar.

template<typename Value_>
constexpr bool boca::LorentzVectorBase< Value_ >::operator< ( LorentzVectorBase< Value_ > const &  lorentz_vector) const
inline

Less than comparison.

template<typename Value_>
constexpr bool boca::LorentzVectorBase< Value_ >::operator== ( LorentzVectorBase< Value_ > const &  lorentz_vector) const
inline

Equality comparison.

template<typename Value_>
Value_ const& boca::LorentzVectorBase< Value_ >::operator[] ( LorentzDim  lorentz_dim) const
inline

components by index.

template<typename Value_>
Value_& boca::LorentzVectorBase< Value_ >::operator[] ( LorentzDim  lorentz_dim)
inline

components by index.

template<typename Value_>
constexpr Value_ boca::LorentzVectorBase< Value_ >::Plus ( ) const
inline

Positive light cone component \(p = t + z\).

Beware of alternative definition \(p = \frac{t + z}{\sqrt 2}\)

template<typename Value_>
boca::Angle boca::LorentzVectorBase< Value_ >::Rap ( ) const
inline

Rapidity \(y = \frac{1}{2} \ln\frac{t + z}{t - z}\).

template<typename Value_>
boca::Angle boca::LorentzVectorBase< Value_ >::Rapidity ( ) const
inline

Rapidity \(y = \frac{1}{2} \ln\frac{t + z}{t - z}\).

template<typename Value_>
boca::Angle boca::LorentzVectorBase< Value_ >::Rapidity ( Vector3< double > const &  vector) const
inline

Rapidity with respect to another vector.

template<typename Value_>
constexpr Value_ boca::LorentzVectorBase< Value_ >::Rho ( ) const
inline

spatial radius \(\rho = \sqrt{x^2 + y^2 + z^2}\)

template<typename Value_>
constexpr ValueSquare boca::LorentzVectorBase< Value_ >::Rho2 ( ) const
inline

Square of the spatial radius \(\rho^2 = x^2 + y^2\).

template<typename Value_>
Value_& boca::LorentzVectorBase< Value_ >::Scalar ( )
inline

Accessor for the scalar.

template<typename Value_>
constexpr Value_ const& boca::LorentzVectorBase< Value_ >::Scalar ( ) const
inline

Getter for the scalar component.

template<typename Value_>
constexpr Value_ boca::LorentzVectorBase< Value_ >::ScalarT ( ) const
inline

transvere scalar square \(e_T = e \frac{p_T}{\rho}\)

template<typename Value_>
template<typename Value , typename = OnlyIfNotQuantity<Value>>
constexpr Value_ boca::LorentzVectorBase< Value_ >::ScalarT ( Vector3< Value > const &  vector) const
inline

Transverse scalar towards a vector.

template<typename Value_>
constexpr ValueSquare boca::LorentzVectorBase< Value_ >::ScalarT2 ( ) const
inline

transvere scalar square \(e_T^2 = e^2 \frac{p_T^2}{\rho^2}\)

template<typename Value_>
template<typename Value , typename = OnlyIfNotQuantity<Value>>
constexpr ValueSquare boca::LorentzVectorBase< Value_ >::ScalarT2 ( Vector3< Value > const &  vector) const
inline

Transverse scalar squared towards a vector.

template<typename Value_>
template<typename Value_2 >
constexpr LorentzVectorBase<ValueProduct<Value_2> > boca::LorentzVectorBase< Value_ >::Scale ( Value_2 const &  scalar) const
inline

Scale.

template<typename Value_>
void boca::LorentzVectorBase< Value_ >::SetMag ( Value_  magnitude)
inline

Set Nergy according to spatial component and magnitude \(e = \sqrt{ m^2 + \rho^2}\).

template<typename Value_>
void boca::LorentzVectorBase< Value_ >::SetPerpEtaPhiMag ( Value_ const &  perp,
boca::Angle const &  eta,
boca::Angle const &  phi,
Value_ const &  mag 
)
inline

Set perp, \(\eta\), \(\phi\) and magnitude.

template<typename Value_>
void boca::LorentzVectorBase< Value_ >::SetPerpEtaPhiT ( Value_ const &  perp,
boca::Angle const &  eta,
boca::Angle const &  phi,
Value_ const &  t 
)
inline

Set perp, \(\eta\), \(\phi\) and time.

template<typename Value_>
void boca::LorentzVectorBase< Value_ >::SetRho ( Value_  rho)
inline

Set spatial magnitude.

template<typename Value_>
void boca::LorentzVectorBase< Value_ >::SetVectMag ( Vector3< Value_ > const &  spatial,
Value_  magnitude 
)
inline

Copy spatial coordinates, and set \(e = \sqrt{ m^2 + \rho^2}\).

template<typename Value_>
void boca::LorentzVectorBase< Value_ >::SetVectT ( Vector3< Value_ > const &  spatial,
Value_  t 
)
inline

Set components.

template<typename Value_>
constexpr Vector3<Value_> const& boca::LorentzVectorBase< Value_ >::Spatial ( ) const
inline

Getter for the spatial components.

template<typename Value_>
Vector3<Value_>& boca::LorentzVectorBase< Value_ >::Spatial ( )
inline

Accessor for the spatial components.

template<typename Value_>
Value_& boca::LorentzVectorBase< Value_ >::T ( )
inline

Getter for the spatial components.

template<typename Value_>
constexpr Value_ const& boca::LorentzVectorBase< Value_ >::T ( ) const
inline

Getter for the scalar component.

Friends And Related Function Documentation

template<typename Value_>
auto& operator<< ( std::ostream &  stream,
LorentzVectorBase< Value_ > const &  lorentz_vector 
)
friend

Output stream operator.

Member Data Documentation

template<typename Value_>
Value_ boca::LorentzVectorBase< Value_ >::scalar_
protected

time or energy component


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