diff --git a/corsika/detail/modules/ObservationPlane.inl b/corsika/detail/modules/ObservationPlane.inl index c28485f6b37b4edcd292326a23b0dd24fc222296..7adc1730bfeee9f38646f957100e0e1eabb529d1 100644 --- a/corsika/detail/modules/ObservationPlane.inl +++ b/corsika/detail/modules/ObservationPlane.inl @@ -27,16 +27,20 @@ namespace corsika { The current step did not yet reach the ObservationPlane, do nothing now and wait: */ if (!stepLimit) { -#ifdef DEBUG + // @todo this is actually needed to fix small instabilities of the leap-frog + // tracking: Note, this is NOT a general solution and should be clearly revised with + // a more robust tracking. #ifdef DEBUG if (deleteOnHit_) { LengthType const check = (particle.getPosition() - plane_.getCenter()).dot(plane_.getNormal()); if (check < 0_m) { - CORSIKA_LOG_DEBUG("PARTICLE AVOIDED OBSERVATIONPLANE {}", check); - } - } -#endif - return ProcessReturn::Ok; + CORSIKA_LOG_WARN("PARTICLE AVOIDED OBSERVATIONPLANE {}", check); + CORSIKA_LOG_WARN("Temporary fix: write and remove particle."); + } else + return ProcessReturn::Ok; + } else + // #endif + return ProcessReturn::Ok; } HEPEnergyType const energy = particle.getEnergy();