diff --git a/CMakeLists.txt b/CMakeLists.txt
index a04d2acbb9eeca7ef29f2e45091be5bc652a5a70..2fd59736e161af2d4f53e57e75613e8d6fe667f6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,6 @@ include (CorsikaUtilities) # a few cmake function
 # enable warnings and disallow non-standard language
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra")
 
-# --std=c++17
 set (CMAKE_CXX_STANDARD 17)
 enable_testing ()
 set (CTEST_OUTPUT_ON_FAILURE 1)
@@ -37,15 +36,16 @@ set (CTEST_OUTPUT_ON_FAILURE 1)
 #add_custom_command (TARGET corsika_pre_build PRE_BUILD COMMAND "${PROJECT_SOURCE_DIR}/pre_compile.py")
 
 # dependencies
-find_package (Boost 1.40 COMPONENTS program_options REQUIRED)
+#find_package (Boost 1.40 COMPONENTS program_options REQUIRED)
 find_package (Eigen3 REQUIRED)
 #find_package (HDF5) # not yet needed
 
 # order of subdirectories 
 add_subdirectory (ThirdParty)
+#add_subdirectory (Utilities)
 add_subdirectory (Framework)
 add_subdirectory (Stack)
+add_subdirectory (Setup)
 add_subdirectory (Processes)
 add_subdirectory (Documentation)
 add_subdirectory (Main)
-
diff --git a/CMakeModules/CorsikaUtilities.cmake b/CMakeModules/CorsikaUtilities.cmake
index f98a7585468a68c1845192c4ff779debb5396a76..0ba70d8ff63f1e372fd8daae3e4f06cc96343a8e 100644
--- a/CMakeModules/CorsikaUtilities.cmake
+++ b/CMakeModules/CorsikaUtilities.cmake
@@ -55,3 +55,26 @@ function (CORSIKA_COPY_HEADERS_TO_NAMESPACE for_library in_namespace)
 
 endfunction (CORSIKA_COPY_HEADERS_TO_NAMESPACE)
 
+
+
+
+#
+# use: CORSIKA_ADD_FILES_ABSOLUTE varname
+#
+# add list of filenames with absolute paths (pointing to CMAKE_SOURCE_DIR) to ${varname} in PARAENT_SCOPE
+# 
+
+macro (CORSIKA_ADD_FILES_ABSOLUTE varname)
+  file (RELATIVE_PATH _relPath "${PROJECT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
+  foreach (_src ${ARGN})
+    if (_relPath)
+      list (APPEND "${varname}" "${CMAKE_SOURCE_DIR}/${_relPath}/${_src}")
+    else()
+      list (APPEND "${varname}" "${CMAKE_SOURCE_DIR}/${_src}")
+    endif()
+  endforeach()
+  if (_relPath)
+    # propagate SRCS to parent directory
+    set ("${varname}" "${${varname}}" PARENT_SCOPE)
+  endif()
+endmacro(CORSIKA_ADD_FILES_ABSOLUTE)
diff --git a/Framework/Cascade/CMakeLists.txt b/Framework/Cascade/CMakeLists.txt
index 63fe2cb858b3709bccb3d12fda1b3d5160327dff..5dbb843bc79e6b181e47489f331490bb87c495a6 100644
--- a/Framework/Cascade/CMakeLists.txt
+++ b/Framework/Cascade/CMakeLists.txt
@@ -51,11 +51,13 @@ add_executable (
 
 target_link_libraries (
   testCascade
+#  CORSIKAutls
   CORSIKAcascade
+  ProcessStackInspector
+  CORSIKAprocesses
   CORSIKAparticles
   CORSIKAgeometry
   CORSIKAprocesssequence
-  SuperStupidStack
   CORSIKAunits
   CORSIKAthirdparty # for catch2
   )
diff --git a/Framework/Cascade/Cascade.cc b/Framework/Cascade/Cascade.cc
index 1bd6b5b2b1c2681edb48e77f51028ad54d10bf08..7784c6ca5670717481ebb218b2e6362328dbf44c 100644
--- a/Framework/Cascade/Cascade.cc
+++ b/Framework/Cascade/Cascade.cc
@@ -2,19 +2,13 @@
 
 using namespace corsika::cascade;
 
-template <typename ProcessList, typename Particle, typename Trajectory, typename Stack>
-Cascade<ProcessList, Particle, Trajectory, Stack>::Cascade() {
-  //  kkk;
-  //  kk;
-}
-
-template <typename ProcessList, typename Particle, typename Trajectory, typename Stack>
+template <typename ProcessList, typename Stack> //, typename Trajectory>
 void Cascade::Init() {
   fStack.Init();
   fProcesseList.Init();
 }
 
-template <typename ProcessList, typename Particle, typename Trajectory, typename Stack>
+template <typename ProcessList, typename Stack> //, typename Trajectory>
 void Cascade::Run() {
   if (!fStack.IsEmpty()) {
     if (!fStack.IsEmpty()) {
@@ -27,10 +21,11 @@ void Cascade::Run() {
   }
 }
 
-template <typename Sequence, typename Trajectory>
+template <typename ProcessList, typename Stack> //, typename Trajectory>
 void Cascade::Step(Particle& particle) {
   double nextStep = fProcesseList.MinStepLength(particle);
-  Trajectory trajectory = fProcesseList.Transport(particle, nextStep);
+  corsika::geometry::LineTrajectory trajectory =
+      fProcesseList.Transport(particle, nextStep);
   sequence.DoContinuous(particle, trajectory);
   sequence.DoDiscrete(particle);
 }
diff --git a/Framework/Cascade/Cascade.h b/Framework/Cascade/Cascade.h
index 25935d3a639cd0f6fc8974174b55391b4dd08710..4f415f0c0bd3941643baa63a490d6657128e0c31 100644
--- a/Framework/Cascade/Cascade.h
+++ b/Framework/Cascade/Cascade.h
@@ -1,8 +1,8 @@
 #ifndef _include_Cascade_h_
 #define _include_Cascade_h_
 
-#include <corsika/geometry/LineTrajectory.h> // to be removed
-#include <corsika/geometry/Point.h>          // to be removed
+#include <corsika/geometry/LineTrajectory.h> // to be removed. for dummy trajectory only
+#include <corsika/geometry/Point.h>          // to be removed. for dummy trajectory only
 #include <corsika/process/ProcessReturn.h>
 #include <corsika/units/PhysicalUnits.h>
 
@@ -10,11 +10,13 @@ using namespace corsika::units::si;
 
 namespace corsika::cascade {
 
-  template <typename Trajectory, typename ProcessList, typename Stack>
+  template <typename ProcessList, typename Stack> //, typename Trajectory>
   class Cascade {
 
     typedef typename Stack::ParticleType Particle;
 
+    Cascade() = delete;
+
   public:
     Cascade(ProcessList& pl, Stack& stack)
         : fProcesseList(pl)
@@ -28,34 +30,37 @@ namespace corsika::cascade {
     void Run() {
       while (!fStack.IsEmpty()) {
         while (!fStack.IsEmpty()) {
-          // Particle& p = *fStack.GetNextParticle();
-          EnergyType Emin;
-          typename Stack::StackIterator pMin(fStack, 0);
-          bool first = true;
-          for (typename Stack::StackIterator ip = fStack.begin(); ip != fStack.end();
-               ++ip) {
+          Particle& pNext = *fStack.GetNextParticle();
+          /*
+            EnergyType Emin;
+            typename Stack::StackIterator pNext(fStack, 0);
+            bool first = true;
+            for (typename Stack::StackIterator ip = fStack.begin(); ip != fStack.end();
+            ++ip) {
             if (first || ip.GetEnergy() < Emin) {
-              first = false;
-              pMin = ip;
-              Emin = pMin.GetEnergy();
+            first = false;
+            pNext = ip;
+            Emin = pMin.GetEnergy();
             }
-          }
-
-          Step(pMin);
+            }
+          */
+          Step(pNext);
         }
         // do cascade equations, which can put new particles on Stack,
         // thus, the double loop
         // DoCascadeEquations(); //
       }
     }
-
+    
     void Step(Particle& particle) {
-      double nextStep = fProcesseList.MinStepLength(particle);
+      [[maybe_unused]] double nextStep = fProcesseList.MinStepLength(particle);
+      // corsika::utls::ignore(nextStep);
       corsika::geometry::CoordinateSystem root;
-      Trajectory trajectory(
-          corsika::geometry::Point(root, {0_m, 0_m, 0_m}),
-          corsika::geometry::Vector<corsika::units::si::SpeedType::dimension_type>(
-              root, 0 * 1_m / second, 0 * 1_m / second, 1 * 1_m / second));
+      corsika::geometry::LineTrajectory
+          trajectory( // trajectory is not yet used. this is a dummy.
+              corsika::geometry::Point(root, {0_m, 0_m, 0_m}),
+              corsika::geometry::Vector<corsika::units::si::SpeedType::dimension_type>(
+                  root, 0 * 1_m / second, 0 * 1_m / second, 1 * 1_m / second));
       corsika::process::EProcessReturn status =
           fProcesseList.DoContinuous(particle, trajectory, fStack);
       if (status == corsika::process::EProcessReturn::eParticleAbsorbed) {
@@ -64,10 +69,10 @@ namespace corsika::cascade {
         fProcesseList.DoDiscrete(particle, fStack);
       }
     }
-
+    
   private:
-    Stack& fStack;
     ProcessList& fProcesseList;
+    Stack& fStack;
   };
 
 } // namespace corsika::cascade
diff --git a/Framework/Cascade/testCascade.cc b/Framework/Cascade/testCascade.cc
index 9d30afcefa12ac8b9a6f5b2798045cd6b1a61ccc..ec194db4b02c116b0863baf0d89b60b2c1696277 100644
--- a/Framework/Cascade/testCascade.cc
+++ b/Framework/Cascade/testCascade.cc
@@ -2,12 +2,15 @@
 #include <corsika/geometry/LineTrajectory.h>
 #include <corsika/process/ProcessSequence.h>
 #include <corsika/process/stack_inspector/StackInspector.h>
-#include <corsika/stack/super_stupid/SuperStupidStack.h>
+
+#include <corsika/setup/SetupStack.h>
+#include <corsika/setup/SetupTrajectory.h>
 
 #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one
                           // cpp file
 #include <catch2/catch.hpp>
 
+using namespace corsika;
 using namespace corsika::process;
 using namespace corsika::units;
 
@@ -26,7 +29,8 @@ public:
   }
 
   template <typename Particle, typename Trajectory, typename Stack>
-  EProcessReturn DoContinuous(Particle& p, Trajectory& t, Stack& s) const {
+  EProcessReturn DoContinuous(Particle&, Trajectory&, Stack&) const {
+    // corsika::utls::ignore(p);
     return EProcessReturn::eOk;
   }
 
@@ -49,55 +53,14 @@ public:
 private:
 };
 
-class ProcessReport : public corsika::process::BaseProcess<ProcessReport> {
-  bool fReport = false;
-
-public:
-  ProcessReport(bool v)
-      : fReport(v) {}
-
-  template <typename Particle>
-  double MinStepLength(Particle&) const {
-    return 0;
-  }
-
-  template <typename Particle, typename Trajectory, typename Stack>
-  EProcessReturn DoContinuous(Particle& p, Trajectory& t, Stack& s) const {
-    static int countStep = 0;
-    if (!fReport) return EProcessReturn::eOk;
-    // std::cout << "generation  " << countStep << std::endl;
-    int i = 0;
-    EnergyType Etot = 0_GeV;
-    for (auto& iterP : s) {
-      EnergyType E = iterP.GetEnergy();
-      Etot += E;
-      /*      std::cout << " particle data: " << i++ << ", id=" << iterP.GetPID()
-                << ", E=" << double(E / 1_GeV) << " GeV "
-                << " | " << std::endl;
-      */
-    }
-    countStep++;
-    // cout << "#=" << countStep << " " << s.GetSize() << " " << Etot/1_GeV << endl;
-    cout << countStep << " " << s.GetSize() << " " << Etot / 1_GeV << " " << fCount
-         << endl;
-    return EProcessReturn::eOk;
-  }
-
-  template <typename Particle, typename Stack>
-  void DoDiscrete(Particle& p, Stack& s) const {}
-  void Init() {}
-};
-
 TEST_CASE("Cascade", "[Cascade]") {
 
-  ProcessReport p0(true);
+  stack_inspector::StackInspector<setup::Stack, setup::Trajectory> p0(true);
   ProcessSplit p1;
   const auto sequence = p0 + p1;
-  corsika::stack::super_stupid::SuperStupidStack stack;
+  setup::Stack stack;
 
-  corsika::cascade::Cascade<corsika::geometry::LineTrajectory, decltype(sequence),
-                            decltype(stack)>
-      EAS(sequence, stack);
+  corsika::cascade::Cascade EAS(sequence, stack);
 
   stack.Clear();
   auto particle = stack.NewParticle();
diff --git a/Framework/Geometry/CMakeLists.txt b/Framework/Geometry/CMakeLists.txt
index a4fc43cb3364881d7f3e42939b0985b69df4afab..60992f4270249a7ad6d090086476849b9364e461 100644
--- a/Framework/Geometry/CMakeLists.txt
+++ b/Framework/Geometry/CMakeLists.txt
@@ -42,7 +42,7 @@ target_link_libraries (
 
 target_include_directories (
   CORSIKAgeometry
-  PRIVATE   ${EIGEN3_INCLUDE_DIR}
+  PUBLIC    ${EIGEN3_INCLUDE_DIR}
   INTERFACE ${EIGEN3_INCLUDE_DIR}
   $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
   $<INSTALL_INTERFACE:include/include>
diff --git a/Framework/Geometry/testGeometry.cc b/Framework/Geometry/testGeometry.cc
index 182f9c07d13e8351a8341be3490f1c64fca81707..8ae5a5ff8e57ee07423515d4e126b6bb4fd854fe 100644
--- a/Framework/Geometry/testGeometry.cc
+++ b/Framework/Geometry/testGeometry.cc
@@ -95,8 +95,9 @@ TEST_CASE("transformations between CoordinateSystems") {
     QuantityVector<length_d> const zAxis{0_m, 0_m, 1_km};
     QuantityVector<length_d> const yAxis{0_m, 7_nm, 0_m};
     QuantityVector<length_d> const xAxis{2_m, 0_nm, 0_m};
-    
-    QuantityVector<magnetic_flux_density_d> components{1. * tesla, 2. * tesla, 3. * tesla};
+
+    QuantityVector<magnetic_flux_density_d> components{1. * tesla, 2. * tesla,
+                                                       3. * tesla};
     Vector<magnetic_flux_density_d> v1(rootCS, components);
 
     double const angle = 90. / 180. * M_PI;
diff --git a/Framework/Particles/CMakeLists.txt b/Framework/Particles/CMakeLists.txt
index 99d8e5a96b526ea7903ff954a9c54d233d8deab9..8ea8654fad658692dbbc1819dbc2ab957cb64de5 100644
--- a/Framework/Particles/CMakeLists.txt
+++ b/Framework/Particles/CMakeLists.txt
@@ -14,6 +14,11 @@ add_custom_command (
   VERBATIM
   )
 
+set (
+  PARTICLE_SOURCES
+  ParticleProperties.cc
+  )
+
 # all public header files of library, includes automatic generated file(s)
 set (
   PARTICLE_HEADERS
@@ -26,7 +31,7 @@ set (
   corsika/particles
   )
 
-add_library (CORSIKAparticles INTERFACE)
+add_library (CORSIKAparticles STATIC ${PARTICLE_SOURCES})
 
 CORSIKA_COPY_HEADERS_TO_NAMESPACE (CORSIKAparticles ${PARTICLE_NAMESPACE} ${PARTICLE_HEADERS})
 
@@ -39,14 +44,27 @@ add_custom_command (
   COMMAND ${CMAKE_COMMAND} -E create_symlink ${PROJECT_BINARY_DIR}/include/corsika/particles/GeneratedParticleProperties.inc ${CMAKE_CURRENT_SOURCE_DIR}/GeneratedParticleProperties.inc
   COMMENT "Generate link in source-dir: ${CMAKE_CURRENT_SOURCE_DIR}/GeneratedParticleProperties.inc"
   )
-add_custom_target (SourceDirLink DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/GeneratedParticleProperties.inc)
+add_custom_target (SourceDirLink DEPENDS ${PROJECT_BINARY_DIR}/Framework/Particles/GeneratedParticleProperties.inc)
 add_dependencies (CORSIKAparticles SourceDirLink)
 # .....................................................
 
+target_link_libraries (
+  CORSIKAparticles
+  PUBLIC
+  CORSIKAunits
+  )
+
+set_target_properties (
+  CORSIKAparticles
+  PROPERTIES
+  VERSION ${PROJECT_VERSION}
+  SOVERSION 1
+  PUBLIC_HEADER "${PARTICLE_HEADERS}"
+  )
 
 target_include_directories (
   CORSIKAparticles
-  INTERFACE
+  PUBLIC
   $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
   $<INSTALL_INTERFACE:include>
   )
diff --git a/Framework/Particles/ParticleProperties.cc b/Framework/Particles/ParticleProperties.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1100b55a2689c1fb30b9997c6dfe6df985ed45a8
--- /dev/null
+++ b/Framework/Particles/ParticleProperties.cc
@@ -0,0 +1,9 @@
+#include <corsika/particles/ParticleProperties.h>
+
+namespace corsika::particles::io {
+
+  std::ostream& operator<<(std::ostream& stream, Code const p) {
+    return stream << GetName(p);
+  }
+
+} // namespace corsika::particles::io
diff --git a/Framework/Particles/ParticleProperties.h b/Framework/Particles/ParticleProperties.h
index e28648127830ab150556ec781ee057e4b6c39976..90d741b6dcaee89cc5c02aa66d85fc178e9aee6a 100644
--- a/Framework/Particles/ParticleProperties.h
+++ b/Framework/Particles/ParticleProperties.h
@@ -4,8 +4,8 @@
    Interface to particle properties
  */
 
-#ifndef _include_ParticleProperties_h_
-#define _include_ParticleProperties_h_
+#ifndef _include_corsika_particles_ParticleProperties_h_
+#define _include_corsika_particles_ParticleProperties_h_
 
 #include <array>
 #include <cstdint>
@@ -24,6 +24,7 @@
  */
 
 namespace corsika::particles {
+
   enum class Code : int16_t;
 
   using PDGCodeType = int16_t;
@@ -34,7 +35,7 @@ namespace corsika::particles {
   corsika::units::si::ElectricChargeType constexpr GetElectricCharge(Code const);
   corsika::units::si::MassType constexpr GetMass(Code const);
   PDGCodeType constexpr GetPDG(Code const);
-  std::string const& GetName(Code const);
+  constexpr std::string const& GetName(Code const);
 
 #include <corsika/particles/GeneratedParticleProperties.inc>
 
@@ -60,15 +61,13 @@ namespace corsika::particles {
     return GetElectricChargeNumber(p) * (corsika::units::si::constants::e / 3.);
   }
 
-  std::string const& GetName(Code const p) {
+  constexpr std::string const& GetName(Code const p) {
     return names[static_cast<CodeIntType const>(p)];
   }
 
   namespace io {
 
-    std::ostream& operator<<(std::ostream& stream, Code const p) {
-      return stream << GetName(p);
-    }
+    std::ostream& operator<<(std::ostream& stream, Code const p);
 
   } // namespace io
 
diff --git a/Framework/StackInterface/CMakeList.txt b/Framework/StackInterface/CMakeList.txt
deleted file mode 100644
index aea441bd22ca6fd91def7826534b5c5e3e98814d..0000000000000000000000000000000000000000
--- a/Framework/StackInterface/CMakeList.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-
-add_library (CORSIKAstack INTERFACE)
-
-target_include_directories (CORSIKAstack INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/Framework>
-                                                   $<INSTALL_INTERFACE:include/Framework>
-                                                   )
-
-install (FILES Stack.h StackIterator.h
-         DESTINATION include/Stack)
-
diff --git a/Framework/StackInterface/CMakeLists.txt b/Framework/StackInterface/CMakeLists.txt
index 11a30200e4e29191012850c33063b5a0ddeba385..42c52ceab9c30014de606890a37ae596538f4e1c 100644
--- a/Framework/StackInterface/CMakeLists.txt
+++ b/Framework/StackInterface/CMakeLists.txt
@@ -31,9 +31,7 @@ install (
   include/${CORSIKAstackinterface_NAMESPACE}
   )
 
-
-# code testing
+#code testing
 add_executable (testStackInterface testStackInterface.cc)
-target_link_libraries (testStackInterface CORSIKAstackinterface CORSIKAthirdparty) # for catch2
 add_test(NAME testStackInterface COMMAND testStackInterface)
-
+target_link_libraries (testStackInterface CORSIKAstackinterface CORSIKAthirdparty) # for catch2
diff --git a/Framework/Units/testUnits.cc b/Framework/Units/testUnits.cc
index 7fc0b00a6e3959d1cce05e31ed3239a7a82105df..e6a0fee90ae1dadf2a40e7768d331283a7392053 100644
--- a/Framework/Units/testUnits.cc
+++ b/Framework/Units/testUnits.cc
@@ -16,7 +16,7 @@ TEST_CASE("PhysicalUnits", "[Units]") {
   }
 
   SECTION("Constructors") {
-    auto E1 = 10_GeV;
+    [[maybe_unused]] auto E1 = 10_GeV;
     REQUIRE(E1 == 10_GeV);
 
     LengthType l1 = 10_nm;
@@ -25,11 +25,11 @@ TEST_CASE("PhysicalUnits", "[Units]") {
     LengthType arr0[5];
     arr0[0] = 5_m;
 
-    LengthType arr1[2] = {{1_mm}, {2_cm}};
+    [[maybe_unused]] LengthType arr1[2] = {{1_mm}, {2_cm}};
 
     std::array<EnergyType, 4> arr2; // empty array
 
-    std::array<EnergyType, 4> arr3 = {1_GeV, 1_eV, 5_MeV};
+    [[maybe_unused]] std::array<EnergyType, 4> arr3 = {1_GeV, 1_eV, 5_MeV};
   }
 
   SECTION("Powers in literal units") {
diff --git a/Processes/CMakeLists.txt b/Processes/CMakeLists.txt
index fe594f3afa5c20989b0dfc58a32a94f986b5fe7c..c8f8557b074a16b0d152f84bc7e96273b10d063b 100644
--- a/Processes/CMakeLists.txt
+++ b/Processes/CMakeLists.txt
@@ -1,3 +1,10 @@
+
 add_subdirectory (NullModel)
 add_subdirectory (Sibyll)
 add_subdirectory (StackInspector)
+
+#add_custom_target(CORSIKAprocesses)
+add_library (CORSIKAprocesses INTERFACE)
+add_dependencies(CORSIKAprocesses ProcessNullModel)
+add_dependencies(CORSIKAprocesses ProcessSibyll)
+add_dependencies(CORSIKAprocesses ProcessStackInspector)
diff --git a/Processes/StackInspector/CMakeLists.txt b/Processes/StackInspector/CMakeLists.txt
index 90b92bca58b8f9967591197bdbe0b64e01981f6f..b0b9d379e9b5b1c7536e1619e9c9e55f322b791c 100644
--- a/Processes/StackInspector/CMakeLists.txt
+++ b/Processes/StackInspector/CMakeLists.txt
@@ -29,6 +29,7 @@ set_target_properties (
 target_link_libraries (
   ProcessStackInspector
   CORSIKAunits
+  CORSIKAsetup
   )
 
 target_include_directories (
@@ -52,7 +53,6 @@ add_executable (testStackInspector testStackInspector.cc)
 
 target_link_libraries (
   testStackInspector
-  CORSIKAgeometry
   CORSIKAunits
   CORSIKAthirdparty # for catch2
   )
diff --git a/Processes/StackInspector/StackInspector.cc b/Processes/StackInspector/StackInspector.cc
index b52ab72b4b26e327a4f80bbbe0642ae1227064d5..3455294e4e6eb6db54f96d0170ad88144a711a99 100644
--- a/Processes/StackInspector/StackInspector.cc
+++ b/Processes/StackInspector/StackInspector.cc
@@ -1,13 +1,56 @@
 #include <corsika/process/stack_inspector/StackInspector.h>
+#include <corsika/units/PhysicalUnits.h>
 
+#include <iostream>
+using namespace std;
+
+using namespace corsika;
+using namespace corsika::units::si;
 using namespace corsika::process::stack_inspector;
 
-StackInspector::StackInspector() {}
+template <typename Stack, typename Trajectory>
+StackInspector<Stack, Trajectory>::StackInspector(const bool aReport)
+    : fReport(aReport) {}
+
+template <typename Stack, typename Trajectory>
+StackInspector<Stack, Trajectory>::~StackInspector() {}
+
+template <typename Stack, typename Trajectory>
+process::EProcessReturn StackInspector<Stack, Trajectory>::DoContinuous(Particle&,
+                                                                        Trajectory&,
+                                                                        Stack& s) const {
+
+  // using namespace corsika::particles::io;
+
+  static int countStep = 0;
+  if (!fReport) return EProcessReturn::eOk;
+  // std::cout << "generation  " << countStep << std::endl;
+  [[maybe_unused]] int i = 0;
+  EnergyType Etot = 0_GeV;
+  for (auto& iterP : s) {
+    EnergyType E = iterP.GetEnergy();
+    Etot += E;
+    // std::cout << " particle data: " << i++ << ", id=" << iterP << " | " << std::endl;
+  }
+  countStep++;
+  // cout << "#=" << countStep << " " << s.GetSize() << " " << Etot/1_GeV << endl;
+  cout << countStep << " " << s.GetSize() << " " << Etot / 1_GeV << " " << endl;
+  return EProcessReturn::eOk;
+}
+
+template <typename Stack, typename Trajectory>
+double StackInspector<Stack, Trajectory>::MinStepLength(Particle&) const {
+  return 0;
+}
 
-StackInspector::~StackInspector() {}
+template <typename Stack, typename Trajectory>
+void StackInspector<Stack, Trajectory>::DoDiscrete(Particle&, Stack&) const {}
 
-void StackInspector::init() {}
+template <typename Stack, typename Trajectory>
+void StackInspector<Stack, Trajectory>::Init() {}
 
-void StackInspector::run() {}
+#include <corsika/setup/SetupStack.h>
+#include <corsika/setup/SetupTrajectory.h>
 
-double StackInspector::GetStepLength() { return 0; }
+template class corsika::process::stack_inspector::StackInspector<setup::Stack,
+                                                                 setup::Trajectory>;
diff --git a/Processes/StackInspector/StackInspector.h b/Processes/StackInspector/StackInspector.h
index acf22aa7c4f67d455326b5e44abacf3f1ab1478d..3127177692bdf2cc3dd75694600962252af8f39d 100644
--- a/Processes/StackInspector/StackInspector.h
+++ b/Processes/StackInspector/StackInspector.h
@@ -1,19 +1,35 @@
 #ifndef _Physics_StackInspector_StackInspector_h_
 #define _Physics_StackInspector_StackInspector_h_
 
+#include <corsika/process/ProcessSequence.h>
+
 namespace corsika::process {
 
   namespace stack_inspector {
 
-    class StackInspector {
+    template <typename Stack, typename Trajectory>
+    class StackInspector
+        : public corsika::process::BaseProcess<StackInspector<Stack, Trajectory>> {
+
+      typedef typename Stack::ParticleType Particle;
 
     public:
-      StackInspector();
+      StackInspector(const bool aReport);
       ~StackInspector();
 
-      void init();
-      void run();
-      double GetStepLength();
+      void Init();
+
+      // template <typename Particle, typename Trajectory, typename Stack>
+      EProcessReturn DoContinuous(Particle&, Trajectory&, Stack& s) const;
+
+      // template <typename Particle>
+      double MinStepLength(Particle&) const;
+
+      // template <typename Particle, typename Stack>
+      void DoDiscrete(Particle&, Stack&) const;
+
+    private:
+      bool fReport;
     };
 
   } // namespace stack_inspector
diff --git a/Setup/CMakeLists.txt b/Setup/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..2f9a4ddf36a57d5f73d523fa5771ee17193a83bd
--- /dev/null
+++ b/Setup/CMakeLists.txt
@@ -0,0 +1,35 @@
+
+set (
+  SETUP_HEADERS
+  SetupStack.h
+  SetupLogger.h
+  SetupEnvironment.h
+  SetupTrajectory.h
+  )
+
+set (
+  SETUP_NAMESPACE
+  corsika/setup
+  )
+
+add_library (CORSIKAsetup INTERFACE)
+CORSIKA_COPY_HEADERS_TO_NAMESPACE (CORSIKAsetup ${SETUP_NAMESPACE} ${SETUP_HEADERS})
+
+target_link_libraries (
+  CORSIKAsetup
+  INTERFACE
+  CORSIKAgeometry
+  SuperStupidStack
+  )
+
+target_include_directories (
+  CORSIKAsetup
+  INTERFACE 
+  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
+  $<INSTALL_INTERFACE:include/include>
+  )
+
+install (
+  FILES ${SETUP_HEADERS} 
+  DESTINATION include/${SETUP_NAMESPACE}
+  )
diff --git a/Setup/SetupEnvironment.h b/Setup/SetupEnvironment.h
new file mode 100644
index 0000000000000000000000000000000000000000..ef97fecbab9b393e445a7d1d95502e45a548a1aa
--- /dev/null
+++ b/Setup/SetupEnvironment.h
@@ -0,0 +1,6 @@
+#ifndef _include_corsika_setup_environment_h_
+#define _include_corsika_setup_environment_h_
+
+namespace corsika {}
+
+#endif
diff --git a/Setup/SetupLogger.h b/Setup/SetupLogger.h
new file mode 100644
index 0000000000000000000000000000000000000000..4383a15705cdf1d083508767965e8eb33edbee0d
--- /dev/null
+++ b/Setup/SetupLogger.h
@@ -0,0 +1,6 @@
+#ifndef _include_corsika_setup_logger_h_
+#define _include_corsika_setup_logger_h_
+
+namespace corsika {}
+
+#endif
diff --git a/Setup/SetupStack.h b/Setup/SetupStack.h
new file mode 100644
index 0000000000000000000000000000000000000000..ec57cf0836d6e547e5124b2564761a85323ec686
--- /dev/null
+++ b/Setup/SetupStack.h
@@ -0,0 +1,11 @@
+#ifndef _corsika_setup_setupstack_h_
+#define _corsika_setup_setupstack_h_
+
+#include <corsika/stack/super_stupid/SuperStupidStack.h>
+
+namespace corsika::setup {
+
+  typedef corsika::stack::super_stupid::SuperStupidStack Stack;
+}
+
+#endif
diff --git a/Setup/SetupTrajectory.h b/Setup/SetupTrajectory.h
new file mode 100644
index 0000000000000000000000000000000000000000..dd903e79cc78c1bc149b11cbaf1139d49020c323
--- /dev/null
+++ b/Setup/SetupTrajectory.h
@@ -0,0 +1,11 @@
+#ifndef _corsika_setup_setuptrajectory_h_
+#define _corsika_setup_setuptrajectory_h_
+
+#include <corsika/geometry/LineTrajectory.h>
+
+namespace corsika::setup {
+
+  typedef corsika::geometry::LineTrajectory Trajectory;
+}
+
+#endif
diff --git a/Stack/SuperStupidStack/SuperStupidStack.h b/Stack/SuperStupidStack/SuperStupidStack.h
index f5674e2cf885c809c17c631e0e3a832afc566047..40bfd6a36d8c579af616fcd317516a693151091b 100644
--- a/Stack/SuperStupidStack/SuperStupidStack.h
+++ b/Stack/SuperStupidStack/SuperStupidStack.h
@@ -1,5 +1,5 @@
-#ifndef _include_superstupidstack_h_
-#define _include_superstupidstack_h_
+#ifndef _include_corsika_stack_superstupidstack_h_
+#define _include_corsika_stack_superstupidstack_h_
 
 #include <corsika/particles/ParticleProperties.h>
 #include <corsika/stack/Stack.h>