After ions transmited one layer material, how to get its trasmitted energy

The several sensitive detectors were constructed in stacked. How can I collected the energy of the ions after it transmited every layer? Using the incident energy to minus the energy loss in the up one layer? Or how to get it?