-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvis.mac
124 lines (115 loc) · 3.87 KB
/
vis.mac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# If you need to see details about the physics
# list, you can use the following. It's also part of
# the output of "./gramsg4 -v".
#/process/em/verbose 1
#/process/had/verbose 1
# In GramsG4, every .mac file must contain this
# line after any physics/geometry/thread setup,
# but before any generation/visualization commands.
/run/initialize
# Use this open statement to create an OpenGL view:
/vis/open OGL 600x600-0+0
#
# Use this open statement to create a .prim file suitable for
# viewing in DAWN:
#/vis/open DAWNFILE
#
# Use this open statement to create a .heprep file suitable for
# viewing in HepRApp:
#/vis/open HepRepFile
#
# Use this open statement to create a .wrl file suitable for
# viewing in a VRML viewer:
#/vis/open VRML2FILE
#
# Disable auto refresh and quieten vis messages whilst scene and
# trajectories are established:
/vis/viewer/set/autoRefresh false
/vis/verbose errors
#
# Draw geometry:
/vis/drawVolume
#
# Specify view angle:
#/vis/viewer/set/viewpointThetaPhi 90. 0.
#
# Specify zoom value:
/vis/viewer/zoom .4
#
# Specify style (surface or wireframe):
#/vis/viewer/set/style wireframe
#
# Draw coordinate axes,
# For GRAMS, offset the axis by y-2.5 m so the axes are
# visible outside of the detector.
/vis/scene/add/axes 0 -2.5 0 1 m
# Add an axis label.
/vis/set/textColour white
# x y z units size x-offset y-offset text
/vis/scene/add/text 0 -2.5 -0.15 m 9 0 0 displaced det
/vis/scene/add/text 0 -2.5 -0.25 m 9 0 0 coord y->y-2.5 m
#
# Draw smooth trajectories at end of event, showing trajectory points
# as markers 2 pixels wide:
/vis/scene/add/trajectories smooth
/vis/modeling/trajectories/create/drawByCharge
/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
#
# Draw hits at end of event.
# For GRAMS, leave this off. The hits are so close together within
# the small Compton scatters that all you see is a mess.
#/vis/scene/add/hits
#
# To draw only gammas:
#/vis/filtering/trajectories/create/particleFilter
#/vis/filtering/trajectories/particleFilter-0/add gamma
#
# To invert the above, drawing all particles except gammas,
# keep the above two lines but also add:
#/vis/filtering/trajectories/particleFilter-0/invert true
#
# Many other options are available with /vis/modeling and /vis/filtering.
# For example, to select colour by particle ID:
#/vis/modeling/trajectories/create/drawByParticleID
#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
#
# To superimpose all of the events from a given run:
#/vis/scene/endOfEventAction accumulate
#
# Re-establish auto refreshing and verbosity:
/vis/viewer/set/autoRefresh true
/vis/verbose warnings
#
# For file-based drivers, use this to create an empty detector view:
#/vis/viewer/flush
#
# 11-May-2020 WGS: Let the view match the coordinate system of GRAMS
/vis/viewer/set/viewpointVector 0.92455 0.358368 0.129536
#/vis/viewer/set/viewpointVector 0.800418 0.536096 0.268201
/vis/viewer/set/upVector 0 0 1
/vis/viewer/set/projection orthogonal
/vis/viewer/zoomTo 1.75696
/vis/viewer/scaleTo 1 1 1
# 01-Aug-2020 WGS: Set the initial particle parameters for the UI
# display. This is so we display something mildly interesting. These
# GPS (General Particle Source) commands can be overridden from within
# the display.
# The particle: 1 MeV monoenergetic gamma
/gps/particle gamma
/gps/ene/type Mono
/gps/ene/mono 1 MeV
# For this example, we want to shoot the gammas in the z-direction
# from a 1.4m x 1.4m square above the detector.
/gps/pos/type Plane
/gps/pos/shape Square
/gps/pos/centre 0 0 2 m
/gps/pos/halfx 0.7 m
/gps/pos/halfy 0.7 m
# We want the particle to be aimed in the negative z-direction.
/gps/direction 0 0 -1
# Make the GPS source visible.
/vis/scene/add/gps
# See detailed gps information.
/gps/verbose 2