Monoenergetic proton pencil beam
From UCL HEP PBT Wiki
for
Monoenergetic proton pencil beam
Jump to:
navigation
,
search
== <span style="color:#000080"> Introduction </span> == This example shows the dose distribution in water along the incident proton beam. The beam hits the water cube surface and deposits a dose under the surface of the water. The volume of the water cube is divided into slices perpendicular to the incident beam. The dose and energy deposited from the pencil beams at each slice is computed. == <span style="color:#000080"> Setting up the environment </span> == ; Connect to HEP cluster and create folder ProtonPBFolder in your area <pre style="color: #800000; background-color: #dcdcdc"> ssh -X username@plus1.hep.ucl.ac.uk password: type your password here cd /home/username/ mkdir ProtonPBFolder cd ProtonPBFolder </pre> ; Setup your environment <pre style="color: #800000; background-color: #dcdcdc"> source /unix/pbt/software/dev/bin/pbt-dev.sh </pre> == <span style="color:#000080"> How to get the code </span> == ; Copy the code to your working directory and rename it <pre style="color: #800000; background-color: #dcdcdc"> cp -r /unix/pbt/tutorials/basic/ProtonPB . mv ProtonPB ProtonPB_source </pre> == <span style="color:#000080"> How to run the code </span> == ; Inside /home/username/ProtonPBFolder/ create a directory <pre style="color: #800000; background-color: #dcdcdc"> mkdir ProtonPB_build </pre> ; To compile the code enter this directory and run cmake and make <pre style="color: #800000; background-color: #dcdcdc"> cd ProtonPB_build cmake -DGeant4_DIR=/unix/pbt/software/dev /home/username/ProtonPBFolder/ProtonPB_source make </pre> ; Run macro proton.mac. The macro generates 6000 events. <pre style="color: #800000; background-color: #dcdcdc"> ./protonPB proton.mac </pre> == <span style="color:#000080"> How to analyze data </span> == The macro produces a root file '''Proton.root''' with a 1D histogram showing the energy deposition in water box along the beam line and another histogram showing zoomed Bragg Peak. It also produces a text file '''DoseFile.txt''' with energy and dose deposited at each slice of the water box. This is an example output with the default settings: physics process '''QGSP_BIC_EMY''' and incident proton energy of 62 MeV. <pre style="color: #800000; background-color: #dcdcdc"> Cumulated Doses : X[mm] Edep Edep/ Ebeam Dose layer 1: 3.33333 23.1611 GeV 6.22611 % 2.78311e-06 Gy layer 2: 6.66667 24.3512 GeV 6.54602 % 2.92612e-06 Gy layer 3: 10 25.9655 GeV 6.97998 % 3.1201e-06 Gy layer 4: 13.3333 27.6521 GeV 7.43336 % 3.32277e-06 Gy layer 5: 16.6667 30.1527 GeV 8.10556 % 3.62325e-06 Gy layer 6: 20 33.6152 GeV 9.03635 % 4.03931e-06 Gy layer 7: 23.3333 39.396 GeV 10.5903 % 4.73395e-06 Gy layer 8: 26.6667 50.3177 GeV 13.5263 % 6.04634e-06 Gy layer 9: 30 88.6343 GeV 23.8264 % 1.06506e-05 Gy layer 10: 33.3333 2.09587 GeV 0.563405 % 2.51846e-07 Gy layer 11: 36.6667 4.59086 MeV 0.0012341 % 5.51653e-10 Gy layer 12: 40 0 eV 0 % 0 Gy </pre> You can open Proton.root file in the following way: <pre style="color: #800000; background-color: #dcdcdc"> root -l Proton.root new TBrowser Select ROOT Files and Proton.root </pre> Inside is 1D histogram showing the energy deposition in water box: [[File:/pbt/RadiotherapyWorkbook/skins/common/images/PhotonPB/Edep.png|Energy deposit per event along the beam]] You can change the physics process, incident proton energy and number of slices etc. by modifying the macro proton.mac. Use your favorite editor '''pico''', '''vi''', '''emacs''' etc. For example open the macro with editor '''pico''': <pre style="color: #800000; background-color: #dcdcdc"> pico proton.mac </pre> This is what you will see: <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 /protonPB/det/setSizeX 4 cm /protonPB/det/setSizeYZ 4 cm /protonPB/det/setSliceSizeYZ 2 cm /protonPB/det/sliceNumber 12 # # set physics process /protonPB/phys/addPhysics QGSP_BIC_EMY #/protonPB/phys/addPhysics emlivermore #/protonPB/phys/addPhysics empenelope # # production tresholds (recommended range #cut off not bigger than 10% of slice thickness) /protonPB/phys/setCuts 0.5 mm #/protonPB/phys/setGCut 1 um #/protonPB/phys/setECut 1 um #/protonPB/phys/setPCut 1 um # # initialize /run/initialize # /gun/particle proton # particle energy used in Clatterbridge Centre /gun/energy 62 MeV # # step limit (recommended not bigger than 5% of # slice thickness) /protonPB/stepMax 0.2 mm # /protonPB/event/printModulo 50 # # output file /analysis/setFileName Proton # # /analysis/h1/set 2 50 25 35 mm # number of events /run/beamOn 6000 # </pre> === Change the physics process === The default physics process is '''QGSP_BIC_EMY'''. This is a physics list recommended for proton therapy. You can check what will be the dose deposition if you change the physics list. In proton.mac change <pre style="color: #800000; background-color: #dcdcdc"> /photonPB/phys/addPhysics QGSP_BIC_EMY </pre> to <pre style="color: #800000; background-color: #dcdcdc"> /photonPB/phys/addPhysics emlivermore </pre> Now run the code: <pre style="color: #800000; background-color: #dcdcdc"> ./protonPB proton.mac </pre> === Change the incident particle energy === The default energy is 62 MeV. This is one of the energies used in radiotherapy. In proton.mac you can change the value of 62 MeV <pre style="color: #800000; background-color: #dcdcdc"> /gun/energy 62 MeV </pre> to, for example, 50 MeV <pre style="color: #800000; background-color: #dcdcdc"> /gun/energy 50 MeV </pre> and run the macro <pre style="color: #800000; background-color: #dcdcdc"> ./protonPB proton.mac </pre> === Change the number of slices === You can change the number of water box slices. The default number is 12. Keep in mind that if you want to have more slices you need to modify the file DetectorConstruction.hh in /ProtonPB_source/include/. In DetectorConstruction.hh change the MaxLayer to a value which is bigger or equal to the number of your slices. <pre style="color: #800000; background-color: #dcdcdc"> const G4int MaxLayer = 10; </pre> Then in gamma.mac you need to change the number of slices <pre style="color: #800000; background-color: #dcdcdc"> /protonPB/det/sliceNumber 10 </pre> You modified the code therefore you need to comppile it again. In directory PhotonPB_build do <pre style="color: #800000; background-color: #dcdcdc"> make </pre> then run the macro <pre style="color: #800000; background-color: #dcdcdc"> ./protonPB proton.mac </pre> == <span style="color:#000080"> Comparison with data from The Clatterbridge Cancer Centre </span> == == <span style="color:#000080"> Files </span> == [[List of files with brief description]]
Return to
Monoenergetic proton pencil beam
.
Views
Page
Discussion
View source
History
Personal tools
Log in
Navigation
Main page
Community portal
Current events
Recent changes
Random page
Help
Search
Toolbox
What links here
Related changes
Special pages