-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvis.mac
145 lines (143 loc) · 4.99 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#
# Macro file for the initialization phase of "radioActiv.cc"
#
# Sets some default verbose
# and initializes the graphic.
#
/control/verbose 2
/run/verbose 2
#
/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 1.5
#
# Specify style (surface or wireframe):
#/vis/viewer/set/style wireframe
#
# Draw coordinate axes:
#/vis/scene/add/axes 0 0 0 1 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:
#/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- red
/vis/modeling/trajectories/drawByParticleID-0/set e+ blue
/vis/modeling/trajectories/drawByParticleID-0/set nu_e white
/vis/modeling/trajectories/drawByParticleID-0/set anti_nu_e white
/vis/modeling/trajectories/drawByParticleID-0/set geantino white
/vis/modeling/trajectories/drawByParticleID-0/set gamma green
/vis/modeling/trajectories/drawByParticleID-0/set alpha yellow
/vis/modeling/trajectories/drawByParticleID-0/set GenericIon grey
#
# 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
#
# This file permits to customize, with commands,
# the menu bar of the G4UIXm, G4UIQt, G4UIWin32 sessions.
# It has no effect with G4UIterminal.
#
# File menu :
/gui/addMenu file File
/gui/addButton file Quit exit
#
# Run menu :
/gui/addMenu run Run
/gui/addButton run "beamOn 1" "/run/beamOn 1"
/gui/addButton run "beamOn 100" "/run/beamOn 100"
/gui/addButton run "beamOn 10000" "/run/beamOn 10000"
/gui/addButton run "beamOn 1000000" "/run/beamOn 1000000"
/gui/addButton run run1 "/control/execute run1.mac"
#
# gps menu :
/gui/addMenu gps Gps
/gui/addButton gps "10 keV" "/gps/energy 10 keV"
/gui/addButton gps "50 keV" "/gps/energy 50 keV"
/gui/addButton gps "1 MeV" "/gps/energy 1 MeV"
/gui/addButton gps "50 MeV" "/gps/energy 50 MeV"
/gui/addButton gps "1 GeV" "/gps/energy 1 GeV"
/gui/addButton gps "10 GeV" "/gps/energy 10 GeV"
/gui/addButton gps "e-" "/gps/particle e-"
/gui/addButton gps "gamma" "/gps/particle gamma"
/gui/addButton gps "pi0" "/gps/particle pi0"
/gui/addButton gps "pi+" "/gps/particle pi+"
/gui/addButton gps "neutron" "/gps/particle neutron"
/gui/addButton gps "proton" "/gps/particle proton"
/gui/addButton gps "ang/type iso" "/gps/ang/type iso"
/gui/addButton gps "ang/type cos" "/gps/ang/type cos"
/gui/addButton gps "ang mintheta" "/gps/ang/mintheta 30 deg"
/gui/addButton gps "ang maxtheta" "/gps/ang/maxtheta 90 deg"
/gui/addButton gps "ang minphi" "/gps/ang/minphi 30 deg"
/gui/addButton gps "ang maxphi" "/gps/ang/maxphi 180 deg"
#
# Vis menu :
/gui/addMenu vis Vis
/gui/addButton vis DAWNFILE "/control/execute visTutor/exN03Vis0.mac"
/gui/addButton vis OpenInventor "/control/execute visTutor/exN03Vis5.mac"
/gui/addButton vis TimeSlicing "/control/execute visTutor/exN03Vis12.mac"
/gui/addButton vis EmShower "/control/execute visTutor/exN03Vis13.mac"
#
# Viewer menu :
/gui/addMenu viewer Viewer
/gui/addButton viewer "Set style surface" "/vis/viewer/set/style surface"
/gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wireframe"
/gui/addButton viewer "Refresh viewer" "/vis/viewer/refresh"
/gui/addButton viewer "Update viewer (interaction or end-of-file)" "/vis/viewer/update"
/gui/addButton viewer "Flush viewer (= refresh + update)" "/vis/viewer/flush"
/gui/addButton viewer "Update scene" "/vis/scene/notifyHandlers"
#
# To limit the output flow in the "dump" widget :
/run/printProgress 100
#