87 lines
2.4 KiB
Plaintext
87 lines
2.4 KiB
Plaintext
# Specify physics list
|
|
/testem/phys/addPhysics emstandard_opt0
|
|
#
|
|
# Initialize the run (must be after specify physics list)
|
|
/run/numberOfThreads 8
|
|
/control/cout/useBuffer
|
|
/run/initialize
|
|
#
|
|
# Set range cut shared by electron, positron and gamma
|
|
/run/setCut 0.01 mm
|
|
#
|
|
# Specify primary foil
|
|
/primFoil/material G4_Au
|
|
/primFoil/thickness 0.00485 cm
|
|
#
|
|
# Specify particle source
|
|
/gps/energy 13.00 MeV
|
|
/gps/particle e-
|
|
/gps/direction 0. 0. 1.
|
|
/gps/pos/type Beam
|
|
/gps/pos/shape Circle
|
|
/gps/pos/sigma_r 0.042 cm
|
|
/gps/pos/centre 0. 0. -60.05 cm
|
|
#
|
|
# Set up visualization
|
|
# Open a viewer
|
|
/vis/open
|
|
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
|
# more comprehensive overview of options. Also the documentation.
|
|
#
|
|
# Disable auto refresh and quieten vis messages whilst scene and
|
|
# trajectories are established:
|
|
/vis/viewer/set/autoRefresh false
|
|
/vis/verbose errors
|
|
#
|
|
# Draw geometry:
|
|
/vis/drawVolume
|
|
#
|
|
# Specify view angle:
|
|
/vis/viewer/set/viewpointThetaPhi 260. 0.
|
|
#
|
|
# Specify zoom value:
|
|
#/vis/viewer/zoom 2.
|
|
#
|
|
# Specify style (surface or wireframe):
|
|
#/vis/viewer/set/style wireframe
|
|
#
|
|
# Draw coordinate axes:
|
|
#/vis/scene/add/axes 0 0 0 1 m
|
|
#
|
|
# Draw smooth trajectories at end of event, showing trajectory points
|
|
# as markers 2 pixels wide:
|
|
/vis/scene/add/trajectories smooth
|
|
/vis/modeling/trajectories/create/drawByCharge
|
|
/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
|
|
/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
|
|
# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
|
|
#
|
|
# Draw hits at end of event:
|
|
#/vis/scene/add/hits
|
|
#
|
|
# To draw only gammas:
|
|
#/vis/filtering/trajectories/create/particleFilter
|
|
#/vis/filtering/trajectories/particleFilter-0/add gamma
|
|
#
|
|
# To invert the above, drawing all particles except gammas,
|
|
# keep the above two lines but also add:
|
|
#/vis/filtering/trajectories/particleFilter-0/invert true
|
|
#
|
|
# Many other options are available with /vis/modeling and /vis/filtering.
|
|
# For example, to select colour by particle ID:
|
|
#/vis/modeling/trajectories/create/drawByParticleID
|
|
#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
|
|
#
|
|
# To superimpose all of the events from a given run:
|
|
/vis/scene/endOfEventAction accumulate
|
|
#
|
|
# Re-establish auto refreshing and verbosity:
|
|
/vis/viewer/set/autoRefresh true
|
|
/vis/verbose warnings
|
|
#
|
|
# For file-based drivers, use this to create an empty detector view:
|
|
#/vis/viewer/flush
|
|
#
|
|
# Run
|
|
#/run/beamOn 5
|