97 lines
2.4 KiB
Plaintext
97 lines
2.4 KiB
Plaintext
# S.E. Mazzaglia May 4 2010
|
|
|
|
# Example macro file to show how to change geometric properties and voxelization of the phantom/detector
|
|
|
|
#######################
|
|
# Set of the verboses #
|
|
#######################
|
|
#
|
|
/control/verbose 1
|
|
/tracking/verbose 0
|
|
/run/verbose 1
|
|
/event/verbose 0
|
|
|
|
|
|
##########################
|
|
# Set of the physic models
|
|
#
|
|
/Physics/addPhysics QGSP_BIC_EMY
|
|
|
|
# Initialize geometry and physic
|
|
/run/initialize
|
|
|
|
#############################
|
|
# Initialize graphic system #
|
|
#############################
|
|
#
|
|
/vis/scene/create
|
|
/vis/open OGL
|
|
/vis/viewer/flush
|
|
/vis/viewer/set/viewpointThetaPhi 30 140 deg
|
|
/tracking/storeTrajectory 1
|
|
/vis/scene/endOfEventAction accumulate -1 # this accumulate infinite tracks
|
|
# zoom to phantom...
|
|
/vis/viewer/panTo 1.5 0.5
|
|
/vis/viewer/zoomTo 3
|
|
|
|
##########################
|
|
# Set here the cut and the step max for the tracking.
|
|
# Suggested values of cut and step:
|
|
# Set cuts OUTSIDE the detector
|
|
/run/setCut 0.01 mm
|
|
# Set cuts ONLY inside the detector
|
|
/run/setCutForRegion DetectorLog 0.01 mm
|
|
|
|
/Step/waterPhantomStepMax 0.01 mm
|
|
|
|
#########################
|
|
|
|
#########################
|
|
# Set the primary particle type,
|
|
# energy and position along the X direction
|
|
#
|
|
|
|
#---------------------------gps-----------------
|
|
/gps/pos/shape Circle
|
|
/gps/pos/centre -310. 0. 0. cm
|
|
/gps/pos/radius 0. mm
|
|
/gps/pos/sigma_r 2. mm
|
|
/gps/particle proton
|
|
/gps/pos/type Beam
|
|
|
|
|
|
# the incident surface is in the y-z plane
|
|
|
|
/gps/pos/rot1 0 1 0
|
|
/gps/pos/rot2 0 0 1
|
|
|
|
|
|
# the beam energy is in gaussian profile
|
|
#
|
|
/gps/ene/type Gauss
|
|
/gps/energy 62 MeV
|
|
/gps/ene/sigma 300 keV
|
|
/gps/direction 1 0 0
|
|
|
|
# Copy & Paste in a new macro the previous and ONE of the following groups of commands
|
|
# in order to change the Phantom & Detector geometry!
|
|
|
|
######################################
|
|
# Change Phantom & Detector geometry #
|
|
######################################
|
|
|
|
##########################################################################################
|
|
# Cut & paste the following commands in order to create,
|
|
# a Phantom with a detector divided by one only slab
|
|
# 1 mm along the X direction, 400 mm along the Y and Z.
|
|
|
|
#/changePhantom/material G4_PLEXIGLASS # in case you do not want the default phantom made of liquid water
|
|
/changeDetector/displacement 0 0 0 mm
|
|
/changePhantom/size 1 400 400 mm
|
|
/changeDetector/size 1 400 400 mm
|
|
/changeDetector/voxelSize 1 400 400 mm
|
|
/changePhantom/update # update geometry!
|
|
|
|
/run/beamOn 1000
|
|
|