Warning, /geant4/examples/extended/medical/electronScattering2/macros/vis.mac is written in an unsupported language. File is not indexed.
0001 # Specify physics list
0002 /testem/phys/addPhysics emstandard_opt0
0003 #
0004 # Initialize the run (must be after specify physics list)
0005 /run/numberOfThreads 8
0006 /control/cout/useBuffer
0007 /run/initialize
0008 #
0009 # Set range cut shared by electron, positron and gamma
0010 /run/setCut 0.01 mm
0011 #
0012 # Specify primary foil
0013 /primFoil/material G4_Au
0014 /primFoil/thickness 0.00485 cm
0015 #
0016 # Specify particle source
0017 /gps/energy 13.00 MeV
0018 /gps/particle e-
0019 /gps/direction 0. 0. 1.
0020 /gps/pos/type Beam
0021 /gps/pos/shape Circle
0022 /gps/pos/sigma_r 0.042 cm
0023 /gps/pos/centre 0. 0. -60.05 cm
0024 #
0025 # Set up visualization
0026 # Open a viewer
0027 /vis/open
0028 # This opens the default viewer - see examples/basic/B1/vis.mac for a
0029 # more comprehensive overview of options. Also the documentation.
0030 #
0031 # Disable auto refresh and quieten vis messages whilst scene and
0032 # trajectories are established:
0033 /vis/viewer/set/autoRefresh false
0034 /vis/verbose errors
0035 #
0036 # Draw geometry:
0037 /vis/drawVolume
0038 #
0039 # Specify view angle:
0040 /vis/viewer/set/viewpointThetaPhi 260. 0.
0041 #
0042 # Specify zoom value:
0043 #/vis/viewer/zoom 2.
0044 #
0045 # Specify style (surface or wireframe):
0046 #/vis/viewer/set/style wireframe
0047 #
0048 # Draw coordinate axes:
0049 #/vis/scene/add/axes 0 0 0 1 m
0050 #
0051 # Draw smooth trajectories at end of event, showing trajectory points
0052 # as markers 2 pixels wide:
0053 /vis/scene/add/trajectories smooth
0054 /vis/modeling/trajectories/create/drawByCharge
0055 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
0056 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
0057 # (if too many tracks cause core dump => /tracking/storeTrajectory 0)
0058 #
0059 # Draw hits at end of event:
0060 #/vis/scene/add/hits
0061 #
0062 # To draw only gammas:
0063 #/vis/filtering/trajectories/create/particleFilter
0064 #/vis/filtering/trajectories/particleFilter-0/add gamma
0065 #
0066 # To invert the above, drawing all particles except gammas,
0067 # keep the above two lines but also add:
0068 #/vis/filtering/trajectories/particleFilter-0/invert true
0069 #
0070 # Many other options are available with /vis/modeling and /vis/filtering.
0071 # For example, to select colour by particle ID:
0072 #/vis/modeling/trajectories/create/drawByParticleID
0073 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue
0074 #
0075 # To superimpose all of the events from a given run:
0076 /vis/scene/endOfEventAction accumulate
0077 #
0078 # Re-establish auto refreshing and verbosity:
0079 /vis/viewer/set/autoRefresh true
0080 /vis/verbose warnings
0081 #
0082 # For file-based drivers, use this to create an empty detector view:
0083 #/vis/viewer/flush
0084 #
0085 # Run
0086 #/run/beamOn 5