#include <setup.h>
A FourVector that is marked as a momentum vector.
Public Member Functions | |
| FourVector () | |
| default constructor nulls the fourvector components More... | |
| FourVector (double y0, double y1, double y2, double y3) | |
| copy constructor More... | |
| FourVector (double y0, ThreeVector vec) | |
| construct from time-like component and a ThreeVector. More... | |
Public Member Functions inherited from smash::FourVector | |
| FourVector () | |
| default constructor nulls the fourvector components More... | |
| FourVector (double y0, double y1, double y2, double y3) | |
| copy constructor More... | |
| FourVector (double y0, ThreeVector vec) | |
| construct from time-like component and a ThreeVector. More... | |
| double & | operator[] (std::size_t i) |
access the component at offset i. More... | |
| double | operator[] (std::size_t i) const |
| const overload of the [] operator More... | |
| double | x0 () const |
| void | set_x0 (double t) |
| double | x1 () const |
| void | set_x1 (double x) |
| double | x2 () const |
| void | set_x2 (double y) |
| double | x3 () const |
| void | set_x3 (double z) |
| ThreeVector | threevec () const |
| void | reset () |
| Set all the 4-vector components to 0. More... | |
| ThreeVector | velocity () const |
| Get the velocity (3-vector divided by zero component). More... | |
| double | Dot (const FourVector &a) const |
| calculate the scalar product with another four-vector More... | |
| double | sqr () const |
| calculate the square of the vector (which is a scalar) More... | |
| double | abs () const |
| calculate the lorentz invariant absolute value More... | |
| double | sqr3 () const |
| calculate the square of the spatial three-vector More... | |
| double | abs3 () const |
| calculate the absolute value of the spatial three-vector More... | |
| double | tau () const |
| calculate the proper time from the given four vector More... | |
| double | eta () const |
| calculate the space-time rapidity from the given four vector More... | |
| FourVector | lorentz_boost (const ThreeVector &v) const |
| Returns the FourVector boosted with velocity v. More... | |
| bool | operator== (const FourVector &a) const |
| Check if all four vector components are almost equal (accuracy \(10^{-4}\)). More... | |
| bool | operator!= (const FourVector &a) const |
| checks inequality (logical complement to FourVector::operator==(const FourVector&) const) More... | |
| bool | operator< (const FourVector &a) const |
| checks if \(x^\mu < a^\mu\) for all \(\mu\) (all four vector components are below comparison vector) More... | |
| bool | operator> (const FourVector &a) const |
| checks if \(x^\mu > a^\mu\) for all \(\mu\) (all four vector components are above comparison vector) More... | |
| bool | operator<= (const FourVector &a) const |
| logical complement to FourVector::operator>(const FourVector&) const More... | |
| bool | operator>= (const FourVector &a) const |
| logical complement to FourVector::operator<(const FourVector&) const More... | |
| FourVector | operator+= (const FourVector &a) |
| adds \(a_\mu: x_\mu^\prime = x_\mu + a_\mu\) More... | |
| FourVector | operator-= (const FourVector &a) |
| subtracts \(a_\mu: x_\mu^\prime = x_\mu - a_\mu\) More... | |
| FourVector | operator*= (const double &a) |
| multiplies by \(a: x_\mu^\prime = a \cdot x_\mu\) More... | |
| FourVector | operator/= (const double &a) |
| divides by \(a: x_\mu^\prime = \frac{1}{a} \cdot x_\mu\) More... | |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| const_iterator | cbegin () const |
| const_iterator | cend () const |
Additional Inherited Members | |
Public Types inherited from smash::FourVector | |
| using | iterator = std::array< double, 4 >::iterator |
| iterates over the components More... | |
| using | const_iterator = std::array< double, 4 >::const_iterator |
| iterates over the components More... | |
|
inline |
default constructor nulls the fourvector components
Definition at line 36 of file fourvector.h.
|
inline |
copy constructor
| [in] | y0 | The time component to be copied |
| [in] | y1 | The x component to be copied |
| [in] | y2 | The y component to be copied |
| [in] | y3 | the z component to be copied |
Definition at line 46 of file fourvector.h.
|
inline |
construct from time-like component and a ThreeVector.
| [in] | y0 | The time component to be used |
| [in] | vec | A ThreeVector (x,y,z) to be used |
Definition at line 55 of file fourvector.h.