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$.
Short answer:
You can't invert a linear combination of exponentials analytically. Only numerically. Even with just two terms.
For instance,
$$y=e^x+e^{5x}$$ amounts to a non-solvable quintic.