From 87205b0f7b9e2f3108d4b019b72233aec866d9e6 Mon Sep 17 00:00:00 2001
From: Felix Riehn <felix@matilda>
Date: Tue, 17 Jan 2023 18:32:46 +0100
Subject: [PATCH] comments

---
 .../modules/sophia/InteractionModel.inl       |  2 +-
 corsika/modules/Sophia.hpp                    | 22 -------------------
 corsika/modules/sophia/InteractionModel.hpp   |  4 ++--
 corsika/modules/sophia/ParticleConversion.hpp | 18 ---------------
 tests/modules/testProposal.cpp                |  1 -
 5 files changed, 3 insertions(+), 44 deletions(-)

diff --git a/corsika/detail/modules/sophia/InteractionModel.inl b/corsika/detail/modules/sophia/InteractionModel.inl
index eabf8f4fa..6228f4b16 100644
--- a/corsika/detail/modules/sophia/InteractionModel.inl
+++ b/corsika/detail/modules/sophia/InteractionModel.inl
@@ -81,7 +81,7 @@ namespace corsika::sophia {
     double Enucleon = nucleonP4.getTimeLikeComponent() / 1_GeV;
     double Ephoton = photonP4.getTimeLikeComponent() / 1_GeV;
     double theta = 0.0; // set nucleon at rest in collision
-    int Imode;
+    int Imode = -1; // overwritten inside SOPHIA
     CORSIKA_LOGGER_DEBUG(logger_,
                          "calling SOPHIA eventgen with L0={}, E0={}, eps={},theta={}",
                          nucleonSophiaCode, Enucleon, Ephoton, theta);
diff --git a/corsika/modules/Sophia.hpp b/corsika/modules/Sophia.hpp
index 9bbda688c..91259b28e 100644
--- a/corsika/modules/Sophia.hpp
+++ b/corsika/modules/Sophia.hpp
@@ -14,25 +14,3 @@
 
 #include <corsika/framework/process/InteractionProcess.hpp>
 
-/**
- * @file Sophia.hpp
- *
- * Includes all the parts of the Sophia model. Defines the InteractionProcess<TModel>
- * classes needed for the ProcessSequence.
- */
-
-namespace corsika::sophia {
-  /**
-   * @brief sophia::Interaction is the process for ProcessSequence.
-   *
-   * The sophia::InteractionModel is wrapped as an InteractionProcess here in order
-   * to provide all the functions for ProcessSequence.
-   */
-  // struct Interaction : public InteractionModel, public InteractionProcess<Interaction>
-  // {
-  //   template <typename TEnvironment>
-  //   Interaction(TEnvironment const& env)
-  //       : InteractionModel{env} {}
-  // };
-
-} // namespace corsika::sophia
diff --git a/corsika/modules/sophia/InteractionModel.hpp b/corsika/modules/sophia/InteractionModel.hpp
index f6e6d8fd7..347b51663 100644
--- a/corsika/modules/sophia/InteractionModel.hpp
+++ b/corsika/modules/sophia/InteractionModel.hpp
@@ -42,8 +42,8 @@ namespace corsika::sophia {
     /**
      * @brief evaluated validity of collision system.
      *
-     * SOPHIA only accepts nucleons as targets, or protons aka Hydrogen or
-     * neutrons (p,n == nucleon).
+     * SOPHIA only accepts nucleons as targets, that is protons (Hydrogen) or
+     * neutrons.
      */
     bool constexpr isValid(Code const projectileId, Code const targetId,
                            HEPEnergyType const sqrtSnn) const;
diff --git a/corsika/modules/sophia/ParticleConversion.hpp b/corsika/modules/sophia/ParticleConversion.hpp
index 526285610..d5884861a 100644
--- a/corsika/modules/sophia/ParticleConversion.hpp
+++ b/corsika/modules/sophia/ParticleConversion.hpp
@@ -20,17 +20,6 @@ namespace corsika::sophia {
   enum class SophiaCode : int8_t;
   using SophiaCodeIntType = std::underlying_type<SophiaCode>::type;
 
-  // /**
-  //    These are the possible projectile for which Sibyll knows the cross section
-  //  */
-  // enum class SibyllXSClass : int8_t {
-  //   CannotInteract = 0,
-  //   Baryon = 1,
-  //   Pion = 2,
-  //   Kaon = 3,
-  // };
-  // using SophiaXSClassIntType = std::underlying_type<SophiaXSClass>::type;
-
 #include <corsika/modules/sophia/Generated.inc>
 
   SophiaCode constexpr convertToSophia(Code const pCode) {
@@ -52,13 +41,6 @@ namespace corsika::sophia {
     return static_cast<int>(convertToSophia(code));
   }
 
-  // int constexpr getSophiaXSCode(Code const code) {
-  //   if (is_nucleus(code))
-  //     return static_cast<SophiaXSClassIntType>(SophiaXSClass::CannotInteract);
-  //   return static_cast<SophiaXSClassIntType>(
-  //       corsika2sophiaXStype[static_cast<CodeIntType>(code)]);
-  // }
-
   bool constexpr canInteract(Code const pCode) {
     return (pCode == Code::Photon ? true : false);
   }
diff --git a/tests/modules/testProposal.cpp b/tests/modules/testProposal.cpp
index 299c913fe..7d59b9be8 100644
--- a/tests/modules/testProposal.cpp
+++ b/tests/modules/testProposal.cpp
@@ -100,7 +100,6 @@ TEST_CASE("ProposalInterface", "modules") {
     // finish successfully
     CHECK(emModel.doHadronicPhotonInteraction(view, cs, P4, Code::Oxygen) ==
           ProcessReturn::Ok);
-    // no LE interactions
     CHECK(stack.getEntries() == 6);
     CORSIKA_LOG_INFO("Number of particles produced in hadronic photon interaction: {}",
                      stack.getEntries() - 1);
-- 
GitLab