diff --git a/src/photon.cpp b/src/photon.cpp index 590e0cc9f..c4beff019 100644 --- a/src/photon.cpp +++ b/src/photon.cpp @@ -154,7 +154,6 @@ PhotonInteraction::PhotonInteraction(hid_t group) // TODO: Move to ElectronSubshell constructor - // Read binding energy and number of electrons hid_t tgroup = open_group(rgroup, designator.c_str()); // Read binding energy energy and number of electrons if atomic relaxation diff --git a/src/physics.cpp b/src/physics.cpp index ae59b49cb..7d391fdf6 100644 --- a/src/physics.cpp +++ b/src/physics.cpp @@ -366,7 +366,14 @@ void sample_photon_reaction(Particle& p) xs_lower(i_shell) + f * (xs_upper(i_shell) - xs_lower(i_shell))); if (prob > cutoff) { - double E_electron = p.E() - shell.binding_energy; + // Determine binding energy based on whether atomic relaxation data is + // present (if not, use value from Compton profile data) + double binding_energy = element.has_atomic_relaxation_ + ? shell.binding_energy + : element.binding_energy_[i_shell]; + + // Determine energy of secondary electron + double E_electron = p.E() - binding_energy; // Sample mu using non-relativistic Sauter distribution. // See Eqns 3.19 and 3.20 in "Implementing a photon physics