IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 5189e66d authored by Remy Prechelt's avatar Remy Prechelt
Browse files

Merge branch 'noise_fix_Cascade' into 'master'

Bug in Cascade.inl

See merge request AirShowerPhysics/corsika!397
parents b1288e92 f24b9ea2
No related branches found
No related tags found
1 merge request!397Bug in Cascade.inl
Pipeline #5495 passed with warnings
...@@ -126,7 +126,7 @@ namespace corsika { ...@@ -126,7 +126,7 @@ namespace corsika {
// inform ContinuousProcesses (if applicable) that it is responsible for step-limit // inform ContinuousProcesses (if applicable) that it is responsible for step-limit
// this would become simpler if we follow the idea of Max to enumerate ALL types of // this would become simpler if we follow the idea of Max to enumerate ALL types of
// processes. Then non-contunuous are included and no further logic is needed to // processes. Then non-continuous are included and no further logic is needed to
// distinguish between continuous and non-continuous limit. // distinguish between continuous and non-continuous limit.
ContinuousProcessIndex limitingId; ContinuousProcessIndex limitingId;
bool const isContinuous = continuous_max_dist < min_non_continuous; bool const isContinuous = continuous_max_dist < min_non_continuous;
...@@ -151,7 +151,6 @@ namespace corsika { ...@@ -151,7 +151,6 @@ namespace corsika {
// assumption: tracking does not change absolute momentum (continuous physics can and // assumption: tracking does not change absolute momentum (continuous physics can and
// will): // will):
vParticle.setMomentum(step.getDirection(1) * vParticle.getMomentum().getNorm()); vParticle.setMomentum(step.getDirection(1) * vParticle.getMomentum().getNorm());
vParticle.setTime(vParticle.getTime() + step.getDuration());
// apply all continuous processes on particle + track // apply all continuous processes on particle + track
if (sequence_.doContinuous(vParticle, step, limitingId) == if (sequence_.doContinuous(vParticle, step, limitingId) ==
...@@ -167,6 +166,7 @@ namespace corsika { ...@@ -167,6 +166,7 @@ namespace corsika {
} }
return; return;
} }
vParticle.setTime(vParticle.getTime() + step.getDuration());
if (isContinuous) { if (isContinuous) {
return; // there is nothing further, step is finished return; // there is nothing further, step is finished
} }
...@@ -232,11 +232,11 @@ namespace corsika { ...@@ -232,11 +232,11 @@ namespace corsika {
/* /*
Create SecondaryView object on Stack. The data container Create SecondaryView object on Stack. The data container
remains untouched and identical, and 'projectil' is identical remains untouched and identical, and 'projectile' is identical
to 'vParticle' above this line. However, to 'vParticle' above this line. However,
projectil.AddSecondaries populate the SecondaryView, which can projectile.AddSecondaries populate the SecondaryView, which can
then be used afterwards for further processing. Thus: it is then be used afterwards for further processing. Thus: it is
important to use projectle/view (and not vParticle) for Interaction, important to use projectile/view (and not vParticle) for Interaction,
and Decay! and Decay!
*/ */
...@@ -303,7 +303,7 @@ namespace corsika { ...@@ -303,7 +303,7 @@ namespace corsika {
if (actual_inv_length * 0.99 > initial_inv_int_length) { if (actual_inv_length * 0.99 > initial_inv_int_length) {
CORSIKA_LOG_WARN( CORSIKA_LOG_WARN(
"Interaction length decreased during step! This leads to un-physical step " "Interaction length decreased during step! This leads to un-physical step "
"length. delta_innverse_interaction_length={}", "length. delta_inverse_interaction_length={}",
1 / initial_inv_int_length - 1 / actual_inv_length); 1 / initial_inv_int_length - 1 / actual_inv_length);
} }
#endif #endif
......
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