Fixes bug in sampling angle for CorrelatedAngleEnergy

This commit is contained in:
Hunter Belanger 2021-04-21 22:21:32 +02:00
parent abf30b39b6
commit 59db5f1260

View file

@ -259,7 +259,7 @@ void CorrelatedAngleEnergy::sample(double E_in, double& E_out, double& mu,
}
// Find correlated angular distribution for closest outgoing energy bin
if (r1 - c_k < c_k1 - r1) {
if (r1 - c_k < c_k1 - r1 || distribution_[l].interpolation == Interpolation::histogram) {
mu = distribution_[l].angle[k]->sample(seed);
} else {
mu = distribution_[l].angle[k + 1]->sample(seed);