CORSIKA8  0.0.0
The framework to simulate particle cascades for astroparticle physics
Environment.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 
11 #include <corsika/media/IMediumModel.hpp>
12 #include <corsika/media/VolumeTreeNode.hpp>
13 #include <corsika/framework/geometry/Point.hpp>
14 #include <corsika/framework/geometry/RootCoordinateSystem.hpp>
15 #include <corsika/framework/geometry/Sphere.hpp>
16 
17 #include <corsika/media/Universe.hpp>
18 
19 #include <limits>
20 
21 namespace corsika {
22 
26  template <typename IEnvironmentModel>
27  class Environment {
28  public:
30 
31  Environment();
32 
37  //* Get non const universe */
39  typename BaseNodeType::VTNUPtr& getUniverse();
40  //* Get const universe */
41  typename BaseNodeType::VTNUPtr const& getUniverse() const;
43 
49 
57  template <class TVolumeType, typename... TVolumeArgs>
58  static std::unique_ptr<BaseNodeType> createNode(TVolumeArgs&&... args);
59 
60  private:
61  CoordinateSystemPtr const coordinateSystem_;
62  typename BaseNodeType::VTNUPtr universe_;
63  };
64 
65 } // namespace corsika
66 
67 #include <corsika/detail/media/Environment.inl>
CoordinateSystemPtr const & getCoordinateSystem() const
Getter for the CoordinateSystem used in the Environment.
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.
BaseNodeType::VTNUPtr & getUniverse()
Getters for the universe stored in the Environment.
static std::unique_ptr< BaseNodeType > createNode(TVolumeArgs &&... args)
Factory method for creation of VolumeTreeNodes.
Base Evnironment class Describes the Environment in which the shower is propagated.
Definition: Environment.hpp:27