IAP GITLAB

Commit 9e5e3bbc authored by Ralf Ulrich's avatar Ralf Ulrich

do not prematurely delete particles!

parent 2f61e672
......@@ -67,12 +67,10 @@ namespace corsika {
}
if constexpr (t2ProcSeq) {
if (!isAbsorbed(ret)) { ret |= B_.doContinuous(particle, vT, limitId); }
ret |= B_.doContinuous(particle, vT, limitId);
} else if constexpr (is_continuous_process_v<process2_type>) {
if (!isAbsorbed(ret)) {
ret |= B_.doContinuous(particle, vT,
limitId == ContinuousProcessIndex(IndexProcess2));
}
ret |=
B_.doContinuous(particle, vT, limitId == ContinuousProcessIndex(IndexProcess2));
}
return ret;
......
......@@ -48,7 +48,6 @@ namespace corsika {
if (deleteOnHit_) {
count_ground_++;
energy_ground_ += energy;
particle.erase();
return ProcessReturn::ParticleAbsorbed;
} else {
return ProcessReturn::Ok;
......
......@@ -153,7 +153,6 @@ namespace corsika {
CORSIKA_LOG_TRACE("ParticleCut::DoContinuous");
if (checkCutParticle(particle)) {
CORSIKA_LOG_TRACE("removing during continuous");
particle.erase();
// signal to upstream code that this particle was deleted
return ProcessReturn::ParticleAbsorbed;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment