CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
SetupStack.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 #include <corsika/detail/setup/SetupStack.hpp>
10 
11 #include <array>
12 #include <memory>
13 
14 namespace corsika::setup {
15 
16  // ---------------------------------------
17  // this is the stack we use in C8 executables:
18 
19 #ifdef WITH_HISTORY
20 
21 #include <corsika/stack/history/HistoryStackExtension.hpp>
22 #include <corsika/stack/history/HistorySecondaryProducer.hpp>
23 
24  /*
25  * the version with history
26  */
27  template <typename TEnvironment>
28  using Stack = typename detail::StackGenerator<TEnvironment>::StackWithHistory;
29 
30 #else // WITH_HISTORY
31 
32  /*
33  * the version without history (and geometry data and weights)
34  */
35  template <typename TEnvironment>
36  using Stack = typename detail::StackGenerator<TEnvironment>::StackWithWeight;
37 
38 #endif
39 
40  // the correct secondary stack view
41  template <typename TEnvironment>
42  using StackView = typename Stack<TEnvironment>::stack_view_type;
43 
44 } // namespace corsika::setup