Files
geant4/examples/novice/N03/visTutor/exN03Vis9.mac
T
2016-06-09 10:56:29 +02:00

102 lines
4.7 KiB
Plaintext

#######################################################################
# MACRO FILE NAME: exN03Vis9.mac #
# #
# AUTHOR(S): Guy Barrand
# #
# DATE: #
# Appril 08, 2004 #
# #
# CONTENTS: A simplest macro to demonstrate visualization of #
# detector geometry and events #
# #
# USAGE: % gmake visclean #
# % $G4BINDIR/exampleN03 #
# Idle> /control/execute visTutor/exN03Vis9.mac #
# #
# REQUIRED PLATFORMS & SOFTWARES: Windows, OpenGL #
# OPTIONAL : DAWN (version 3.85 or after) #
# #
# ENVIRONMENTAL VARIABLES (C-MACROS) FOR INSTALLATION: #
# (See geant4/source/visualization/README for details.) #
# #
# G4VIS_BUILD_OPENGLWIN32_DRIVER #
# (G4UI_BUILD_WIN32_SESSION) #
# #
# ENVIRONMENTAL VARIABLES (C-MACROS) FOR COMPILATION: #
# (See geant4/source/visualization/README for details.) #
# #
# G4VIS_USE_OPENGLWIN32 #
# (G4UI_USE_WIN32) #
# #
# ADDITIONAL NOTES: #
# The compound command "/vis/open <vis-driver-name>" #
# is equivalent to the following set of commands: #
# #
# /vis/sceneHandler/create $1 #
# /vis/viewer/create #
# #
# The compound command "/vis/drawVolume <physical-volume-name>" #
# is equivalent to the following set of commands: #
# #
# /vis/scene/create #
# /vis/scene/add/volume $1 #
# /vis/sceneHandler/attach #
# #
#######################################################################
##############################################
# Visualization of detector geometry
# with the OGLIWin32 (OpenGL Immediate Windows) driver
##############################################
# Invoke the OGLIWin32 driver
/vis/open OGLIWin32
#/vis/open DAWNFILE
# Set camera
/vis/viewer/reset
/vis/viewer/set/viewpointThetaPhi 70 20
# Create an empty scene and add the detector geometry to it
/vis/drawVolume
# The following command "flush"
# the action of the current viewer.
# They are required for the post-processing drivers
# such as DAWNFILE, VRMLFILE, HepRep drivers, etc.
# For OpenGL drivers, these commands are not required
# but harmless even if they are described.
/vis/viewer/flush
#########################################################
# Visualization of events with the DAWNFILE driver
#
# * Each visualized view is saved to a file "g4_XX.eps"
# with the "vectorized" PostScript format.
#
# * Set an environmental variable if you wish to
# skip DAWN GUI:
# % setenv G4DAWNFILE_VIEWER "dawn -d"
##########################################################
# Invoke the DAWNFILE driver
/vis/open DAWNFILE
# Add the world volume to the current scene
/vis/drawVolume
# Add trajectories to the current scene
# Note: This command is not necessary in exampleN03,
# since the C++ method DrawTrajectory() is
# described in the event action.
#/vis/scene/add/trajectories
# Set camera
/vis/viewer/reset
/vis/viewer/zoom 1.5
/vis/viewer/set/viewpointThetaPhi 70 20
# Visualize events added to the current scene
/tracking/storeTrajectory 1
/run/beamOn 3