Files
geant4/examples/advanced/hadrontherapy/macro/hadron_therapy.mac
T
2016-06-10 12:08:39 +02:00

152 lines
3.9 KiB
Plaintext

# G.A.P.Cirrone
# cirrone@lns.infn.it
#
# Macro file recommended for the use with proton beams and built-in physic list.
# This macro uses the physics list already contained in the Geant4 distribution
#
# The 'Reference Physics Lists' can be activated setting a specific enviroment variable to the name
# of the physics. For example if the QGSP_BIC Reference Physics Lists must be activated the User
# must set export PHYSLIST=QGSP_BIC (or setenv PHYSLIST QGSP_BIC).
# A 'Reference Physics Lists' contains all the physics process necessary to a particle transport
# If the User set the PHYSLIST variable Hadrontherapy will start with the defaultMacroWithReferencePhysicsList.mac
# macro. See this macro file for more details
#########################
# 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
##########################
# Initialisation procedure
#
/run/initialize
#########################
# 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 is travelling along the x-axis without any angular dispersion (angular despersion set to 0.0)
#
/gps/ang/rot1 0 0 1
/gps/ang/rot2 0 1 0
/gps/ang/type beam1d
/gps/ang/sigma_r 0. deg
# the beam energy is in gaussian profile
#
/gps/ene/type Gauss
/gps/ene/mono 62 MeV
/gps/ene/sigma 0.3 MeV
#/beamLine/RangeShifter/RSMat G4_PLEXIGLASS
#/beamLine/RangeShifter/thickness 13 mm
/beamLine/FinalCollimator/halfInnerRad 12.5 mm
##########################
# Set here the cut and the step max for the tracking.
# Suggested values of cut and step:
# Set cuts OUTSIDE the detector
#
/run/setCut 1 mm
# Set cuts ONLY inside the detector
#
/run/setCutForRegion DetectorLog 0.05 mm
/Step/waterPhantomStepMax 1 mm
#########################
##############################################################################################################################
# DETECTOR DESCRIPTION
###################################################
# USE THE FOLLOWING FOUR LINES FOR DEFINITION OF PHANTOM
###################################################
#
#/changePhantom/position 20. 0. 0. cm
#/changePhantom/update
/changePhantom/size 40 40 40 cm
/changePhantom/position 20 0 0 cm
###################################################
# USE THE FOLLOWING FOR A VOXELLIZED DETECTOR
###################################################
#
/changeDetector/size 4 4 4 cm
/changeDetector/voxelSize .1 40 40 mm
# Put the detector in the lower left corner of the phantom
#
/changeDetector/displacement 0 18 18 cm
/changePhantom/update
# Visualisation
#
/vis/scene/create
/vis/open OGL
/vis/viewer/flush
/vis/viewer/set/viewpointThetaPhi 30 140 deg
/vis/viewer/zoomTo 1
#/vis/viewer/panTo 100 20 cm
/vis/viewer/panTo -10 0 cm
/vis/scene/add/trajectories
/tracking/storeTrajectory 1
/vis/scene/endOfEventAction accumulate -1
/vis/viewer/update
#########################
# Display the event number
# during the run
#
/event/printEventNumber 1
# Default material is liquid water (G4_WATER)
#/changePhantom/material G4_Pb
# For dose/fleunce computation of primary and secondary particles
#/analysis/secondary true
# For dose average LET computations of primary and secondary particles
#/analysis/computeLet
/run/beamOn 10
#########################
# Move the generated .root & .out
# files into the
# "SimulationOutputs" folder
# if this folder has been created
/control/shell mv DoseDistribution.root experimentalData/proton/BraggPeak/protonBraggPeak.root
/control/shell mv Dose.out experimentalData/proton/BraggPeak/Dose.out