Check for valid binding energy for photoelectric effect

This commit is contained in:
Paul Romano 2022-12-05 22:09:52 -06:00
parent ea7e2a13d0
commit f9309bf090
2 changed files with 8 additions and 2 deletions

View file

@ -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