Define primaryGenerator

Hi Dear Geant4 Users !
I need help to know to define my primary Generator.
I want to to collect the total energy deposited in the center of room, where the walls and the floor are the gamma source.
Someone can help me to define walls and floor are my source of gamma ?
Thank for any help.

Hello,
you can use GeneralParticleSource and define several box sources, which copy the dimensions and positions of the walls and the floor. If the walls and the floor are one PhysicalVolume, you can create one big box source that contain this physical volume and confine the source to it.
Marek

alright, I’ll try to see.
Thank for your help.