Source code question regarding TSL

Hi all,

Could someone teach me which operation the following code is doing in secondary_thermal.cpp around line 295? I believe it is dealing with the ACE inelastic thermal scattering law for continuous tabular energy format TSLs, but it doesn’t seem to be the scaled interpolation being done in LAW = 44 or LAW = 61.

// Adjustment of outgoing energy
double E_l = energy_[l];
if (E_out < 0.5 * E_l) {
E_out *= 2.0 * E_in / E_l - 1.0;
} else {
E_out += E_in - E_l;
}

Many thanks in advance.