How to get energy deposited by specified particle?

Hi, experts
I’m new to Geant4, I would like to know how can I get the energy deposited by a specified particle?
That is, if the primary particle is the photon, how can I get the energy deposited by electrons and secondary photons.

Hi dear luoxyVio,
One of the possible approaches, that I’ve tried before, is identifying each particle at each step by its parentid and trackid, then score its deposited energy in any separated data structure as you want.

1 Like

Thank you, keyvantabaei.
It sounds great.
I’ll have a try.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.