Utilities¶
- group Utilities
Collection of classes and methods to perform recurring tasks.
-
class corsika::COMBoost¶
- #include <COMBoost.hpp>
This utility class handles Lorentz boost 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 z-axis. Also the inverse of this rotation is calculated. The Lorentz boost matrix and its inverse are determined as 2x2 matrices considering the energy and pz-momentum.
Different constructors are offered with different specialization for the cases of collisions (projectile-target) or just decays (projectile only).
Public Functions
-
COMBoost(FourVector<HEPEnergyType, MomentumVector> const &Pprojectile, HEPEnergyType const massTarget)¶
construct a COMBoost given four-vector of projectile and mass of target (target at rest)
-
COMBoost(MomentumVector const &momentum, HEPEnergyType mass)¶
construct a COMBoost to boost into the rest frame given a 3-momentum and mass
-
template<typename FourVector>
FourVector toCoM(FourVector const &p) const¶ transforms a 4-momentum from lab frame to the center-of-mass frame
-
template<typename FourVector>
FourVector fromCoM(FourVector const &p) const¶ transforms a 4-momentum from the center-of-mass frame back to lab frame
-
CoordinateSystemPtr getRotatedCS() const¶
returns the rotated coordinate system
-
COMBoost(FourVector<HEPEnergyType, MomentumVector> const &Pprojectile, HEPEnergyType const massTarget)¶
-
namespace corsika::andre¶
Functions
-
std::vector<double> solveP3(long double a, long double b, long double c, long double d, double const epsilon = 1e-12)¶
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 = 1e-12)¶
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 = 1e-12)¶
-
class corsika::COMBoost¶