From bbe5786eb47352d81f32a76b376ebd59d7076d2c Mon Sep 17 00:00:00 2001 From: Fan <fan_hu@pku.edu.cn> Date: Sun, 28 Nov 2021 15:50:34 +0800 Subject: [PATCH] fix final point problem in ObservationPlane --- corsika/detail/modules/ObservationPlane.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/corsika/detail/modules/ObservationPlane.inl b/corsika/detail/modules/ObservationPlane.inl index b40e8d772..7100db181 100644 --- a/corsika/detail/modules/ObservationPlane.inl +++ b/corsika/detail/modules/ObservationPlane.inl @@ -22,7 +22,7 @@ namespace corsika { template <typename TTracking, typename TOutput> template <typename TParticle, typename TTrajectory> inline ProcessReturn ObservationPlane<TTracking, TOutput>::doContinuous( - TParticle& particle, TTrajectory&, bool const stepLimit) { + TParticle& particle, TTrajectory& step, bool const stepLimit) { /* The current step did not yet reach the ObservationPlane, do nothing now and wait: */ @@ -46,7 +46,7 @@ namespace corsika { } HEPEnergyType const energy = particle.getEnergy(); - Point const pointOfIntersection = particle.getPosition(); + Point const pointOfIntersection = step.getPosition(1); Vector const displacement = pointOfIntersection - plane_.getCenter(); // add our particles to the output file stream -- GitLab