-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvis.mac
58 lines (48 loc) · 1.43 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
# display applied commands on screen
/control/verbose 2
# add more menu items in GUI
/control/ifInteractive gui.mac
# no need of many threads for visualization
/run/numberOfThreads 2
# construct detector geometry and physics processes
/run/initialize
# check overlapping in between detector volumes
/geometry/test/run
# list visualization setups for detector components
/vis/geometry/list
# print hierarchical structure of detector components
/vis/ASCIITree/verbose 13
/vis/drawTree
# X-ray imaging of detector components
/vis/open RayTracer
# white transparent background
/vis/viewer/set/background 1 1 1 0
# view image from a good angle
/vis/viewer/set/viewpointThetaPhi 60 0
# pick a component (volume) to draw (world, by default)
/vis/drawVolume
# save image to g4RayTracer.*.jpeg
# it is commented out as it is time-consuming
#/vis/viewer/refresh
# save detector geometry to g4_000?.prim
/vis/open DAWNFILE
/vis/drawVolume
/vis/viewer/refresh
# shoot 2 MeV electrons to positive x direction
/gps/particle e-
/gps/energy 2 MeV
/gps/pos/centre -4 0 0 m
/gps/direction 1 0 0
# save detector geometry and particle tracks to g4_0?.wrl
/vis/open VRML2FILE
/vis/drawVolume
/vis/scene/add/trajectories
/vis/scene/endOfEventAction accumulate
/run/beamOn 10
# save detector geometry and particle tracks to G4Data0.heprep
/vis/open HepRepFile
/vis/drawVolume
/vis/scene/add/axes
/vis/scene/add/trajectories
/vis/scene/endOfEventAction accumulate
/run/beamOn 10