CORSIKA8  0.0.0
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 #pragma once
10 
11 #include <corsika/framework/stack/CombinedStack.hpp>
12 #include <corsika/stack/GeometryNodeStackExtension.hpp>
13 #include <corsika/stack/NuclearStackExtension.hpp>
14 #include <corsika/stack/WeightStackExtension.hpp>
15 #include <corsika/stack/history/HistorySecondaryProducer.hpp>
16 #include <corsika/stack/history/HistoryStackExtension.hpp>
17 
18 #include <corsika/setup/SetupEnvironment.hpp>
19 
20 namespace corsika {
21 
22  namespace setup::detail {
23 
24  // ------------------------------------------
25  // add geometry node tracking data to stack:
26 
27  // the GeometryNode stack needs to know the type of geometry-nodes from the
28  // environment:
29  template <typename TStackIter>
30  using SetupGeometryDataInterface =
31  typename node::MakeGeometryDataInterface<TStackIter, setup::Environment>::type;
32 
33  // combine particle data stack with geometry information for tracking
34  template <typename TStackIter>
35  using StackWithGeometryInterface =
36  CombinedParticleInterface<nuclear_stack::ParticleDataStack::pi_type,
37  SetupGeometryDataInterface, TStackIter>;
38 
39  using StackWithGeometry =
41  node::GeometryData<setup::Environment>, StackWithGeometryInterface,
42  DefaultSecondaryProducer>;
43 
44  // ------------------------------------------
45  // Add [optional] history data to stack, too:
46 
47  // combine dummy stack with geometry information for tracking
48  template <typename TStackIter>
49  using StackWithHistoryInterface =
50  CombinedParticleInterface<StackWithGeometry::pi_type,
51  history::HistoryEventDataInterface, TStackIter>;
52 
53  using StackWithHistory =
55  history::HistoryEventData, StackWithHistoryInterface,
56  history::HistorySecondaryProducer>;
57 
58  } // namespace setup::detail
59 
60 } // namespace corsika
Stack< CombinedStackImpl< Stack1Impl, Stack2Impl >, _PI, _MSecondaryProducer > CombinedStack
Helper template alias CombinedStack to construct new combined stack from two stack data objects and a...
TStackData stack_data_type
this is the type of the user-provided data structure
Definition: Stack.hpp:82
The cascade namespace assembles all objects needed to simulate full particles cascades.