From 6501af379c40d9583a5999ce3c9b3724592b8fce Mon Sep 17 00:00:00 2001
From: Maximilian Reininghaus <maximilian.reininghaus@kit.edu>
Date: Thu, 2 May 2019 17:53:46 -0300
Subject: [PATCH] SIBYLL coding style

---
 Processes/Sibyll/Decay.cc       |  9 ++++-----
 Processes/Sibyll/Decay.h        | 10 +++++-----
 Processes/Sibyll/Interaction.cc |  3 ++-
 Processes/Sibyll/Interaction.h  |  9 ++++-----
 4 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/Processes/Sibyll/Decay.cc b/Processes/Sibyll/Decay.cc
index 7a865e92f..9cb42f0c5 100644
--- a/Processes/Sibyll/Decay.cc
+++ b/Processes/Sibyll/Decay.cc
@@ -24,9 +24,8 @@ using std::vector;
 
 using namespace corsika;
 using namespace corsika::setup;
-using Projectile = corsika::setup::StackView::ParticleType;
-using Particle = corsika::setup::Stack::ParticleType;
-using Track = Trajectory;
+using SetupProjectile = corsika::setup::StackView::ParticleType;
+using SetupParticle = corsika::setup::Stack::ParticleType;
 
 namespace corsika::process::sibyll {
 
@@ -104,7 +103,7 @@ namespace corsika::process::sibyll {
   }
 
   template <>
-  units::si::TimeType Decay::GetLifetime(Particle const& vP) {
+  units::si::TimeType Decay::GetLifetime(SetupParticle const& vP) const {
     using namespace units::si;
 
     HEPEnergyType E = vP.GetEnergy();
@@ -133,7 +132,7 @@ namespace corsika::process::sibyll {
   }
 
   template <>
-  void Decay::DoDecay(Projectile& vP) {
+  void Decay::DoDecay(SetupProjectile& vP) {
     using geometry::Point;
     using namespace units::si;
 
diff --git a/Processes/Sibyll/Decay.h b/Processes/Sibyll/Decay.h
index 5dc06bd0c..03efcb971 100644
--- a/Processes/Sibyll/Decay.h
+++ b/Processes/Sibyll/Decay.h
@@ -22,7 +22,7 @@ namespace corsika::process {
   namespace sibyll {
 
     class Decay : public corsika::process::DecayProcess<Decay> {
-      std::vector<particles::Code> fTrackedParticles;
+      std::vector<particles::Code> const fTrackedParticles;
       int fCount = 0;
 
     public:
@@ -36,11 +36,11 @@ namespace corsika::process {
       void SetAllStable();
       void SetHadronsUnstable();
 
-      template <typename Particle>
-      corsika::units::si::TimeType GetLifetime(Particle const&);
+      template <typename TParticle>
+      corsika::units::si::TimeType GetLifetime(TParticle const&) const;
 
-      template <typename Projectile>
-      void DoDecay(Projectile&);
+      template <typename TProjectile>
+      void DoDecay(TProjectile&);
     };
   } // namespace sibyll
 } // namespace corsika::process
diff --git a/Processes/Sibyll/Interaction.cc b/Processes/Sibyll/Interaction.cc
index 949086012..d674f9a3a 100644
--- a/Processes/Sibyll/Interaction.cc
+++ b/Processes/Sibyll/Interaction.cc
@@ -118,7 +118,8 @@ namespace corsika::process::sibyll {
   }
 
   template <>
-  units::si::GrammageType Interaction::GetInteractionLength(SetupParticle& vP, Track&) const {
+  units::si::GrammageType Interaction::GetInteractionLength(SetupParticle& vP,
+                                                            Track&) const {
 
     using namespace units;
     using namespace units::si;
diff --git a/Processes/Sibyll/Interaction.h b/Processes/Sibyll/Interaction.h
index 4e1899f68..e7d7a0902 100644
--- a/Processes/Sibyll/Interaction.h
+++ b/Processes/Sibyll/Interaction.h
@@ -49,12 +49,11 @@ namespace corsika::process::sibyll {
     }
 
     std::tuple<corsika::units::si::CrossSectionType, corsika::units::si::CrossSectionType>
-    GetCrossSection(const corsika::particles::Code BeamId,
-                    const corsika::particles::Code TargetId,
-                    const corsika::units::si::HEPEnergyType CoMenergy) const;
+    GetCrossSection(const corsika::particles::Code, const corsika::particles::Code,
+                    const corsika::units::si::HEPEnergyType) const;
 
-    template <typename Particle, typename Track>
-    corsika::units::si::GrammageType GetInteractionLength(Particle&, Track&) const;
+    template <typename TParticle, typename TTrack>
+    corsika::units::si::GrammageType GetInteractionLength(TParticle&, TTrack&) const;
 
     /**
        In this function SIBYLL is called to produce one event. The
-- 
GitLab