CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
BaseExponential.hpp
Go to the documentation of this file.
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/Line.hpp>
14 #include <corsika/framework/geometry/Point.hpp>
15 #include <corsika/framework/geometry/BaseTrajectory.hpp>
16 #include <limits>
17 
22 namespace corsika {
23 
30  template <typename TDerived>
32 
33  public:
34  BaseExponential(Point const& point, LengthType const referenceHeight,
35  MassDensityType const rho0, LengthType const lambda);
36 
37  Point const& getAnchorPoint() const { return point_; }
38 
39  protected:
40  auto const& getImplementation() const;
41 
48  MassDensityType getMassDensity(LengthType const height) const;
49 
50  // clang-format off
64  // clang-format on
66  DirectionVector const& axis) const;
67 
68  // clang-format off
85  // clang-format on
87  GrammageType const grammage,
88  DirectionVector const& axis) const;
89 
90  private:
91  MassDensityType const rho0_;
92  LengthType const lambda_;
93  InverseLengthType const invLambda_;
94  Point const point_;
95  LengthType const referenceHeight_;
96 
97  }; // class BaseExponential
98 
99 } // namespace corsika
100 
101 #include <corsika/detail/media/BaseExponential.inl>
Import and extend the phys::units package.
This class provides the grammage/length conversion functionality for (locally) flat exponential atmos...
LengthType getArclengthFromGrammage(BaseTrajectory const &line, GrammageType const grammage, DirectionVector const &axis) const
For a (normalized) axis , the length of a non-orthogonal line with (normalized) direction correspond...
`, since they are used everywhere as integral part of the framework.
A Trajectory is a description of a momvement of an object in three-dimensional space that describes t...
Interface to particle properties.
GrammageType getIntegratedGrammage(BaseTrajectory const &line, DirectionVector const &axis) const
For a (normalized) axis , the grammage along a non-orthogonal line with (normalized) direction is gi...
MassDensityType getMassDensity(LengthType const height) const
Returns the mass density at altitude "height".