Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/visualization/vtk/vis.mac is written in an unsupported language. File is not indexed.

0001 # Macro file for the visualization setting in the initialization phase 
0002 # of the B1 example when running in interactive mode
0003 #
0004 
0005 /vis/open Vtk
0006 
0007 # Specify a viewer, e.g., /vis/open OGL, or allow a system choice:
0008 /vis/open
0009 # This chooses a graphics system (in order of priority):
0010 # - by argument in G4VisExecutive construction.
0011 # - by environment variable, G4VIS_DEFAULT_DRIVER.
0012 # - by information in ~/.g4session.
0013 # - by mode (batch/interactive) and if interactive, by your build flags.
0014 # See "Choosing a graphics viewer" in the Application Guide for details.
0015 # For example, with environment variable G4VIS_DEFAULT_DRIVER:
0016 #   The format is <graphics-system> [<window-size-hint>]. Set this, e.g:
0017 #     (bash) export G4VIS_DEFAULT_DRIVER=TSG
0018 #     (tcsh) setenv G4VIS_DEFAULT_DRIVER OI
0019 #   or on the command line, precede the app invocation, e.g:
0020 #     G4VIS_DEFAULT_DRIVER=Vtk ./<application-name>
0021 #   The window-size-hint can optionally be added, e.g:
0022 #     (bash) export G4VIS_DEFAULT_DRIVER="OGLSX 1000x1000-0+0"
0023 # Other suggestions for G4VIS_DEFAULT_DRIVER (see list of registered
0024 # graphics systems printed at the start):
0025 #     DAWNFILE: to create a .prim file suitable for viewing in DAWN.
0026 #     HepRepFile: to create a .heprep file suitable for viewing in HepRApp.
0027 #     VRML2FILE: to create a .wrl file suitable for viewing in a VRML viewer.
0028 #     "TSG_OFFSCREEN 1200x1200": to create an image file with TSG.
0029 #       See the tsg_offscreen.mac in examples/basic/B1 for more commands
0030 #       to change the file format, file name, picture size, etc.
0031 
0032 # Disable auto refresh and quieten vis messages whilst scene and
0033 # trajectories are established:
0034 /vis/viewer/set/autoRefresh false
0035 /vis/verbose errors
0036 #
0037 # Draw geometry:
0038 /vis/drawVolume
0039 #
0040 # Specify view angle:
0041 /vis/viewer/set/viewpointVector -1 0 0
0042 /vis/viewer/set/lightsVector -1 0 0
0043 #
0044 # Specify style (surface, wireframe, auxiliary edges,...)
0045 /vis/viewer/set/style wireframe
0046 /vis/viewer/set/auxiliaryEdge true
0047 /vis/viewer/set/lineSegmentsPerCircle 100
0048 #
0049 # Draw smooth trajectories at end of event, showing trajectory points
0050 # as markers 2 pixels wide:
0051 /vis/scene/add/trajectories smooth
0052 /vis/modeling/trajectories/create/drawByCharge
0053 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
0054 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
0055 # (if too many tracks cause core dump => /tracking/storeTrajectory 0)
0056 #
0057 # Draw hits at end of event:
0058 #/vis/scene/add/hits
0059 #
0060 # To draw only gammas:
0061 #/vis/filtering/trajectories/create/particleFilter
0062 #/vis/filtering/trajectories/particleFilter-0/add gamma
0063 #
0064 # To invert the above, drawing all particles except gammas,
0065 # keep the above two lines but also add:
0066 #/vis/filtering/trajectories/particleFilter-0/invert true
0067 #
0068 # Many other options are available with /vis/modeling and /vis/filtering.
0069 # For example, to select colour by particle ID:
0070 #/vis/modeling/trajectories/create/drawByParticleID
0071 #/vis/modeling/trajectories/drawByParticleID-0/default/setDrawStepPts true
0072 # To select or override default colours (note: e+ is blue by default):
0073 #/vis/modeling/trajectories/list
0074 #/vis/modeling/trajectories/drawByParticleID-0/set e+ yellow
0075 #
0076 # To superimpose all of the events from a given run:
0077 /vis/scene/endOfEventAction accumulate
0078 #
0079 # Decorations
0080 # Name
0081 /vis/set/textColour green
0082 /vis/set/textLayout right
0083 /vis/scene/add/text2D 0.9 -.9 24 ! ! VTK-example
0084 # or, if your system does not support right-adjustment
0085 #/vis/scene/add/text2D 0 -.9 24 ! ! VTK-example
0086 /vis/set/textLayout    # Revert to normal (left adjusted) layout
0087 /vis/set/textColour    # Revert to default text colour (blue)
0088 #
0089 # Axes, scale, etc.
0090 /vis/scene/add/scale   # Simple scale line
0091 /vis/scene/add/axes    # Simple axes: x=red, y=green, z=blue.
0092 /vis/scene/add/eventID # Drawn at end of event
0093 /vis/scene/add/date    # Date stamp
0094 /vis/scene/add/logo2D  # Simple logo
0095 /vis/scene/add/logo    # 3D logo
0096 #
0097 # Frame
0098 /vis/set/colour red
0099 /vis/set/lineWidth 2
0100 /vis/scene/add/frame   # Simple frame around the view
0101 /vis/set/colour        # Revert to default colour (white)
0102 /vis/set/lineWidth     # Revert to default line width (1.)
0103 #
0104 # Attach text to one edge of Shape1, with a small, fixed offset
0105 /vis/scene/add/text 0 6 -4 cm 18 4 4 Shape1
0106 # Attach text to one corner of Shape2, with a small, fixed offset
0107 /vis/scene/add/text 6 7 10 cm 18 4 4 Shape2
0108 #
0109 # To get nice view
0110 # Make the "World" box invisible
0111 /vis/geometry/set/visibility World 0 false
0112 # "Envelope" is transparent blue to represent water
0113 /vis/geometry/set/colour Envelope 0 0 0 1 .3
0114 /vis/viewer/set/style surface
0115 /vis/viewer/set/hiddenMarker true
0116 /vis/viewer/set/viewpointThetaPhi 120 150
0117 #
0118 # Re-establish auto refreshing and verbosity:
0119 /vis/viewer/set/autoRefresh true
0120 /vis/verbose warnings
0121 #
0122 # For file-based drivers, use this to create an empty detector view:
0123 #/vis/viewer/flush
0124 
0125 
0126