IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 9c7a6b05 authored by Maximilian Sackel's avatar Maximilian Sackel
Browse files

Reject the idea to propagate the particles to the exact particle cut.

parent d84795ac
No related branches found
No related tags found
1 merge request!245Include proposal process rebase
...@@ -99,13 +99,13 @@ namespace corsika::process::proposal { ...@@ -99,13 +99,13 @@ namespace corsika::process::proposal {
1_MeV; 1_MeV;
// if the particle has a charge take multiple scattering into account // 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); Scatter(vP, vP.GetEnergy() - final_energy, dX);
// Update the energy and absorbe the particle if it's below the energy // Update the energy and absorbe the particle if it's below the energy
// threshold, because it will no longer propagated. // threshold, because it will no longer propagated.
vP.SetEnergy(final_energy); vP.SetEnergy(final_energy);
if (std::fabs((vP.GetEnergy() - cut.GetECut() )/ cut.GetECut()) < 0.01) if (vP.GetEnergy() <= cut.GetECut())
return process::EProcessReturn::eParticleAbsorbed; return process::EProcessReturn::eParticleAbsorbed;
vP.SetMomentum(vP.GetMomentum() * vP.GetEnergy() / vP.GetMomentum().GetNorm()); vP.SetMomentum(vP.GetMomentum() * vP.GetEnergy() / vP.GetMomentum().GetNorm());
return process::EProcessReturn::eOk; return process::EProcessReturn::eOk;
...@@ -121,10 +121,6 @@ namespace corsika::process::proposal { ...@@ -121,10 +121,6 @@ namespace corsika::process::proposal {
// hyper parameter which must be adjusted. // hyper parameter which must be adjusted.
auto energy_lim = 0.9 * vP.GetEnergy(); 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 // solving the track integral for giving energy lim
auto c = GetCalculator(vP, calc); auto c = GetCalculator(vP, calc);
auto grammage = get<DISPLACEMENT>(c->second)->SolveTrackIntegral( auto grammage = get<DISPLACEMENT>(c->second)->SolveTrackIntegral(
......
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