From ddd6b2bf20c32f96329068e77ccc79a9476a7bdd Mon Sep 17 00:00:00 2001
From: Maximilian Reininghaus <maximilian.reininghaus@kit.edu>
Date: Mon, 10 Oct 2022 14:30:04 +0200
Subject: [PATCH] do not use view.getProjectile()

---
 corsika/detail/modules/pythia8/Interaction.inl | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/corsika/detail/modules/pythia8/Interaction.inl b/corsika/detail/modules/pythia8/Interaction.inl
index 977feaf95..db429ef5b 100644
--- a/corsika/detail/modules/pythia8/Interaction.inl
+++ b/corsika/detail/modules/pythia8/Interaction.inl
@@ -224,8 +224,6 @@ namespace corsika::pythia8 {
                                          FourMomentum const& projectileP4,
                                          FourMomentum const& targetP4) {
 
-    auto projectile = view.getProjectile();
-
     CORSIKA_LOG_DEBUG(
         "Pythia::Interaction: "
         "doInteraction: {} interaction? ",
@@ -242,14 +240,7 @@ namespace corsika::pythia8 {
       throw std::runtime_error("invalid target,projectile,energy combination.");
     }
 
-    // position and time of interaction
-    Point const& pOrig = projectile.getPosition();
-    TimeType const tOrig = projectile.getTime();
-
     CORSIKA_LOG_DEBUG("Interaction: ebeam lab: {} GeV", eProjectileLab / 1_GeV);
-    CORSIKA_LOG_DEBUG("Interaction: position of interaction: ", pOrig.getCoordinates());
-    CORSIKA_LOG_DEBUG("Interaction: time: {}", tOrig);
-
     CORSIKA_LOG_DEBUG(
         "Interaction: "
         " doInteraction: E(GeV): {}"
@@ -426,7 +417,7 @@ namespace corsika::pythia8 {
 
       // add to corsika stack
       auto pnew =
-          projectile.addSecondary(std::make_tuple(pyId, Ekin, pyPlab.normalized()));
+          view.addSecondary(std::make_tuple(pyId, Ekin, pyPlab.normalized()));
 
       Plab_final += pnew.getMomentum();
       Elab_final += pnew.getEnergy();
-- 
GitLab