When compiling GEANT4, there are default visualization output. In the past, I used DAWN. DAWN is a static viewer, need to specific view angle, zoom, etc.
Another dynamic viewer is VRML. This is also a built-in visualization output. In the GEANT4 macro,
/vis/open VRML2FILE
/vis/drawVolume
/vis/scene/add/trajectories
/vis/scene/endOfEventAction accumulate
#generate 10 beams
/run/beamOn 10
GEANT4 will output a g4_XX.wrl file. This file can be opened in any Ubuntu by view3dscene
>sudo apt install view3dscene
After installation, run
>view3dscene g4_XX.wrl
Here is the screenshot of the extended example Testem4
Much better than DAWN.
John McMillan
Sep 13, 2021 @ 11:57:08
https://geant4-forum.web.cern.ch/t/visualizing-geometries-with-paraview/6133/2