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 two histograms. The first histogram shows the energy deposition in water box along the beam line, the second histogram shows zoomed energy deposition around the peak. The macro also produces two text files '''DoseFile.txt''' and '''PlotDose.txt'''. The file '''DoseFile.txt''' contains energy and dose deposition for every layer. The file '''PlotDose.txt''' contains only depth vs dose values for each layer. These values can be imported in matlab. === <span style="color:#000080"> Text files </span> === This is an example output for '''DoseFile.txt''' with physics process '''QGSP_BIC_EMY''' and incident proton energy of '''62 MeV'''. <pre style="color: #800000; background-color: #dcdcdc"> Layers : x[mm] Edep Edep/Ebeam[%] Dose Dose/MaxDose[%] layer 1: 1.33333 8.7788 GeV 2.35989 1.05489e-05 Gy 20.404 layer 2: 2.66667 8.95366 GeV 2.4069 1.0759e-05 Gy 20.8104 layer 3: 4 9.20046 GeV 2.47324 1.10556e-05 Gy 21.384 layer 4: 5.33333 9.33632 GeV 2.50976 1.12188e-05 Gy 21.6998 layer 5: 6.66667 9.58072 GeV 2.57546 1.15125e-05 Gy 22.2678 layer 6: 8 9.76978 GeV 2.62628 1.17397e-05 Gy 22.7073 layer 7: 9.33333 10.0149 GeV 2.69217 1.20342e-05 Gy 23.277 layer 8: 10.6667 10.248 GeV 2.75484 1.23143e-05 Gy 23.8187 layer 9: 12 10.5163 GeV 2.82695 1.26367e-05 Gy 24.4422 layer 10: 13.3333 10.7679 GeV 2.89459 1.2939e-05 Gy 25.0271 layer 11: 14.6667 11.2918 GeV 3.03543 1.35686e-05 Gy 26.2448 layer 12: 16 11.5998 GeV 3.11822 1.39387e-05 Gy 26.9606 layer 13: 17.3333 11.9594 GeV 3.21489 1.43708e-05 Gy 27.7964 layer 14: 18.6667 12.6008 GeV 3.38732 1.51416e-05 Gy 29.2873 layer 15: 20 13.0799 GeV 3.51611 1.57173e-05 Gy 30.4008 layer 16: 21.3333 13.853 GeV 3.72393 1.66463e-05 Gy 32.1977 layer 17: 22.6667 14.4719 GeV 3.89029 1.73899e-05 Gy 33.636 layer 18: 24 15.3391 GeV 4.12341 1.8432e-05 Gy 35.6517 layer 19: 25.3333 16.7448 GeV 4.50128 2.01211e-05 Gy 38.9188 layer 20: 26.6667 18.2636 GeV 4.90957 2.19461e-05 Gy 42.4489 layer 21: 28 20.5916 GeV 5.53539 2.47436e-05 Gy 47.8598 layer 22: 29.3333 24.3455 GeV 6.54449 2.92543e-05 Gy 56.5847 layer 23: 30.6667 32.4192 GeV 8.71484 3.8956e-05 Gy 75.3499 layer 24: 32 43.0249 GeV 11.5658 5.17001e-05 Gy 100 layer 25: 33.3333 1.97182 GeV 0.530059 2.3694e-06 Gy 4.58297 layer 26: 34.6667 0 eV 0 0 Gy 0 layer 27: 36 0 eV 0 0 Gy 0 layer 28: 37.3333 442.484 keV 0.00011 5.31703e-10 Gy 0.00102844 layer 29: 38.6667 0 eV 0 0 Gy 0 layer 30: 40 0 eV 0 0 Gy 0 The run consists of 6000 proton of 62 MeV through 4 cm of Water (density: 1 g/cm3 ) divided into 30 slices. Edep is the deposited energy in every slice. Total incident energy(Ebeam)= 372 GeV Total energy deposit= 367.309 GeV Dose is the deposited dose in every slice. MaxDose is the highest dose value from all slices. </pre> The corresponding '''PlotDose.txt''' is: <pre style="color: #800000; background-color: #dcdcdc"> 1.33333 20.404 2.66667 20.8104 4 21.384 5.33333 21.6998 6.66667 22.2678 8 22.7073 9.33333 23.277 10.6667 23.8187 12 24.4422 13.3333 25.0271 14.6667 26.2448 16 26.9606 17.3333 27.7964 18.6667 29.2873 20 30.4008 21.3333 32.1977 22.6667 33.636 24 35.6517 25.3333 38.9188 26.6667 42.4489 28 47.8598 29.3333 56.5847 30.6667 75.3499 32 100 33.3333 4.58297 34.6667 0 36 0 37.3333 0.00102844 38.6667 0 40 0 </pre> === <span style="color:#000080"> Root file </span> === 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> <span style="color:#000080"> '''This is the energy deposition along the beam in the absorber:''' </span> http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonPB/BraggPeak_PB.png <span style="color:#000080"> '''This is the energy deposition along the beam in the absorber, zoomed around the peak:''' </span> http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonPB/BraggPeak_PBzoom.png === <span style="color:#000080"> Changes in proton.mac </span> === 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 1 cm /protonPB/det/sliceNumber 30 # # 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.2 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.1 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 slices. The default number is 30. Keep in mind that if you want to increase the number of slices you need to modify the file DetectorConstruction.hh in /ProtonPB_source/include/. In DetectorConstruction.hh set MaxLayer to a value which is bigger than the number of your slices. The default value is 40. For example, if you want to have 35 slices you do not need to modify MaxLayer. Then in proton.mac change the number of slices <pre style="color: #800000; background-color: #dcdcdc"> /protonPB/det/sliceNumber 35 </pre> then run the macro <pre style="color: #800000; background-color: #dcdcdc"> ./protonPB proton.mac </pre> If you modify the files in ProtonPB_source (for example change the value of MaxLayer) you need to comppile the code 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"> Visualisation </span> === == <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