104 lines
4.8 KiB
Plaintext
104 lines
4.8 KiB
Plaintext
#######################################################################
|
|
# #
|
|
# This code implementation is the intellectual property of #
|
|
# the GEANT4 collaboration. #
|
|
# #
|
|
# By copying, distributing or modifying the Program (or any work #
|
|
# based on the Program) you indicate your acceptance of this #
|
|
# statement, and all its terms. #
|
|
# #
|
|
# ******************************************************************* #
|
|
# * * #
|
|
# * GEANT 4 xray_telescope advanced example * #
|
|
# * * #
|
|
# * MACRO: opengl.mac * #
|
|
# * ------ demostrates the OGLIX DRIVER * #
|
|
# * * #
|
|
# * Version: 1.0 * #
|
|
# * Date: 16/10/01 * #
|
|
# * Author: R Nartallo * #
|
|
# * Organisation: ESA/ESTEC, Noordwijk, THe Netherlands * #
|
|
# * * #
|
|
# ******************************************************************* #
|
|
# #
|
|
# NOTES #
|
|
# ----- #
|
|
# USAGE: Idle> /control/execute opengl.mac. #
|
|
# prompt> XrayTel opengl.mac #
|
|
# #
|
|
# REQUIRED PLATFORMS & SOFTWARE: OpenGL, e.g. Mesa #
|
|
# #
|
|
# ENVIRONMENT VARIABLES (C-MACROS) FOR INSTALLATION: #
|
|
# (See geant4/source/visualization/README for details.) #
|
|
# #
|
|
# % setenv OGLHOME opengl_home_dir #
|
|
# (where opengl_home_dir is e.g. /usr/local/Mesa-3.2.1 #
|
|
# #
|
|
# % setenv G4VIS_USE_OPENGLX 1 #
|
|
# % setenv G4VIS_BUILD_OPENGLX_DRIVER 1 #
|
|
# #
|
|
#######################################################################
|
|
# #
|
|
# CHANGE HISTORY #
|
|
# -------------- #
|
|
# #
|
|
# 16.10.2001 R. Nartallo #
|
|
# - New implementation with new "/vis" commands #
|
|
# #
|
|
# 15.11.2000 R. Nartallo #
|
|
# - Replaced standard particle gun by GPS set options #
|
|
# #
|
|
# 08.11.2000 R. Nartallo #
|
|
# - First implementation #
|
|
# #
|
|
#######################################################################
|
|
|
|
# Set verbose level
|
|
/run/verbose 2
|
|
|
|
# Invoke the OGLIX driver
|
|
/vis/open OGLIX
|
|
/vis/viewer/set/style wireframe
|
|
/vis/drawVolume
|
|
/vis/viewer/set/viewpointThetaPhi 60 -75 deg
|
|
/vis/scene/endOfEventAction accumulate
|
|
|
|
# Visualize one event added to the current scene
|
|
# * Command "/vis/scene/notifyHandlers" is written in
|
|
# XrayTelRunAction::BeginOfRunAction()
|
|
# * Command "/vis/viewer/update" is written in
|
|
# XrayTelRunAction::EndOfRunAction()
|
|
|
|
# Store particle trajactories for visualization
|
|
/tracking/storeTrajectory 1
|
|
|
|
# Set to draw tracks of positively charged particles
|
|
/event/drawTracks charged
|
|
|
|
# Set General Particle Source options
|
|
/gps/particle proton
|
|
/gps/pos/type Plane
|
|
/gps/pos/shape Annulus
|
|
/gps/pos/rot1 0. 0. 1.
|
|
/gps/pos/rot2 0. 1. 0.
|
|
/gps/pos/radius 35.5 cm
|
|
/gps/pos/inner_radius 30.5 cm
|
|
/gps/pos/centre 780.1 0. 0. cm
|
|
/gps/ang/type cos
|
|
/gps/ang/maxtheta 1. deg
|
|
/gps/ene/type Mono
|
|
/gps/ene/mono 0.5 MeV
|
|
|
|
# Set number of particles and start
|
|
/run/beamOn 30000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|