Back to home page

EIC code displayed by LXR

 
 

    


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