From c84b912cb0bdb655a82674a229edd239d31abf2e Mon Sep 17 00:00:00 2001 From: Maximilian Sackel <maximilian.sackel@tu-dortmund.de> Date: Wed, 30 Sep 2020 16:26:17 +0000 Subject: [PATCH] Reject the idea to propagate the particles to the exact particle cut. --- Processes/Proposal/ContinuousProcess.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Processes/Proposal/ContinuousProcess.cc b/Processes/Proposal/ContinuousProcess.cc index eb5f8d3f7..61a64c0bb 100644 --- a/Processes/Proposal/ContinuousProcess.cc +++ b/Processes/Proposal/ContinuousProcess.cc @@ -99,13 +99,13 @@ namespace corsika::process::proposal { 1_MeV; // if the particle has a charge take multiple scattering into account - if (vP.GetChargeNumber() != 0 && vP.GetEnergy() > final_energy) + if (vP.GetChargeNumber() != 0) Scatter(vP, vP.GetEnergy() - final_energy, dX); // Update the energy and absorbe the particle if it's below the energy // threshold, because it will no longer propagated. vP.SetEnergy(final_energy); - if (std::fabs((vP.GetEnergy() - cut.GetECut() )/ cut.GetECut()) < 0.01) + if (vP.GetEnergy() <= cut.GetECut()) return process::EProcessReturn::eParticleAbsorbed; vP.SetMomentum(vP.GetMomentum() * vP.GetEnergy() / vP.GetMomentum().GetNorm()); return process::EProcessReturn::eOk; @@ -121,10 +121,6 @@ namespace corsika::process::proposal { // hyper parameter which must be adjusted. auto energy_lim = 0.9 * vP.GetEnergy(); - // If energy lim is below the cut it couldn't be descriped by these process. So the - // energy_lim is replaced by the cut. - if (cut.GetECut() > energy_lim) energy_lim = cut.GetECut(); - // solving the track integral for giving energy lim auto c = GetCalculator(vP, calc); auto grammage = get<DISPLACEMENT>(c->second)->SolveTrackIntegral( -- GitLab