Seg faulting when particle leaves world volume

Hi all,

I’m running a modified version of Example B1 for my graduate thesis. Pretty simple setup, the geometry is all modded and brand new (Basically just a bunch of boxes) and I cleared all overlaps so that part is good to go. For my source, I’m trying to use a GPS that takes up 99.9999% of the world volume in the shape of the world volume (world volume is a square, so I have a ParaP with all angles set to 90’), which shoots off gamma’s. So the problem I’m having is that the GPS code is seg Faulting when a gamma leaves the world volume instead of killing the interaction. I’m wondering how to fix the issue? I’ve tried to modify it in the stepping action, but do I need to find the StackingAction.hh file and modify it there/include it in exampleB1.cc?

Here is the error:

Some /vis commands (optionally) take a string to specify colour.
“/vis/list” to see available colours.
Checking overlaps for volume FrontWall1 … OK!
Checking overlaps for volume FrontWall2 … OK!
Checking overlaps for volume RightWall … OK!
Checking overlaps for volume LeftWall … OK!
Checking overlaps for volume BackWall … OK!
Checking overlaps for volume TopWall … OK!
Checking overlaps for volume BottomWall … OK!
Checking overlaps for volume PbFW … OK!
Checking overlaps for volume PbBW … OK!
Checking overlaps for volume PbRW … OK!
Checking overlaps for volume PbLW … OK!
Checking overlaps for volume PbTW … OK!
Checking overlaps for volume PbBottom … OK!
Checking overlaps for volume WATER … OK!
Issue /vis/viewer/refresh or flush to see effect.
/tracking/storeTrajectory 1
Attributes available for modeling and filtering with
“/vis/modeling/trajectories/create/drawByAttribute” and
“/vis/filtering/trajectories/create/attributeFilter” commands:
G4TrajectoriesModel:
Event ID (EventID): G4int
Run ID (RunID): G4int
G4Trajectory:
Charge (Ch): unit: e+ (G4double)
Track ID (ID): G4int
Initial kinetic energy (IKE): G4BestUnit (G4double)
Initial momentum magnitude (IMag): G4BestUnit (G4double)
Initial momentum (IMom): G4BestUnit (G4ThreeVector)
No. of points (NTP): G4int
PDG Encoding (PDG): G4int
Parent ID (PID): G4int
Particle Name (PN): G4String
G4TrajectoryPoint:
Position (Pos): G4BestUnit (G4ThreeVector)
WARNING: Trajectory storing has been requested. This action may be
reversed with “/tracking/storeTrajectory 0”.
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
See commands in /vis/modeling/trajectories/ for other options.
HepRepFile writing to G4Data0.heprep
/run/verbose 1
/event/verbose 1
/tracking/verbose 1
/gps/verbose 1
/gps/particle gamma
/gps/pos/type Plane
/gps/pos/shape Rectangle
/gps/pos/centre 0 0 0 cm
/gps/pos/halfx 816 cm
/gps/pos/halfy 228 cm
/gps/pos/halfz 230 cm
/gps/ang/type iso
/gps/energy 10 MeV
/gps/ene/min 0.1 MeV
/gps/ene/max 30 MeV
/run/beamOn 100

========= Table of registered couples ==============================

Index : 0 used in the geometry : Yes
Material : G4_AIR
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld

Index : 1 used in the geometry : Yes
Material : G4_STAINLESS-STEEL
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 20.9232 keV e- 1.31345 MeV e+ 1.22809 MeV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld

Index : 2 used in the geometry : Yes
Material : G4_PLEXIGLASS
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 2.78665 keV e- 389.196 keV e+ 376.336 keV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld

Index : 3 used in the geometry : Yes
Material : G4_Pb
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 101.843 keV e- 1.36749 MeV e+ 1.27862 MeV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld

Index : 4 used in the geometry : Yes
Material : G4_WATER
Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm
Energy thresholds : gamma 2.94056 keV e- 351.877 keV e+ 342.545 keV proton 100 keV
Region(s) which use this couple :
DefaultRegionForTheWorld

====================================================================

/vis/scene/notifyHandlers scene-0

Run 0 starts.

Rotated and Translated position (-2113.3,-799.247,0)
Generating isotropic vector: (0.759379,0.522945,-0.387133)

G4EventManager::ProcessOneEvent()

G4PrimaryTransformer::PrimaryVertex (-2113.3(mm),-799.247(mm),0(mm),0(nsec))
1 primaries are passed from G4EventTransformer.
!!! Now start processing an event !!!


  • G4Track Information: Particle = gamma, Track ID = 1, Parent ID = 0

Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName
0 -2.11e+03 -799 0 10 0 0 0 World initStep
1 -1.47e+03 -357 -328 10 0 846 846 RightWall Transportation
2 -1.46e+03 -349 -333 10 0 14.6 861 World Transportation
3 -573 262 -785 10 0 1.17e+03 2.03e+03 BackWall Transportation
4 -551 277 -797 10 0 28.5 2.06e+03 World Transportation
5 5.69e+03 4.57e+03 -3.98e+03 10 0 8.21e+03 1.03e+04 OutOfWorld Transportation
Segmentation fault (core dumped)

Sorry, I also just left the gps source as planar rectangle for the time being while I figure out the seg faulting!