From 17d0edcc6867c0198cdf8de249e4542cffb722cf Mon Sep 17 00:00:00 2001
From: ralfulrich <ralf.ulrich@kit.edu>
Date: Mon, 12 Oct 2020 12:08:35 +0200
Subject: [PATCH] remove testing code, cleanup

---
 Documentation/Examples/cascade_example.cc     |  3 +-
 Documentation/Examples/em_shower.cc           |  4 +--
 .../Examples/staticsequence_example.cc        | 21 ++++++------
 Documentation/Examples/vertical_EAS.cc        |  7 ++--
 Environment/ShowerAxis.cc                     | 12 ++++---
 Framework/Cascade/Cascade.h                   | 32 +++++++++---------
 Framework/Cascade/testCascade.cc              |  1 -
 Framework/ProcessSequence/DecayProcess.h      |  8 ++---
 .../ProcessSequence/InteractionProcess.h      | 11 ++++---
 Framework/ProcessSequence/ProcessSequence.h   | 33 +++----------------
 Framework/ProcessSequence/ProcessTraits.h     |  1 -
 .../ProcessSequence/SwitchProcessSequence.h   |  5 +--
 .../ProcessSequence/testProcessSequence.cc    | 17 +++++-----
 .../testSwitchProcessSequence.cc              |  1 -
 .../testSwitchProcessSequence.h               |  1 -
 Framework/Random/RNGManager.cc                |  2 +-
 Framework/StackInterface/SecondaryView.h      |  3 +-
 Framework/StackInterface/Stack.h              |  4 ++-
 .../StackInterface/StackIteratorInterface.h   |  2 +-
 .../LongitudinalProfile.cc                    |  4 ++-
 Processes/ParticleCut/ParticleCut.cc          |  6 ++--
 Processes/Proposal/ContinuousProcess.cc       |  5 +--
 Processes/StackInspector/StackInspector.h     |  2 +-
 Processes/UrQMD/UrQMD.cc                      |  9 ++---
 24 files changed, 86 insertions(+), 108 deletions(-)

diff --git a/Documentation/Examples/cascade_example.cc b/Documentation/Examples/cascade_example.cc
index ff0e419e0..993714c08 100644
--- a/Documentation/Examples/cascade_example.cc
+++ b/Documentation/Examples/cascade_example.cc
@@ -147,8 +147,7 @@ int main() {
   process::energy_loss::EnergyLoss eLoss{showerAxis, cut.GetECut()};
 
   // assemble all processes into an ordered process list
-  auto sequence = stackInspect % sibyll % sibyllNuc % decay % eLoss % cut
-                               % trackWriter;
+  auto sequence = stackInspect % sibyll % sibyllNuc % decay % eLoss % cut % trackWriter;
 
   // define air shower object, run simulation
   cascade::Cascade EAS(env, tracking, sequence, stack);
diff --git a/Documentation/Examples/em_shower.cc b/Documentation/Examples/em_shower.cc
index 208deaa93..5a528975a 100644
--- a/Documentation/Examples/em_shower.cc
+++ b/Documentation/Examples/em_shower.cc
@@ -144,8 +144,8 @@ int main(int argc, char** argv) {
   process::observation_plane::ObservationPlane observationLevel(obsPlane,
                                                                 "particles.dat");
 
-  auto sequence = proposalCounted % em_continuous % longprof % cut % observationLevel
-                                  % trackWriter;
+  auto sequence =
+      proposalCounted % em_continuous % longprof % cut % observationLevel % trackWriter;
   // define air shower object, run simulation
   tracking_line::TrackingLine tracking;
   cascade::Cascade EAS(env, tracking, sequence, stack);
diff --git a/Documentation/Examples/staticsequence_example.cc b/Documentation/Examples/staticsequence_example.cc
index 02749b498..64fbf6bc0 100644
--- a/Documentation/Examples/staticsequence_example.cc
+++ b/Documentation/Examples/staticsequence_example.cc
@@ -79,29 +79,28 @@ struct DummyTrajectory {};
 void modular() {
 
   //              = 0
-  Process1 m1; // + 1.0
-  Process2 m2; // - (0.1*i)
-  Process3 m3; // * 1.0
+  Process1 m1;      // + 1.0
+  Process2 m2;      // - (0.1*i)
+  Process3 m3;      // * 1.0
   Process4 m4(1.5); // * 1.5
-  
+
   auto sequence = m1 % m2 % m3 % m4;
 
   DummyData particle;
   DummyTrajectory track;
 
-  double check[nData] = {0,0,0,0,0,0,0,0,0,0};
-  
+  double check[nData] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+
   const int nEv = 10;
-  for (int iEv = 0; iEv < nEv; ++iEv) { sequence.DoContinuous(particle, track);
+  for (int iEv = 0; iEv < nEv; ++iEv) {
+    sequence.DoContinuous(particle, track);
     for (int i = 0; i < nData; ++i) {
-      check[i] += 1. - 0.1*i;
+      check[i] += 1. - 0.1 * i;
       check[i] *= 1.5;
     }
   }
 
-  for (int i = 0; i < nData; ++i) {
-    assert(particle.p[i] == check[i]);
-  }
+  for (int i = 0; i < nData; ++i) { assert(particle.p[i] == check[i]); }
 
   cout << " done (checking...) " << endl;
 }
diff --git a/Documentation/Examples/vertical_EAS.cc b/Documentation/Examples/vertical_EAS.cc
index ce28c92c9..2e37e11a5 100644
--- a/Documentation/Examples/vertical_EAS.cc
+++ b/Documentation/Examples/vertical_EAS.cc
@@ -199,7 +199,7 @@ int main(int argc, char** argv) {
 
   decaySibyll.PrintDecayConfig();
 
-   process::particle_cut::ParticleCut cut{50_GeV, false, true};
+  process::particle_cut::ParticleCut cut{50_GeV, false, true};
   process::proposal::Interaction proposal(env, cut.GetECut());
   process::proposal::ContinuousProcess em_continuous(env, cut.GetECut());
   process::interaction_counter::InteractionCounter proposalCounted(proposal);
@@ -230,15 +230,14 @@ int main(int argc, char** argv) {
   auto hadronSequence = process::select(urqmdCounted, sibyllNucCounted % sibyllCounted,
                                         EnergySwitch(55_GeV));
   auto decaySequence = decayPythia % decaySibyll;
-  auto sequence = hadronSequence + (reset_particle_mass + decaySequence + proposalCounted) *
-                  em_continuous + cut + observationLevel + longprof;
+  auto sequence = hadronSequence % reset_particle_mass % decaySequence % proposalCounted %
+                  em_continuous % cut % observationLevel % longprof;
 
   // define air shower object, run simulation
   tracking_line::TrackingLine tracking;
   cascade::Cascade EAS(env, tracking, sequence, stack);
 
   // to fix the point of first interaction, uncomment the following two lines:
-  //  EAS.SetNodes();
   //  EAS.forceInteraction();
 
   EAS.Run();
diff --git a/Environment/ShowerAxis.cc b/Environment/ShowerAxis.cc
index ca5a4e45c..3cc5779e0 100644
--- a/Environment/ShowerAxis.cc
+++ b/Environment/ShowerAxis.cc
@@ -22,20 +22,22 @@ GrammageType ShowerAxis::X(LengthType l) const {
   decltype(X_.size()) const upper = lower + 1;
 
   if (lower < 0) {
-    C8LOG_ERROR("cannot extrapolate to points behind point of injection l={} m", l/1_m);
+    C8LOG_ERROR("cannot extrapolate to points behind point of injection l={} m", l / 1_m);
     throw std::runtime_error("cannot extrapolate to points behind point of injection");
   }
 
-  if (upper >= X_.size()) { 
-    const std::string err = fmt::format("shower axis too short, cannot extrapolate (l / max_length_ = {} )",
-				   l / max_length_);
+  if (upper >= X_.size()) {
+    const std::string err =
+        fmt::format("shower axis too short, cannot extrapolate (l / max_length_ = {} )",
+                    l / max_length_);
     C8LOG_ERROR(err);
     throw std::runtime_error(err.c_str());
   }
 
   assert(0 <= lambda && lambda <= 1.);
 
-  C8LOG_TRACE("ShowerAxis::X l={} m, lower={}, lambda={}, upper={}", l/1_m, lower, lambda, upper);
+  C8LOG_TRACE("ShowerAxis::X l={} m, lower={}, lambda={}, upper={}", l / 1_m, lower,
+              lambda, upper);
 
   // linear interpolation between X[lower] and X[upper]
   return X_[upper] * lambda + X_[lower] * (1 - lambda);
diff --git a/Framework/Cascade/Cascade.h b/Framework/Cascade/Cascade.h
index bf271fcb3..43a527543 100644
--- a/Framework/Cascade/Cascade.h
+++ b/Framework/Cascade/Cascade.h
@@ -104,24 +104,12 @@ namespace corsika::cascade {
       }
     }
 
-    /**
-     * set the nodes for all particles on the stack according to their numerical
-     * position
-     */
-    void SetNodes() {
-      std::for_each(stack_.begin(), stack_.end(), [&](auto& p) {
-        auto const* numericalNode =
-            environment_.GetUniverse()->GetContainingNode(p.GetPosition());
-        p.SetNode(numericalNode);
-      });
-    }
-
     /**
      * The Run function is the main simulation loop, which processes
      * particles from the Stack until the Stack is empty.
      */
     void Run() {
-      SetNodes();
+      setNodes();
 
       while (!stack_.IsEmpty()) {
         while (!stack_.IsEmpty()) {
@@ -149,11 +137,12 @@ namespace corsika::cascade {
      */
     void forceInteraction() {
       C8LOG_DEBUG("forced interaction!");
+      setNodes();
       auto vParticle = stack_.GetNextParticle();
       TStackView secondaries(vParticle);
       interaction(secondaries);
       process_sequence_.DoSecondaries(secondaries);
-      vParticle.Delete(); // todo: this should be reviewed, see below
+      vParticle.Delete(); // primary particle has interacted and is gone
     }
 
   private:
@@ -240,8 +229,7 @@ namespace corsika::cascade {
           process::EProcessReturn::eParticleAbsorbed) {
         C8LOG_DEBUG("Cascade: delete absorbed particle PID={} E={} GeV",
                     vParticle.GetPID(), vParticle.GetEnergy() / 1_GeV);
-	if (!vParticle.isDeleted())
-	  vParticle.Delete();
+        if (!vParticle.isDeleted()) vParticle.Delete();
         return;
       }
 
@@ -348,6 +336,18 @@ namespace corsika::cascade {
       return returnCode;
     }
 
+    /**
+     * set the nodes for all particles on the stack according to their numerical
+     * position
+     */
+    void setNodes() {
+      std::for_each(stack_.begin(), stack_.end(), [&](auto& p) {
+        auto const* numericalNode =
+            environment_.GetUniverse()->GetContainingNode(p.GetPosition());
+        p.SetNode(numericalNode);
+      });
+    }
+
     void SetEventType(TStackView& view, [[maybe_unused]] history::EventType eventType) {
       if constexpr (TStackView::has_event) {
         for (auto&& sec : view) { sec.GetEvent()->setEventType(eventType); }
diff --git a/Framework/Cascade/testCascade.cc b/Framework/Cascade/testCascade.cc
index 0c969d3d2..6dad05ac5 100644
--- a/Framework/Cascade/testCascade.cc
+++ b/Framework/Cascade/testCascade.cc
@@ -161,7 +161,6 @@ TEST_CASE("Cascade", "[Cascade]") {
   }
 
   SECTION("forced interaction") {
-    EAS.SetNodes();
     EAS.forceInteraction();
     CHECK(stack.getEntries() == 2);
     CHECK(split.GetCalls() == 1);
diff --git a/Framework/ProcessSequence/DecayProcess.h b/Framework/ProcessSequence/DecayProcess.h
index d047d214e..09ba80743 100644
--- a/Framework/ProcessSequence/DecayProcess.h
+++ b/Framework/ProcessSequence/DecayProcess.h
@@ -39,13 +39,11 @@ namespace corsika::process {
     corsika::units::si::InverseTimeType GetInverseLifetime(const TParticle& particle) {
       return 1. / GetRef().GetLifetime(particle);
     }
-    
+
     /*    template <typename TParticle>
-    corsika::units::si::InverseTimeType GetInverseInteractionLength(TParticle&& particle) {
-      auto p = std::move(particle);
-      return 1. / GetRef().GetLifetime(p);
+    corsika::units::si::InverseTimeType GetInverseInteractionLength(TParticle&& particle)
+    { auto p = std::move(particle); return 1. / GetRef().GetLifetime(p);
       }*/
-
   };
 
 } // namespace corsika::process
diff --git a/Framework/ProcessSequence/InteractionProcess.h b/Framework/ProcessSequence/InteractionProcess.h
index 487668f5b..92858aaca 100644
--- a/Framework/ProcessSequence/InteractionProcess.h
+++ b/Framework/ProcessSequence/InteractionProcess.h
@@ -36,16 +36,17 @@ namespace corsika::process {
     corsika::units::si::GrammageType GetInteractionLength(const TParticle&);
 
     template <typename TParticle>
-    corsika::units::si::InverseGrammageType GetInverseInteractionLength(const TParticle& particle) {
+    corsika::units::si::InverseGrammageType GetInverseInteractionLength(
+        const TParticle& particle) {
       return 1. / GetRef().GetInteractionLength(particle);
     }
 
     /*
     template <typename TParticle>
-    corsika::units::si::InverseGrammageType GetInverseInteractionLength(TParticle&& particle) {
-      auto p = std::move(particle);
-      return 1. / GetRef().GetInteractionLength(p);
+    corsika::units::si::InverseGrammageType GetInverseInteractionLength(TParticle&&
+    particle) { auto p = std::move(particle); return 1. /
+    GetRef().GetInteractionLength(p);
       }*/
-};
+  };
 
 } // namespace corsika::process
diff --git a/Framework/ProcessSequence/ProcessSequence.h b/Framework/ProcessSequence/ProcessSequence.h
index a959d40fd..9ae32534e 100644
--- a/Framework/ProcessSequence/ProcessSequence.h
+++ b/Framework/ProcessSequence/ProcessSequence.h
@@ -144,7 +144,8 @@ namespace corsika::process {
     }
 
     template <typename TParticle, typename TTrack>
-    inline corsika::units::si::LengthType MaxStepLength(TParticle& particle, TTrack& vTrack) {
+    inline corsika::units::si::LengthType MaxStepLength(TParticle& particle,
+                                                        TTrack& vTrack) {
       corsika::units::si::LengthType
           max_length = // if no other process in the sequence implements it
           std::numeric_limits<double>::infinity() * corsika::units::si::meter;
@@ -193,7 +194,7 @@ namespace corsika::process {
             corsika::units::si::InverseGrammageType::zero()) {
 
       // TODO: add check for lambda_inv_select>lambda_inv_tot
-      
+
       if constexpr (t1ProcSeq) {
         // if A is a process sequence --> check inside
         const EProcessReturn ret =
@@ -259,7 +260,7 @@ namespace corsika::process {
             corsika::units::si::InverseTimeType::zero()) {
 
       // TODO: add check for decay_inv_select>decay_inv_tot
-      
+
       if constexpr (t1ProcSeq) {
         // if A is a process sequence --> check inside
         const EProcessReturn ret = A.SelectDecay(view, decay_inv_select, decay_inv_sum);
@@ -271,7 +272,7 @@ namespace corsika::process {
         decay_inv_sum += A.GetInverseLifetime(view.parent());
         // check if we should execute THIS process and then EXIT
         if (decay_inv_select < decay_inv_sum) { // more pedagogical: rndm_select <
-                                            // decay_inv_sum / decay_inv_tot
+                                                // decay_inv_sum / decay_inv_tot
           A.DoDecay(view);
           return EProcessReturn::eDecayed;
         }
@@ -314,30 +315,6 @@ namespace corsika::process {
     return ProcessSequence<TProcess1, TProcess2>(vA, vB);
   }
 
-    template <typename TProcess1, typename TProcess2>
-  inline typename std::enable_if<
-      std::is_base_of<BaseProcess<typename std::decay<TProcess1>::type>,
-                      typename std::decay<TProcess1>::type>::value &&
-          std::is_base_of<BaseProcess<typename std::decay<TProcess2>::type>,
-                          typename std::decay<TProcess2>::type>::value,
-      ProcessSequence<TProcess1, TProcess2>>::type
-  operator+(TProcess1&& vA, TProcess2&& vB) {
-    C8LOG_TRACE("ProcessSequence (+) for\n\t\t {} and\n\t\t {}", typeid(vA).name(), typeid(vB).name());
-    return ProcessSequence<TProcess1, TProcess2>(vA, vB);
-  }
-
-      template <typename TProcess1, typename TProcess2>
-  inline typename std::enable_if<
-      std::is_base_of<BaseProcess<typename std::decay<TProcess1>::type>,
-                      typename std::decay<TProcess1>::type>::value &&
-          std::is_base_of<BaseProcess<typename std::decay<TProcess2>::type>,
-                          typename std::decay<TProcess2>::type>::value,
-      ProcessSequence<TProcess1, TProcess2>>::type
-	operator*(TProcess1&& vA, TProcess2&& vB) {
-    C8LOG_TRACE("ProcessSequence (*) for\n\t\t {} and\n\t\t {}", typeid(vA).name(), typeid(vB).name());
-    return ProcessSequence<TProcess1, TProcess2>(vA, vB);
-  }
-
   /// traits marker to identify objectas ProcessSequence
   template <typename TProcess1, typename TProcess2>
   struct is_process_sequence<corsika::process::ProcessSequence<TProcess1, TProcess2>>
diff --git a/Framework/ProcessSequence/ProcessTraits.h b/Framework/ProcessSequence/ProcessTraits.h
index 5c272d618..5f8b2f39f 100644
--- a/Framework/ProcessSequence/ProcessTraits.h
+++ b/Framework/ProcessSequence/ProcessTraits.h
@@ -19,7 +19,6 @@ namespace corsika::process {
   template <typename TClass>
   bool constexpr is_process_sequence_v = is_process_sequence<TClass>::value;
 
-  
   /**
    * A traits marker to identiy a BaseProcess that is also SwitchProcessesSequence
    **/
diff --git a/Framework/ProcessSequence/SwitchProcessSequence.h b/Framework/ProcessSequence/SwitchProcessSequence.h
index 20fb1b0db..94e7fee5c 100644
--- a/Framework/ProcessSequence/SwitchProcessSequence.h
+++ b/Framework/ProcessSequence/SwitchProcessSequence.h
@@ -293,7 +293,8 @@ namespace corsika::process {
         case SwitchResult::First: {
           if constexpr (t1ProcSeq) {
             // if A is a process sequence --> check inside
-            const EProcessReturn ret = A.SelectDecay(view, decay_inv_select, decay_inv_sum);
+            const EProcessReturn ret =
+                A.SelectDecay(view, decay_inv_select, decay_inv_sum);
             // if A did succeed, stop routine here (not checking other static branch B)
             if (ret != EProcessReturn::eOk) { return ret; }
           } else if constexpr (std::is_base_of_v<DecayProcess<TProcess1type>,
@@ -356,7 +357,7 @@ namespace corsika::process {
       corsika::process::SwitchProcessSequence<TProcess1, TProcess2, TSelect>>
       : std::true_type {};
 
-    /// traits marker to identify objectas SwitchProcessSequence
+  /// traits marker to identify objectas SwitchProcessSequence
   template <typename TProcess1, typename TProcess2, typename TSelect>
   struct is_switch_process_sequence<
       corsika::process::SwitchProcessSequence<TProcess1, TProcess2, TSelect>>
diff --git a/Framework/ProcessSequence/testProcessSequence.cc b/Framework/ProcessSequence/testProcessSequence.cc
index 8b9f0b581..2e529efb4 100644
--- a/Framework/ProcessSequence/testProcessSequence.cc
+++ b/Framework/ProcessSequence/testProcessSequence.cc
@@ -26,10 +26,10 @@ static const int nData = 10;
 
 int globalCount = 0; // simple counter
 
-int checkDecay = 0;   // use this as a bit field
+int checkDecay = 0;    // use this as a bit field
 int checkInteract = 0; // use this as a bit field
-int checkSec = 0;     // use this as a bit field
-int checkCont = 0;    // use this as a bit field
+int checkSec = 0;      // use this as a bit field
+int checkCont = 0;     // use this as a bit field
 
 class ContinuousProcess1 : public ContinuousProcess<ContinuousProcess1> {
   int fV = 0;
@@ -232,7 +232,7 @@ public:
     fCount++;
     return EProcessReturn::eOk;
   }
-  int GetCount() const { return fCount; }  
+  int GetCount() const { return fCount; }
 };
 
 struct DummyStack {};
@@ -402,7 +402,7 @@ TEST_CASE("Switch Process Sequence", "[Process Sequence]") {
     CHECK(checkSec == 0);
 
     // 1/(30g/cm2) is Process3
-    corsika::units::si::InverseGrammageType lambda_select = .9/30. * square(1_cm) / 1_g; 
+    corsika::units::si::InverseGrammageType lambda_select = .9 / 30. * square(1_cm) / 1_g;
     corsika::units::si::InverseTimeType time_select = 0.1 / second;
 
     checkDecay = 0;
@@ -413,10 +413,10 @@ TEST_CASE("Switch Process Sequence", "[Process Sequence]") {
     sequence.SelectInteraction(view, lambda_select);
     sequence.SelectDecay(view, time_select);
     CHECK(checkInteract == 0b100); // this is Process3
-    CHECK(checkDecay == 0b001); // this is Decay1
+    CHECK(checkDecay == 0b001);    // this is Decay1
     CHECK(checkCont == 0);
     CHECK(checkSec == 0);
-    lambda_select = 1.01/30. * square(1_cm) / 1_g; 
+    lambda_select = 1.01 / 30. * square(1_cm) / 1_g;
     checkInteract = 0;
     sequence.SelectInteraction(view, lambda_select);
     CHECK(checkInteract == 0b001); // this is Process1
@@ -429,7 +429,7 @@ TEST_CASE("Switch Process Sequence", "[Process Sequence]") {
     sequence.SelectInteraction(view, lambda_select);
     sequence.SelectDecay(view, time_select);
     CHECK(checkInteract == 0b010); // this is Process2
-    CHECK(checkDecay == 0b010); // this is Decay2
+    CHECK(checkDecay == 0b010);    // this is Decay2
     CHECK(checkCont == 0);
     CHECK(checkSec == 0);
 
@@ -447,4 +447,3 @@ TEST_CASE("Switch Process Sequence", "[Process Sequence]") {
     CHECK(checkSec == 0);
   }
 }
-
diff --git a/Framework/ProcessSequence/testSwitchProcessSequence.cc b/Framework/ProcessSequence/testSwitchProcessSequence.cc
index 304dc78a0..c596613f4 100644
--- a/Framework/ProcessSequence/testSwitchProcessSequence.cc
+++ b/Framework/ProcessSequence/testSwitchProcessSequence.cc
@@ -137,7 +137,6 @@ TEST_CASE("SwitchProcess from InteractionProcess") {
       REQUIRE(switchProcess.GetInteractionLength(p) / kgMSq == Approx(1));
       REQUIRE(seq.GetInteractionLength(p) / kgMSq == Approx(3. / 4));
     }
-
   }
 
   SECTION("high energy") {
diff --git a/Framework/ProcessSequence/testSwitchProcessSequence.h b/Framework/ProcessSequence/testSwitchProcessSequence.h
index aed29021e..709dc8510 100644
--- a/Framework/ProcessSequence/testSwitchProcessSequence.h
+++ b/Framework/ProcessSequence/testSwitchProcessSequence.h
@@ -137,7 +137,6 @@ TEST_CASE("SwitchProcess from InteractionProcess") {
       REQUIRE(switchProcess.GetInteractionLength(p) / kgMSq == Approx(1));
       REQUIRE(seq.GetTotalInteractionLength(p) / kgMSq == Approx(3. / 4));
     }
-
   }
 
   SECTION("high energy") {
diff --git a/Framework/Random/RNGManager.cc b/Framework/Random/RNGManager.cc
index 9aa094a4b..8bbcf15dd 100644
--- a/Framework/Random/RNGManager.cc
+++ b/Framework/Random/RNGManager.cc
@@ -53,7 +53,7 @@ void corsika::random::RNGManager::SeedAll(uint64_t vSeed) {
 
 void corsika::random::RNGManager::SeedAll() {
   std::random_device rd;
-  std::seed_seq sseq{rd(), rd(), rd(), rd(), rd(), rd()};  
+  std::seed_seq sseq{rd(), rd(), rd(), rd(), rd(), rd()};
   for (auto& entry : rngs) {
     std::vector<std::uint32_t> seeds(1);
     sseq.generate(seeds.begin(), seeds.end());
diff --git a/Framework/StackInterface/SecondaryView.h b/Framework/StackInterface/SecondaryView.h
index 985be9953..709a8c4fe 100644
--- a/Framework/StackInterface/SecondaryView.h
+++ b/Framework/StackInterface/SecondaryView.h
@@ -168,7 +168,8 @@ namespace corsika::stack {
      * SecondaryView is derived from. This projectile should not be
      * used to modify the Stack!
      */
-    StackIteratorValue parent() const { // todo: check if this can't be ConstStackIteratorValue
+    StackIteratorValue parent()
+        const { // todo: check if this can't be ConstStackIteratorValue
       return StackIteratorValue(inner_stack_, projectile_index_);
     }
 
diff --git a/Framework/StackInterface/Stack.h b/Framework/StackInterface/Stack.h
index 33d5554ae..85ec6418f 100644
--- a/Framework/StackInterface/Stack.h
+++ b/Framework/StackInterface/Stack.h
@@ -303,7 +303,9 @@ namespace corsika::stack {
      */
     bool isDeleted(const StackIterator& p) const { return isDeleted(p.GetIndex()); }
     bool isDeleted(const ConstStackIterator& p) const { return isDeleted(p.GetIndex()); }
-    bool isDeleted(const ParticleInterfaceType& p) const { return isDeleted(p.GetIterator()); }
+    bool isDeleted(const ParticleInterfaceType& p) const {
+      return isDeleted(p.GetIterator());
+    }
 
     /**
      * Function to ultimatively remove the last entry from the stack,
diff --git a/Framework/StackInterface/StackIteratorInterface.h b/Framework/StackInterface/StackIteratorInterface.h
index c23561dc6..6c4901084 100644
--- a/Framework/StackInterface/StackIteratorInterface.h
+++ b/Framework/StackInterface/StackIteratorInterface.h
@@ -203,7 +203,7 @@ namespace corsika::stack {
     ParticleInterfaceType& operator*() {
       return static_cast<ParticleInterfaceType&>(*this);
     }
-  
+
     /**
      * Convert iterator to const value type, where value type is the user-provided
      * particle readout class
diff --git a/Processes/LongitudinalProfile/LongitudinalProfile.cc b/Processes/LongitudinalProfile/LongitudinalProfile.cc
index 5c9956663..f9fd05c1b 100644
--- a/Processes/LongitudinalProfile/LongitudinalProfile.cc
+++ b/Processes/LongitudinalProfile/LongitudinalProfile.cc
@@ -41,7 +41,9 @@ corsika::process::EProcessReturn LongitudinalProfile::DoContinuous(Particle cons
   GrammageType const grammageStart = shower_axis_.projectedX(vTrack.GetPosition(0));
   GrammageType const grammageEnd = shower_axis_.projectedX(vTrack.GetPosition(1));
 
-  C8LOG_INFO("pos1={} m, pos2={}, X={} g/cm2", vTrack.GetPosition(0).GetCoordinates()/1_m, vTrack.GetPosition(1).GetCoordinates()/1_m, grammageStart/1_g*square(1_cm));
+  C8LOG_INFO(
+      "pos1={} m, pos2={}, X={} g/cm2", vTrack.GetPosition(0).GetCoordinates() / 1_m,
+      vTrack.GetPosition(1).GetCoordinates() / 1_m, grammageStart / 1_g * square(1_cm));
 
   const int binStart = std::ceil(grammageStart / dX_);
   const int binEnd = std::floor(grammageEnd / dX_);
diff --git a/Processes/ParticleCut/ParticleCut.cc b/Processes/ParticleCut/ParticleCut.cc
index e5fb9d47e..728c7d25b 100644
--- a/Processes/ParticleCut/ParticleCut.cc
+++ b/Processes/ParticleCut/ParticleCut.cc
@@ -101,9 +101,9 @@ namespace corsika::process {
       C8LOG_TRACE("ParticleCut::DoContinuous");
       if (checkCutParticle(particle)) {
         C8LOG_TRACE("removing during continuous");
-	particle.Delete();
-	// signal to upstream code that this particle was deleted
-        return process::EProcessReturn::eParticleAbsorbed; 
+        particle.Delete();
+        // signal to upstream code that this particle was deleted
+        return process::EProcessReturn::eParticleAbsorbed;
       }
       return process::EProcessReturn::eOk;
     }
diff --git a/Processes/Proposal/ContinuousProcess.cc b/Processes/Proposal/ContinuousProcess.cc
index d0e2056d5..371f28262 100644
--- a/Processes/Proposal/ContinuousProcess.cc
+++ b/Processes/Proposal/ContinuousProcess.cc
@@ -108,7 +108,7 @@ namespace corsika::process::proposal {
     // if the particle has a charge take multiple scattering into account
     if (vP.GetChargeNumber() != 0) Scatter(vP, dE, dX);
     vP.SetEnergy(final_energy);
-    vP.SetMomentum(vP.GetMomentum() * vP.GetEnergy() / vP.GetMomentum().GetNorm());     
+    vP.SetMomentum(vP.GetMomentum() * vP.GetEnergy() / vP.GetMomentum().GetNorm());
     return process::EProcessReturn::eOk;
   }
 
@@ -141,7 +141,8 @@ namespace corsika::process::proposal {
 
     // return it in distance aequivalent
     auto dist = vP.GetNode()->GetModelProperties().ArclengthFromGrammage(vT, grammage);
-    C8LOG_TRACE("PROPOSAL::MaxStepLength X={} g/cm2, l={} m ", grammage/1_g*square(1_cm), dist/1_m);
+    C8LOG_TRACE("PROPOSAL::MaxStepLength X={} g/cm2, l={} m ",
+                grammage / 1_g * square(1_cm), dist / 1_m);
     return dist;
   }
 
diff --git a/Processes/StackInspector/StackInspector.h b/Processes/StackInspector/StackInspector.h
index a7222d37c..6d99a4164 100644
--- a/Processes/StackInspector/StackInspector.h
+++ b/Processes/StackInspector/StackInspector.h
@@ -29,7 +29,7 @@ namespace corsika::process {
       StackInspector(const int vNStep, const bool vReportStack,
                      const corsika::units::si::HEPEnergyType vE0);
       ~StackInspector();
-      
+
       void DoStack(const TStack&);
 
       /**
diff --git a/Processes/UrQMD/UrQMD.cc b/Processes/UrQMD/UrQMD.cc
index 71bf1dd49..9d78d20ae 100644
--- a/Processes/UrQMD/UrQMD.cc
+++ b/Processes/UrQMD/UrQMD.cc
@@ -247,16 +247,17 @@ GrammageType UrQMD::GetInteractionLength(SetupParticle const& particle) const {
 corsika::process::EProcessReturn UrQMD::DoInteraction(SetupView& view) {
   using namespace units::si;
 
-  auto const projectile = view.GetProjectile();  
-  
+  auto const projectile = view.GetProjectile();
+
   auto projectileCode = projectile.GetPID();
   auto const projectileEnergyLab = projectile.GetEnergy();
   auto const& projectileMomentumLab = projectile.GetMomentum();
   auto const& projectilePosition = projectile.GetPosition();
   auto const projectileTime = projectile.GetTime();
 
-  C8LOG_DEBUG("UrQMD::DoInteraction pid={} E={} GeV", projectileCode, projectileEnergyLab/1_GeV);
-  
+  C8LOG_DEBUG("UrQMD::DoInteraction pid={} E={} GeV", projectileCode,
+              projectileEnergyLab / 1_GeV);
+
   // sample target particle
   auto const& mediumComposition =
       projectile.GetNode()->GetModelProperties().GetNuclearComposition();
-- 
GitLab