The problem about G4PSSphereSurfaceCurrent

_Geant4 Version:_G4.11.3
Operating System:
Compiler/Version:
CMake Version:


I try to simulate the carbon bomb the water tank .then analyze the secondary neutron energy, so the REo2 example was changed
when use the 100MeV neutron bomb the logicalvolum which is set as MultiFunctionDetector, it is anticipated to record the 100MeV neutron. the program as follow list:
RE02DetectorConstruction.cc (10.8 KB)

but the result show the neutron was not monoenergy but continuous spectrum. the results list in the new140.txt

new140.txt (973 Bytes)

the unit of the neutron was permm2

I had changed the units to percm2,but it can’t work

here is the runaction
RE02RunAction.cc (7.4 KB)
RE02PrimaryGeneratorAction.cc (4.1 KB)

There are a couple things to note here that might make it hard to debug things:

  1. You define a “vacuum” water tank that is 1.75 cm in radius and height to place at the origin. You then also define a 1m water sphere that overlaps this volume but there is no mother/daughter relationship here.
  2. You have a for loop with a single iteration for the water sphere.
  3. Your primary generator currently is set for 4.6 GeV carbon ions, not neutrons

1 and 2 can cause undefined behavior. 3 means you aren’t looking at the right particle.
100 MeV neutrons are not going to be fully stopped inside 1 m of water. You should expect a continuum.

thank you for the reply,

  1. for the one.it is a mistake.but.not the core issue
  2. the loop is ready for mutilogicalvolume
  3. in the vis.mac, change the particle from carbon to neutron

Overlapping volumes, like you have, will cause undefined behaviour. You will not get correct energy deposits or interactions, because the tracking loop will not consistently identify the correct volume in which the particle is interacting.

One way to check your geometry is to set the final (optional) argument to G4PVPlacement, named pSurfChk, to true. If you do this, then Geant4 will check every volume when you place it to see whether it has overlaps with other already placed volumes, or if it extends outside its mother volume. It adds output to your log file, so you might not want to do it each time, but you should do it once, and you should fix your geometry so there are no “overlaps errors.”

The neutron scattering cross section with water beyond 10 MeV is going to be about a barn. Any collision with hydrogen is going to cause 0-100% energy “loss” for the neutron. A meter of water is more than enough to cause several interactions for the primary neutron. You are going to get a continuum. Remove the water and youll get nearly mono-energetic neutrons again.