Project

General

Profile

Visualization

There are many choices with visualization drivers. Detailed tutorials are found here.
HepRApp: http://geant4.slac.stanford.edu/Presentations/vis/G4HepRAppTutorial/G4HepRAppTutorial.html
DAWN: http://geant4.slac.stanford.edu/Presentations/vis/G4DAWNTutorial/G4DAWNTutorial.html
OPENGL: http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html
In each link, you can find more information about visualization in Geant4.

Here I explain a simple example of visualization in g4lbne v3 using HepRApp.
First, run the g4lbne by typing ‘g4lbne’ in your command terminal.

$ g4lbne

Here ‘$’ is your linux prompt.
Then, type these two commands in turn.

/LBNE/det/construct
/run/initialize

Then you will get Geant4 command prompt ‘Idle>’.
Now, you are ready to input visualization commands.
Input these lines in turn.

/vis/open HepRepFile
/vis/drawVolume
/vis/scene/add/trajectories
/vis/scene/endOfEventAction accumulate 
/LBNE/run/NEvents 2
/gun/particle proton
/gun/energy 120 GeV
/run/beamOn

Or, you can make a macro file which contains above command lines including ‘/LBNE/det/construct’ and ‘/run/initi