Files
geant4/examples/advanced/iort_therapy/macro/oneSlabPhantom.mac
T
2016-06-09 17:01:34 +02:00

89 lines
2.5 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
#
#/physic/addPhysics standard_opt3 # Electromagnetic model
#/physic/addPhysics elastic # Hadronic elastic model
#/physic/addPhysics binary # Hadronic inelastic model
#/physic/addPhysics local_ion_ion_inelastic # Hadronic inelastic model for ions (local physic list)
#/Physics/addPhysics radioactive_decay
#
# Or alternatively:
#
/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 detector
/Physics/setCuts 0.01 mm
# Set cuts ONLY inside detector
/Physics/setDetectorCuts 0.01 mm
/Step/waterPhantomStepMax 0.01 mm
#########################
#########################
# Set the primary particle type,
# energy and position along the X direction
#
/gun/particle proton
/beam/energy/meanEnergy 62 MeV
/beam/energy/sigmaEnergy 400 keV
/beam/position/Xposition -2700 mm
# 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