CORSIKA  @c8_version@
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 
28  template <typename IEnvironmentModel>
29  class Environment {
30  public:
32 
33  Environment();
34 
40  typename BaseNodeType::VTNUPtr& getUniverse();
44  typename BaseNodeType::VTNUPtr const& getUniverse() const;
46 
53 
63  template <class TVolumeType, typename... TVolumeArgs>
64  static std::unique_ptr<BaseNodeType> createNode(TVolumeArgs&&... args);
65 
66  private:
67  CoordinateSystemPtr const coordinateSystem_;
68  typename BaseNodeType::VTNUPtr universe_;
69  };
70 
71 } // namespace corsika
72 
73 #include <corsika/detail/media/Environment.inl>
CoordinateSystemPtr const & getCoordinateSystem() const
Getter for the CoordinateSystem used in the Environment.
`, since they are used everywhere as integral part of the framework.
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 Environment class.
Definition: Environment.hpp:29