CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
BaseTabular.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/Line.hpp>
14 #include <corsika/framework/geometry/Point.hpp>
15 #include <corsika/framework/geometry/BaseTrajectory.hpp>
16 
17 #include <limits>
18 #include <vector>
19 
20 namespace corsika {
21 
26  template <typename TDerived>
27  class BaseTabular {
28 
29  public:
30  BaseTabular(Point const& point, LengthType const referenceHeight,
31  std::function<MassDensityType(LengthType)> const& rho,
32  unsigned int const nBins, LengthType const deltaHeight);
33 
34  Point const& getAnchorPoint() const { return point_; }
35 
36  protected:
37  auto const& getImplementation() const;
38 
39  MassDensityType getMassDensity(LengthType const height) const;
40 
41  GrammageType getIntegratedGrammage(BaseTrajectory const& line) const;
42 
43  LengthType getArclengthFromGrammage(BaseTrajectory const& line,
44  GrammageType const grammage) const;
45 
46  private:
47  unsigned int const nBins_;
48  LengthType deltaHeight_;
49  std::vector<MassDensityType> density_;
50  Point const point_;
51  LengthType const referenceHeight_;
52 
53  }; // class BaseTabular
54 
55 } // namespace corsika
56 
57 #include <corsika/detail/media/BaseTabular.inl>
Import and extend the phys::units package.
This class provides the grammage/length conversion functionality for (locally) flat tabulated atmosph...
Definition: BaseTabular.hpp:27
`, 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.