CORSIKA  @c8_version@
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 
13 #include <corsika/framework/geometry/PhysicalGeometry.hpp>
16 
17 #include <Eigen/Dense>
18 
19 namespace corsika {
20 
47  class COMBoost {
48 
49  public:
56  COMBoost(FourMomentum const& P4projectile, HEPEnergyType const massTarget);
57 
62  COMBoost(MomentumVector const& momentum, HEPEnergyType const mass);
63 
69  COMBoost(FourMomentum const& P4projectile, FourMomentum const& P4target);
70 
72  template <typename FourVector>
73  FourVector toCoM(FourVector const& p4) const;
74 
76  template <typename FourVector>
77  FourVector fromCoM(FourVector const& p4) const;
78 
80  CoordinateSystemPtr const& getRotatedCS() const;
81 
83  CoordinateSystemPtr const& getOriginalCS() const;
84 
85  protected:
87  void setBoost(double const coshEta, double const sinhEta);
88 
89  public:
90  Eigen::Matrix2d boost_;
91  Eigen::Matrix2d inverseBoost_;
92  CoordinateSystemPtr const originalCS_;
93  CoordinateSystemPtr rotatedCS_;
94  };
95 } // namespace corsika
96 
97 #include <corsika/detail/framework/utility/COMBoost.inl>
Import and extend the phys::units package.
This utility class handles Lorentz boost (in one spatial direction) between different referenence fra...
Definition: COMBoost.hpp:47
CoordinateSystemPtr const & getRotatedCS() const
returns the rotated coordinate system: +z is projectile direction
CORSIKA8 logging utilities.
FourVector fromCoM(FourVector const &p4) const
transforms a 4-momentum from the center-of-mass frame back to lab frame
Description of physical four-vectors.
Definition: FourVector.hpp:51
`, since they are used everywhere as integral part of the framework.
CoordinateSystemPtr const & getOriginalCS() const
returns the original coordinate system of the projectile (lab)
std::shared_ptr< CoordinateSystem const > CoordinateSystemPtr
To refer to CoordinateSystems, only the CoordinateSystemPtr must be used.
COMBoost(FourMomentum const &P4projectile, HEPEnergyType const massTarget)
Construct a COMBoost given four-vector of projectile and mass of target (target at rest)...
void setBoost(double const coshEta, double const sinhEta)
internal method
FourVector toCoM(FourVector const &p4) const
transforms a 4-momentum from lab frame to the center-of-mass frame
General FourVector object.