Summing detector scattered gamma particle energies

Hello, I am working on a project for my professor and I have been given the task to (when a gamma particle is detected in a scintillation detector) also check the two detectors on either side of it for potential scattering and sum the energies that are deposited in them. Currently I am using an
if(vol == detector)
energy += GetTotalEnergyDeposit();
approach to get this energy, but I am unsure what the best approach to do this task would be. Also, would this be best done in the SteppingAction file, or along side my other gating and data acquisition functions in Analysis? Any advice would be GREATLY appreciated!

Hello. I would expect that the answer would depend on how you have created your setup. If all three ‘detectors’ are volumes with sensitive detectors attached to them, they will have the ability to store the information about the energy deposited in a similar way to your main (central) detector. So long as you associate your energy deposition with the current event number, it should be possible to store it in the neighbouring detectors’ hit collections and recover them from there. Else a single sensitive detector crossing all three detectors could also store the energy deposition in the central and two side ‘detectors’ for a single event.
Hope this helps,
John Apostolakis
( This is my understanding. Someone with more knowledge of this area may need to improve or correct this recipe. )