Have what I can only assume to be a bug when creating a sensitive detector volume using G4PhantomParameterisation. When I use SetRegularStructureID(1) it results in a bunch of scattering events creating nans (see right image below). From what I can tell these nans occur in mostly low density materials and come from electrons being produced as secondary particles. The following images show the results from my sensitive detector on two different colour scales, left to show the rough structure of my detector which is just a grid of G4_WATER voxels in a G4_AIR background and right to show all the areas that produced nans.
I am working with an adapted version of RE03 that I changed to use G4PVParameterised. Previous attempts working from the dicom example also resulted in this problem. Would anyone mind running my code to see if it reproduces on different machines or otherwise share any inside on how geant4 simulations could create nans? I’ve it here
MakeList
CMakeLists.txt (2.2 KB)
Headers
RE02ActionInitialization.hh (2.1 KB)
RE02DetectorConstruction.hh (5.7 KB)
RE02EventAction.hh (2.3 KB)
RE02NestedPhantomParameterisation.hh (6.4 KB)
RE02PrimaryGeneratorAction.hh (2.6 KB)
RE02PSCellFlux.hh (2.8 KB)
RE02PSEnergyDeposit.hh (2.4 KB)
RE02PSFlatSurfaceCurrent.hh (3.0 KB)
RE02PSFlatSurfaceFlux.hh (3.1 KB)
RE02PSNofStep.hh (2.4 KB)
RE02RunAction.hh (3.3 KB)
RE02PSPassageCellFlux.hh (2.7 KB)
RE02Run.hh (4.3 KB)
Source
RE02ActionInitialization.cc (2.6 KB)
RE02DetectorConstruction.cc (10.7 KB)
RE02EventAction.cc (3.1 KB)
RE02NestedPhantomParameterisation.cc (2.6 KB)
RE02PrimaryGeneratorAction.cc (3.4 KB)
RE02PSPassageCellFlux.cc (3.6 KB)
RE02Run.cc (9.0 KB)
RE02RunAction.cc (10.2 KB)
RE02PSCellFlux.cc (3.5 KB)
RE02PSEnergyDeposit.cc (3.6 KB)
RE02PSFlatSurfaceCurrent.cc (3.8 KB)
RE02PSFlatSurfaceFlux.cc (3.7 KB)
RE02PSNofStep.cc (3.5 KB)
Main
RE02.cc (5.7 KB)