/vis/scene/add/

Add model to current scene.

Commands

arrow
arrow2D
axes
date
digis
electricField
eventID
extent
frame
gps
hits
line
line2D
localAxes
logicalVolume
logo
logo2D
magneticField
plotter
psHits
scale
text
text2D
trajectories
userAction
volume

arrow [x1] [y1] [z1] [x2] [y2] [z2] [unit]

Adds arrow to current scene.

Available at all Geant4 states.

Parameters
x1 type d
y1 type d
z1 type d
x2 type d
y2 type d
z2 type d
unit type s Omittable : default value = m

arrow2D [x1] [y1] [x2] [y2]

Adds 2D arrow to current scene.
x,y in range [-1,1]

Available at all Geant4 states.

Parameters
x1 type d
y1 type d
x2 type d
y2 type d

axes [x0] [y0] [z0] [length] [unit] [colour-string] [showtext]

Add axes.
Draws axes at (x0, y0, z0) of given length and colour.
If "colour-string" is "auto", x, y and z will be red, green and blue respectively. Otherwise it can be one of the pre-defined text-specified colours - see information printed by the vis manager at start-up or use "/vis/list".
If "length" is negative, it is set to about 25% of scene extent.
If "showtext" is false, annotations are suppressed.

Available at all Geant4 states.

Parameters
x0 type d Omittable : default value = 0
y0 type d Omittable : default value = 0
z0 type d Omittable : default value = 0
length type d Omittable : default value = -1
unit type s Omittable : default value = m
colour-string type s Omittable : default value = auto
showtext type b Omittable : default value = true

date [size] [x-position] [y-position] [layout] [date]

Adds date to current scene.
If "date"is omitted, the current date and time is drawn. Otherwise, the string, including the rest of the line, is drawn.

Available at all Geant4 states.

Parameters
size type i Omittable : default value = 18
x-position type d Omittable : default value = 0.95
y-position type d Omittable : default value = 0.9
layout type s Omittable : default value = right
date type s Omittable : default value = -

digis

Adds digis to current scene.
Digis are drawn at end of event when the scene in which they are added is current.

Available at all Geant4 states.

electricField [nDataPointsPerHalfExtent] [representation]

Adds electric field representation to current scene.
The first parameter is no. of data points per half extent. So, possibly, at maximum, the number of data points sampled is (2*n+1)^3, which can grow large--be warned! The default value is 10, i.e., a 21x21x21 array, i.e., 9,261 sampling points. That may swamp your view, but usually, a field is limited to a small part of the extent, so it's not a problem. But if it is, here are some of the things you can do: - reduce the number of data points per half extent (first parameter); - specify "lightArrow" (second parameter); - restrict the region sampled with "/vis/set/extentForField"; - restrict the drawing to a specific volume with "/vis/set/volumeForField" or "/vis/touchable/volumeForField". Note: you might have to deactivate existing field models with "/vis/scene/activateModel Field false" and re-issue "/vis/scene/add/...Field" command again.
In the arrow representation, the length of the arrow is proportional to the magnitude of the field and the colour is mapped onto the range as a fraction of the maximum magnitude: 0->0.5->1 is red->green->blue.

Available at all Geant4 states.

Parameters
nDataPointsPerHalfExtent type i Omittable : default value = 10
representation type s Omittable : default value = fullArrow Parameter candidates : fullArrow lightArrow

eventID [size] [x-position] [y-position] [layout]

Adds eventID to current scene.
Run and event numbers are drawn at end of event or run when the scene in which they are added is current.

Available at all Geant4 states.

Parameters
size type i Omittable : default value = 18
x-position type d Omittable : default value = -0.95
y-position type d Omittable : default value = 0.9
layout type s Omittable : default value = left

extent [xmin] [xmax] [ymin] [ymax] [zmin] [zmax] [unit]

Adds a dummy model with given extent to the current scene. Requires the limits: xmin, xmax, ymin, ymax, zmin, zmax unit. This can be used to provide an extent to the scene even if no other models with extent are available. For example, even if there is no geometry. In that case, for example: /vis/open OGL /vis/scene/create /vis/scene/add/extent -300 300 -300 300 -300 300 cm /vis/sceneHandler/attach

Available at all Geant4 states.

Parameters
xmin type d Omittable : default value = 0
xmax type d Omittable : default value = 0
ymin type d Omittable : default value = 0
ymax type d Omittable : default value = 0
zmin type d Omittable : default value = 0
zmax type d Omittable : default value = 0
unit type s Omittable : default value = m

frame [size]

Add frame to current scene.

Available at all Geant4 states.

Parameters
size type d Omittable : default value = 0.97 Parameter range : size > 0 && size <=1

gps [red_or_string] [green] [blue] [opacity]

A representation of the source(s) of the General Particle Source will be added to current scene and drawn, if applicable.
Accepts (a) RGB triplet. e.g., ".3 .4 .5", or (b) string such as "white", "black", "grey", "red"...or (c) an additional number for opacity, e.g., ".3 .4 .5 .6" or "grey ! ! .6" (note "!"'s for unused parameters).
Default: red and transparent.

Available at all Geant4 states.

Parameters
red_or_string type s Omittable : default value = 1.
green type d Omittable : default value = 0
blue type d Omittable : default value = 0
opacity type d Omittable : default value = 0.3

hits

Adds hits to current scene.
Hits are drawn at end of event when the scene in which they are added is current.

Available at all Geant4 states.

line [x1] [y1] [z1] [x2] [y2] [z2] [unit]

Adds line to current scene.

Available at all Geant4 states.

Parameters
x1 type d
y1 type d
z1 type d
x2 type d
y2 type d
z2 type d
unit type s Omittable : default value = m

line2D [x1] [y1] [x2] [y2]

Adds 2D line to current scene.
x,y in range [-1,1]

Available at all Geant4 states.

Parameters
x1 type d
y1 type d
x2 type d
y2 type d

localAxes [physical-volume-name] [copy-no]

Adds local axes to physical volume(s).

Available at all Geant4 states.

Parameters
physical-volume-name type s
copy-no type i Omittable : default value = -1

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

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

logo [height] [unit] [direction] [red] [green] [blue] [placement] [xmid] [ymid] [zmid] [unit]

Adds a G4 logo to the current scene.
If "unit" is "auto", height is roughly one tenth of scene extent.
"direction" is that of outward-facing normal to front face of logo. If "direction" is "auto", logo faces the user in the current viewer.
If "placement" is "auto", logo is placed at bottom right of screen when viewed from logo direction.

Available at all Geant4 states.

Parameters
height type d Omittable : default value = 1
unit type s Omittable : default value = auto
direction type s Omittable : default value = auto
red type d Omittable : default value = 0
green type d Omittable : default value = 1
blue type d Omittable : default value = 0
placement type s Omittable : default value = auto Parameter candidates : auto manual
xmid type d Omittable : default value = 0
ymid type d Omittable : default value = 0
zmid type d Omittable : default value = 0
unit type s Omittable : default value = m

logo2D [size] [x-position] [y-position] [layout]

Adds 2D logo to current scene.

Available at all Geant4 states.

Parameters
size type i Omittable : default value = 48
x-position type d Omittable : default value = -0.9
y-position type d Omittable : default value = -0.9
layout type s Omittable : default value = left

magneticField [nDataPointsPerHalfExtent] [representation]

Adds magnetic field representation to current scene.
The first parameter is no. of data points per half extent. So, possibly, at maximum, the number of data points sampled is (2*n+1)^3, which can grow large--be warned! The default value is 10, i.e., a 21x21x21 array, i.e., 9,261 sampling points. That may swamp your view, but usually, a field is limited to a small part of the extent, so it's not a problem. But if it is, here are some of the things you can do: - reduce the number of data points per half extent (first parameter); - specify "lightArrow" (second parameter); - restrict the region sampled with "/vis/set/extentForField"; - restrict the drawing to a specific volume with "/vis/set/volumeForField" or "/vis/touchable/volumeForField". Note: you might have to deactivate existing field models with "/vis/scene/activateModel Field false" and re-issue "/vis/scene/add/...Field" command again.
In the arrow representation, the length of the arrow is proportional to the magnitude of the field and the colour is mapped onto the range as a fraction of the maximum magnitude: 0->0.5->1 is red->green->blue.

Available at all Geant4 states.

Parameters
nDataPointsPerHalfExtent type i Omittable : default value = 10
representation type s Omittable : default value = fullArrow Parameter candidates : fullArrow lightArrow

plotter [plotter]

Add a plotter to current scene.

Available at all Geant4 states.

Parameters
plotter type s

psHits [mapname]

Adds Primitive Scorer Hits (PSHits) to current scene.
PSHits are drawn at end of run when the scene in which they are added is current.
Optional parameter specifies name of scoring map. By default all scoring maps registered with the G4ScoringManager are drawn.

Available at all Geant4 states.

Parameters
mapname type s Omittable : default value = all

scale [length] [unit] [direction] [red] [green] [blue] [placement] [xmid] [ymid] [zmid] [unit]

Adds an annotated scale line to the current scene.
If "unit" is "auto", length is roughly one tenth of the scene extent.
If "direction" is "auto", scale is roughly in the plane of the current view.
If "placement" is "auto", scale is placed at bottom left of current view. Otherwise placed at (xmid,ymid,zmid).
An annotated line in the specified direction with tick marks at the end. If autoPlacing is true it is required to be centred at the front, right, bottom corner of the world space, comfortably outside the existing bounding box/sphere so that existing objects do not obscure it. Otherwise it is required to be drawn with mid-point at (xmid, ymid, zmid). The auto placing algorithm is (approx): x = xmin + (1 + comfort) * (xmax - xmin); y = ymin - comfort * (ymax - ymin); z = zmin + (1 + comfort) * (zmax - zmin); if direction == x then (x - length,y,z) to (x,y,z); if direction == y then (x,y,z) to (x,y + length,z); if direction == z then (x,y,z - length) to (x,y,z);

Available at all Geant4 states.

Parameters
length type d Omittable : default value = 1
unit type s Omittable : default value = auto
direction type s Omittable : default value = auto
red type d Omittable : default value = 1
green type d Omittable : default value = 0
blue type d Omittable : default value = 0
placement type s Omittable : default value = auto Parameter candidates : auto manual
xmid type d Omittable : default value = 0
ymid type d Omittable : default value = 0
zmid type d Omittable : default value = 0
unit type s Omittable : default value = m

text [x] [y] [z] [unit] [font_size] [x_offset] [y_offset] [text]

Adds text to current scene.
Use "/vis/set/textColour" to set colour.
Use "/vis/set/textLayout" to set layout:

Available at all Geant4 states.

Parameters
x type d Omittable : default value = 0
y type d Omittable : default value = 0
z type d Omittable : default value = 0
unit type s Omittable : default value = m
font_size type d Omittable : default value = 12
x_offset type d Omittable : default value = 0
y_offset type d Omittable : default value = 0
text type s Omittable : default value = Hello G4

text2D [x] [y] [font_size] [x_offset] [y_offset] [text]

Adds 2D text to current scene.
x,y in range [-1,1]
Use "/vis/set/textColour" to set colour.
Use "/vis/set/textLayout" to set layout:

Available at all Geant4 states.

Parameters
x type d Omittable : default value = 0
y type d Omittable : default value = 0
font_size type d Omittable : default value = 12
x_offset type d Omittable : default value = 0
y_offset type d Omittable : default value = 0
text type s Omittable : default value = Hello G4

trajectories [default-trajectory-type]

Adds trajectories to current scene.
Causes trajectories, if any, to be drawn at the end of processing an event. Switches on trajectory storing and sets the default trajectory type.
The command line parameter list determines the default trajectory type. If it contains the string "smooth", auxiliary inter-step points will be inserted to improve the smoothness of the drawing of a curved trajectory. If it contains the string "rich", significant extra information will be stored in the trajectory (G4RichTrajectory) amenable to modeling and filtering with "/vis/modeling/trajectories/create/drawByAttribute" and "/vis/filtering/trajectories/create/attributeFilter" commands. It may contain both strings in any order.
To switch off trajectory storing: "/tracking/storeTrajectory 0". See also "/vis/scene/endOfEventAction".
Note: This only sets the default. Independently of the result of this command, a user may instantiate a trajectory that overrides this default in PreUserTrackingAction.

Available at all Geant4 states.

Parameters
default-trajectory-type type s Omittable : default value =

userAction [action-name]

Add named Vis User Action to current scene.
Attempts to match search string to name of action - use unique sub-string.
(Use /vis/list to see names of registered actions.)
If name == "all" (default), all actions are added.

Available at all Geant4 states.

Parameters
action-name type s Omittable : default value = all

volume [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]

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