Get number of particles and energy deposited in large number of volumes

hello everyone,
as you see in the screenshot; i have 20 volumes constructed with G4Replica (or large number of pixels),
I want to retrieve the number of gamma rays passed through each volume and the energy deposited in each of those volumes.
what is easiest way to extract those quantities.
best regards

Capture d’écran de 2021-03-20 17-28-25

I have the same problem, now using 320 sensitive volumes. ChamberParameterisation.cc helps me control every volume…