source: trunk/examples/advanced/xray_telescope/vrml.mac @ 1309

Last change on this file since 1309 was 807, checked in by garnier, 16 years ago

update

File size: 6.4 KB
Line 
1#######################################################################
2#                                                                     #
3#  This code implementation is the intellectual property of           #
4#  the GEANT4 collaboration.                                          #
5#                                                                     #
6#  By copying, distributing or modifying the Program (or any work     #
7#  based on the Program) you indicate your acceptance of this         #
8#  statement, and all its terms.                                      #
9#                                                                     #
10# ******************************************************************* #
11# *                                                                 * #
12# *                    GEANT 4 xray_telescope advanced example      * #
13# *                                                                 * #
14# * MACRO:             vrml.mac                                     * #
15# * ------             demostrates the VRML DRIVER                  * #
16# *                                                                 * #
17# * Version:           1.0                                          * #
18# * Date:              16/10/01                                     * #
19# * Author:            R Nartallo                                   * #
20# * Organisation:      ESA/ESTEC, Noordwijk, THe Netherlands        * #
21# *                                                                 * #
22# ******************************************************************* #
23#                                                                     #
24#  NOTES                                                              #
25#  -----                                                              #
26#  USAGE:  Idle> /control/execute vrml.mac                            #
27#          prompt> XrayTel vrml.mac                                   #
28#                                                                     #
29#  REQUIRED PLATFORMS & SOFTWARE: VRML viewer, e.g. VRMLview          #
30#                                                                     #
31#  ENVIRONMENT VARIABLES (C-MACROS) FOR INSTALLATION:                 #
32#  (See geant4/source/visualization/README for details.)              #
33#                                                                     #
34#    % setenv G4VIS_USE_VRML               1                          #
35#    % setenv G4VIS_USE_VRMLFILE           1                          #
36#    % setenv G4VIS_BUILD_VRMLFILE_DRIVER  1                          #
37#                                                                     #
38#  RECOMMENDED ENVIRONMENT VARIABLES FOR THE VRML VIEWER:             #
39#                                                                     #
40#    % setenv G4VRMLFILE_VIEWER    vrmlview //default value is "NONE" #
41#    % setenv G4VRMLFILE_MAX_FILE_NUM  100  //default value is "1"    #
42#                                                                     #
43#  Addional Notes:                                                    #
44#    You may have to set the command path to the directory where      #
45#    a VRML viewer is installed, e.g., to                             #
46#    "/afs/cern.ch/sw/contrib/VRML/bin/Linux/"    at CERN             #
47#                                                                     #
48#######################################################################
49#                                                                     #
50#   CHANGE HISTORY                                                    #
51#   --------------                                                    #
52#                                                                     #
53#   16.10.2001 R. Nartallo                                            #
54#   - New implementation with new "/vis" commands                     #
55#                                                                     #
56#   15.11.2000 R. Nartallo                                            #
57#   - Replaced standard particle gun by GPS set options               #
58#                                                                     #
59#   08.11.2000 R. Nartallo                                            #
60#   - Modified version                                                #
61#                                                                     #
62#   17.10.2000 S. Tanaka                                              #
63#   - First implementation                                            #
64#                                                                     #
65#######################################################################
66
67# Set verbose level
68/run/verbose 2
69
70#################################################
71# Visualization of detector geometry with
72# the VRML2FILE driver.
73#################################################
74
75# Invoke the VRML2FILE driver
76#/vis/open VRML2FILE
77
78# Visualize of the whole detector geometry
79#/vis/viewer/set/style surface
80#/vis/drawVolume
81#/vis/viewer/update
82
83#################################################
84# Visualization of detector geometry and events
85# with the VRML2FILE driver.
86#################################################
87
88# Invoke the VRML2FILE driver
89/vis/open VRML2FILE
90
91# Set viewer rendering style
92# "wireframe" means  "half-transparent" in VRML2FILE driver
93#/vis/viewer/set/style surface
94/vis/viewer/set/style wireframe
95
96# Compund command: creates scene, adds volume, attaches scene handler
97# and refreshes viewer
98/vis/drawVolume
99
100# Create a new scene
101/vis/scene/create
102
103# Attach the current scene handler to the current scene
104/vis/sceneHandler/attach
105
106# Add the world volume to the current scene
107/vis/scene/add/volume
108
109# Visualize one event added to the current scene
110# * Command "/vis/scene/notifyHandlers" is written in
111#   XrayTelRunAction::BeginOfRunAction()
112# * Command "/vis/viewer/update" is written in
113#   XrayTelRunAction::EndOfRunAction()
114
115# Store particle trajactories for visualization
116/tracking/storeTrajectory 1
117
118# Set to draw tracks of positively charged particles
119/event/drawTracks charged
120
121# Set General Particle Source options
122/gps/particle proton
123/gps/pos/type Plane
124/gps/pos/shape Annulus
125/gps/pos/rot1 0. 0. 1.
126/gps/pos/rot2 0. 1. 0.
127/gps/pos/radius 35.5 cm
128/gps/pos/inner_radius 30.5 cm
129/gps/pos/centre 780.1 0. 0. cm
130/gps/ang/type cos
131/gps/ang/rot1 0. 0. 1.
132/gps/ang/rot2 0. 1. 0.
133/gps/ang/maxtheta 1. deg
134/gps/ene/type Mono
135/gps/ene/mono 0.5 MeV
136
137# Set number of particles and start
138/run/beamOn 10000
139
140
141
142
143
144
145
146
147
148
149
Note: See TracBrowser for help on using the repository browser.