IAP GITLAB

Skip to content
Snippets Groups Projects
Commit b4f395b1 authored by Alan Coleman's avatar Alan Coleman
Browse files

Merge branch 'catch_negative_maxsteplength' into 'master'

Catch negative step lengths in proposal::ContinuousProcess::getMaxStepLength

See merge request !484
parents bd5d5c8b c62ed5a1
No related branches found
No related tags found
1 merge request!484Catch negative step lengths in proposal::ContinuousProcess::getMaxStepLength
Pipeline #9957 passed with warnings
...@@ -157,6 +157,13 @@ namespace corsika::proposal { ...@@ -157,6 +157,13 @@ namespace corsika::proposal {
vP.getNode()->getModelProperties().getArclengthFromGrammage(track, grammage); vP.getNode()->getModelProperties().getArclengthFromGrammage(track, grammage);
CORSIKA_LOG_TRACE("PROPOSAL::getMaxStepLength X={} g/cm2, l={} m ", CORSIKA_LOG_TRACE("PROPOSAL::getMaxStepLength X={} g/cm2, l={} m ",
grammage / 1_g * square(1_cm), dist / 1_m); grammage / 1_g * square(1_cm), dist / 1_m);
if (dist < 0_m) {
CORSIKA_LOG_WARN(
"PROPOSAL::getMaxStepLength calculated a negative step length of l={} m. "
"Return 0_m instead.",
dist / 1_m);
return 0_m;
}
return dist; return dist;
} }
......
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