CORSIKA8  0.0.0
The framework to simulate particle cascades for astroparticle physics
COMBoost.hpp
1 /*
2  * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
3  *
4  * This software is distributed under the terms of the GNU General Public
5  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
6  * the license.
7  */
8 
9 #pragma once
10 
12 #include <corsika/framework/geometry/FourVector.hpp>
13 #include <corsika/framework/geometry/PhysicalGeometry.hpp>
16 
17 #include <Eigen/Dense>
18 
19 namespace corsika {
20 
47  class COMBoost {
48 
49  public:
53  HEPEnergyType const massTarget);
54 
56  COMBoost(MomentumVector const& momentum, HEPEnergyType mass);
57 
59  template <typename FourVector>
60  FourVector toCoM(FourVector const& p) const;
61 
63  template <typename FourVector>
64  FourVector fromCoM(FourVector const& p) const;
65 
68 
69  protected:
71  void setBoost(double coshEta, double sinhEta);
72 
73  private:
74  Eigen::Matrix2d boost_;
75  Eigen::Matrix2d inverseBoost_;
76  CoordinateSystemPtr originalCS_;
77  CoordinateSystemPtr rotatedCS_;
78  };
79 } // namespace corsika
80 
81 #include <corsika/detail/framework/utility/COMBoost.inl>
COMBoost(FourVector< HEPEnergyType, MomentumVector > const &Pprojectile, HEPEnergyType const massTarget)
construct a COMBoost given four-vector of projectile and mass of target (target at rest) ...
CoordinateSystemPtr getRotatedCS() const
returns the rotated coordinate system
Import and extend the phys::units package.
This utility class handles Lorentz boost between different referenence frames, using FourVector...
Definition: COMBoost.hpp:47
FourVector toCoM(FourVector const &p) const
transforms a 4-momentum from lab frame to the center-of-mass frame
CORSIKA8 logging utilities.
FourVector fromCoM(FourVector const &p) const
transforms a 4-momentum from the center-of-mass frame back to lab frame
void setBoost(double coshEta, double sinhEta)
internal method
Description of physical four-vectors.
Definition: FourVector.hpp:45
The cascade namespace assembles all objects needed to simulate full particles cascades.
std::shared_ptr< CoordinateSystem const > CoordinateSystemPtr
To refer to CoordinateSystems, only the CoordinateSystemPtr must be used.