Monoenergetic proton pencil beam
From UCL HEP PBT Wiki
m |
m |
||
Line 441: | Line 441: | ||
=== <span style="color:#000080"> Visualisation </span> === | === <span style="color:#000080"> Visualisation </span> === | ||
- | If you want to use visualisation, in macro '''proton.mac''' uncomment the line '''/control/execute visualisation.mac'''. This will run macro '''visualisation.mac''' with a specific visualisation | + | If you want to use visualisation, in macro '''proton.mac''' uncomment the line '''/control/execute visualisation.mac'''. This will run macro '''visualisation.mac''' with a specific visualisation setup. |
- | If you uncomment the lines '''/score/drawProjection waterMeshlongitudinal doseDeposit''' and '''/score/drawProjection waterMeshlateral doseDeposit''' you will draw the dose projections. In this example, we use | + | If you uncomment the lines '''/score/drawProjection waterMeshlongitudinal doseDeposit''' and '''/score/drawProjection waterMeshlateral doseDeposit''' you will draw the dose projections. In this example, we use '''DAWN''' event display. Before running the visualisation look at this [http://geant4.slac.stanford.edu/Presentations/vis/G4DAWNTutorial/G4DAWNTutorial.html DAWN tutorial]. |
- | + | ||
To run the visualisation, first uncomment lines '''/control/execute visualisation.mac''' and '''/score/drawProjection waterMeshlongitudinal doseDeposit'''. Then, run the proton.mac | To run the visualisation, first uncomment lines '''/control/execute visualisation.mac''' and '''/score/drawProjection waterMeshlongitudinal doseDeposit'''. Then, run the proton.mac | ||
Line 451: | Line 450: | ||
</pre> | </pre> | ||
- | In addition to the text files | + | In addition to the text files the code will create two .prim files, '''g4_00.prim''' and '''g4_01.prim'''. The first file contains detector geometry and particle interactions. The second file contains dose projections. While running the proton.mac you will be asked to open g4_00.prim in DAWN. In the opened window press OK. This will create your first visualisation: |
http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonPB/g4_00_6000e.eps | http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonPB/g4_00_6000e.eps | ||
- | The second file g4_01.prim will not open automatically. Open | + | The second file g4_01.prim will not open automatically. It will be created after the running is finished. Open the file in the following way: |
<pre style="color: #800000; background-color: #dcdcdc"> | <pre style="color: #800000; background-color: #dcdcdc"> | ||
Line 465: | Line 464: | ||
http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonPB/g4_02_6000e.eps | http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonPB/g4_02_6000e.eps | ||
- | You can modify the .prim files in DAWN. For example, change the polar and azimuthal angles | + | You can modify the .prim files in DAWN. For example, in the DAWN display change the polar and azimuthal angles. 1) (polar angle, azimuthal angle) = (0,90) will create this image |
http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonPB/g4_01_6000e.eps | http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonPB/g4_01_6000e.eps | ||
- | (polar angle, azimuthal angle) = (90,0) will create this image | + | 2) (polar angle, azimuthal angle) = (90,0) will create this image |
http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonPB/g4_04_6000e.eps | http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonPB/g4_04_6000e.eps | ||
- | Now, in proton.mac macro uncomment '''/score/drawProjection waterMeshlateral doseDeposit''' and comment '''/score/drawProjection waterMeshlongitudinal doseDeposit'''. Run | + | Now, in proton.mac macro uncomment '''/score/drawProjection waterMeshlateral doseDeposit''' and comment '''/score/drawProjection waterMeshlongitudinal doseDeposit'''. Run '''proton.mac''' with the new settings. The image with the lateral dose projections will look like that: |
http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonPB/g4_03_6000e.eps | http://www.hep.ucl.ac.uk/pbt/RadiotherapyWorkbook/skins/common/images/ProtonPB/g4_03_6000e.eps |