154 lines
3.9 KiB
Plaintext
154 lines
3.9 KiB
Plaintext
|
|
# ---------------------------------------------------------
|
|
# THIS MACRO PERMIT TO RECONSTRUCT THE SPREAD OUT BRAGG PEAK
|
|
# MODULATING THE PROTON BEAM ENERGY BY MEANS OF A ROTATING
|
|
# MODULATOR WHEEL.
|
|
# HERE THE WHEEL IS ROTATED OF 1 DEGREE AT EACH RUN AND
|
|
# ONE THOUSAND PROTON HYSTORIES ARE SIMULATED IN EACH
|
|
# RUN
|
|
# IN ORDER TO INCREASE THE RESOLUTION MORE EVENT CAN ADDED
|
|
# OR A SMALLER ANGLE CAN BE CHOSEN.
|
|
#
|
|
# NOTE THAT THE MODULATOR MATERIAL IS AIR FOR DEFAULT.
|
|
# IF ONE WANT CARRY OUT A SIMULATION WITH
|
|
# THE MODULATOR HE/SHE MUST MODIFY "HadrontherapyModulator.cc"
|
|
# AND SET the <<ModMater>> TO "PMMA".
|
|
#
|
|
# USERS SHOULD GIVE A LOOK TO THE HELP OF THE IDLE TO KNOW
|
|
# THE ACTIVATED MESSSENGERS FOR THE GEOMETRY
|
|
#
|
|
#
|
|
# ANYWAY SEND ME AN E-MAIL FOR ANY QUESTION: cirrone@lns.infn.it.
|
|
# --------------------------------------------------------------------------------
|
|
#########################
|
|
# Set of the verboses
|
|
#
|
|
/control/verbose 1
|
|
/tracking/verbose 0
|
|
/run/verbose 0
|
|
/event/verbose 0
|
|
|
|
##########################
|
|
# Set of the physic models
|
|
#
|
|
/Physics/addPhysics HADRONTHERAPY_1
|
|
/run/numberOfThreads 7
|
|
|
|
|
|
##########################
|
|
# Initialisation procedure
|
|
#
|
|
/run/initialize
|
|
|
|
# Set a very high time threshold to allow all decays to happen
|
|
/process/had/rdm/thresholdForVeryLongDecayTime 1.0e+60 year
|
|
|
|
##########################
|
|
# Visualisation
|
|
#
|
|
#/vis/open OGLI 600x600-0+0
|
|
##/vis/open ## open the default viewer
|
|
#/vis/viewer/flush
|
|
#/vis/viewer/set/viewpointThetaPhi 50 130 deg
|
|
#/vis/scene/add/axes 0 0 0 0.1 m
|
|
#/vis/viewer/zoom 1
|
|
#/vis/viewer/panTo -80 40 cm
|
|
#/vis/scene/add/trajectories
|
|
#/vis/viewer/update
|
|
#/vis/scene/endOfEventAction accumulate
|
|
#/vis/viewer/set/hiddenMarker 1
|
|
#########################
|
|
# 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.5 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
|
|
|
|
|
|
##########################
|
|
# Set here the cut and the step max for the tracking.
|
|
# Suggested values of cut and step:
|
|
#
|
|
/run/setCutForRegion DetectorLog 0.1 mm
|
|
|
|
# Cut for the rest of the volume
|
|
/run/setCut 1 mm
|
|
|
|
#/Step/waterPhantomStepMax 0.1 mm
|
|
|
|
/changePhantom/size 40 40 40 cm
|
|
/changePhantom/position 20 0 0 cm
|
|
|
|
/changeDetector/size 4 4 4 cm
|
|
/changeDetector/voxelSize .1 40 40 mm
|
|
|
|
/changeDetector/displacement 0 18. 18. cm
|
|
/changePhantom/update
|
|
|
|
|
|
# IF YOU WANT A RANGE SHIFTER PLEASE CHANGE
|
|
# THE FOLLOWIG PARAMETERS
|
|
# SETTING FOR THE RANGE SHIFTER
|
|
|
|
# /beamLine/RangeShifter/G4_PLEXIGLASS
|
|
# /beamLine/RangeShifter/thickness 1 cm
|
|
##########################################################
|
|
### Set the modulator properties
|
|
|
|
/modulator/ReadData
|
|
|
|
# You can set as a parameter your data file in a right format instead if you left blank or input default, ..
|
|
# .. data will be read from the default file "ModulWeight.txt"
|
|
|
|
/modulator/RMWMat G4_PLEXIGLASS
|
|
/modulator/position -2160.5 30 50 mm
|
|
/modulator/innerRadius 2.5 cm
|
|
/modulator/outRadius 9.5 cm
|
|
############################################################
|
|
|
|
#########################
|
|
# Start of the run
|
|
#
|
|
# If secondary particles dose & fluence are needed
|
|
/analysis/secondary true
|
|
/analysis/computeLet
|
|
|
|
/run/printProgress 1000
|
|
|
|
# START OF THE MODULATOR ROTATION
|
|
# IT CONSISTS IN A COMPLETE ROTATION
|
|
# OF THE WHEEL (360 DEG)
|
|
|
|
# Running in loop
|
|
/control/alias initialValue 0
|
|
/control/alias finalValue 359
|
|
/control/alias stepSize 1
|
|
/control/loop macro/modulator.loop counterName {initialValue} {finalValue} {stepSize}
|