Loading...
Searching...
No Matches
vis.mac
Go to the documentation of this file.
1# Macro file for the visualization setting in the initialization phase
2# of the B1 example when running in interactive mode
3#
4
5# Open a viewer
6/vis/open
7# This opens the default viewer - see examples/basic/B1/vis.mac for a
8# more comprehensive overview of options. Also the documentation.
9#
10# Use this open statement to create an offscreen file with TSG:
11#/vis/open TSG_OFFSCREEN 1200x1200
12# See the tsg_offscreen.mac file for more commands to change
13# the file format, file name, picture size, etc.
14#
15# Disable auto refresh and quieten vis messages whilst scene and
16# trajectories are established:
17/vis/viewer/set/autoRefresh false
18/vis/verbose errors
19#
20# Draw geometry:
21/vis/drawVolume
22#
23# Specify view angle:
24/vis/viewer/set/viewpointVector -1 0 0
25/vis/viewer/set/lightsVector -1 0 0
26#
27# Specify style (surface, wireframe, auxiliary edges,...)
28/vis/viewer/set/style wireframe
29/vis/viewer/set/auxiliaryEdge true
30/vis/viewer/set/lineSegmentsPerCircle 100
31#
32# Draw smooth trajectories at end of event, showing trajectory points
33# as markers 2 pixels wide:
34/vis/scene/add/trajectories smooth
35/vis/modeling/trajectories/create/drawByCharge
36/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
37/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
38# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
39#
40# Draw hits at end of event:
41#/vis/scene/add/hits
42#
43# To draw only gammas:
44#/vis/filtering/trajectories/create/particleFilter
45#/vis/filtering/trajectories/particleFilter-0/add gamma
46#
47# To invert the above, drawing all particles except gammas,
48# keep the above two lines but also add:
49#/vis/filtering/trajectories/particleFilter-0/invert true
50#
51# Many other options are available with /vis/modeling and /vis/filtering.
52# For example, to select colour by particle ID:
53#/vis/modeling/trajectories/create/drawByParticleID
54#/vis/modeling/trajectories/drawByParticleID-0/default/setDrawStepPts true
55# To select or override default colours (note: e+ is blue by default):
56#/vis/modeling/trajectories/list
57#/vis/modeling/trajectories/drawByParticleID-0/set e+ yellow
58#
59# To superimpose all of the events from a given run:
60/vis/scene/endOfEventAction accumulate
61#
62# Decorations
63# Name
64/vis/set/textColour green
65/vis/set/textLayout right
66/vis/scene/add/text2D 0.9 -.9 24 ! ! exampleB1
67# or, if your system does not support right-adjustment
68#/vis/scene/add/text2D 0 -.9 24 ! ! exampleB1
69/vis/set/textLayout # Revert to normal (left adjusted) layout
70/vis/set/textColour # Revert to default text colour (blue)
71#
72# Axes, scale, etc.
73/vis/scene/add/scale # Simple scale line
74/vis/scene/add/axes # Simple axes: x=red, y=green, z=blue.
75/vis/scene/add/eventID # Drawn at end of event
76/vis/scene/add/date # Date stamp
77/vis/scene/add/logo2D # Simple logo
78/vis/scene/add/logo # 3D logo
79#
80# Frame
81/vis/set/colour red
82/vis/set/lineWidth 2
83/vis/scene/add/frame # Simple frame around the view
84/vis/set/colour # Revert to default colour (white)
85/vis/set/lineWidth # Revert to default line width (1.)
86#
87# Attach text to one edge of Shape1, with a small, fixed offset
88/vis/scene/add/text 0 6 -4 cm 18 4 4 Shape1
89# Attach text to one corner of Shape2, with a small, fixed offset
90/vis/scene/add/text 6 7 10 cm 18 4 4 Shape2
91#
92# To get nice view
93# Make the "World" box invisible
94/vis/geometry/set/visibility World 0 false
95# "Envelope" is transparent blue to represent water
96#/vis/geometry/set/colour Envelope 0 0 0 1 .3
97/vis/viewer/set/style surface
98/vis/viewer/set/hiddenMarker true
99/vis/viewer/set/viewpointThetaPhi 120 150
100#
101# Re-establish auto refreshing and verbosity:
102/vis/viewer/set/autoRefresh true
103/vis/verbose warnings
104#
105# For file-based drivers, use this to create an empty detector view:
106#/vis/viewer/flush

Applications | User Support | Publications | Collaboration