From 08338a85ec9f83dbe090ae6ea22c3036a5b334b1 Mon Sep 17 00:00:00 2001
From: Maximilian Reininghaus <maximilian.reininghaus@kit.edu>
Date: Mon, 17 Dec 2018 19:20:41 +0100
Subject: [PATCH] included changes from master

---
 Documentation/Examples/cascade_example.cc     |  21 ++-
 Environment/Environment.h                     |   5 +-
 Framework/Cascade/testCascade.cc              |   3 +-
 Framework/Geometry/RootCoordinateSystem.h     |   4 +-
 Framework/Geometry/testGeometry.cc            |   9 +-
 Framework/Particles/ParticleProperties.h      |   8 +-
 Framework/Particles/testParticles.cc          |  15 +--
 Processes/NullModel/NullModel.cc              |   7 +-
 Processes/NullModel/NullModel.h               |   1 -
 Processes/NullModel/testNullModel.cc          |  18 +--
 Processes/Sibyll/Decay.h                      |   2 +-
 Processes/Sibyll/Interaction.h                |   8 +-
 Processes/Sibyll/SibStack.h                   | 122 +++++++++---------
 Processes/Sibyll/testSibyll.cc                |  32 ++---
 Processes/StackInspector/StackInspector.cc    |   4 +-
 .../StackInspector/testStackInspector.cc      |  22 ++--
 16 files changed, 138 insertions(+), 143 deletions(-)

diff --git a/Documentation/Examples/cascade_example.cc b/Documentation/Examples/cascade_example.cc
index 8607bbcbb..f2326e06e 100644
--- a/Documentation/Examples/cascade_example.cc
+++ b/Documentation/Examples/cascade_example.cc
@@ -118,13 +118,13 @@ public:
   }
 
   template <typename Particle>
-  double MaxStepLength(Particle& p, setup::Trajectory&) const {
+  LengthType MaxStepLength(Particle& p, setup::Trajectory&) const {
     const Code pid = p.GetPID();
     if (isEmParticle(pid) || isInvisible(pid)) {
       cout << "ProcessCut: MinStep: next cut: " << 0. << endl;
-      return 0.;
+      return 0_m;
     } else {
-      double next_step = std::numeric_limits<double>::infinity();
+      LengthType next_step = 1_m * std::numeric_limits<double>::infinity();
       cout << "ProcessCut: MinStep: next cut: " << next_step << endl;
       return next_step;
     }
@@ -199,9 +199,9 @@ private:
 };
 
 int main() {
-    
+
   corsika::random::RNGManager::GetInstance().RegisterRandomStream("cascade");
-    
+
   corsika::environment::Environment env; // dummy environment
   auto& universe = *(env.GetUniverse());
 
@@ -219,22 +219,17 @@ int main() {
 
   universe.AddChild(std::move(theMedium));
 
-  CoordinateSystem& rootCS = RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+  CoordinateSystem& rootCS =
+      RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
 
   tracking_line::TrackingLine<setup::Stack> tracking(env);
   stack_inspector::StackInspector<setup::Stack> p0(true);
 
-<<<<<<< HEAD
-  corsika::process::sibyll::Interaction /*<setup::Stack>,setup::Trajectory>*/ p1;
-  corsika::process::sibyll::Decay p2;
-  ProcessEMCut p3;
-  const auto sequence = /*p0 +*/ p1 + p2 + p3;
-=======
   corsika::process::sibyll::Interaction sibyll;
   corsika::process::sibyll::Decay decay;
   ProcessEMCut cut;
   const auto sequence = /*p0 +*/ sibyll + decay + cut;
->>>>>>> master
+
   setup::Stack stack;
 
   corsika::cascade::Cascade EAS(env, tracking, sequence, stack);
diff --git a/Environment/Environment.h b/Environment/Environment.h
index ef69116fe..aa567e876 100644
--- a/Environment/Environment.h
+++ b/Environment/Environment.h
@@ -35,8 +35,9 @@ namespace corsika::environment {
   class Environment {
   public:
     Environment()
-        : fCoordinateSystem{corsika::geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem()},        
-        fUniverse(std::make_unique<VolumeTreeNode<IEnvironmentModel>>(
+        : fCoordinateSystem{corsika::geometry::RootCoordinateSystem::GetInstance()
+                                .GetRootCoordinateSystem()}
+        , fUniverse(std::make_unique<VolumeTreeNode<IEnvironmentModel>>(
               std::make_unique<Universe>(fCoordinateSystem))) {}
 
     using IEnvironmentModel = corsika::setup::IEnvironmentModel;
diff --git a/Framework/Cascade/testCascade.cc b/Framework/Cascade/testCascade.cc
index 0e95d1dbd..3d7d07419 100644
--- a/Framework/Cascade/testCascade.cc
+++ b/Framework/Cascade/testCascade.cc
@@ -117,7 +117,8 @@ TEST_CASE("Cascade", "[Cascade]") {
   setup::Stack stack;
 
   corsika::cascade::Cascade EAS(env, tracking, sequence, stack);
-  CoordinateSystem& rootCS = RootCoordinateSystem::GetInstance().GetRootCS();
+  CoordinateSystem const& rootCS =
+      RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
 
   stack.Clear();
   auto particle = stack.NewParticle();
diff --git a/Framework/Geometry/RootCoordinateSystem.h b/Framework/Geometry/RootCoordinateSystem.h
index a9df34edf..3351d104d 100644
--- a/Framework/Geometry/RootCoordinateSystem.h
+++ b/Framework/Geometry/RootCoordinateSystem.h
@@ -22,7 +22,9 @@ namespace corsika::geometry {
 
   public:
     corsika::geometry::CoordinateSystem& GetRootCoordinateSystem() { return fRootCS; }
-    const corsika::geometry::CoordinateSystem& GetRootCoordinateSystem() const { return fRootCS; }
+    const corsika::geometry::CoordinateSystem& GetRootCoordinateSystem() const {
+      return fRootCS;
+    }
 
   private:
     corsika::geometry::CoordinateSystem fRootCS; // THIS IS IT
diff --git a/Framework/Geometry/testGeometry.cc b/Framework/Geometry/testGeometry.cc
index d5ef38588..f2ac12e13 100644
--- a/Framework/Geometry/testGeometry.cc
+++ b/Framework/Geometry/testGeometry.cc
@@ -29,7 +29,8 @@ using namespace corsika::units::si;
 double constexpr absMargin = 1.0e-8;
 
 TEST_CASE("transformations between CoordinateSystems") {
-  CoordinateSystem& rootCS = RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+  CoordinateSystem& rootCS =
+      RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
 
   REQUIRE(CoordinateSystem::GetTransformation(rootCS, rootCS)
               .isApprox(EigenTransform::Identity()));
@@ -128,7 +129,8 @@ TEST_CASE("transformations between CoordinateSystems") {
 }
 
 TEST_CASE("Sphere") {
-  CoordinateSystem& rootCS = RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+  CoordinateSystem& rootCS =
+      RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
   Point center(rootCS, {0_m, 3_m, 4_m});
   Sphere sphere(center, 5_m);
 
@@ -147,7 +149,8 @@ TEST_CASE("Sphere") {
 }
 
 TEST_CASE("Trajectories") {
-  CoordinateSystem& rootCS = RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+  CoordinateSystem& rootCS =
+      RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
   Point r0(rootCS, {0_m, 0_m, 0_m});
 
   SECTION("Line") {
diff --git a/Framework/Particles/ParticleProperties.h b/Framework/Particles/ParticleProperties.h
index 91bb74eef..db3f10fe3 100644
--- a/Framework/Particles/ParticleProperties.h
+++ b/Framework/Particles/ParticleProperties.h
@@ -54,7 +54,7 @@ namespace corsika::particles {
   bool constexpr IsNucleus(Code const);
   int constexpr GetNucleusA(Code const);
   int constexpr GetNucleusZ(Code const);
-  
+
 #include <corsika/particles/GeneratedParticleProperties.inc>
 
   /*!
@@ -84,7 +84,8 @@ namespace corsika::particles {
   }
 
   corsika::units::si::TimeType constexpr GetLifetime(Code const p) {
-    return detail::lifetime[static_cast<CodeIntType const>(p)] * corsika::units::si::second;
+    return detail::lifetime[static_cast<CodeIntType const>(p)] *
+           corsika::units::si::second;
   }
 
   bool constexpr IsNucleus(Code const p) {
@@ -92,14 +93,13 @@ namespace corsika::particles {
   }
 
   int constexpr GetNucleusA(Code const p) {
-      return detail::nucleusA[static_cast<CodeIntType const>(p)];
+    return detail::nucleusA[static_cast<CodeIntType const>(p)];
   }
 
   int constexpr GetNucleusZ(Code const p) {
     return detail::nucleusZ[static_cast<CodeIntType const>(p)];
   }
 
-
   namespace io {
 
     std::ostream& operator<<(std::ostream& stream, Code const p);
diff --git a/Framework/Particles/testParticles.cc b/Framework/Particles/testParticles.cc
index bf307798b..219e8dd89 100644
--- a/Framework/Particles/testParticles.cc
+++ b/Framework/Particles/testParticles.cc
@@ -58,12 +58,12 @@ TEST_CASE("ParticleProperties", "[Particles]") {
     REQUIRE(GetLifetime(Code::Electron) ==
             std::numeric_limits<double>::infinity() * corsika::units::si::second);
     REQUIRE(GetLifetime(Code::DPlus) < GetLifetime(Code::Gamma));
-    REQUIRE(GetLifetime(Code::RhoPlus)/corsika::units::si::second ==
-	    (Approx(4.414566727909413e-24).epsilon(1e-3)));
-    REQUIRE(GetLifetime(Code::SigmaMinusBar)/corsika::units::si::second ==
-	    (Approx(8.018880848563575e-11).epsilon(1e-5)));
-    REQUIRE(GetLifetime(Code::MuPlus)/corsika::units::si::second ==
-	    (Approx(2.1970332555864364e-06).epsilon(1e-5)));
+    REQUIRE(GetLifetime(Code::RhoPlus) / corsika::units::si::second ==
+            (Approx(4.414566727909413e-24).epsilon(1e-3)));
+    REQUIRE(GetLifetime(Code::SigmaMinusBar) / corsika::units::si::second ==
+            (Approx(8.018880848563575e-11).epsilon(1e-5)));
+    REQUIRE(GetLifetime(Code::MuPlus) / corsika::units::si::second ==
+            (Approx(2.1970332555864364e-06).epsilon(1e-5)));
   }
 
   SECTION("Nuclei") {
@@ -78,8 +78,5 @@ TEST_CASE("ParticleProperties", "[Particles]") {
     REQUIRE(GetNucleusA(Code::Tritium) == 3);
     REQUIRE(Hydrogen::GetNucleusZ() == 1);
     REQUIRE(Tritium::GetNucleusA() == 3);
-
-
   }
-
 }
diff --git a/Processes/NullModel/NullModel.cc b/Processes/NullModel/NullModel.cc
index 631891e63..313d38034 100644
--- a/Processes/NullModel/NullModel.cc
+++ b/Processes/NullModel/NullModel.cc
@@ -11,7 +11,6 @@
 
 #include <corsika/process/null_model/NullModel.h>
 
-
 #include <corsika/logging/Logger.h>
 #include <corsika/setup/SetupTrajectory.h>
 
@@ -31,7 +30,7 @@ NullModel<Stack>::~NullModel() {}
 
 template <typename Stack>
 process::EProcessReturn NullModel<Stack>::DoContinuous(Particle&, setup::Trajectory&,
-						       Stack& ) const {
+                                                       Stack&) const {
   return EProcessReturn::eOk;
 }
 
@@ -41,10 +40,8 @@ double NullModel<Stack>::MaxStepLength(Particle&, setup::Trajectory&) const {
 }
 
 template <typename Stack>
-void NullModel<Stack>::Init() {
-}
+void NullModel<Stack>::Init() {}
 
 #include <corsika/setup/SetupStack.h>
 
 template class process::null_model::NullModel<setup::Stack>;
-
diff --git a/Processes/NullModel/NullModel.h b/Processes/NullModel/NullModel.h
index e7eac1bb0..367c907f3 100644
--- a/Processes/NullModel/NullModel.h
+++ b/Processes/NullModel/NullModel.h
@@ -31,7 +31,6 @@ namespace corsika::process {
       void Init();
       EProcessReturn DoContinuous(Particle&, corsika::setup::Trajectory&, Stack& s) const;
       double MaxStepLength(Particle&, corsika::setup::Trajectory&) const;
-
     };
 
   } // namespace null_model
diff --git a/Processes/NullModel/testNullModel.cc b/Processes/NullModel/testNullModel.cc
index 908d73702..ffcba5e03 100644
--- a/Processes/NullModel/testNullModel.cc
+++ b/Processes/NullModel/testNullModel.cc
@@ -16,8 +16,8 @@
 #include <corsika/process/null_model/NullModel.h>
 
 #include <corsika/geometry/Point.h>
-#include <corsika/geometry/Vector.h>
 #include <corsika/geometry/RootCoordinateSystem.h>
+#include <corsika/geometry/Vector.h>
 
 #include <corsika/units/PhysicalUnits.h>
 
@@ -30,24 +30,24 @@ using namespace corsika;
 
 TEST_CASE("NullModel", "[processes]") {
 
-  auto const& cs = geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();    
-  geometry::Point const origin(cs, {0_m, 0_m, 0_m});    
-  geometry::Vector<corsika::units::si::SpeedType::dimension_type> v(cs, 0_m / second,
-								    0_m / second, 1_m / second);
+  auto const& cs =
+      geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+  geometry::Point const origin(cs, {0_m, 0_m, 0_m});
+  geometry::Vector<corsika::units::si::SpeedType::dimension_type> v(
+      cs, 0_m / second, 0_m / second, 1_m / second);
   geometry::Line line(origin, v);
   geometry::Trajectory<geometry::Line> track(line, 10_s);
 
   setup::Stack stack;
   auto particle = stack.NewParticle();
-  
+
   SECTION("interface") {
 
     NullModel<setup::Stack> model;
 
     model.Init();
-    [[maybe_unused]] const process::EProcessReturn ret = model.DoContinuous(particle, track, stack);
+    [[maybe_unused]] const process::EProcessReturn ret =
+        model.DoContinuous(particle, track, stack);
     [[maybe_unused]] const double length = model.MaxStepLength(particle, track);
-
-    
   }
 }
diff --git a/Processes/Sibyll/Decay.h b/Processes/Sibyll/Decay.h
index fb2f67a67..050466793 100644
--- a/Processes/Sibyll/Decay.h
+++ b/Processes/Sibyll/Decay.h
@@ -4,8 +4,8 @@
 #include <corsika/process/DecayProcess.h>
 #include <corsika/process/sibyll/ParticleConversion.h>
 #include <corsika/process/sibyll/SibStack.h>
-#include <corsika/setup/SetupTrajectory.h>
 #include <corsika/setup/SetupStack.h>
+#include <corsika/setup/SetupTrajectory.h>
 
 #include <corsika/particles/ParticleProperties.h>
 
diff --git a/Processes/Sibyll/Interaction.h b/Processes/Sibyll/Interaction.h
index 839fc4461..24401ad7c 100644
--- a/Processes/Sibyll/Interaction.h
+++ b/Processes/Sibyll/Interaction.h
@@ -20,7 +20,7 @@ using namespace corsika::units::si;
 
 namespace corsika::process::sibyll {
 
-  class Interaction : public corsika::process::InteractionProcess<Interaction> { 
+  class Interaction : public corsika::process::InteractionProcess<Interaction> {
 
   public:
     Interaction() {}
@@ -45,7 +45,8 @@ namespace corsika::process::sibyll {
     template <typename Particle, typename Track>
     corsika::units::si::GrammageType GetInteractionLength(Particle& p, Track&) const {
       // coordinate system, get global frame of reference
-      CoordinateSystem& rootCS = RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+      CoordinateSystem& rootCS =
+          RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
 
       const particles::Code corsikaBeamId = p.GetPID();
 
@@ -121,7 +122,8 @@ namespace corsika::process::sibyll {
       if (process::sibyll::CanInteract(p.GetPID())) {
         cout << "defining coordinates" << endl;
         // coordinate system, get global frame of reference
-        CoordinateSystem& rootCS = RootCoordinateSystem::GetInstance().GetRootCS();
+        CoordinateSystem& rootCS =
+            RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
 
         QuantityVector<length_d> const coordinates{0_m, 0_m, 0_m};
         Point pOrig(rootCS, coordinates);
diff --git a/Processes/Sibyll/SibStack.h b/Processes/Sibyll/SibStack.h
index 3df5f8076..264cff1b8 100644
--- a/Processes/Sibyll/SibStack.h
+++ b/Processes/Sibyll/SibStack.h
@@ -24,66 +24,66 @@ namespace corsika::process::sibyll {
 
     int GetSize() const { return s_plist_.np; }
 #warning check actual capacity of sibyll stack
-  int GetCapacity() const { return 8000; }
-
-  void SetId(const int i, const int v) { s_plist_.llist[i] = v; }
-  void SetEnergy(const int i, const EnergyType v) { s_plist_.p[3][i] = v / 1_GeV; }
-  void SetMomentum(const int i, const super_stupid::MomentumVector& v) {
-    auto tmp = v.GetComponents();
-    for (int idx = 0; idx < 3; ++idx)
-      s_plist_.p[idx][i] = tmp[idx] / 1_GeV * constants::c;
-  }
-
-  int GetId(const int i) const { return s_plist_.llist[i]; }
-
-  EnergyType GetEnergy(const int i) const { return s_plist_.p[3][i] * 1_GeV; }
-
-  super_stupid::MomentumVector GetMomentum(const int i) const {
-    CoordinateSystem& rootCS = RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
-    corsika::geometry::QuantityVector<momentum_d> components{
-        s_plist_.p[0][i] * 1_GeV / constants::c,
-        s_plist_.p[1][i] * 1_GeV / constants::c,
-        s_plist_.p[2][i] * 1_GeV / constants::c};
-    super_stupid::MomentumVector v1(rootCS, components);
-    return v1;
-  }
-
-  void Copy(const int i1, const int i2) {
-    s_plist_.llist[i1] = s_plist_.llist[i2];
-    s_plist_.p[3][i1] = s_plist_.p[3][i2];
-  }
-
-protected:
-  void IncrementSize() { s_plist_.np++; }
-  void DecrementSize() {
-    if (s_plist_.np > 0) { s_plist_.np--; }
-  }
-};
-
-template <typename StackIteratorInterface>
-class ParticleInterface : public ParticleBase<StackIteratorInterface> {
-  using ParticleBase<StackIteratorInterface>::GetStackData;
-  using ParticleBase<StackIteratorInterface>::GetIndex;
-
-public:
-  void SetEnergy(const EnergyType v) { GetStackData().SetEnergy(GetIndex(), v); }
-  EnergyType GetEnergy() const { return GetStackData().GetEnergy(GetIndex()); }
-  void SetPID(const int v) { GetStackData().SetId(GetIndex(), v); }
-  corsika::process::sibyll::SibyllCode GetPID() const {
-    return static_cast<corsika::process::sibyll::SibyllCode>(
-        GetStackData().GetId(GetIndex()));
-  }
-  super_stupid::MomentumVector GetMomentum() const {
-    return GetStackData().GetMomentum(GetIndex());
-  }
-  void SetMomentum(const super_stupid::MomentumVector& v) {
-    GetStackData().SetMomentum(GetIndex(), v);
-  }
-};
-
-typedef Stack<SibStackData, ParticleInterface> SibStack;
-
-}
->>>>>>> master
+    int GetCapacity() const { return 8000; }
+
+    void SetId(const int i, const int v) { s_plist_.llist[i] = v; }
+    void SetEnergy(const int i, const EnergyType v) { s_plist_.p[3][i] = v / 1_GeV; }
+    void SetMomentum(const int i, const super_stupid::MomentumVector& v) {
+      auto tmp = v.GetComponents();
+      for (int idx = 0; idx < 3; ++idx)
+        s_plist_.p[idx][i] = tmp[idx] / 1_GeV * constants::c;
+    }
+
+    int GetId(const int i) const { return s_plist_.llist[i]; }
+
+    EnergyType GetEnergy(const int i) const { return s_plist_.p[3][i] * 1_GeV; }
+
+    super_stupid::MomentumVector GetMomentum(const int i) const {
+      CoordinateSystem& rootCS =
+          RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+      corsika::geometry::QuantityVector<momentum_d> components{
+          s_plist_.p[0][i] * 1_GeV / constants::c,
+          s_plist_.p[1][i] * 1_GeV / constants::c,
+          s_plist_.p[2][i] * 1_GeV / constants::c};
+      super_stupid::MomentumVector v1(rootCS, components);
+      return v1;
+    }
+
+    void Copy(const int i1, const int i2) {
+      s_plist_.llist[i1] = s_plist_.llist[i2];
+      s_plist_.p[3][i1] = s_plist_.p[3][i2];
+    }
+
+  protected:
+    void IncrementSize() { s_plist_.np++; }
+    void DecrementSize() {
+      if (s_plist_.np > 0) { s_plist_.np--; }
+    }
+  };
+
+  template <typename StackIteratorInterface>
+  class ParticleInterface : public ParticleBase<StackIteratorInterface> {
+    using ParticleBase<StackIteratorInterface>::GetStackData;
+    using ParticleBase<StackIteratorInterface>::GetIndex;
+
+  public:
+    void SetEnergy(const EnergyType v) { GetStackData().SetEnergy(GetIndex(), v); }
+    EnergyType GetEnergy() const { return GetStackData().GetEnergy(GetIndex()); }
+    void SetPID(const int v) { GetStackData().SetId(GetIndex(), v); }
+    corsika::process::sibyll::SibyllCode GetPID() const {
+      return static_cast<corsika::process::sibyll::SibyllCode>(
+          GetStackData().GetId(GetIndex()));
+    }
+    super_stupid::MomentumVector GetMomentum() const {
+      return GetStackData().GetMomentum(GetIndex());
+    }
+    void SetMomentum(const super_stupid::MomentumVector& v) {
+      GetStackData().SetMomentum(GetIndex(), v);
+    }
+  };
+
+  typedef Stack<SibStackData, ParticleInterface> SibStack;
+
+} // namespace corsika::process::sibyll
 
 #endif
diff --git a/Processes/Sibyll/testSibyll.cc b/Processes/Sibyll/testSibyll.cc
index 5d91a5b4b..a2cbb9e1b 100644
--- a/Processes/Sibyll/testSibyll.cc
+++ b/Processes/Sibyll/testSibyll.cc
@@ -9,8 +9,8 @@
  * the license.
  */
 
-#include <corsika/process/sibyll/Interaction.h>
 #include <corsika/process/sibyll/Decay.h>
+#include <corsika/process/sibyll/Interaction.h>
 #include <corsika/process/sibyll/ParticleConversion.h>
 
 #include <corsika/particles/ParticleProperties.h>
@@ -58,12 +58,12 @@ TEST_CASE("Sibyll", "[processes]") {
     REQUIRE(process::sibyll::GetSibyllXSCode(corsika::particles::Code::K0Long) == 3);
     REQUIRE(process::sibyll::GetSibyllXSCode(corsika::particles::Code::SigmaPlus) == 1);
     REQUIRE(process::sibyll::GetSibyllXSCode(corsika::particles::Code::PiMinus) == 2);
-  } 
+  }
 }
 
 #include <corsika/geometry/Point.h>
-#include <corsika/geometry/Vector.h>
 #include <corsika/geometry/RootCoordinateSystem.h>
+#include <corsika/geometry/Vector.h>
 
 #include <corsika/units/PhysicalUnits.h>
 
@@ -74,24 +74,26 @@ using namespace corsika::units::si;
 
 TEST_CASE("SibyllInterface", "[processes]") {
 
-  auto const& cs = geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();    
-  geometry::Point const origin(cs, {0_m, 0_m, 0_m});    
-  geometry::Vector<corsika::units::si::SpeedType::dimension_type> v(cs, 0_m / second,
-								    0_m / second, 1_m / second);
+  auto const& cs =
+      geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+  geometry::Point const origin(cs, {0_m, 0_m, 0_m});
+  geometry::Vector<corsika::units::si::SpeedType::dimension_type> v(
+      cs, 0_m / second, 0_m / second, 1_m / second);
   geometry::Line line(origin, v);
   geometry::Trajectory<geometry::Line> track(line, 10_s);
 
   setup::Stack stack;
   auto particle = stack.NewParticle();
-  
+
   SECTION("InteractionInterface") {
 
     Interaction model;
 
     model.Init();
-    [[maybe_unused]] const process::EProcessReturn ret = model.DoInteraction(particle, stack);
-    [[maybe_unused]] const double length = model.GetInteractionLength(particle, track);
-    
+    [[maybe_unused]] const process::EProcessReturn ret =
+        model.DoInteraction(particle, stack);
+    [[maybe_unused]] const GrammageType length =
+        model.GetInteractionLength(particle, track);
   }
 
   SECTION("DecayInterface") {
@@ -99,10 +101,8 @@ TEST_CASE("SibyllInterface", "[processes]") {
     Decay model;
 
     model.Init();
-    /*[[maybe_unused]] const process::EProcessReturn ret =*/ model.DoDecay(particle, stack);
-    [[maybe_unused]] const double length = model.GetLifetime(particle);
-    
+    /*[[maybe_unused]] const process::EProcessReturn ret =*/model.DoDecay(particle,
+                                                                          stack);
+    [[maybe_unused]] const TimeType time = model.GetLifetime(particle);
   }
-
 }
-
diff --git a/Processes/StackInspector/StackInspector.cc b/Processes/StackInspector/StackInspector.cc
index d84634fba..52fe7e742 100644
--- a/Processes/StackInspector/StackInspector.cc
+++ b/Processes/StackInspector/StackInspector.cc
@@ -44,8 +44,8 @@ process::EProcessReturn StackInspector<Stack>::DoContinuous(Particle&, setup::Tr
   for (auto& iterP : s) {
     EnergyType E = iterP.GetEnergy();
     Etot += E;
-    geometry::CoordinateSystem& rootCS =
-        geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem(); // for printout
+    geometry::CoordinateSystem& rootCS = geometry::RootCoordinateSystem::GetInstance()
+                                             .GetRootCoordinateSystem(); // for printout
     auto pos = iterP.GetPosition().GetCoordinates(rootCS);
     cout << "StackInspector: i=" << setw(5) << fixed << (i++) << ", id=" << setw(30)
          << iterP.GetPID() << " E=" << setw(15) << scientific << (E / 1_GeV) << " GeV, "
diff --git a/Processes/StackInspector/testStackInspector.cc b/Processes/StackInspector/testStackInspector.cc
index 51f796a24..5ff999c1d 100644
--- a/Processes/StackInspector/testStackInspector.cc
+++ b/Processes/StackInspector/testStackInspector.cc
@@ -16,8 +16,8 @@
 #include <corsika/process/stack_inspector/StackInspector.h>
 
 #include <corsika/geometry/Point.h>
-#include <corsika/geometry/Vector.h>
 #include <corsika/geometry/RootCoordinateSystem.h>
+#include <corsika/geometry/Vector.h>
 
 #include <corsika/units/PhysicalUnits.h>
 
@@ -28,28 +28,26 @@ using namespace corsika::units::si;
 using namespace corsika::process::stack_inspector;
 using namespace corsika;
 
-
 TEST_CASE("StackInspector", "[processes]") {
 
-  auto const& cs = geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();    
-  geometry::Point const origin(cs, {0_m, 0_m, 0_m});    
-  geometry::Vector<corsika::units::si::SpeedType::dimension_type> v(cs, 0_m / second,
-								    0_m / second, 1_m / second);
+  auto const& cs =
+      geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem();
+  geometry::Point const origin(cs, {0_m, 0_m, 0_m});
+  geometry::Vector<corsika::units::si::SpeedType::dimension_type> v(
+      cs, 0_m / second, 0_m / second, 1_m / second);
   geometry::Line line(origin, v);
   geometry::Trajectory<geometry::Line> track(line, 10_s);
 
   setup::Stack stack;
   auto particle = stack.NewParticle();
-  
+
   SECTION("interface") {
 
     StackInspector<setup::Stack> model(true);
 
     model.Init();
-    [[maybe_unused]] const process::EProcessReturn ret = model.DoContinuous(particle, track, stack);
-    [[maybe_unused]] const double length = model.MaxStepLength(particle, track);
-    
+    [[maybe_unused]] const process::EProcessReturn ret =
+        model.DoContinuous(particle, track, stack);
+    [[maybe_unused]] const LengthType length = model.MaxStepLength(particle, track);
   }
 }
-
-
-- 
GitLab