When BDSIM
is invoked in interactive mode, the run is controlled by the Geant4 shell. A visualization macro
should be then provided. A simple visualization macro is include with the
distribution, and is outlined below.
# Invoke the OGLSX driver # Create a scene handler and a viewer for the OGLSX driver /vis/open OGLIX # Create an empty scene /vis/scene/create # Add detector geometry to the current scene /vis/scene/add/volume # Attach the current scene handler # to the current scene (omittable) /vis/sceneHandler/attach # Add trajectories to the current scene # Note: This command is not necessary in exampleN03, # since the C++ method DrawTrajectory() is # described in the event action. /vis/viewer/set/viewpointThetaPhi 90 90 # /vis/drawVolume #/vis/scene/add/trajectories # /tracking/storeTrajectory 0 #/vis/viewer/zoom /tracking/storeTrajectory 1 # # for BDS: #/vis/viewer/zoom 300 #/vis/viewer/set/viewpointThetaPhi 3 45
By default the macro is read from the file named vis.mac
located in the
current directory. The name of the file with the macro can also be passed
via the vis_mac
switch.
bdsim --file=line.gmad --vis_mac=my_macro.mac
In interactive mode all the Geant4 interactive commands are available. For instance, to fire 100 particles type
/run/beamOn 100
and to end the session type
exit
To display help menu
/help
;
For more details see 1.