From 512df2f4ffb4ad529af2f69b614685ab1ad4d372 Mon Sep 17 00:00:00 2001 From: Amanda Lund Date: Sat, 3 May 2025 00:46:14 -0500 Subject: [PATCH] Skip atomic relaxation if binding energy is larger than photon energy (#3391) Co-authored-by: Paul Romano --- src/photon.cpp | 5 +- .../results_true.dat | 58 +++++++++---------- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/src/photon.cpp b/src/photon.cpp index 4b2fb41978..dae87ea4e2 100644 --- a/src/photon.cpp +++ b/src/photon.cpp @@ -770,8 +770,9 @@ void PhotonInteraction::pair_production(double alpha, double* E_electron, void PhotonInteraction::atomic_relaxation(int i_shell, Particle& p) const { - // Return if no atomic relaxation data is present - if (!has_atomic_relaxation_) + // Return if no atomic relaxation data is present or if the binding energy is + // larger than the incident particle energy + if (!has_atomic_relaxation_ || shells_[i_shell].binding_energy > p.E()) return; // Stack for unprocessed holes left by transitioning electrons diff --git a/tests/regression_tests/photon_production_fission/results_true.dat b/tests/regression_tests/photon_production_fission/results_true.dat index 1aa08b1476..7e20342af5 100644 --- a/tests/regression_tests/photon_production_fission/results_true.dat +++ b/tests/regression_tests/photon_production_fission/results_true.dat @@ -1,12 +1,12 @@ k-combined: -2.272421E+00 4.418825E-02 +2.270911E+00 4.568134E-02 tally 1: -2.665301E+00 -2.369839E+00 +2.663476E+00 +2.366726E+00 0.000000E+00 0.000000E+00 -2.665301E+00 -2.369839E+00 +2.663476E+00 +2.366726E+00 0.000000E+00 0.000000E+00 0.000000E+00 @@ -18,52 +18,52 @@ tally 1: 0.000000E+00 0.000000E+00 tally 2: -2.637532E+00 -2.320051E+00 -4.231377E+08 -5.971498E+16 +2.636709E+00 +2.318646E+00 +4.230052E+08 +5.967879E+16 0.000000E+00 0.000000E+00 -2.637532E+00 -2.320051E+00 -4.231377E+08 -5.971498E+16 +2.636709E+00 +2.318646E+00 +4.230052E+08 +5.967879E+16 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 -2.448745E+06 -2.005297E+12 +2.455009E+06 +2.015314E+12 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 -2.448745E+06 -2.005297E+12 +2.455009E+06 +2.015314E+12 0.000000E+00 0.000000E+00 tally 3: -2.660000E+00 -2.358558E+00 -4.231377E+08 -5.971498E+16 +2.660004E+00 +2.358564E+00 +4.230052E+08 +5.967879E+16 0.000000E+00 0.000000E+00 -2.660000E+00 -2.358558E+00 -4.231377E+08 -5.971498E+16 +2.660004E+00 +2.358564E+00 +4.230052E+08 +5.967879E+16 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 -2.448745E+06 -2.005297E+12 +2.455009E+06 +2.015314E+12 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 -2.448745E+06 -2.005297E+12 +2.455009E+06 +2.015314E+12 0.000000E+00 0.000000E+00