How to create a histogram TH2F

Hi everyone. How to draw a histogram of accumulated energy in different volumes?

1 Like

I suspect it’s about “how to create”, not “how to draw”.

1 Like

I do not know how to sum up the energy of the particles that fell into the volume.

That’s what TH2::Fill is doing.