From f37d2fcbcee5dbce169fcc3811026af1defcac8a Mon Sep 17 00:00:00 2001 From: amandalund Date: Thu, 28 Jun 2018 19:43:13 -0500 Subject: [PATCH] Corrected bug in TTB photon energy sampling introduced in 492a4e950fffcf607d8d8592903b686e59aa1332 --- src/photon_physics.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/photon_physics.F90 b/src/photon_physics.F90 index cba7726ca..79388a8ce 100644 --- a/src/photon_physics.F90 +++ b/src/photon_physics.F90 @@ -626,6 +626,7 @@ contains p_r = mat % pdf(i_w+1, i_e) c_l = mat % cdf(i_w, i_e) a = log(p_r/p_l)/(w_r - w_l) + ONE + w = exp(w_l)*(a*(c - c_l)/(exp(w_l)*p_l) + ONE)**(ONE/a) if (w > energy_cutoff(PHOTON)) then ! Create secondary photon