Hello,
I am using Geant4 10.07 on Linux.
I am trying to run very low energy electrons (down to 1 eV eventually) with a non-uniform electric field. I am using Geant4-DNA as my PhysicsList.
I find that I can see the electron trajectory plotted on screen using an energy of 71 eV. However, with an energy of 70 eV, I get a Segmentation fault. I note that it cant find the region “Target”. I am not sure why this is at the moment, but its only a warning… and it doesn´t seem to cause a problem at the higher energy.
Any help much appreciated.
Chris
The output at 70 eV is as follows:
Available UI session types: [ Qt, GAG, tcsh, csh ]
qt.qpa.xcb: X server does not support XInput 2
Geant4 version Name: geant4-10-07 [MT] (4-December-2020)
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
: NIM A 835 (2016), 186-225
WWW : http://geant4.org/
After SetUserInitialization(new B1DetectorConstruction())
Visualization Manager instantiating with verbosity “warnings (3)”…
Visualization Manager initialising…
Registering graphics systems…
You have successfully registered the following graphics systems.
Registered graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
OpenGLImmediateX (OGLIX, OGLIQt_FALLBACK)
OpenGLStoredX (OGLSX, OGLSQt_FALLBACK)
RayTracerX (RayTracerX)
Registering model factories…
You have successfully registered the following model factories.
Registered model factories:
generic
drawByAttribute
drawByCharge
drawByOriginVolume
drawByParticleID
drawByEncounteredVolume
Registered models:
None
Registered filter factories:
attributeFilter
chargeFilter
originVolumeFilter
particleFilter
encounteredVolumeFilter
Registered filters:
None
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none
Some /vis commands (optionally) take a string to specify colour.
“/vis/list” to see available colours.
/control/saveHistory
/run/verbose 2
Change the default number of threads (in multi-threaded mode)
#/run/numberOfThreads 4
Initialize kernel
/run/initialize
userDetector->Construct() start.
Checking overlaps for volume Sample (G4Tubs) … OK!
Checking overlaps for volume eFieldVol1 (G4Tubs) … OK!
Checking overlaps for volume eFieldVol2 (G4Tubs) … OK!
Checking overlaps for volume eFieldVol3 (G4Tubs) … OK!
Checking overlaps for volume eFieldVol4 (G4Tubs) … OK!
Checking overlaps for volume eFieldVol5 (G4Tubs) … OK!
Checking overlaps for volume eFieldVol6 (G4Tubs) … OK!
Checking overlaps for volume eFieldVol7 (G4Tubs) … OK!
World is registered to the default region.
Construct E Field Step 1
Construct E Field Step 2
Electric field
—> Reading the field grid from EField_z_1E-9_r_1E-9_Tip_-70V.txt …
[ Number of values r,z: 11 11 ]
rstart: 0 zstart: 0 rend: 1e-08 zend: 1e-08
rstep: 1e-09 zstep: 1e-09
—> … done reading
Electric field
—> Reading the field grid from EField_z_1E-8_r_1E-8_Tip_-70V.txt …
[ Number of values r,z: 11 11 ]
rstart: 0 zstart: 0 rend: 1e-07 zend: 1e-07
rstep: 1e-08 zstep: 1e-08
—> … done reading
Electric field
—> Reading the field grid from EField_z_1E-7_r_1E-7_Tip_-70V.txt …
[ Number of values r,z: 11 11 ]
rstart: 0 zstart: 0 rend: 1e-06 zend: 1e-06
rstep: 1e-07 zstep: 1e-07
—> … done reading
Electric field
—> Reading the field grid from EField_z_1E-6_r_1E-6_Tip_-70V.txt …
[ Number of values r,z: 11 11 ]
rstart: 0 zstart: 0 rend: 1e-05 zend: 1e-05
rstep: 1e-06 zstep: 1e-06
—> … done reading
Electric field
—> Reading the field grid from EField_z_1E-5_r_1E-5_Tip_-70V.txt …
[ Number of values r,z: 11 11 ]
rstart: 0 zstart: 0 rend: 0.0001 zend: 0.0001
rstep: 1e-05 zstep: 1e-05
—> … done reading
Electric field
—> Reading the field grid from EField_z_1E-4_r_1E-4_Tip_-70V.txt …
[ Number of values r,z: 11 11 ]
rstart: 0 zstart: 0 rend: 0.001 zend: 0.001
rstep: 0.0001 zstep: 0.0001
—> … done reading
Electric field
—> Reading the field grid from EField_z_1E-3_r_1E-3_Tip_-70V.txt …
[ Number of values r,z: 26 21 ]
rstart: 0 zstart: 0 rend: 0.025 zend: 0.02
rstep: 0.001 zstep: 0.001
—> … done reading
physicsList->Construct() start.
=== G4UAtomicDeexcitation::InitialiseForNewRun()
physicsList->CheckParticleList() start.
physicsList->setCut() start.
PhysicsList::SetCuts:CutLength : 1 um
Visualization setting
/control/execute vis.mac
Macro file for the visualization setting in the initialization phase
of the B1 example when running in interactive mode
Use these open statements to open selected visualization
Use this open statement to create an OpenGL view:
/vis/open OGL 600x600-0+0
/vis/sceneHandler/create OGL
/vis/viewer/create ! ! 600x600-0+0
/vis/viewer/refresh
#/vis/open Win32
Use this open statement to create an OpenInventor view:
#/vis/open OI
Use this open statement to create a .prim file suitable for
viewing in DAWN:
#/vis/open DAWNFILE
Use this open statement to create a .heprep file suitable for
viewing in HepRApp:
#/vis/open HepRepFile
Use this open statement to create a .wrl file suitable for
viewing in a VRML viewer:
#/vis/open VRML2FILE
Disable auto refresh and quieten vis messages whilst scene and
trajectories are established:
/vis/viewer/set/autoRefresh false
/vis/verbose errors
Visualization verbosity changed to errors (2)
Draw geometry:
/vis/drawVolume
/vis/scene/create
/vis/scene/add/volume world -1 -1 none m 0 0 0 0 0 0
/vis/sceneHandler/attach
Specify view angle:
/vis/viewer/set/viewpointVector -1 0 0
/vis/viewer/set/lightsVector -1 0 0
Specify style (surface, wireframe, auxiliary edges,…)
/vis/viewer/set/style wireframe
/vis/viewer/set/auxiliaryEdge true
/vis/viewer/set/lineSegmentsPerCircle 100
Draw smooth trajectories at end of event, showing trajectory points
as markers 2 pixels wide:
/vis/scene/add/trajectories smooth
/tracking/storeTrajectory 2
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
G4SmoothTrajectory:
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
G4SmoothTrajectoryPoint:
Auxiliary Point Position (Aux): G4BestUnit (G4ThreeVector)
Step Position (Pos): G4BestUnit (G4ThreeVector)
/vis/scene/notifyHandlers
/vis/modeling/trajectories/create/drawByCharge
/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
/vis/scene/notifyHandlers scene-0
/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
/vis/scene/notifyHandlers scene-0
(if too many tracks cause core dump => /tracking/storeTrajectory 0)
Draw hits at end of event:
#/vis/scene/add/hits
To draw only gammas:
#/vis/filtering/trajectories/create/particleFilter
#/vis/filtering/trajectories/particleFilter-0/add gamma
To invert the above, drawing all particles except gammas,
keep the above two lines but also add:
#/vis/filtering/trajectories/particleFilter-0/invert true
Many other options are available with /vis/modeling and /vis/filtering.
For example, to select colour by particle ID:
#/vis/modeling/trajectories/create/drawByParticleID
#/vis/modeling/trajectories/drawByParticleID-0/default/setDrawStepPts true
To select or override default colours (note: e+ is blue by default):
#/vis/modeling/trajectories/list
#/vis/modeling/trajectories/drawByParticleID-0/set e+ yellow
To superimpose all of the events from a given run:
/vis/scene/endOfEventAction accumulate
Decorations
Name
/vis/set/textColour green
/vis/set/textLayout right
/vis/scene/add/text2D 0.9 -.9 24 ! ! exampleB1
/vis/scene/notifyHandlers
or, if your system does not support right-adjustment
#/vis/scene/add/text2D 0 -.9 24 ! ! exampleB1
/vis/set/textLayout
/vis/set/textColour
Axes, scale, etc.
/vis/scene/add/scale
/vis/scene/notifyHandlers
/vis/scene/add/axes
/vis/scene/notifyHandlers
/vis/scene/add/eventID
/vis/scene/notifyHandlers
/vis/scene/add/date
/vis/scene/notifyHandlers
/vis/scene/add/logo2D
/vis/scene/notifyHandlers
/vis/scene/add/logo
/vis/scene/notifyHandlers
Frame
/vis/set/colour red
/vis/set/lineWidth 2
/vis/scene/add/frame
/vis/scene/notifyHandlers
/vis/set/colour
/vis/set/lineWidth
Attach text to one edge of Shape1, with a small, fixed offset
/vis/scene/add/text 0 6 -4 cm 18 4 4 Shape1
/vis/scene/notifyHandlers
Attach text to one corner of Shape2, with a small, fixed offset
/vis/scene/add/text 6 7 10 cm 18 4 4 Shape2
/vis/scene/notifyHandlers
To get nice view
Make the “World” box invisible
/vis/geometry/set/visibility World 0 false
/vis/scene/notifyHandlers
“Sample” is transparent blue to represent water
/vis/geometry/set/colour Sample 0 0 0 1 .3
/vis/scene/notifyHandlers
/vis/viewer/set/style surface
/vis/viewer/set/hiddenMarker true
/vis/viewer/set/viewpointThetaPhi 120 150
Re-establish auto refreshing and verbosity:
/vis/viewer/set/autoRefresh true
/vis/viewer/refresh
/vis/verbose warnings
Visualization verbosity changed to warnings (3)
For file-based drivers, use this to create an empty detector view:
#/vis/viewer/flush
/control/execute run1.mac
Macro file for example B1
Can be run in batch, without graphic
or interactively: Idle> /control/execute run1.mac
Change the default number of workers (in multi-threading mode)
#/run/numberOfThreads 4
Initialize kernel
/run/initialize
/control/verbose 2
/run/verbose 2
/event/verbose 0
/tracking/verbose 1
gamma 6 MeV to the direction (0.,0.,1.)
#/gun/particle gamma
#/gun/energy 60 eV
#/run/beamOn 5
electron 210 eV to the direction (0.,-1.,0.)
/process/em/lowestElectronEnergy 1 eV
/run/physicsModified
/run/setCut 0.001 mm
PhysicsList::SetCuts:CutLength : 1 um
/gun/particle e-
/gun/direction 0. 1. 1.
/gun/position 0. 100. 0. um
/gun/energy 70 eV
/tracking/verbose 2
/run/beamOn 1
=== Deexcitation model UAtomDeexcitation is activated for 1 region:
DefaultRegionForTheWorld 1 1 1
=== G4UAtomicDeexcitation::InitialiseForNewRun()
=== Auger cascade flag: 0
=== Ignore cuts flag: 0
=== PIXE model for hadrons: Empirical
=== PIXE model for e±: Livermore
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomMgt1001
issued by : G4RegionStore::GetRegion()
Region NOT found in store !
Region Target NOT found in store !
Returning NULL pointer.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4EmConfigurator WARNING: fails to find a region <Target
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomMgt1001
issued by : G4RegionStore::GetRegion()
Region NOT found in store !
Region Target NOT found in store !
Returning NULL pointer.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4EmConfigurator WARNING: fails to find a region <Target
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomMgt1001
issued by : G4RegionStore::GetRegion()
Region NOT found in store !
Region Target NOT found in store !
Returning NULL pointer.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4EmConfigurator WARNING: fails to find a region <Target
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomMgt1001
issued by : G4RegionStore::GetRegion()
Region NOT found in store !
Region Target NOT found in store !
Returning NULL pointer.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4EmConfigurator WARNING: fails to find a region <Target
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomMgt1001
issued by : G4RegionStore::GetRegion()
Region NOT found in store !
Region Target NOT found in store !
Returning NULL pointer.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4EmConfigurator WARNING: fails to find a region <Target
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomMgt1001
issued by : G4RegionStore::GetRegion()
Region NOT found in store !
Region Target NOT found in store !
Returning NULL pointer.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4EmConfigurator WARNING: fails to find a region <Target
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomMgt1001
issued by : G4RegionStore::GetRegion()
Region NOT found in store !
Region Target NOT found in store !
Returning NULL pointer.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4EmConfigurator WARNING: fails to find a region <Target
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomMgt1001
issued by : G4RegionStore::GetRegion()
Region NOT found in store !
Region Target NOT found in store !
Returning NULL pointer.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4EmConfigurator WARNING: fails to find a region <Target
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomMgt1001
issued by : G4RegionStore::GetRegion()
Region NOT found in store !
Region Target NOT found in store !
Returning NULL pointer.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4EmConfigurator WARNING: fails to find a region <Target
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomMgt1001
issued by : G4RegionStore::GetRegion()
Region NOT found in store !
Region Target NOT found in store !
Returning NULL pointer.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4EmConfigurator WARNING: fails to find a region <Target
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomMgt1001
issued by : G4RegionStore::GetRegion()
Region NOT found in store !
Region Target NOT found in store !
Returning NULL pointer.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4EmConfigurator WARNING: fails to find a region <Target
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomMgt1001
issued by : G4RegionStore::GetRegion()
Region NOT found in store !
Region Target NOT found in store !
Returning NULL pointer.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4EmConfigurator WARNING: fails to find a region <Target
msc: for e- SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llimit=1
eIoni: for e- SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 1 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
MollerBhabha : Emin= 0 eV Emax= 100 TeV
e-_G4MicroElecElastic: for e- SubType=51 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
DummyModel : Emin= 0 eV Emax= 100 TeV
StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llimit=1
e-_G4MicroElecInelastic: for e- SubType=53 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
DummyModel : Emin= 0 eV Emax= 100 TeV
StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llimit=1
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomMgt1001
issued by : G4RegionStore::GetRegion()
Region NOT found in store !
Region Target NOT found in store !
Returning NULL pointer.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
msc: for proton SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 TeV Nbins=84 100 eV - 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1
hIoni: for proton SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.01
===== EM models for the G4Region DefaultRegionForTheWorld ======
Bragg : Emin= 0 eV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 100 TeV
p_G4MicroElecInelastic: for proton SubType=53 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
DummyModel : Emin= 0 eV Emax= 100 TeV
StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llimit=1
msc: for GenericIon SubType= 10
===== EM models for the G4Region DefaultRegionForTheWorld ======
UrbanMsc : Emin= 0 eV Emax= 100 TeV
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:0 Skin=1 Llimit=1
ionIoni: for GenericIon SubType=2
dE/dx and range tables from 100 eV to 100 TeV in 84 bins
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
StepFunction=(0.2, 0.1 mm), integ: 1, fluct: 1, linLossLim= 0.02
Stopping Power data for 17 ion/material pairs
===== EM models for the G4Region DefaultRegionForTheWorld ======
BraggIon : Emin= 0 eV Emax= 2 MeV
BetheBloch : Emin= 2 MeV Emax= 100 TeV
ion_G4MicroElecInelastic: for GenericIon SubType=53 BuildTable=0
===== EM models for the G4Region DefaultRegionForTheWorld ======
DummyModel : Emin= 0 eV Emax= 100 TeV
StepLim=UseSafety Rfact=0.04 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=1 Llimit=1
Region – – appears in world volume
This region is in the mass world.
Root logical volume(s) : World
Pointers : G4VUserRegionInformation[0], G4UserLimits[0], G4FastSimulationManager[0], G4UserSteppingAction[0]
Materials : G4_Galactic G4_W Galactic
Production cuts : gamma 1 um e- 1 um e+ 1 um proton 1 um
Region – – is not associated to any world.
Root logical volume(s) :
Pointers : G4VUserRegionInformation[0], G4UserLimits[0], G4FastSimulationManager[0], G4UserSteppingAction[0]
Materials :
Production cuts : gamma 1 um e- 1 um e+ 1 um proton 1 um
========= Table of registered couples ============================
Index : 0 used in the geometry : Yes
Material : G4_Galactic
Range cuts : gamma 1 um e- 1 um e+ 1 um proton 1 um
Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 eV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 1 used in the geometry : Yes
Material : G4_W
Range cuts : gamma 1 um e- 1 um e+ 1 um proton 1 um
Energy thresholds : gamma 1.62781 keV e- 14.7038 keV e+ 14.3856 keV proton 100 eV
Region(s) which use this couple :
DefaultRegionForTheWorld
Index : 2 used in the geometry : Yes
Material : Galactic
Range cuts : gamma 1 um e- 1 um e+ 1 um proton 1 um
Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 eV
Region(s) which use this couple :
DefaultRegionForTheWorld
==================================================================
Start closing geometry.
G4GeometryManager::ReportVoxelStats – Voxel Statistics
Total memory consumed for geometry optimisation: 1 kByte
Total CPU time elapsed for geometry optimisation: 0 seconds
Voxelisation: top CPU users:
Percent Total CPU System CPU Memory Volume
------- ---------- ---------- -------- ----------
0.00 0.00 0.00 1k World
Voxelisation: top memory users:
Percent Memory Heads Nodes Pointers Total CPU Volume
------- -------- ------ ------ -------- ---------- ----------
100.00 1k 3 9 50 0.00 World
/vis/scene/notifyHandlers scene-0
Run 0 starts.
- G4Track Information: Particle = e-, Track ID = 1, Parent ID = 0
Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName
0 0 0.1 0 7e-05 0 0 0 eFieldVol6 initStep
1 1.3e-17 1 0.00524 7.01e-05 9.89e-24 0.925 0.925 eFieldVol7 Transportation
2 1.4e-17 1.06 7.23e-16 6.99e-05 5.96e-25 0.0557 0.981 Sample Transportation
3 1.4e-17 1.06 -3.57e-08 5.1e-05 1.89e-05 1.85e-06 0.981 Sample msc
4 2.9e-08 1.06 -2.31e-18 4.78e-05 3.26e-06 6.39e-08 0.981 eFieldVol7 Transportation
5 0.23 0.973 0.306 6.01e-05 3.46e-24 0.392 1.37 eFieldVol6 Transportation
Segmentation fault