Several proton beams with spread out Bragg peaks

From UCL HEP PBT Wiki

Jump to: navigation, search
m
m
Line 57: Line 57:
== <span style="color:#000080"> How to analyze data </span> ==
== <span style="color:#000080"> How to analyze data </span> ==
 +
The code produces two text files '''DoseFile.txt''' and '''PlotDose.txt'''. The file '''DoseFile.txt''' contains energy and dose deposition for every layer and for every beam energy. The file '''PlotDose.txt''' contains only depth vs dose for each layer for every beam energy. These text files can be analyzed with MATLAB or ROOT.
 +
 +
=== <span style="color:#000080"> Text files </span> ===
 +
 +
This is the [http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonSB/DoseFile.txt content] of '''DoseFile.txt''' with proton beam energies 50, 52, 54 and 56 MeV. This is the [http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonSB/PlotDose.txt content] of the '''PlotDose.txt'''.
 +
 +
=== <span style="color:#000080"> Root file </span> ===
 +
 +
You can use script '''PlotSimulation.C''' to plot the spread out Bragg peak. The script uses '''PlotDose.txt'''. Copy the script to your current ProtonSB_build directory:
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
cp /home/username/ProtonSBFolder/ProtonSB_source/PlotSimulation.C .
 +
</pre>
 +
 +
Then, run the script in the following way:
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
[username@plus1 ProtonSB_build]$ root -l
 +
 +
root [1] .x PlotSimulation.C
 +
</pre>
 +
 +
This will create '''SOBP.root''' file with the following plot:
 +
 +
http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonSB/SOPB.png   
 +
 +
=== <span style="color:#000080"> Run with different settings </span> ===
 +
 +
You can change the physics process, incident proton beam energies, number of slices etc. by
 +
modifying macros proton.mac and protonLoop.mac.
 +
 +
 +
This is the content of proton.mac:
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
# proton.mac
 +
#
 +
/control/verbose 2
 +
/run/verbose 2
 +
/tracking/verbose 0
 +
/run/particle/verbose 1
 +
/run/particle/dumpList
 +
#
 +
# set geometry
 +
/protonSB/det/setSizeX  4 cm
 +
/protonSB/det/setSizeYZ 4 cm
 +
/protonSB/det/setSliceSizeYZ 4 cm
 +
/protonSB/det/sliceNumber 50
 +
#
 +
# set physics process
 +
/protonSB/phys/addPhysics QGSP_BIC_EMY
 +
#/protonSB/phys/addPhysics emlivermore
 +
#/protonSB/phys/addPhysics empenelope
 +
#
 +
# production tresholds (recommended range
 +
#cut off not bigger than 10% of slice thickness)
 +
/protonSB/phys/setCuts 0.2 mm
 +
#/protonSB/phys/setGCut 1 um
 +
#/protonSB/phys/setECut 1 um
 +
#/protonSB/phys/setPCut 1 um
 +
#
 +
# initialize
 +
/run/initialize
 +
#
 +
# visualisation
 +
#/control/execute visualisation.mac
 +
#
 +
/control/loop protonLoop.mac ene 50 56 2
 +
</pre>
 +
 +
This is the content of protonLoop.mac:
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
# protonLoop.mac
 +
#
 +
/gun/particle proton
 +
# particle energy
 +
/gun/energy {ene} MeV
 +
#
 +
# beam size
 +
#/photonSB/gun/rndm 3 mm
 +
#
 +
# step limit (recommended not bigger than 5% of
 +
# slice thickness)
 +
/protonSB/stepMax 0.1 mm
 +
#
 +
/protonSB/event/printModulo 50
 +
#
 +
# number of events
 +
/run/beamOn 6000
 +
#
 +
</pre>
 +
 +
'''Change of the beam energies'''
 +
 +
You can change the proton beam energies by modifying this line
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
/control/loop protonLoop.mac ene 50 56 2
 +
</pre>
== <span style="color:#000080"> Files </span> ==
== <span style="color:#000080"> Files </span> ==

Revision as of 16:54, 3 September 2014

Personal tools