21 #ifndef yap_LorentzTransformation_h
22 #define yap_LorentzTransformation_h
25 #include "FourVector.h"
37 FourMatrix<T> L = unitMatrix<T, 4>();
38 for (
unsigned i = 0; i < R.size(); ++i)
39 std::copy(R[i].begin(), R[i].end(), L[i + 1].begin() + 1);
48 auto gamma = V[0] /
abs(V);
51 return diagonalMatrix<T, 4>({ -1, 1, 1, 1}) +
outer(b, b);
71 {
return lorentzTransformation<T>(V) * lorentzTransformation<T>(R); }
78 {
return lorentzTransformation<T>(V) * lorentzTransformation<T>(R); }
85 {
return lorentzTransformation<T>(R) * lorentzTransformation<T>(V); }
92 {
return lorentzTransformation<T>(R) * lorentzTransformation<T>(V); }
Four-Vector handling.
Definition: FourVector.h:41
constexpr ThreeVector< T > vect(const FourVector< T > &V) noexcept
Definition: FourVector.h:68
constexpr T abs(const Vector< T, N > &A)
Definition: Vector.h:371
const SquareMatrix< T, N > outer(const Vector< T, N > &A, const Vector< T, N > &B)
outer product
Definition: Vector.h:405
const FourMatrix< T > lorentzTransformation(const ThreeMatrix< T > &R)
Definition: LorentzTransformation.h:35