Commit 950a1add authored by Philipp Oleynik's avatar Philipp Oleynik
Browse files

Birks correction limited to 100 MeV

parent b7e22187
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PySciProjectComponent">
<option name="PY_SCI_VIEW_SUGGESTED" value="true" />
</component>
</project>
\ No newline at end of file
......@@ -57,7 +57,10 @@ def birks_correction(energy): # Birks coefficient and parameter estimates taken
:return: Corrected energy in Mev
"""
kbirks = 0.68E-3
return energy * (1 - scs.hyp2f1(1, 1 / 0.678, 1 + 1 / 0.678, -np.power(energy, 0.678) / (95 * kbirks)))
if energy > 100:
return energy
else:
return energy * (1 - scs.hyp2f1(1, 1 / 0.678, 1 + 1 / 0.678, -np.power(energy, 0.678) / (95 * kbirks)))
def core_energy_to_64(energy):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment