IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 1dc8f44e authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan: Committed by ralfulrich
Browse files

HadronicElasticModel produces secondary

parent cae982f9
No related branches found
No related tags found
No related merge requests found
......@@ -131,8 +131,7 @@ process::EProcessReturn HadronicElasticInteraction::DoInteraction(SetupView& vie
do {
// |t| cannot become arbitrarily large, max. given by GER eq. (4.16), so we just
// throw again until we have an acceptable value. Note that the formula holds in
// any frame despite of what is stated in the book.
// throw again until we have an acceptable value.
absT = tDist(fRNG);
} while (absT >= maxT);
......@@ -155,12 +154,10 @@ process::EProcessReturn HadronicElasticInteraction::DoInteraction(SetupView& vie
pProjectileCoMNorm * sin(theta) * sin(phi),
pProjectileCoMNorm * cos(theta)})));
p.SetMomentum(projectileScatteredLab.GetSpaceLikeComponents());
p.SetEnergy(
sqrt(projectileScatteredLab.GetSpaceLikeComponents().squaredNorm() +
units::static_pow<2>(particles::GetMass(
p.GetPID())))); // Don't use energy from boost. It can be smaller than
// the momentum due to limited numerical accuracy.
view.AddSecondary(std::tuple<particles::Code, units::si::HEPEnergyType,
corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{
p.GetPID(), sqrt(projectileScatteredLab.GetSpaceLikeComponents().squaredNorm() + units::static_pow<2>(particles::GetMass(p.GetPID()))),
projectileScatteredLab.GetSpaceLikeComponents(), p.GetPosition(), p.GetTime()});
return process::EProcessReturn::eOk;
}
......
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