Warning, /geant4/examples/extended/visualization/userVisAction/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 # Open a viewer
0006 /vis/open
0007 # This opens the default viewer - see examples/basic/B1/vis.mac for a
0008 # more comprehensive overview of options. Also the documentation.
0009 #
0010 # Disable auto refresh and quieten vis messages whilst scene and
0011 # trajectories are established:
0012 /vis/viewer/set/autoRefresh false
0013 /vis/verbose errors
0014 #
0015 # Draw geometry:
0016 /vis/drawVolume
0017 #
0018 # Specify view angle:
0019 /vis/viewer/set/viewpointVector -1 0 0
0020 /vis/viewer/set/lightsVector -1 0 0
0021 #
0022 # Specify style (surface, wireframe, auxiliary edges,...)
0023 /vis/viewer/set/style wireframe
0024 /vis/viewer/set/auxiliaryEdge true
0025 /vis/viewer/set/lineSegmentsPerCircle 100
0026 #
0027 # Draw smooth trajectories at end of event, showing trajectory points
0028 # as markers 2 pixels wide:
0029 /vis/scene/add/trajectories smooth
0030 /vis/modeling/trajectories/create/drawByCharge
0031 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
0032 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
0033 # (if too many tracks cause core dump => /tracking/storeTrajectory 0)
0034 #
0035 # Draw hits at end of event:
0036 #/vis/scene/add/hits
0037 #
0038 # To draw only gammas:
0039 #/vis/filtering/trajectories/create/particleFilter
0040 #/vis/filtering/trajectories/particleFilter-0/add gamma
0041 #
0042 # To invert the above, drawing all particles except gammas,
0043 # keep the above two lines but also add:
0044 #/vis/filtering/trajectories/particleFilter-0/invert true
0045 #
0046 # Many other options are available with /vis/modeling and /vis/filtering.
0047 # For example, to select colour by particle ID:
0048 #/vis/modeling/trajectories/create/drawByParticleID
0049 #/vis/modeling/trajectories/drawByParticleID-0/default/setDrawStepPts true
0050 # To select or override default colours (note: e+ is blue by default):
0051 #/vis/modeling/trajectories/list
0052 #/vis/modeling/trajectories/drawByParticleID-0/set e+ yellow
0053 #
0054 # To superimpose all of the events from a given run:
0055 /vis/scene/endOfEventAction accumulate
0056 #
0057 # Decorations
0058 # Name
0059 /vis/set/textColour green
0060 /vis/set/textLayout right
0061 /vis/scene/add/text2D 0.9 -.9 24 ! ! exampleB1
0062 # or, if your system does not support right-adjustment
0063 #/vis/scene/add/text2D 0 -.9 24 ! ! exampleB1
0064 /vis/set/textLayout # Revert to normal (left adjusted) layout
0065 /vis/set/textColour # Revert to default text colour (blue)
0066 #
0067 # Axes, scale, etc.
0068 /vis/scene/add/scale # Simple scale line
0069 /vis/scene/add/axes # Simple axes: x=red, y=green, z=blue.
0070 /vis/scene/add/eventID # Drawn at end of event
0071 /vis/scene/add/date # Date stamp
0072 /vis/scene/add/logo2D # Simple logo
0073 #/vis/scene/add/logo # 3D logo
0074 /vis/scene/add/userAction # User action(s), if any
0075 #
0076 # Frame
0077 /vis/set/colour red
0078 /vis/set/lineWidth 2
0079 /vis/scene/add/frame # Simple frame around the view
0080 /vis/set/colour # Revert to default colour (white)
0081 /vis/set/lineWidth # Revert to default line width (1.)
0082 #
0083 # Attach text to one edge of Shape1, with a small, fixed offset
0084 /vis/scene/add/text 0 6 -4 cm 18 4 4 Shape1
0085 # Attach text to one corner of Shape2, with a small, fixed offset
0086 /vis/scene/add/text 6 7 10 cm 18 4 4 Shape2
0087 #
0088 # To get nice view
0089 /vis/geometry/set/visibility World 0 false
0090 /vis/geometry/set/visibility Envelope 0 false
0091 /vis/viewer/set/style surface
0092 /vis/viewer/set/hiddenMarker true
0093 /vis/viewer/set/viewpointThetaPhi 120 150
0094 #
0095 # Re-establish auto refreshing and verbosity:
0096 /vis/viewer/set/autoRefresh true
0097 /vis/verbose warnings
0098 #
0099 # For file-based drivers, use this to create an empty detector view:
0100 #/vis/viewer/flush