From f417f35809e7d1081f1cfd399f9eddc7419ca5b9 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 14 Jan 2020 13:34:17 -0600 Subject: [PATCH] Fix check for no angle distribution in elastic scattering --- src/physics.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/physics.cpp b/src/physics.cpp index 4b80d1039..721af4a80 100644 --- a/src/physics.cpp +++ b/src/physics.cpp @@ -696,12 +696,12 @@ void elastic_scatter(int i_nuclide, const Reaction& rx, double kT, // Find speed of neutron in CM vel = v_n.norm(); - // Sample scattering angle, checking if it is an ncorrelated angle-energy - // distribution + // Sample scattering angle, checking if angle distribution is present (assume + // isotropic otherwise) double mu_cm; auto& d = rx.products_[0].distribution_[0]; auto d_ = dynamic_cast(d.get()); - if (d_) { + if (!d_->angle().empty()) { mu_cm = d_->angle().sample(p->E_, p->current_seed()); } else { mu_cm = 2.0*prn(p->current_seed()) - 1.0;