Volumetric Energy Deposition

Hello everybody,
I’m trying to use Geant4 to obtain a spacial distribution of the energy deposited by particles going through a volume, to obtain something similar to a profile of J/m^3.
My idea has been to divide the whole volume in small cube (like a discretization) to then evaluate the total energy deposited in each of the volume units. However, I’ve seen that at each boundary the step ends and therefore the trajectory is modified, which is not exactly what I want.
Is there someone who knows any other possible solution to obtain such a result?
Thank you, Tommaso.

I have the same question, too . Do you have some advice
thanks

You can create a parameterized volume. For instance, you could have a 10x10x10 array of cubes, each with a unique id number. Then you can get the energy deposited in each of the volumes.

Thank you very much :smiling_face_with_three_hearts: