source: trunk/examples/advanced/gammaray_telescope/macro3.mac @ 1346

Last change on this file since 1346 was 1313, checked in by garnier, 14 years ago

geant4.9.4 beta rc0

File size: 2.7 KB
Line 
1# ----------------------------------------------
2# Example macro file for the GammaRayTel
3# Visualization with OpenGL
4# ----------------------------------------------
5# Authors: R.Giannitrapani, F.Longo and G.Santin
6# ----------------------------------------------
7
8#
9# Sets some default verbose
10# and initializes the graphic.
11#
12/control/verbose 1
13/control/saveHistory
14/run/verbose 1
15/gun/sourceGen true
16/control/execute emstd.mac
17/run/initialize
18/gun/particle gamma
19/gun/energy 1 GeV
20/gun/vertexRadius 25. cm
21/gun/sourceType 2
22
23
24# You can modify the geometry of the telescope via a messenger
25#/payload/setNbOfTKRLayers 15
26#/payload/update
27
28# Use this open statement to create an OpenGL view:
29#/vis/open OGL 600x600-0+0
30#
31# Use this open statement to create a DAWN view:
32/vis/open DAWN
33#
34# Use this open statement to create a .heprep file suitable for
35# viewing in HepRApp:
36#/vis/open HepRepFile
37#
38# Use this open statement to create a .wrl file suitable for
39# viewing in a VRML viewer:
40#/vis/open VRML2FILE
41#
42# Disable auto refresh and quieten vis messages whilst scene and
43# trajectories are established:
44/vis/viewer/set/autoRefresh false
45/vis/verbose errors
46#
47# Draw geometry:
48/vis/drawVolume
49#
50# Specify view angle:
51/vis/viewer/set/viewpointThetaPhi 90. 0.
52#
53# Specify zoom value:
54#/vis/viewer/zoom 2.
55#
56# Specify style (surface or wireframe):
57#/vis/viewer/set/style wireframe
58#
59# Draw coordinate axes:
60#/vis/scene/add/axes 0 0 0 1 m
61#
62# Draw smooth trajectories at end of event, showing trajectory points
63# as markers 2 pixels wide:
64/vis/scene/add/trajectories smooth
65/vis/modeling/trajectories/create/drawByCharge
66/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
67/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
68# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
69#
70# Draw hits at end of event:
71#/vis/scene/add/hits
72#
73# To draw only gammas:
74#/vis/filtering/trajectories/create/particleFilter
75#/vis/filtering/trajectories/particleFilter-0/add gamma
76#
77# To invert the above, drawing all particles except gammas,
78# keep the above two lines but also add:
79#/vis/filtering/trajectories/particleFilter-0/invert true
80#
81# Many other options are available with /vis/modeling and /vis/filtering.
82# For example, to select colour by particle ID:
83#/vis/modeling/trajectories/create/drawByParticleID
84#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
85#
86# To superimpose all of the events from a given run:
87#/vis/scene/endOfEventAction accumulate
88#
89# Re-establish auto refreshing and verbosity:
90/vis/viewer/set/autoRefresh true
91/vis/verbose warnings
92#
93# For file-based drivers, use this to create an empty detector view:
94#/vis/viewer/flush
95
96# run 10 events
97/run/beamOn 10
98
99
Note: See TracBrowser for help on using the repository browser.