-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathair.mac
48 lines (38 loc) · 1.06 KB
/
air.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
/geometry/source air.tg
/run/initialize
/vis/ASCIITree/verbose 13
/vis/drawTree
/geometry/test/run
/gps/particle gamma
/gps/energy 2 MeV
/gps/pos/centre -9 0 0 m
/gps/direction 1 0 0
/vis/open OGL
/vis/viewer/zoom 1.5
/vis/viewer/set/background white ! ! 0
/vis/drawVolume
/vis/scene/add/trajectories
/vis/scene/endOfEventAction accumulate
/run/beamOn 100
/control/shell rm -f *.pdf
/vis/ogl/export air.pdf
# the following needs dawn to be installed
/control/shell dawn -c
/control/shell rm -f *.prim *.eps *.png
/vis/open DAWNFILE
/vis/viewer/zoom 1.5
/vis/viewer/set/background white ! ! 0
/vis/drawVolume
/vis/scene/add/arrow -9 0 0 -7 0 0 m
/vis/scene/add/text -9 -0.8 0 m 20 0 0 0
/vis/scene/add/text -4 -0.8 0 m 20 0 0 5
/vis/scene/add/text 1 -0.8 0 m 20 0 0 10
/vis/scene/add/text 6 -0.8 0 m 20 0 0 15 m
/vis/scene/add/text -10 0.5 0 m 20 0 0 2 MeV gamma
/vis/scene/add/trajectories
/vis/scene/endOfEventAction accumulate
# fix the result
/random/setSeeds 23 234 53 89 157
/run/beamOn 300
# create png file
/control/shell convert g4_*.eps -trim +repage gammaInAir.png