Unexpected energy deposition by neutrons

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

Geant4 Version: 11.3
Operating System: Ubuntu 22.04
Compiler/Version: 11.4.0
*CMake Version:*3.22.1

Hello everyone,

I am simulating a background of neutrons from rock so I am using as an input to G4 the energy spectrum of these neutrons in the laboratory. Firstly, I am interested in seeing the energy deposited in the neutron detector filled with He3 gas in the absence of shielding. I could achieve this using maybe a point source but things change when I sample positions and directions from cavern walls as I do not see any peaks as one would expect from thermal neutron interaction with He3.

I attach the energy spectrum that I get when I use a macro

neutrons.mac.txt (2.6 KB)

. Can you please suggest the possible reason. I attach the macro that I use. Could the problem be with my macro?

Physics list is QGSP_BIC_HP.


I realized that I incorrectly assumed that I could define surfaces in any orientation of my choice and the positions of my plane were incorrect as they did not allow particles to be generated from the walls. Briefly, the problem is with my macro.

But how can one generate particles from the surfaces of a cuboid inwards all at the go using gps? I tried customizing the gps generator but it gives rise to some errors.

I will appreciate your help.

I don’t think that there is with just gps, you are likely going to need to write your own particle gun. A convoluted workaround would be to simply split the simulation into 6 different simulations firing particles from only 1 of the 6 sides of the cuboid. You could automate this with bash scripts.

How about you restrict particle generation to really thin (or thick as per your application) cuboid volume and consider only generated particle’s first position that are inside of your space. I have implemented something similar before where I created a raw G4 output with all events in the volume of interest and then only considered events’ x/y/z positions that meet my criteria in post processing.

See if something like /process/had/rdm/selectVolume Target in rdecay02/macros will be helpful.

Thanks for your suggestion. I have defined my own particleGun to meet requirements and CFD for energy spectrum. So far so good with that but I will try your suggestion also to compare with my approach.

Cheers!