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 #     HepRepFile: to create a .heprep file suitable for viewing in HepRApp.
0025 #     VRML2FILE: to create a .wrl file suitable for viewing in a VRML viewer.
0026 #     "TSG_OFFSCREEN 1200x1200": to create an image file with TSG.
0027 #       See the tsg_offscreen.mac in examples/basic/B5 for more commands
0028 #       to change the file format, file name, picture size, etc.
0029 
0030 # Disable auto refresh and quieten vis messages whilst scene and
0031 # trajectories are established:
0032 /vis/viewer/set/autoRefresh false
0033 /vis/verbose errors
0034 #
0035 # Draw geometry:
0036 /vis/drawVolume
0037 #
0038 # Specify view angle:
0039 /vis/viewer/set/viewpointVector -1 0 0
0040 /vis/viewer/set/lightsVector -1 0 0
0041 #
0042 # Specify style (surface, wireframe, auxiliary edges,...)
0043 /vis/viewer/set/style wireframe
0044 /vis/viewer/set/auxiliaryEdge true
0045 /vis/viewer/set/lineSegmentsPerCircle 100
0046 #
0047 # Draw smooth trajectories at end of event, showing trajectory points
0048 # as markers 2 pixels wide:
0049 /vis/scene/add/trajectories smooth
0050 /vis/modeling/trajectories/create/drawByCharge
0051 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
0052 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
0053 # (if too many tracks cause core dump => /tracking/storeTrajectory 0)
0054 #
0055 # Draw hits at end of event:
0056 #/vis/scene/add/hits
0057 #
0058 # To draw only gammas:
0059 #/vis/filtering/trajectories/create/particleFilter
0060 #/vis/filtering/trajectories/particleFilter-0/add gamma
0061 #
0062 # To invert the above, drawing all particles except gammas,
0063 # keep the above two lines but also add:
0064 #/vis/filtering/trajectories/particleFilter-0/invert true
0065 #
0066 # Many other options are available with /vis/modeling and /vis/filtering.
0067 # For example, to select colour by particle ID:
0068 #/vis/modeling/trajectories/create/drawByParticleID
0069 #/vis/modeling/trajectories/drawByParticleID-0/default/setDrawStepPts true
0070 # To select or override default colours (note: e+ is blue by default):
0071 #/vis/modeling/trajectories/list
0072 #/vis/modeling/trajectories/drawByParticleID-0/set e+ yellow
0073 #
0074 # To superimpose all of the events from a given run:
0075 /vis/scene/endOfEventAction accumulate
0076 #
0077 # Decorations
0078 # Name
0079 /vis/set/textColour green
0080 /vis/set/textLayout right
0081 /vis/scene/add/text2D 0.9 -.9 24 ! ! exampleB1
0082 # or, if your system does not support right-adjustment
0083 #/vis/scene/add/text2D 0 -.9 24 ! ! exampleB1
0084 /vis/set/textLayout    # Revert to normal (left adjusted) layout
0085 /vis/set/textColour    # Revert to default text colour (blue)
0086 #
0087 # Axes, scale, etc.
0088 /vis/scene/add/scale   # Simple scale line
0089 /vis/scene/add/axes    # Simple axes: x=red, y=green, z=blue.
0090 /vis/scene/add/eventID # Drawn at end of event
0091 /vis/scene/add/date    # Date stamp
0092 /vis/scene/add/logo2D  # Simple logo
0093 /vis/scene/add/logo    # 3D logo
0094 #
0095 # Frame
0096 /vis/set/colour red
0097 /vis/set/lineWidth 2
0098 /vis/scene/add/frame   # Simple frame around the view
0099 /vis/set/colour        # Revert to default colour (white)
0100 /vis/set/lineWidth     # Revert to default line width (1.)
0101 #
0102 # Attach text to one edge of Shape1, with a small, fixed offset
0103 /vis/scene/add/text 0 6 -4 cm 18 4 4 Shape1
0104 # Attach text to one corner of Shape2, with a small, fixed offset
0105 /vis/scene/add/text 6 7 10 cm 18 4 4 Shape2
0106 #
0107 # To get nice view
0108 # Make the "World" box invisible
0109 /vis/geometry/set/visibility World 0 false
0110 # "Envelope" is transparent blue to represent water
0111 /vis/geometry/set/colour Envelope 0 0 0 1 .3
0112 /vis/viewer/set/style surface
0113 /vis/viewer/set/hiddenMarker true
0114 /vis/viewer/set/viewpointThetaPhi 120 150
0115 #
0116 # Re-establish auto refreshing and verbosity:
0117 /vis/viewer/set/autoRefresh true
0118 /vis/verbose warnings
0119 #
0120 # For file-based drivers, use this to create an empty detector view:
0121 #/vis/viewer/flush