IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 9e5e3bbc authored by ralfulrich's avatar ralfulrich
Browse files

do not prematurely delete particles!

parent 2f61e672
No related branches found
No related tags found
1 merge request!321Resolve "Weird LongitudinalProfile"
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment