# Source code question regarding TSL

**URL:** <https://openmc.discourse.group/t/source-code-question-regarding-tsl/4046>\
**Category:** Development\
**Created:** [March 15, 2024, 4:51am UTC](https://openmc.discourse.group/t/source-code-question-regarding-tsl/4046 "2024-03-15T04:51:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![njchoi94](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@njchoi94](https://openmc.discourse.group/u/njchoi94)\
**Post date:** [March 15, 2024, 4:51am UTC](https://openmc.discourse.group/t/source-code-question-regarding-tsl/4046/1 "2024-03-15T04:51:40Z")

</div>

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.
