Utilities
 group Utilities
Collection of classes and methods to perform recurring tasks.

class COMBoost
 #include <COMBoost.hpp>
This utility class handles Lorentz boost (in one spatial direction) between different referenence frames, using FourVector.
The class is initialized with projectile and optionally target energy/momentum data. During initialization, a rotation matrix is calculated to represent the projectile movement (and thus the boost) along the zaxis. Also the inverse of this rotation is calculated. The Lorentz boost matrix and its inverse are determined as 2x2 matrices considering the energy and pzmomentum.
Different constructors are offered with different specialization for the cases of collisions (projectiletarget) or just decays (projectile only).
Public Functions

COMBoost(FourMomentum const &P4projectile, HEPEnergyType const massTarget)
Construct a COMBoost given fourvector of projectile and mass of target (target at rest).
The FourMomentum and mass define the lab system.

COMBoost(MomentumVector const &momentum, HEPEnergyType const mass)
Construct a COMBoost to boost into the rest frame of a particle given its 3momentum and mass.

COMBoost(FourMomentum const &P4projectile, FourMomentum const &P4target)
Construct a COMBoost given two fourvectors of projectile target.
The two FourMomentum can define an arbitrary system.

template<typename FourVector>
FourVector toCoM(FourVector const &p4) const transforms a 4momentum from lab frame to the centerofmass frame

template<typename FourVector>
FourVector fromCoM(FourVector const &p4) const transforms a 4momentum from the centerofmass frame back to lab frame

CoordinateSystemPtr const &getRotatedCS() const
returns the rotated coordinate system: +z is projectile direction

CoordinateSystemPtr const &getOriginalCS() const
returns the original coordinate system of the projectile (lab)

COMBoost(FourMomentum const &P4projectile, HEPEnergyType const massTarget)

namespace andre
Functions

std::vector<double> solveP3(long double a, long double b, long double c, long double d, double const epsilon = 1e12)
Solve a x^3 + b x^2 + c x + d = 0.

std::vector<double> solve_quartic_real(long double a, long double b, long double c, long double d, long double e, double const epsilon = 1e12)
solve quartic equation a*x^4 + b*x^3 + c*x^2 + d*x + e Attention  this function returns dynamically allocated array.
It has to be released afterwards.

std::vector<double> solveP3(long double a, long double b, long double c, long double d, double const epsilon = 1e12)

class COMBoost