/vis/

Visualization commands.

Sub-directories

/vis/ASCIITree/Commands for ASCIITree control.
/vis/filtering/Filtering commands.
/vis/gMocren/gMocren commands.
/vis/geometry/Operations on vis attributes of Geant4 geometry.
/vis/heprep/HepRep commands.
/vis/modeling/Modeling commands.
/vis/multithreading/Commands unique to multithreading mode.
/vis/ogl/G4OpenGLViewer commands.
/vis/oglxm/G4OpenGLXmViewer commands.
/vis/plotter/...Title not available...
/vis/scene/Operations on Geant4 scenes.
/vis/sceneHandler/Operations on Geant4 scene handlers.
/vis/set/Set quantities for use in future commands where appropriate.
/vis/touchable/Operations on touchables.
/vis/tsg/...Title not available...
/vis/viewer/Operations on Geant4 viewers.

Commands

abortReviewKeptEvents
abortReviewPlots
disable
drawLogicalVolume
drawOnlyToBeKeptEvents
drawTree
drawView
drawVolume
enable
initialize
list
open
plot
reviewKeptEvents
reviewPlots
specify
verbose

abortReviewKeptEvents [abort]

Abort review of kept events.

Available at all Geant4 states.

Parameters
abort type b Omittable : default value = 1

abortReviewPlots [abort]

Abort review of plots.

Available at all Geant4 states.

Parameters
abort type b Omittable : default value = 1

disable

Disables visualization system.

Available at all Geant4 states.

drawLogicalVolume [logical-volume-name] [depth-of-descent] [booleans-flag] [voxels-flag] [readout-flag] [axes-flag] [check-overlap-flag]

Draws logical volume with additional components.
Synonymous with "/vis/specify".
Creates a scene consisting of this logical volume and asks the current viewer to draw it. The scene becomes current.
Adds a logical volume to the current scene,
Shows boolean components (if any), voxels (if any), readout geometry (if any), local axes and overlaps (if any), under control of the appropriate flag. Note: voxels are not constructed until start of run - "/run/beamOn". (For voxels without a run, "/run/beamOn 0".)

Available at all Geant4 states.

Parameters
logical-volume-name type s
depth-of-descent type i Omittable : default value = 1
booleans-flag type b Omittable : default value = 1
voxels-flag type b Omittable : default value = 1
readout-flag type b Omittable : default value = 1
axes-flag type b Omittable : default value = 1
check-overlap-flag type b Omittable : default value = 1

drawOnlyToBeKeptEvents [draw]

DURING A RUN draw only those events that have been "to be kept" by the user with G4EventManager::GetEventManager()->KeepTheCurrentEvent() or with "/event/keepCurrentEvent".
To draw selected events the user should set this flag, then in a user action: if ( some criterion ) { G4EventManager::GetEventManager()->KeepTheCurrentEvent(); }

Available at all Geant4 states.

Parameters
draw type b Omittable : default value = 1

drawTree [physical-volume-name] [system]

Produces a representation of the geometry hierarchy. Further guidance is given on running the command. Or look at the guidance for "/vis/ASCIITree/verbose".
The pre-existing scene and view are preserved.

Available at all Geant4 states.

Parameters
physical-volume-name type s Omittable : default value = world
system type s Omittable : default value = ATree

drawView [theta-degrees] [phi-degrees] [pan-right] [pan-up] [pan-unit] [zoom-factor] [dolly] [dolly-unit]

Draw view from this angle, etc.

Available at all Geant4 states.

Parameters
theta-degrees type d Omittable : default value = 0
phi-degrees type d Omittable : default value = 0
pan-right type d Omittable : default value = 0
pan-up type d Omittable : default value = 0
pan-unit type s Omittable : default value = cm
zoom-factor type d Omittable : default value = 1
dolly type d Omittable : default value = 0
dolly-unit type s Omittable : default value = cm

drawVolume [physical-volume-name] [copy-no] [depth-of-descent] [clip-volume-type] [parameter-unit] [parameter-1] [parameter-2] [parameter-3] [parameter-4] [parameter-5] [parameter-6]

Creates a scene containing this physical volume and asks the current viewer to draw it. The scene becomes current.
Adds a physical volume to current scene, with optional clipping volume.
If physical-volume-name is "world" (the default), the top of the main geometry tree (material world) is added. If "worlds", the tops of all worlds - material world and parallel worlds, if any - are added. Otherwise a search of all worlds is made.
In the last case the names of all volumes in all worlds are matched against physical-volume-name. If this is of the form "/regexp/", where regexp is a regular expression (see C++ regex), the match uses the usual rules of regular expression matching. Otherwise an exact match is required. For example, "/Shap/" adds "Shape1" and "Shape2".
It may help to see a textual representation of the geometry hierarchy of the worlds. Try "/vis/drawTree [worlds]" or one of the driver/browser combinations that have the required functionality, e.g., HepRepFile.
If clip-volume-type is specified, the subsequent parameters are used to to define a clipping volume. For example, "/vis/scene/add/volume ! ! ! -box km 0 1 0 1 0 1" will draw the world with the positive octant cut away. (If the Boolean Processor issues warnings try replacing 0 by 0.000000001 or something.)
If clip-volume-type is prepended with '-', the clip-volume is subtracted (cutaway). (This is the default if there is no prepended character.) If '*' is prepended, the intersection of the physical-volume and the clip-volume is made. (You can make a section through the detector with a thin box, for example).
For "box", the parameters are xmin,xmax,ymin,ymax,zmin,zmax. Only "box" is programmed at present.

Available at all Geant4 states.

Parameters
physical-volume-name type s Omittable : default value = world
copy-no type i Omittable : default value = -1
depth-of-descent type i Omittable : default value = -1
clip-volume-type type s Omittable : default value = none Parameter candidates : none box -box *box
parameter-unit type s Omittable : default value = m
parameter-1 type d Omittable : default value = 0
parameter-2 type d Omittable : default value = 0
parameter-3 type d Omittable : default value = 0
parameter-4 type d Omittable : default value = 0
parameter-5 type d Omittable : default value = 0
parameter-6 type d Omittable : default value = 0

enable [enabled]

Enables/disables visualization system.

Available at all Geant4 states.

Parameters
enabled type b Omittable : default value = 1

initialize

Initialise visualisation manager.

Available at all Geant4 states.

list [verbosity]

Lists visualization parameters.

Available at all Geant4 states.

Parameters
verbosity type s Omittable : default value = warnings

open [graphics-system-name] [window-size-hint]

Creates a scene handler and viewer ready for drawing.
The scene handler and viewer names are auto-generated.
The scene handler and viewer become current.
(Note: the system adds the graphics system name to the viewer name for identification, but for selecting, copying, etc., only characters up to the first blank are used. For example, if the viewer name is "viewer-0 (G4OpenGLStoredQt)", it may be referenced by "viewer-0", for example in "/vis/viewer/select viewer-0".)
Window size and placement hints, e.g. 600x600-100+100 (in pixels):
- single number, e.g., "600": square window;
- two numbers, e.g., "800x600": rectangluar window;
- two numbers plus placement hint, e.g., "600x600-100+100" places window of size 600x600 100 pixels left and 100 pixels down from top right corner.
- If not specified, the default is "600", i.e., 600 pixels square, placed at the window manager's discretion...or picked up from the previous viewer.
- This is an X-Windows-type geometry string, see: https://en.wikibooks.org/wiki/Guide_to_X11/Starting_Programs, "Specifying window geometry".

Available at all Geant4 states.

Parameters
graphics-system-name type s Omittable : current value is used as the default value.
window-size-hint type s Omittable : current value is used as the default value.

plot [type] [id]

Draws plots.

Available at all Geant4 states.

Parameters
type type s Parameter candidates : h1 h2
id type i

reviewKeptEvents [macro-file-name]

Review kept events.
If a macro file is specified, it is executed for each event.
If a macro file is not specified, each event is drawn to the current viewer. After each event, the session is paused. The user may issue any allowed command. Then enter "cont[inue]" to continue to the next event. Useful commands might be: "/vis/viewer/..." to change the view (zoom, set/viewpoint,...). "/vis/ogl/export" to get hard copy. "/vis/open" to get alternative viewer. "/vis/abortReviewKeptEvents", then "cont[inue]", to abort.

Available at all Geant4 states.

Parameters
macro-file-name type s Omittable : default value =

reviewPlots

Review plots.
Each plot is drawn, one by one, to the current viewer. After each plot the session is paused. The user may issue any allowed command. Then enter "cont[inue]" to continue to the next plot. Useful commands might be: "/vis/tsg/export" to get hard copy. "/vis/abortReviewPlots", then "cont[inue]", to abort.

Available at all Geant4 states.

specify [logical-volume-name] [depth-of-descent] [booleans-flag] [voxels-flag] [readout-flag] [axes-flag] [check-overlap-flag]

Draws logical volume with Boolean components, voxels and readout geometry.
Synonymous with "/vis/drawLogicalVolume".
Creates a scene consisting of this logical volume and asks the current viewer to draw it to the specified depth of descent showing boolean components (if any), voxels (if any), readout geometry (if any), local axes and overlaps (if any), under control of the appropriate flag.
Note: voxels are not constructed until start of run - /run/beamOn. (For voxels without a run, "/run/beamOn 0".)
The scene becomes current.

Available at all Geant4 states.

Parameters
logical-volume-name type s
depth-of-descent type i Omittable : default value = 1
booleans-flag type b Omittable : default value = 1
voxels-flag type b Omittable : default value = 1
readout-flag type b Omittable : default value = 1
axes-flag type b Omittable : default value = 1
check-overlap-flag type b Omittable : default value = 1

verbose [verbosity]

Simple graded message scheme - digit or string (1st character defines):
0) quiet, // Nothing is printed.
1) startup, // Startup and endup messages are printed...
2) errors, // ...and errors...
3) warnings, // ...and warnings...
4) confirmations, // ...and confirming messages...
5) parameters, // ...and parameters of scenes and views...
6) all // ...and everything available.

Available at all Geant4 states.

Parameters
verbosity type s Omittable : default value = warnings