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

82 lines
2.3 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 emstandard_opt3 # Electromagnetic model
/Physics/addPhysics Em_extra_physics
/Physics/addPhysics Elastic # Hadronic elastic model
/Physics/addPhysics decay
/Physics/addPhysics radioactive_decay
/Physics/addPhysics Stopping_physics
/Physics/addPhysics Neutron_tracking_cut
/Physics/addPhysics binary # Hadronic inelastic model
# 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
####################################
# Change Phantom/Detector geometry #
####################################
##########################################################################################
# Cut & paste the following commands in order to create, starting from the default sizes,
# a full voxellized (40 by 40 by 40) detector
/changePhantom/size 4 4 4 cm
/changeDetector/size 4 4 4 cm
/changeDetector/voxelSize 1 1 1 mm
# Put the detector in the lower left corner of the phantom
/changeDetector/displacement 0 0 0
/changePhantom/update
##########################################################################################
/run/beamOn 5000