CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
SlidingPlanarTabular.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 #include <corsika/media/NuclearComposition.hpp>
17 #include <corsika/media/BaseTabular.hpp>
18 
19 namespace corsika {
20 
21  // clang-format off
31  // clang-format on
32 
33  template <typename TDerived>
34  class SlidingPlanarTabular : public BaseTabular<SlidingPlanarTabular<TDerived>>,
35  public TDerived {
36 
38 
39  public:
40  SlidingPlanarTabular(Point const& p0,
41  std::function<MassDensityType(LengthType)> const& rho,
42  unsigned int const nBins, LengthType const deltaHeight,
43  NuclearComposition const& nuclComp,
44  LengthType referenceHeight = LengthType::zero());
45 
46  MassDensityType getMassDensity(Point const& point) const override;
47 
48  NuclearComposition const& getNuclearComposition() const override;
49 
50  GrammageType getIntegratedGrammage(BaseTrajectory const& line) const override;
51 
52  LengthType getArclengthFromGrammage(BaseTrajectory const& line,
53  GrammageType grammage) const override;
54 
55  private:
56  NuclearComposition const nuclComp_;
57  };
58 
59 } // namespace corsika
60 
61 #include <corsika/detail/media/SlidingPlanarTabular.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
class "quantity" is the heart of the library.
Definition: quantity.hpp:54
The SlidingPlanarTabular models mass density as For grammage/length conversion, the density distribu...
`, since they are used everywhere as integral part of the framework.
static constexpr quantity zero()
We need a "zero" of each type – for comparisons, to initialize running totals, etc.
Definition: quantity.hpp:359
A Trajectory is a description of a momvement of an object in three-dimensional space that describes t...
Describes the composition of matter Allowes and handles the creation of custom matter compositions...
Interface to particle properties.