Warning, /geant4/examples/advanced/hadrontherapy/macro/modulatorMacro.mac is written in an unsupported language. File is not indexed.
0001
0002 # ---------------------------------------------------------
0003 # THIS MACRO PERMIT TO RECONSTRUCT THE SPREAD OUT BRAGG PEAK
0004 # MODULATING THE PROTON BEAM ENERGY BY MEANS OF A ROTATING
0005 # MODULATOR WHEEL.
0006 # HERE THE WHEEL IS ROTATED OF 1 DEGREE AT EACH RUN AND
0007 # ONE THOUSAND PROTON HYSTORIES ARE SIMULATED IN EACH
0008 # RUN
0009 # IN ORDER TO INCREASE THE RESOLUTION MORE EVENT CAN ADDED
0010 # OR A SMALLER ANGLE CAN BE CHOSEN.
0011 #
0012 # NOTE THAT THE MODULATOR MATERIAL IS AIR FOR DEFAULT.
0013 # IF ONE WANT CARRY OUT A SIMULATION WITH
0014 # THE MODULATOR HE/SHE MUST MODIFY "HadrontherapyModulator.cc"
0015 # AND SET the <<ModMater>> TO "PMMA".
0016 #
0017 # USERS SHOULD GIVE A LOOK TO THE HELP OF THE IDLE TO KNOW
0018 # THE ACTIVATED MESSSENGERS FOR THE GEOMETRY
0019 #
0020 #
0021 # ANYWAY SEND ME AN E-MAIL FOR ANY QUESTION: cirrone@lns.infn.it.
0022 # --------------------------------------------------------------------------------
0023 #########################
0024 # Set of the verboses
0025 #
0026 /control/verbose 1
0027 /tracking/verbose 0
0028 /run/verbose 0
0029 /event/verbose 0
0030
0031 ##########################
0032 # Set of the physic models
0033 #
0034 /Physics/addPhysics HADRONTHERAPY_1
0035 /run/numberOfThreads 7
0036
0037
0038 ##########################
0039 # Initialisation procedure
0040 #
0041 /run/initialize
0042
0043 # Set a very high time threshold to allow all decays to happen
0044 /process/had/rdm/thresholdForVeryLongDecayTime 1.0e+60 year
0045
0046 ##########################
0047 # Visualisation
0048 #
0049 #/vis/open OGLI 600x600-0+0
0050 ##/vis/open ## open the default viewer
0051 #/vis/viewer/flush
0052 #/vis/viewer/set/viewpointThetaPhi 50 130 deg
0053 #/vis/scene/add/axes 0 0 0 0.1 m
0054 #/vis/viewer/zoom 1
0055 #/vis/viewer/panTo -80 40 cm
0056 #/vis/scene/add/trajectories
0057 #/vis/viewer/update
0058 #/vis/scene/endOfEventAction accumulate
0059 #/vis/viewer/set/hiddenMarker 1
0060 #########################
0061 # Set the primary particle type,
0062 # energy and position along the X direction
0063 #
0064
0065 #---------------------------gps-----------------
0066 /gps/pos/shape Circle
0067 /gps/pos/centre -310. 0. 0. cm
0068 /gps/pos/radius 0. mm
0069 /gps/pos/sigma_r 2.5 mm
0070 /gps/particle proton
0071 /gps/pos/type Beam
0072
0073
0074 # the incident surface is in the y-z plane
0075
0076 /gps/pos/rot1 0 1 0
0077 /gps/pos/rot2 0 0 1
0078
0079 # the beam is travelling along the x-axis without any angular dispersion (angular despersion set to 0.0)
0080 #
0081
0082 /gps/ang/rot1 0 0 1
0083 /gps/ang/rot2 0 1 0
0084 /gps/ang/type beam1d
0085 /gps/ang/sigma_r 0. deg
0086
0087
0088 # the beam energy is in gaussian profile
0089 #
0090 /gps/ene/type Gauss
0091 /gps/ene/mono 62 MeV
0092 /gps/ene/sigma 0.3 MeV
0093
0094
0095 ##########################
0096 # Set here the cut and the step max for the tracking.
0097 # Suggested values of cut and step:
0098 #
0099 /run/setCutForRegion DetectorLog 0.1 mm
0100
0101 # Cut for the rest of the volume
0102 /run/setCut 1 mm
0103
0104 #/Step/waterPhantomStepMax 0.1 mm
0105
0106 /changePhantom/size 40 40 40 cm
0107 /changePhantom/position 20 0 0 cm
0108
0109 /changeDetector/size 4 4 4 cm
0110 /changeDetector/voxelSize .1 40 40 mm
0111
0112 /changeDetector/displacement 0 18. 18. cm
0113 /changePhantom/update
0114
0115
0116 # IF YOU WANT A RANGE SHIFTER PLEASE CHANGE
0117 # THE FOLLOWIG PARAMETERS
0118 # SETTING FOR THE RANGE SHIFTER
0119
0120 # /beamLine/RangeShifter/G4_PLEXIGLASS
0121 # /beamLine/RangeShifter/thickness 1 cm
0122 ##########################################################
0123 ### Set the modulator properties
0124
0125 /modulator/ReadData
0126
0127 # You can set as a parameter your data file in a right format instead if you left blank or input default, ..
0128 # .. data will be read from the default file "ModulWeight.txt"
0129
0130 /modulator/RMWMat G4_PLEXIGLASS
0131 /modulator/position -2160.5 30 50 mm
0132 /modulator/innerRadius 2.5 cm
0133 /modulator/outRadius 9.5 cm
0134 ############################################################
0135
0136 #########################
0137 # Start of the run
0138 #
0139 # If secondary particles dose & fluence are needed
0140 /analysis/secondary true
0141 /analysis/computeLet
0142
0143 /run/printProgress 1000
0144
0145 # START OF THE MODULATOR ROTATION
0146 # IT CONSISTS IN A COMPLETE ROTATION
0147 # OF THE WHEEL (360 DEG)
0148
0149 # Running in loop
0150 /control/alias initialValue 0
0151 /control/alias finalValue 359
0152 /control/alias stepSize 1
0153 /control/loop macro/modulator.loop counterName {initialValue} {finalValue} {stepSize}