I'm having an hard time inverting this formula in order to get $x$. This is a short form for the amount of Energy deposited in a single pixel of a detector.
$$ K = \sum_E f(E) e^{-(g(E) \cdot x)} $$
Where $f(E)$ and $g(E)$ are two functions summed over $E$, $K$ is a constant. $x$ doesn't depend on $E$.