/vis/scene/add/

Add model to current scene.


Sub-directories :


Commands :


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.

Available at all Geant4 states.

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


axes [x0] [y0] [z0] [length] [unit] [unitcolour] [showtext]

Add axes.
Draws axes at (x0, y0, z0) of given length and colour.
If "unitcolour" is "auto", x, y and z will be red, green and blue respectively. Otherwise choose from 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
unitcolour 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.


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]

Adds frame to current scene.

Available at all Geant4 states.

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


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.

Available at all Geant4 states.

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


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

Adds a logical volume to the current scene,
Shows boolean components (if any), voxels (if any) and readout geometry (if any). 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


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 [nDataPointsPerHalfScene] [representation]

Adds magnetic field representation to current scene.
The first parameter is no. of data points per half scene. So, possibly, at maximum, the number of data points sampled is (2*n+1)^3, which can grow large--be warned! You might find that your scene is cluttered by thousands of arrows for the default number of data points, so try reducing to 2 or 3, e.g: /vis/scene/add/magneticField 3 or, if only a small part of the scene has a field: /vis/scene/add/magneticField 50 # or more
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 blue->green->red.

Available at all Geant4 states.

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


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 might be: 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.
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 top of all worlds - material world and parallel worlds, if any - are added. Otherwise a search of all worlds is made, taking the first matching occurence only. To see a 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., HepRep.
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/DCUT 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