1 | # |
---|
2 | # Macro file for A01app |
---|
3 | # |
---|
4 | # For initialization of graphics. |
---|
5 | # See geant4/source/visualization/README.built_in_commands. |
---|
6 | # |
---|
7 | # Create a scene handler and viewer for a specific graphics system |
---|
8 | # Edit the next line(s) to choose another graphic system |
---|
9 | # /vis/open is a compound command equivalent to: |
---|
10 | # /vis/sceneHandler/create |
---|
11 | # /vis/viewer/create |
---|
12 | # |
---|
13 | /vis/open OGLIX |
---|
14 | # |
---|
15 | # Create a scene. One could use /vis/drawVolume, which is equivalent to: |
---|
16 | # /vis/scene/create |
---|
17 | # /vis/scene/add/volume |
---|
18 | # /vis/sceneHandler/attach |
---|
19 | # but we want more, so... |
---|
20 | # |
---|
21 | # Create empty scene |
---|
22 | # |
---|
23 | /vis/scene/create |
---|
24 | # |
---|
25 | # Add volume to scene ("world" is default) |
---|
26 | # |
---|
27 | /vis/scene/add/volume |
---|
28 | # |
---|
29 | # Add trajectories to scene |
---|
30 | # |
---|
31 | /vis/scene/add/trajectories |
---|
32 | # |
---|
33 | # Add hits to scene |
---|
34 | # |
---|
35 | /vis/scene/add/hits |
---|
36 | # |
---|
37 | # If you wish to accumulate trajectories or hits... |
---|
38 | # |
---|
39 | /vis/scene/endOfEventAction accumulate |
---|
40 | # |
---|
41 | # Attach scene to scene handler. |
---|
42 | # |
---|
43 | /vis/sceneHandler/attach |
---|
44 | # |
---|
45 | # Set view parameters |
---|
46 | # |
---|
47 | /vis/viewer/set/lightsThetaPhi 90. 0. |
---|
48 | /vis/viewer/set/viewpointThetaPhi 150. 90. |
---|
49 | # |
---|
50 | # Draw detector (with refresh, the detector is "drawn" but on some systems, |
---|
51 | # those requiring and update action, it is not visible until update or flush). |
---|
52 | # |
---|
53 | /vis/viewer/refresh |
---|
54 | # |
---|
55 | # Do runs |
---|
56 | # |
---|
57 | /tracking/storeTrajectory 1 |
---|
58 | # |
---|
59 | /run/beamOn 10 |
---|
60 | /vis/viewer/flush |
---|
61 | # |
---|
62 | /mydet/armAngle 60. deg |
---|
63 | /mydet/fieldValue 2. tesla |
---|
64 | /vis/viewer/refresh |
---|
65 | /run/beamOn 10 |
---|
66 | /vis/viewer/flush |
---|
67 | # |
---|
68 | /mydet/armAngle 30. deg |
---|
69 | /mydet/momentum 2. GeV |
---|
70 | /mydet/sigmaMomentum 0. |
---|
71 | /mydet/sigmaAngle 0. |
---|
72 | /vis/viewer/refresh |
---|
73 | /vis/scene/endOfEventAction refresh |
---|
74 | /run/beamOn 10 |
---|
75 | /vis/viewer/flush |
---|
76 | # |
---|
77 | /vis/scene/create |
---|
78 | /vis/scene/add/volume |
---|
79 | /vis/scene/add/trajectories |
---|
80 | /vis/sceneHandler/attach |
---|
81 | /vis/viewer/clear |
---|
82 | /vis/viewer/reset |
---|
83 | /vis/viewer/set/lightsThetaPhi 90. 0. |
---|
84 | /vis/viewer/set/viewpointThetaPhi 150. 90. |
---|
85 | /vis/viewer/refresh |
---|
86 | /mydet/sigmaAngle 2. deg |
---|
87 | /vis/viewer/refresh |
---|
88 | /run/beamOn 10 |
---|
89 | /vis/viewer/flush |
---|
90 | # |
---|