IAP GITLAB

Skip to content
Snippets Groups Projects
Commit d7a05a5f authored by ralfulrich's avatar ralfulrich Committed by Ralf Ulrich
Browse files

another attempt to make cuved leap frog tracking more robust

parent 7809407e
No related branches found
No related tags found
1 merge request!369Resolve "Trajectories crossing observation plane"
......@@ -106,7 +106,15 @@ namespace corsika {
LengthType const gyroradius = convert_HEP_to_SI<MassType::dimension_type>(p_perp) *
constants::c / (abs(charge) * magnitudeB);
double const maxRadians = 0.01; // maximal allowed deflection
if (gyroradius > 1e9_m) {
CORSIKA_LOG_WARN(
"CurvedLeapFrog is not very stable for extremely high gyroradius steps. "
"Rg={} -> straight tracking.",
gyroradius);
return getLinearTrajectory(particle);
}
double const maxRadians = 0.01;
LengthType const steplimit = 2 * cos(maxRadians) * sin(maxRadians) * gyroradius;
TimeType const steplimit_time = steplimit / initialVelocity.getNorm();
CORSIKA_LOG_DEBUG("gyroradius {}, steplimit: {} = {}", gyroradius, steplimit,
......
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