<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?action=history&amp;feed=atom&amp;title=Software%2FGeant4%2FTutorials%2FPBTCVMFS%2FMonoenergetic_Proton_Pencil_Beam</id>
	<title>Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic Proton Pencil Beam - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?action=history&amp;feed=atom&amp;title=Software%2FGeant4%2FTutorials%2FPBTCVMFS%2FMonoenergetic_Proton_Pencil_Beam"/>
	<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic_Proton_Pencil_Beam&amp;action=history"/>
	<updated>2026-04-06T16:18:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic_Proton_Pencil_Beam&amp;diff=5679&amp;oldid=prev</id>
		<title>JosephBateman: /* Create folder ProtonPBFolder */</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic_Proton_Pencil_Beam&amp;diff=5679&amp;oldid=prev"/>
		<updated>2024-11-27T11:42:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Create folder ProtonPBFolder&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:42, 27 November 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l35&quot;&gt;Line 35:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 35:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;or  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;or  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ssh -X username@pcpool.hep.ucl.ac.uk (are unsure, or don&#039;t care, which PC you want to connect to)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ssh -X username@pcpool.hep.ucl.ac.uk (&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if you &lt;/ins&gt;are unsure, or don&#039;t care, which PC you want to connect to)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;username@pc###.hep.ucl.ac.uk&amp;#039;s password: type your password here&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;username@pc###.hep.ucl.ac.uk&amp;#039;s password: type your password here&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pbtwiki:diff:1.41:old-5652:rev-5679:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>JosephBateman</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic_Proton_Pencil_Beam&amp;diff=5652&amp;oldid=prev</id>
		<title>JosephBateman at 14:49, 25 November 2024</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic_Proton_Pencil_Beam&amp;diff=5652&amp;oldid=prev"/>
		<updated>2024-11-25T14:49:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic_Proton_Pencil_Beam&amp;amp;diff=5652&amp;amp;oldid=5629&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>JosephBateman</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic_Proton_Pencil_Beam&amp;diff=5629&amp;oldid=prev</id>
		<title>JosephBateman: /* Compile the Code with Make and Cmake */</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic_Proton_Pencil_Beam&amp;diff=5629&amp;oldid=prev"/>
		<updated>2024-11-19T12:43:30Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Compile the Code with Make and Cmake&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:43, 19 November 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l61&quot;&gt;Line 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPBFolder]$ cd ProtonPB_build  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPBFolder]$ cd ProtonPB_build  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPB_build]$ cmake -DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=Release -DGeant4_DIR=/cvmfs/geant4.cern.ch/geant4/11.2/x86_64-centos7-gcc10-optdeb-MT /home/username/ProtonPBFolder/ProtonPB_source  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPB_build]$ cmake -DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=Release &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-DGEANT4_USE_QT=ON &lt;/ins&gt;-DGeant4_DIR=/cvmfs/geant4.cern.ch/geant4/11.2/x86_64-centos7-gcc10-optdeb-MT /home/username/ProtonPBFolder/ProtonPB_source  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPB_build]$ make   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPB_build]$ make   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pbtwiki:diff:1.41:old-5620:rev-5629:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>JosephBateman</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic_Proton_Pencil_Beam&amp;diff=5620&amp;oldid=prev</id>
		<title>JosephBateman: /* Copy the Code to Your Working Directory and Rename It */</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic_Proton_Pencil_Beam&amp;diff=5620&amp;oldid=prev"/>
		<updated>2024-11-12T14:06:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Copy the Code to Your Working Directory and Rename It&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:06, 12 November 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l45&quot;&gt;Line 45:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 45:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPBFolder]$ cp -rv /unix/pbt/tutorials/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;basic&lt;/del&gt;/ProtonPB .&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPBFolder]$ cp -rv /unix/pbt/tutorials/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;cvmfs&lt;/ins&gt;/ProtonPB .&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPBFolder]$ mv ProtonPB ProtonPB_source&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPBFolder]$ mv ProtonPB ProtonPB_source&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pbtwiki:diff:1.41:old-5614:rev-5620:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>JosephBateman</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic_Proton_Pencil_Beam&amp;diff=5614&amp;oldid=prev</id>
		<title>JosephBateman at 13:49, 12 November 2024</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic_Proton_Pencil_Beam&amp;diff=5614&amp;oldid=prev"/>
		<updated>2024-11-12T13:49:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:49, 12 November 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l61&quot;&gt;Line 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPBFolder]$ cd ProtonPB_build  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPBFolder]$ cd ProtonPB_build  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPB_build]$ cmake -DGeant4_DIR=/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;unix&lt;/del&gt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pbt&lt;/del&gt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;software&lt;/del&gt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;dev &lt;/del&gt;/home/username/ProtonPBFolder/ProtonPB_source  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPB_build]$ cmake &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=Release &lt;/ins&gt;-DGeant4_DIR=/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;cvmfs/geant4.cern.ch&lt;/ins&gt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;geant4&lt;/ins&gt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;11.2&lt;/ins&gt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;x86_64-centos7-gcc10-optdeb-MT &lt;/ins&gt;/home/username/ProtonPBFolder/ProtonPB_source  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPB_build]$ make   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[username@plus1 ProtonPB_build]$ make   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JosephBateman</name></author>
	</entry>
	<entry>
		<id>https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic_Proton_Pencil_Beam&amp;diff=5613&amp;oldid=prev</id>
		<title>JosephBateman: Created page with &quot;== Monoenergetic Proton Pencil Beam ==  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.   At each slice the deposited dose and energy is computed.    The slices are created using class &lt;code&gt;G4PVReplica&lt;/code&gt;.   The energy and the dose are scored using classe...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.hep.ucl.ac.uk/pbt/pbtWiki/index.php?title=Software/Geant4/Tutorials/PBTCVMFS/Monoenergetic_Proton_Pencil_Beam&amp;diff=5613&amp;oldid=prev"/>
		<updated>2024-11-12T13:30:10Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Monoenergetic Proton Pencil Beam ==  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.   At each slice the deposited dose and energy is computed.    The slices are created using class &amp;lt;code&amp;gt;G4PVReplica&amp;lt;/code&amp;gt;.   The energy and the dose are scored using classe...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Monoenergetic Proton Pencil Beam ==&lt;br /&gt;
&lt;br /&gt;
This example shows the dose distribution in water along the incident proton beam.  &lt;br /&gt;
The beam hits the water cube surface and deposits a dose under the surface of the water.  &lt;br /&gt;
The volume of the water cube is divided into slices perpendicular to the incident beam.  &lt;br /&gt;
At each slice the deposited dose and energy is computed.  &lt;br /&gt;
&lt;br /&gt;
The slices are created using class &amp;lt;code&amp;gt;G4PVReplica&amp;lt;/code&amp;gt;.  &lt;br /&gt;
The energy and the dose are scored using classes &amp;lt;code&amp;gt;G4UserSteppingAction&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;G4UserRunAction&amp;lt;/code&amp;gt;.  &lt;br /&gt;
Alternatively, the energy and the dose are scored using class &amp;lt;code&amp;gt;G4ScoringManager&amp;lt;/code&amp;gt; by defining two scoring meshes in longitudinal and lateral direction of the beam.  &lt;br /&gt;
More information about the scoring meshes can be found [https://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/ch04s08.html here].  &lt;br /&gt;
The protons are generated using &amp;lt;code&amp;gt;G4ParticleGun&amp;lt;/code&amp;gt; class.  &lt;br /&gt;
There is an option to chose among several &amp;lt;code&amp;gt;EM&amp;lt;/code&amp;gt; and the &amp;lt;code&amp;gt;QGSP_BIC_EMY&amp;lt;/code&amp;gt; physics lists.&lt;br /&gt;
&lt;br /&gt;
[[File:ProtonPB_g4_00_6000e.gif|500px]]&lt;br /&gt;
&lt;br /&gt;
The image shows the water box divided into slices using class &amp;lt;code&amp;gt;G4PVReplica&amp;lt;/code&amp;gt;.  &lt;br /&gt;
Protons are in blue, photons are in green.&lt;br /&gt;
&lt;br /&gt;
== Running the Tutorial ==&lt;br /&gt;
&lt;br /&gt;
All the source files for the tutorial can be found in http://www.hep.ucl.ac.uk/pbt/wikiData/code/ProtonPB/.  &lt;br /&gt;
&lt;br /&gt;
The corresponding data files are available from http://www.hep.ucl.ac.uk/pbt/wikiData/data/ProtonPB/.  &lt;br /&gt;
&lt;br /&gt;
=== Create folder ProtonPBFolder ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh -X username@plus1.hep.ucl.ac.uk &lt;br /&gt;
&lt;br /&gt;
username@plus1.hep.ucl.ac.uk&amp;#039;s password: type your password here&lt;br /&gt;
 &lt;br /&gt;
[username@plus1 ~]$ mkdir ProtonPBFolder &lt;br /&gt;
&lt;br /&gt;
[username@plus1 ~]$ cd ProtonPBFolder  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setup Your Environment ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPBFolder]$ source /unix/pbt/software/scripts/pbt.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Copy the Code to Your Working Directory and Rename It ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPBFolder]$ cp -rv /unix/pbt/tutorials/basic/ProtonPB .&lt;br /&gt;
  &lt;br /&gt;
[username@plus1 ProtonPBFolder]$ mv ProtonPB ProtonPB_source&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the Build Directory ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPBFolder]$ mkdir ProtonPB_build  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile the Code with &amp;lt;code&amp;gt;Make&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Cmake&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPBFolder]$ cd ProtonPB_build &lt;br /&gt;
&lt;br /&gt;
[username@plus1 ProtonPB_build]$ cmake -DGeant4_DIR=/unix/pbt/software/dev /home/username/ProtonPBFolder/ProtonPB_source &lt;br /&gt;
&lt;br /&gt;
[username@plus1 ProtonPB_build]$ make  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run Macro &amp;lt;code&amp;gt;proton.mac&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPB_build]$ ./protonPB proton.mac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Analysing the Data ==&lt;br /&gt;
&lt;br /&gt;
The macro produces a root file &amp;lt;code&amp;gt;Proton.root&amp;lt;/code&amp;gt; with two histograms.  &lt;br /&gt;
The first histogram shows the energy deposition in water box along the beam line, the second histogram shows zoomed energy deposition around the peak.  &lt;br /&gt;
The macro also produces several text files. &lt;br /&gt;
&lt;br /&gt;
* The data in files &amp;lt;code&amp;gt;DoseFile.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PlotDose.txt&amp;lt;/code&amp;gt; was created using classes &amp;lt;code&amp;gt;G4UserSteppingAction&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;G4UserRunAction&amp;lt;/code&amp;gt;.  The file &amp;lt;code&amp;gt;DoseFile.txt&amp;lt;/code&amp;gt; contains energy and dose deposition for every layer.  The file &amp;lt;code&amp;gt;PlotDose.txt&amp;lt;/code&amp;gt; contains only depth vs dose for each layer.  These text files can be analyzed with MATLAB or ROOT.&lt;br /&gt;
&lt;br /&gt;
* The files &amp;lt;code&amp;gt;DoseLongitudinalMesh.txt&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EnergyLongitudinalMesh.txt&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DoseLateralMesh.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EnergyLateralMesh.txt&amp;lt;/code&amp;gt; contain information about the dose and energy deposition in voxels in longitudinal and lateral direction of the beam.  The data was created using class &amp;lt;code&amp;gt;G4ScoringManager&amp;lt;/code&amp;gt; and commands &amp;lt;code&amp;gt;/score/&amp;lt;/code&amp;gt; in proton.mac.  These text files can be analyzed with MATLAB or ROOT.&lt;br /&gt;
&lt;br /&gt;
* The two ways to record data should give similar result.   &lt;br /&gt;
&lt;br /&gt;
=== Text files ===&lt;br /&gt;
&lt;br /&gt;
This is output from &amp;lt;code&amp;gt;DoseFile.txt&amp;lt;/code&amp;gt; with physics process &amp;lt;code&amp;gt;QGSP_BIC_EMY&amp;lt;/code&amp;gt; and incident proton energy of &amp;#039;&amp;#039;&amp;#039;62 MeV&amp;#039;&amp;#039;&amp;#039;.  &lt;br /&gt;
Use your favorite editor &amp;lt;code&amp;gt;pico&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;vi&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;emacs&amp;lt;/code&amp;gt; etc to open text files.  &lt;br /&gt;
For example, open this text file with editor &amp;lt;code&amp;gt;pico&amp;lt;/code&amp;gt;: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPB_build]$ pico DoseFile.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==== &amp;lt;code&amp;gt;DoseFile.txt&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Layers :	x[mm]  	Edep 	    Edep/Ebeam[%]  Dose        Dose/MaxDose[%]&lt;br /&gt;
 layer 1: 	0.8	5.17382 GeV	1.39081	6.47608e-07 Gy	17.3315	&lt;br /&gt;
 layer 2: 	1.6	5.24175 GeV	1.40907	6.5611e-07 Gy	17.5591	&lt;br /&gt;
 layer 3: 	2.4	5.29862 GeV	1.42436	6.63229e-07 Gy	17.7496	&lt;br /&gt;
 layer 4: 	3.2	5.41481 GeV	1.45559	6.77772e-07 Gy	18.1388	&lt;br /&gt;
 layer 5: 	4	5.43787 GeV	1.46179	6.80658e-07 Gy	18.216	&lt;br /&gt;
 layer 6: 	4.8	5.52101 GeV	1.48414	6.91065e-07 Gy	18.4946	&lt;br /&gt;
 layer 7: 	5.6	5.64633 GeV	1.51783	7.06751e-07 Gy	18.9144	&lt;br /&gt;
 layer 8: 	6.4	5.63969 GeV	1.51605	7.0592e-07 Gy	18.8921	&lt;br /&gt;
 layer 9: 	7.2	5.71744 GeV	1.53695	7.15652e-07 Gy	19.1526	&lt;br /&gt;
 layer 10: 	8	5.78086 GeV	1.55399	7.2359e-07 Gy	19.365	&lt;br /&gt;
 layer 11: 	8.8	5.94371 GeV	1.59777	7.43975e-07 Gy	19.9106	&lt;br /&gt;
 layer 12: 	9.6	6.02518 GeV	1.61967	7.54172e-07 Gy	20.1835	&lt;br /&gt;
 layer 13: 	10.4	6.10292 GeV	1.64057	7.63903e-07 Gy	20.4439	&lt;br /&gt;
 layer 14: 	11.2	6.18071 GeV	1.66148	7.7364e-07 Gy	20.7045	&lt;br /&gt;
 layer 15: 	12	6.2621 GeV	1.68336	7.83827e-07 Gy	20.9771	&lt;br /&gt;
 layer 16: 	12.8	6.37762 GeV	1.71441	7.98286e-07 Gy	21.3641	&lt;br /&gt;
 layer 17: 	13.6	6.52458 GeV	1.75392	8.16682e-07 Gy	21.8564	&lt;br /&gt;
 layer 18: 	14.4	6.67805 GeV	1.79517	8.35892e-07 Gy	22.3705	&lt;br /&gt;
 layer 19: 	15.2	6.86252 GeV	1.84476	8.58982e-07 Gy	22.9884	&lt;br /&gt;
 layer 20: 	16	6.95226 GeV	1.86889	8.70215e-07 Gy	23.289	&lt;br /&gt;
 layer 21: 	16.8	7.11679 GeV	1.91312	8.90809e-07 Gy	23.8402	&lt;br /&gt;
 layer 22: 	17.6	7.15125 GeV	1.92238	8.95122e-07 Gy	23.9556	&lt;br /&gt;
 layer 23: 	18.4	7.43274 GeV	1.99805	9.30356e-07 Gy	24.8986	&lt;br /&gt;
 layer 24: 	19.2	7.58811 GeV	2.03981	9.49804e-07 Gy	25.419	&lt;br /&gt;
 layer 25: 	20	7.8156 GeV	2.10097	9.78279e-07 Gy	26.1811	&lt;br /&gt;
 layer 26: 	20.8	7.94754 GeV	2.13643	9.94794e-07 Gy	26.6231	&lt;br /&gt;
 layer 27: 	21.6	8.35363 GeV	2.2456	1.04562e-06 Gy	27.9834	&lt;br /&gt;
 layer 28: 	22.4	8.44564 GeV	2.27033	1.05714e-06 Gy	28.2917	&lt;br /&gt;
 layer 29: 	23.2	8.74817 GeV	2.35166	1.09501e-06 Gy	29.3051	&lt;br /&gt;
 layer 30: 	24	9.08194 GeV	2.44138	1.13679e-06 Gy	30.4232	&lt;br /&gt;
 layer 31: 	24.8	9.50886 GeV	2.55615	1.19022e-06 Gy	31.8533	&lt;br /&gt;
 layer 32: 	25.6	9.93302 GeV	2.67017	1.24332e-06 Gy	33.2741	&lt;br /&gt;
 layer 33: 	26.4	10.5627 GeV	2.83943	1.32213e-06 Gy	35.3834	&lt;br /&gt;
 layer 34: 	27.2	11.1563 GeV	2.99902	1.39644e-06 Gy	37.3721	&lt;br /&gt;
 layer 35: 	28	12.0025 GeV	3.22647	1.50235e-06 Gy	40.2065	&lt;br /&gt;
 layer 36: 	28.8	13.1124 GeV	3.52485	1.64128e-06 Gy	43.9247	&lt;br /&gt;
 layer 37: 	29.6	14.5158 GeV	3.90209	1.81694e-06 Gy	48.6257	&lt;br /&gt;
 layer 38: 	30.4	16.8932 GeV	4.54119	2.11452e-06 Gy	56.5898	&lt;br /&gt;
 layer 39: 	31.2	20.9827 GeV	5.64051	2.62641e-06 Gy	70.289	&lt;br /&gt;
 layer 40: 	32	29.8521 GeV	8.02475	3.73658e-06 Gy	100	&lt;br /&gt;
 layer 41: 	32.8	14.922 GeV	4.0113	1.86779e-06 Gy	49.9866	&lt;br /&gt;
 layer 42: 	33.6	330.005 MeV	0.088711     4.13067e-08 Gy  1.10547	&lt;br /&gt;
 layer 43: 	34.4	2.92265 MeV	0.000785658  3.65828e-10 Gy  0.00979044	&lt;br /&gt;
 layer 44: 	35.2	864.413 keV	0.000232369  1.08199e-10 Gy  0.00289566	&lt;br /&gt;
 layer 45: 	36	673.958 keV	0.000181172  8.43594e-11 Gy  0.00225766	&lt;br /&gt;
 layer 46: 	36.8	1.18851 MeV	0.000319491  1.48765e-10 Gy  0.00398132	&lt;br /&gt;
 layer 47: 	37.6	3.81319 MeV	0.00102505   4.77297e-10 Gy  0.0127736	&lt;br /&gt;
 layer 48: 	38.4	4.58219 MeV	0.00123177   5.73552e-10 Gy  0.0153496	&lt;br /&gt;
 layer 49: 	39.2	7.29449 MeV	0.00196088   9.13052e-10 Gy  0.0244355	&lt;br /&gt;
 layer 50: 	40	0 eV 	0	0 Gy	0	&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 The run consists of 6000 proton of 62 MeV through 4 cm  of Water (density: 1 g/cm3 ) &lt;br /&gt;
 divided into 50 slices.&lt;br /&gt;
&lt;br /&gt;
 Edep is the deposited energy in every slice.&lt;br /&gt;
 Total incident energy(Ebeam)= 372 GeV&lt;br /&gt;
 Total energy deposit= 367.368 GeV&lt;br /&gt;
 Dose is the deposited dose in every slice.&lt;br /&gt;
 MaxDose is the highest dose value from all slices.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;PlotDose.txt&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The corresponding &amp;lt;code&amp;gt;PlotDose.txt&amp;lt;/code&amp;gt; is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0.8	17.3315	&lt;br /&gt;
1.6	17.5591	&lt;br /&gt;
2.4	17.7496	&lt;br /&gt;
3.2	18.1388	&lt;br /&gt;
4	18.216	&lt;br /&gt;
4.8	18.4946	&lt;br /&gt;
5.6	18.9144	&lt;br /&gt;
6.4	18.8921	&lt;br /&gt;
7.2	19.1526	&lt;br /&gt;
8	19.365	&lt;br /&gt;
8.8	19.9106	&lt;br /&gt;
9.6	20.1835	&lt;br /&gt;
10.4	20.4439	&lt;br /&gt;
11.2	20.7045	&lt;br /&gt;
12	20.9771	&lt;br /&gt;
12.8	21.3641	&lt;br /&gt;
13.6	21.8564	&lt;br /&gt;
14.4	22.3705	&lt;br /&gt;
15.2	22.9884	&lt;br /&gt;
16	23.289	&lt;br /&gt;
16.8	23.8402	&lt;br /&gt;
17.6	23.9556	&lt;br /&gt;
18.4	24.8986	&lt;br /&gt;
19.2	25.419	&lt;br /&gt;
20	26.1811	&lt;br /&gt;
20.8	26.6231	&lt;br /&gt;
21.6	27.9834	&lt;br /&gt;
22.4	28.2917	&lt;br /&gt;
23.2	29.3051	&lt;br /&gt;
24	30.4232	&lt;br /&gt;
24.8	31.8533	&lt;br /&gt;
25.6	33.2741	&lt;br /&gt;
26.4	35.3834	&lt;br /&gt;
27.2	37.3721	&lt;br /&gt;
28	40.2065	&lt;br /&gt;
28.8	43.9247	&lt;br /&gt;
29.6	48.6257	&lt;br /&gt;
30.4	56.5898	&lt;br /&gt;
31.2	70.289	&lt;br /&gt;
32	100	&lt;br /&gt;
32.8	49.9866	&lt;br /&gt;
33.6	1.10547	&lt;br /&gt;
34.4	0.00979044	&lt;br /&gt;
35.2	0.00289566	&lt;br /&gt;
36	0.00225766	&lt;br /&gt;
36.8	0.00398132	&lt;br /&gt;
37.6	0.0127736	&lt;br /&gt;
38.4	0.0153496	&lt;br /&gt;
39.2	0.0244355	&lt;br /&gt;
40	0		&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The files &amp;lt;code&amp;gt;DoseLongitudinalMesh.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EnergyLongitudinalMesh.txt&amp;lt;/code&amp;gt; contain information about the dose and energy deposition in 50 voxels along the beam.  &lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;DoseLongitudinalMesh.txt&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mesh name: waterMeshlongitudinal&lt;br /&gt;
# primitive scorer name: doseDeposit&lt;br /&gt;
# iX, iY, iZ, value [Gy]&lt;br /&gt;
0,0,0,6.398582855930675e-07&lt;br /&gt;
1,0,0,6.476076943270951e-07&lt;br /&gt;
2,0,0,6.561104727924428e-07&lt;br /&gt;
3,0,0,6.632288576514804e-07&lt;br /&gt;
4,0,0,6.777723406342788e-07&lt;br /&gt;
5,0,0,6.806579456409969e-07&lt;br /&gt;
6,0,0,6.91064665975597e-07&lt;br /&gt;
7,0,0,7.067512545709638e-07&lt;br /&gt;
8,0,0,7.059200031350208e-07&lt;br /&gt;
9,0,0,7.156519176900015e-07&lt;br /&gt;
10,0,0,7.235903386590427e-07&lt;br /&gt;
11,0,0,7.439747389552145e-07&lt;br /&gt;
12,0,0,7.541720785591247e-07&lt;br /&gt;
13,0,0,7.639027568851979e-07&lt;br /&gt;
14,0,0,7.736399498415839e-07&lt;br /&gt;
15,0,0,7.838271332286684e-07&lt;br /&gt;
16,0,0,7.982864751716507e-07&lt;br /&gt;
17,0,0,8.166815318022948e-07&lt;br /&gt;
18,0,0,8.35891621887706e-07&lt;br /&gt;
19,0,0,8.589818300723569e-07&lt;br /&gt;
20,0,0,8.702146985960477e-07&lt;br /&gt;
21,0,0,8.908094582985716e-07&lt;br /&gt;
22,0,0,8.951224309882678e-07&lt;br /&gt;
23,0,0,9.303558877909548e-07&lt;br /&gt;
24,0,0,9.498037872001912e-07&lt;br /&gt;
25,0,0,9.782791267955695e-07&lt;br /&gt;
26,0,0,9.947936277972093e-07&lt;br /&gt;
27,0,0,1.045624447589806e-06&lt;br /&gt;
28,0,0,1.057141333117292e-06&lt;br /&gt;
29,0,0,1.095009220830727e-06&lt;br /&gt;
30,0,0,1.136786796980433e-06&lt;br /&gt;
31,0,0,1.190224735866411e-06&lt;br /&gt;
32,0,0,1.243315989674068e-06&lt;br /&gt;
33,0,0,1.322130956487186e-06&lt;br /&gt;
34,0,0,1.396440433021823e-06&lt;br /&gt;
35,0,0,1.50234984419867e-06&lt;br /&gt;
36,0,0,1.641284907129354e-06&lt;br /&gt;
37,0,0,1.816941697430821e-06&lt;br /&gt;
38,0,0,2.11452442916524e-06&lt;br /&gt;
39,0,0,2.62640665908421e-06&lt;br /&gt;
40,0,0,3.736584034770657e-06&lt;br /&gt;
41,0,0,1.867790510876118e-06&lt;br /&gt;
42,0,0,4.130671695136958e-08&lt;br /&gt;
43,0,0,3.658280235043075e-10&lt;br /&gt;
44,0,0,1.081986690905131e-10&lt;br /&gt;
45,0,0,8.435936307778899e-11&lt;br /&gt;
46,0,0,1.48765431607862e-10&lt;br /&gt;
47,0,0,4.77297093105983e-10&lt;br /&gt;
48,0,0,5.735524713083603e-10&lt;br /&gt;
49,0,0,9.130516230902128e-10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;EnergyLongitudinalMesh.txt&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mesh name: waterMeshlongitudinal&lt;br /&gt;
# primitive scorer name: energyDeposit&lt;br /&gt;
# iX, iY, iZ, value [MeV]&lt;br /&gt;
0,0,0,5111.912527768401&lt;br /&gt;
1,0,0,5173.82357976574&lt;br /&gt;
2,0,0,5241.753402253778&lt;br /&gt;
3,0,0,5298.623120998874&lt;br /&gt;
4,0,0,5414.812931353903&lt;br /&gt;
5,0,0,5437.86641165753&lt;br /&gt;
6,0,0,5521.007077722527&lt;br /&gt;
7,0,0,5646.32931010448&lt;br /&gt;
8,0,0,5639.688332367972&lt;br /&gt;
9,0,0,5717.437885750247&lt;br /&gt;
10,0,0,5780.858981508537&lt;br /&gt;
11,0,0,5943.712653315673&lt;br /&gt;
12,0,0,6025.180549012026&lt;br /&gt;
13,0,0,6102.920225997912&lt;br /&gt;
14,0,0,6180.711949227533&lt;br /&gt;
15,0,0,6262.098705563481&lt;br /&gt;
16,0,0,6377.616302015511&lt;br /&gt;
17,0,0,6524.576843992425&lt;br /&gt;
18,0,0,6678.048796107832&lt;br /&gt;
19,0,0,6862.519525245148&lt;br /&gt;
20,0,0,6952.260398532138&lt;br /&gt;
21,0,0,7116.794659477272&lt;br /&gt;
22,0,0,7151.251569109977&lt;br /&gt;
23,0,0,7432.736318595246&lt;br /&gt;
24,0,0,7588.108160872322&lt;br /&gt;
25,0,0,7815.601417563028&lt;br /&gt;
26,0,0,7947.537951731407&lt;br /&gt;
27,0,0,8353.632098427806&lt;br /&gt;
28,0,0,8445.642021147274&lt;br /&gt;
29,0,0,8748.173587841&lt;br /&gt;
30,0,0,9081.94017289281&lt;br /&gt;
31,0,0,9508.862939073984&lt;br /&gt;
32,0,0,9933.015992281295&lt;br /&gt;
33,0,0,10562.67919317931&lt;br /&gt;
34,0,0,11156.34743594843&lt;br /&gt;
35,0,0,12002.47173877234&lt;br /&gt;
36,0,0,13112.44234434682&lt;br /&gt;
37,0,0,14515.7876899454&lt;br /&gt;
38,0,0,16893.21551834444&lt;br /&gt;
39,0,0,20982.71039991735&lt;br /&gt;
40,0,0,29852.0643843804&lt;br /&gt;
41,0,0,14922.02559031455&lt;br /&gt;
42,0,0,330.0048285988424&lt;br /&gt;
43,0,0,2.922648496498087&lt;br /&gt;
44,0,0,0.8644134872755548&lt;br /&gt;
45,0,0,0.6739581164479411&lt;br /&gt;
46,0,0,1.188506721969284&lt;br /&gt;
47,0,0,3.813189646289314&lt;br /&gt;
48,0,0,4.582186601985135&lt;br /&gt;
49,0,0,7.294490257710744&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The files &amp;lt;code&amp;gt;DoseLateralMesh.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EnergyLateralMesh.txt&amp;lt;/code&amp;gt; contain information about the dose and energy deposition in 50 voxels in direction perpendicular to the beam at its peak location along the beam. &lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;DoseLateralMesh.txt&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mesh name: waterMeshlateral&lt;br /&gt;
# primitive scorer name: doseDeposit&lt;br /&gt;
# iX, iY, iZ, value [Gy]&lt;br /&gt;
0,0,0,0&lt;br /&gt;
0,0,1,0&lt;br /&gt;
0,0,2,0&lt;br /&gt;
0,0,3,0&lt;br /&gt;
0,0,4,0&lt;br /&gt;
0,0,5,0&lt;br /&gt;
0,0,6,0&lt;br /&gt;
0,0,7,0&lt;br /&gt;
0,0,8,0&lt;br /&gt;
0,0,9,8.892767522638671e-11&lt;br /&gt;
0,0,10,8.21852079266635e-10&lt;br /&gt;
0,0,11,0&lt;br /&gt;
0,0,12,0&lt;br /&gt;
0,0,13,8.318919310499272e-09&lt;br /&gt;
0,0,14,1.595723831016101e-09&lt;br /&gt;
0,0,15,0&lt;br /&gt;
0,0,16,2.546870274558055e-08&lt;br /&gt;
0,0,17,5.784197150675933e-08&lt;br /&gt;
0,0,18,1.230136624294735e-07&lt;br /&gt;
0,0,19,1.494748043820479e-07&lt;br /&gt;
0,0,20,2.215227319180893e-07&lt;br /&gt;
0,0,21,5.986605482048514e-07&lt;br /&gt;
0,0,22,1.329975409856811e-06&lt;br /&gt;
0,0,23,1.476881959416276e-05&lt;br /&gt;
0,0,24,5.974330866809595e-05&lt;br /&gt;
0,0,25,5.920917640298571e-05&lt;br /&gt;
0,0,26,1.639379722918268e-05&lt;br /&gt;
0,0,27,1.739367160863735e-06&lt;br /&gt;
0,0,28,3.982482450957319e-07&lt;br /&gt;
0,0,29,2.221785043134072e-07&lt;br /&gt;
0,0,30,1.39961928308002e-07&lt;br /&gt;
0,0,31,1.233101954534728e-07&lt;br /&gt;
0,0,32,5.621640994750944e-08&lt;br /&gt;
0,0,33,7.942616647408834e-08&lt;br /&gt;
0,0,34,4.494378494527077e-09&lt;br /&gt;
0,0,35,5.106873601769217e-08&lt;br /&gt;
0,0,36,0&lt;br /&gt;
0,0,37,0&lt;br /&gt;
0,0,38,3.322392221862852e-09&lt;br /&gt;
0,0,39,5.270936869417144e-10&lt;br /&gt;
0,0,40,0&lt;br /&gt;
0,0,41,0&lt;br /&gt;
0,0,42,0&lt;br /&gt;
0,0,43,0&lt;br /&gt;
0,0,44,0&lt;br /&gt;
0,0,45,2.717977576808592e-10&lt;br /&gt;
0,0,46,1.562629353086799e-10&lt;br /&gt;
0,0,47,0&lt;br /&gt;
0,0,48,0&lt;br /&gt;
0,0,49,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;EnergyLateralMesh.txt&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mesh name: waterMeshlateral&lt;br /&gt;
# primitive scorer name: energyDeposit&lt;br /&gt;
# iX, iY, iZ, value [MeV]&lt;br /&gt;
0,0,0,0&lt;br /&gt;
0,0,1,0&lt;br /&gt;
0,0,2,0&lt;br /&gt;
0,0,3,0&lt;br /&gt;
0,0,4,0&lt;br /&gt;
0,0,5,0&lt;br /&gt;
0,0,6,0&lt;br /&gt;
0,0,7,0&lt;br /&gt;
0,0,8,0&lt;br /&gt;
0,0,9,0.03552274834057498&lt;br /&gt;
0,0,10,0.3282942515999153&lt;br /&gt;
0,0,11,0&lt;br /&gt;
0,0,12,0&lt;br /&gt;
0,0,13,3.323047368326242&lt;br /&gt;
0,0,14,0.6374224438673245&lt;br /&gt;
0,0,15,0&lt;br /&gt;
0,0,16,10.17364184871573&lt;br /&gt;
0,0,17,23.10535828274578&lt;br /&gt;
0,0,18,49.13862148999507&lt;br /&gt;
0,0,19,59.7086997473273&lt;br /&gt;
0,0,20,88.48872117268637&lt;br /&gt;
0,0,21,239.1389175661426&lt;br /&gt;
0,0,22,531.2674784674697&lt;br /&gt;
0,0,23,5899.502718307062&lt;br /&gt;
0,0,24,23864.85999378014&lt;br /&gt;
0,0,25,23651.49732590654&lt;br /&gt;
0,0,26,6548.610787768303&lt;br /&gt;
0,0,27,694.8017225225892&lt;br /&gt;
0,0,28,159.0828968776824&lt;br /&gt;
0,0,29,88.75067379551463&lt;br /&gt;
0,0,30,55.90871844889415&lt;br /&gt;
0,0,31,49.25707356871391&lt;br /&gt;
0,0,32,22.45601696088681&lt;br /&gt;
0,0,33,31.72730779403615&lt;br /&gt;
0,0,34,1.795309230809683&lt;br /&gt;
0,0,35,20.39974454532298&lt;br /&gt;
0,0,36,0&lt;br /&gt;
0,0,37,0&lt;br /&gt;
0,0,38,1.327151558673589&lt;br /&gt;
0,0,39,0.2105510612469108&lt;br /&gt;
0,0,40,0&lt;br /&gt;
0,0,41,0&lt;br /&gt;
0,0,42,0&lt;br /&gt;
0,0,43,0&lt;br /&gt;
0,0,44,0&lt;br /&gt;
0,0,45,0.10857141290437&lt;br /&gt;
0,0,46,0.06242026356585469&lt;br /&gt;
0,0,47,0&lt;br /&gt;
0,0,48,0&lt;br /&gt;
0,0,49,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Root file ===&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;Proton.root&amp;lt;/code&amp;gt; file in the following way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPB_build]$ root -l Proton.root&lt;br /&gt;
&lt;br /&gt;
root [1] new TBrowser&lt;br /&gt;
&lt;br /&gt;
Select ROOT Files and Proton.root&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== The energy deposition along the beam in the absorber ====&lt;br /&gt;
 &lt;br /&gt;
[[File:ProtonPB_BraggPeak_PB1.png]]&lt;br /&gt;
 &lt;br /&gt;
==== The energy deposition along the beam zoomed around the peak ====&lt;br /&gt;
&lt;br /&gt;
[[File:ProtonPB_BraggPeak_PBzoom1.png]]&lt;br /&gt;
&lt;br /&gt;
You can close your ROOT session by typing &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
.q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Plotting the dose distribution ===&lt;br /&gt;
&lt;br /&gt;
Folder &amp;lt;code&amp;gt;RootScripts&amp;lt;/code&amp;gt; contains several ROOT scripts which plot dose deposition in data and simulation.&lt;br /&gt;
You can use script &amp;lt;code&amp;gt;PlotSimulation.C&amp;lt;/code&amp;gt; to plot the dose deposition along the absorber.  &lt;br /&gt;
This script uses &amp;lt;code&amp;gt;PlotDose.txt&amp;lt;/code&amp;gt;.  &lt;br /&gt;
Copy the script to your current ProtonPB_build directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /home/username/ProtonPBFolder/ProtonPB_source/RootScripts/PlotSimulation.C .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run the script in the following way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPB_build]$ root -l &lt;br /&gt;
&lt;br /&gt;
root [1] .x PlotSimulation.C&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create &amp;lt;code&amp;gt;Simulation.root&amp;lt;/code&amp;gt; file with the following plot:&lt;br /&gt;
&lt;br /&gt;
[[File:ProtonPB_Simulation1.png]]&lt;br /&gt;
&lt;br /&gt;
You can also plot the file &amp;lt;code&amp;gt;PlotDose.txt&amp;lt;/code&amp;gt; using MATLAB.  &lt;br /&gt;
Similarly to the previous example first copy the text file to your computer.  &lt;br /&gt;
In the terminal at your computer write:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scp username@plus1.hep.ucl.ac.uk:/home/username/ProtonPBFolder/ProtonPB_build/PlotDose.txt .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, open MATLAB and follow the procedure:&lt;br /&gt;
&lt;br /&gt;
* Import the file: Chose &amp;#039;HOME&amp;#039; tab and &amp;#039;Import Data&amp;#039;. &lt;br /&gt;
* In the &amp;#039;Import Data&amp;#039; window select the &amp;#039;PlotDose.txt&amp;#039; file choosing the right path. &lt;br /&gt;
* In the opened window select the data points in the &amp;#039;IMPORT&amp;#039; tab.  If you like, you can change the name of the variables.  For example, &amp;#039;x&amp;#039; instead of &amp;#039;VarName1&amp;#039; and &amp;#039;Dose&amp;#039; instead of &amp;#039;VarName2&amp;#039;.  Then, press &amp;#039;Import Selection&amp;#039;/&amp;#039;Import Data&amp;#039;.  &lt;br /&gt;
* Close the Import Window and in the Command Window type plot(x,Dose). Press Enter.&lt;br /&gt;
&lt;br /&gt;
This plot will be created with added axis labels and a legend:&lt;br /&gt;
&lt;br /&gt;
[[File:ProtonPB_matlab1proton.png]]&lt;br /&gt;
&lt;br /&gt;
You can also plot the data in &amp;lt;code&amp;gt;DoseLongitudinalMesh.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;DoseLateralMesh.txt&amp;lt;/code&amp;gt; which were created using commands &amp;lt;code&amp;gt;/score/&amp;lt;/code&amp;gt; in the macro &amp;lt;code&amp;gt;proton.mac&amp;lt;/code&amp;gt;.  &lt;br /&gt;
The file &amp;lt;code&amp;gt;DoseLongitudinalMesh.txt&amp;lt;/code&amp;gt; will be used later to compare with data from the Clatterbridge Cancer Center.  &lt;br /&gt;
Now, use script &amp;lt;code&amp;gt;PlotLateralDoseMesh.C&amp;lt;/code&amp;gt; to plot the lateral dose distribution.&lt;br /&gt;
Before running the script substitude the commas in &amp;lt;code&amp;gt;DoseLateralMesh.txt&amp;lt;/code&amp;gt; with spaces.  &lt;br /&gt;
Remove also the header in the text file.  &lt;br /&gt;
Then, save the text file as &amp;lt;code&amp;gt;DoseLateralMesh_Mod.txt&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPB_build]$ cp /home/username/ProtonPBFolder/ProtonPB_source/RootScripts/PlotLateralDoseMesh.C .&lt;br /&gt;
&lt;br /&gt;
[username@plus1 ProtonPB_build]$ root -l &lt;br /&gt;
&lt;br /&gt;
root [1] .x PlotLateralDoseMesh.C&lt;br /&gt;
&amp;lt;/pre&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This will create &amp;lt;code&amp;gt;LateralDose_Mesh.root&amp;lt;/code&amp;gt; file with the following plot:&lt;br /&gt;
&lt;br /&gt;
[[File:ProtonPB_SimulationLateralMesh.png]]&lt;br /&gt;
&lt;br /&gt;
=== Run with different settings ===&lt;br /&gt;
&lt;br /&gt;
You can change the physics process, incident proton energy and number of slices etc. by&lt;br /&gt;
modifying the macro &amp;lt;code&amp;gt;proton.mac&amp;lt;/code&amp;gt;.  &lt;br /&gt;
Open the macro with editor &amp;lt;code&amp;gt;pico&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPB_build]$ pico proton.mac&lt;br /&gt;
&amp;lt;/pre&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
This is the content of the macro:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# proton.mac&lt;br /&gt;
#&lt;br /&gt;
/control/verbose 2&lt;br /&gt;
/run/verbose 2&lt;br /&gt;
/tracking/verbose 0&lt;br /&gt;
/run/particle/verbose 1&lt;br /&gt;
/run/particle/dumpList&lt;br /&gt;
#&lt;br /&gt;
# set geometry &lt;br /&gt;
/protonPB/det/setSizeX  4 cm&lt;br /&gt;
/protonPB/det/setSizeYZ 4 cm&lt;br /&gt;
/protonPB/det/setSliceSizeYZ 4 cm&lt;br /&gt;
/protonPB/det/sliceNumber 50 &lt;br /&gt;
#&lt;br /&gt;
# define longitudinal scoring mesh&lt;br /&gt;
# along the beam&lt;br /&gt;
/score/create/boxMesh waterMeshlongitudinal&lt;br /&gt;
/score/mesh/boxSize 2. 2. 2. cm&lt;br /&gt;
/score/mesh/nBin 50 1 1&lt;br /&gt;
/score/mesh/translate/xyz 0. 0. 0. cm&lt;br /&gt;
/score/quantity/energyDeposit energyDeposit &lt;br /&gt;
/score/quantity/doseDeposit doseDeposit&lt;br /&gt;
/score/close&lt;br /&gt;
#&lt;br /&gt;
# define lateral scoring mesh&lt;br /&gt;
# centered at the Bragg peak&lt;br /&gt;
/score/create/boxMesh waterMeshlateral&lt;br /&gt;
/score/mesh/boxSize 0.1 2. 2. cm&lt;br /&gt;
/score/mesh/nBin 1 1 50&lt;br /&gt;
/score/mesh/translate/xyz 1.2 0. 0. cm&lt;br /&gt;
/score/quantity/energyDeposit energyDeposit &lt;br /&gt;
/score/quantity/doseDeposit doseDeposit&lt;br /&gt;
/score/close&lt;br /&gt;
#&lt;br /&gt;
# set physics process&lt;br /&gt;
/protonPB/phys/addPhysics QGSP_BIC_EMY&lt;br /&gt;
#/protonPB/phys/addPhysics emlivermore&lt;br /&gt;
#/protonPB/phys/addPhysics empenelope&lt;br /&gt;
#&lt;br /&gt;
# production tresholds (recommended range &lt;br /&gt;
#cut off not bigger than 10% of slice thickness)&lt;br /&gt;
/protonPB/phys/setCuts 0.2 mm&lt;br /&gt;
#/protonPB/phys/setGCut 1 um&lt;br /&gt;
#/protonPB/phys/setECut 1 um&lt;br /&gt;
#/protonPB/phys/setPCut 1 um&lt;br /&gt;
#&lt;br /&gt;
# initialize&lt;br /&gt;
/run/initialize&lt;br /&gt;
#&lt;br /&gt;
# visualisation&lt;br /&gt;
#/control/execute visualisation.mac&lt;br /&gt;
#&lt;br /&gt;
/gun/particle proton&lt;br /&gt;
# particle energy used in Clatterbridge Centre  &lt;br /&gt;
/gun/energy 62 MeV&lt;br /&gt;
#&lt;br /&gt;
# beam size&lt;br /&gt;
#/photonPB/gun/rndm 3 mm&lt;br /&gt;
#&lt;br /&gt;
# step limit (recommended not bigger than 5% of &lt;br /&gt;
# slice thickness)&lt;br /&gt;
/protonPB/stepMax 0.1 mm&lt;br /&gt;
#&lt;br /&gt;
/protonPB/event/printModulo 50&lt;br /&gt;
#&lt;br /&gt;
# output file&lt;br /&gt;
/analysis/setFileName Proton&lt;br /&gt;
#&lt;br /&gt;
# histogram &lt;br /&gt;
/analysis/h1/set 2 50 25 35 mm&lt;br /&gt;
# number of events&lt;br /&gt;
/run/beamOn 6000&lt;br /&gt;
#&lt;br /&gt;
# drawing projections&lt;br /&gt;
#/score/drawProjection waterMeshlongitudinal doseDeposit&lt;br /&gt;
#/score/drawProjection waterMeshlateral doseDeposit&lt;br /&gt;
#&lt;br /&gt;
# dump scores to a file&lt;br /&gt;
/score/dumpQuantityToFile waterMeshlongitudinal doseDeposit DoseLongitudinalMesh.txt&lt;br /&gt;
/score/dumpQuantityToFile waterMeshlongitudinal energyDeposit EnergyLongitudinalMesh.txt&lt;br /&gt;
/score/dumpQuantityToFile waterMeshlateral doseDeposit DoseLateralMesh.txt&lt;br /&gt;
/score/dumpQuantityToFile waterMeshlateral energyDeposit EnergyLateralMesh.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Change dimensions of the water box ====&lt;br /&gt;
&lt;br /&gt;
The default size is 4x4x4 cm. You can change the dimensions by modifying the lines&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/protonPB/det/setSizeX  4 cm&lt;br /&gt;
/protonPB/det/setSizeYZ 4 cm &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Change the physics process ====&lt;br /&gt;
&lt;br /&gt;
The default physics process is &amp;lt;code&amp;gt;QGSP_BIC_EMY&amp;lt;/code&amp;gt;.  &lt;br /&gt;
This is a physics list recommended for proton therapy.  &lt;br /&gt;
You can check what will be the dose deposition if you change the physics list.  &lt;br /&gt;
In &amp;lt;code&amp;gt;proton.mac&amp;lt;/code&amp;gt; change&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/photonPB/phys/addPhysics QGSP_BIC_EMY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/photonPB/phys/addPhysics emlivermore&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Change the incident proton energy ====&lt;br /&gt;
&lt;br /&gt;
The default energy is 62 MeV.  &lt;br /&gt;
This is one of the energies used in radiotherapy.  &lt;br /&gt;
In &amp;lt;code&amp;gt;proton.mac&amp;lt;/code&amp;gt; you can change the value of 62 MeV &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gun/energy 62 MeV&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to, for example, 50 MeV&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/gun/energy 50 MeV&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Change the diameter of the beam ====&lt;br /&gt;
&lt;br /&gt;
You can set the diameter of the beam with the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/protonPB/gun/rndm 3 mm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Change the number of slices ====&lt;br /&gt;
&lt;br /&gt;
You can change the number of slices.  &lt;br /&gt;
The default number is 50.  &lt;br /&gt;
Keep in mind that if you want to increase the number of slices you need to modify the file DetectorConstruction.hh in &amp;lt;code&amp;gt;/ProtonPB_source/include/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In DetectorConstruction.hh set MaxLayer to value bigger than the number of your slices.  &lt;br /&gt;
The default value is MaxLayer=60.  &lt;br /&gt;
For example, if you want to have 55 slices you do not need to modify MaxLayer.  &lt;br /&gt;
Then, only in &amp;lt;code&amp;gt;proton.mac&amp;lt;/code&amp;gt; change the number of slices:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/protonPB/det/sliceNumber 55 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modify the mesh ====&lt;br /&gt;
&lt;br /&gt;
You can change the size of the mesh (longitudinal and lateral) and the number of voxels by modifying their corresponding lines &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/score/mesh/boxSize 2. 2. 2. cm&lt;br /&gt;
/score/mesh/nBin 30 1 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After modifications in &amp;lt;code&amp;gt;proton.mac&amp;lt;/code&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
After modifying the macro &amp;lt;code&amp;gt;proton.mac&amp;lt;/code&amp;gt; you can run it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPB_build]$ ./protonPB proton.mac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If you modify files in directory ProtonPB_source (for example you change the value of MaxLayer) you need to compile the code.  &lt;br /&gt;
In directory PhotonPB_build do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPB_build]$ make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then run the macro &amp;lt;code&amp;gt;proton.mac&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Visualisation ===&lt;br /&gt;
&lt;br /&gt;
If you want to use visualisation, in macro &amp;lt;code&amp;gt;proton.mac&amp;lt;/code&amp;gt; uncomment the line &amp;lt;code&amp;gt;/control/execute visualisation.mac&amp;lt;/code&amp;gt;.  &lt;br /&gt;
This will run macro &amp;lt;code&amp;gt;visualisation.mac&amp;lt;/code&amp;gt; with a specific visualisation setup. &lt;br /&gt;
If you uncomment the lines &amp;lt;code&amp;gt;/score/drawProjection waterMeshlongitudinal doseDeposit&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/score/drawProjection waterMeshlateral doseDeposit&amp;lt;/code&amp;gt; you will draw the dose projections.  &lt;br /&gt;
In this example, we use &amp;lt;code&amp;gt;DAWN&amp;lt;/code&amp;gt; event display.  &lt;br /&gt;
Before running the visualisation look at this [http://geant4.slac.stanford.edu/Presentations/vis/G4DAWNTutorial/G4DAWNTutorial.html DAWN tutorial].&lt;br /&gt;
&lt;br /&gt;
To run the visualisation, first uncomment lines &amp;lt;code&amp;gt;/control/execute visualisation.mac&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/score/drawProjection waterMeshlongitudinal doseDeposit&amp;lt;/code&amp;gt;.  &lt;br /&gt;
Then, run the &amp;lt;code&amp;gt;proton.mac&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPB_build]$ ./protonPB proton.mac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition to the text files the code will create two .prim files, &amp;lt;code&amp;gt;g4_00.prim&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;g4_01.prim&amp;lt;/code&amp;gt;.  &lt;br /&gt;
The first file contains detector geometry and particle interactions.  &lt;br /&gt;
The second file contains dose projections.  &lt;br /&gt;
While running the &amp;lt;code&amp;gt;proton.mac&amp;lt;/code&amp;gt; you will be asked to open g4_00.prim in DAWN.  &lt;br /&gt;
In the opened window press OK.  &lt;br /&gt;
This will create your first visualisation:&lt;br /&gt;
&lt;br /&gt;
[[File:ProtonPB_g4_00_6000e.gif|500px]]&lt;br /&gt;
&lt;br /&gt;
The second file g4_01.prim will not open automatically.  &lt;br /&gt;
It will be created after the running is finished.  &lt;br /&gt;
Open the file in the following way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPB_build]$ dawn g4_01.prim&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the opened window press OK and this will create the image:&lt;br /&gt;
&lt;br /&gt;
[[File:ProtonPB_g4_02_6000e.gif|500px]]&lt;br /&gt;
&lt;br /&gt;
You can modify the .prim files in DAWN.  &lt;br /&gt;
For example, in the DAWN display change the polar and azimuthal angles.  &lt;br /&gt;
1) (polar angle, azimuthal angle) = (0,90) will create this image:&lt;br /&gt;
&lt;br /&gt;
[[File:ProtonPB_g4_01_6000e.gif|500px]]&lt;br /&gt;
&lt;br /&gt;
2) (polar angle, azimuthal angle) = (90,0) will create this image:&lt;br /&gt;
&lt;br /&gt;
[[File:ProtonPB_g4_04_6000e.gif|500px]]&lt;br /&gt;
&lt;br /&gt;
Now, in &amp;lt;code&amp;gt;proton.mac&amp;lt;/code&amp;gt; macro uncomment &amp;lt;code&amp;gt;/score/drawProjection waterMeshlateral doseDeposit&amp;lt;/code&amp;gt; and comment &amp;lt;code&amp;gt;/score/drawProjection waterMeshlongitudinal doseDeposit&amp;lt;/code&amp;gt;.  &lt;br /&gt;
Run &amp;lt;code&amp;gt;proton.mac&amp;lt;/code&amp;gt; with the new settings.  &lt;br /&gt;
The image with the lateral dose projections will look like that:&lt;br /&gt;
&lt;br /&gt;
[[File:ProtonPB_g4_03_6000e.gif|500px]]&lt;br /&gt;
&lt;br /&gt;
== Data from The Clatterbridge Cancer Centre ==&lt;br /&gt;
&lt;br /&gt;
The file [http://www.hep.ucl.ac.uk/pbt/wikiData/data/Clatterbridge/ClatterbridgeBraggPeak.txt &amp;lt;code&amp;gt;ClatterbridgeBraggPeak.txt&amp;lt;/code&amp;gt;] contains Bragg Peak data from the Clatterbridge Cancer Center.  &lt;br /&gt;
The first column represents the values in mm in depth, the second column represents the normalized values of deposited dose and normalized at the peak.  &lt;br /&gt;
You can use script &amp;lt;code&amp;gt;PlotData.C&amp;lt;/code&amp;gt; from folder &amp;lt;code&amp;gt;RootScripts&amp;lt;/code&amp;gt; to plot the data: these are available in the directory http://www.hep.ucl.ac.uk/pbt/wikiData/code/ProtonPB/.  &lt;br /&gt;
Copy files &amp;lt;code&amp;gt;ClatterbridgeData.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PlotData.C&amp;lt;/code&amp;gt; to your current ProtonPB_build directory and run the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPB_build]$ cp /home/username/ProtonPBFolder/ProtonPB_source/RootScripts/PlotData.C .&lt;br /&gt;
&lt;br /&gt;
[username@plus1 ProtonPB_build]$ cp /home/username/ProtonPBFolder/ProtonPB_source/RootScripts/ClatterbridgeData.txt .&lt;br /&gt;
&lt;br /&gt;
[username@plus1 ProtonPB_build]$ root -l &lt;br /&gt;
&lt;br /&gt;
root [1] .x PlotData.C&lt;br /&gt;
&amp;lt;/pre&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This will create &amp;lt;code&amp;gt;ClatterbridgeData.root&amp;lt;/code&amp;gt; file with the following plot:&lt;br /&gt;
&lt;br /&gt;
[[File:ClatterbridgeBraggPeak.png]]&lt;br /&gt;
&lt;br /&gt;
== Comparison between data and simulation ==&lt;br /&gt;
&lt;br /&gt;
The scripts &amp;lt;code&amp;gt;PlotDataAndSim.C&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PlotDataAndSimMesh.C&amp;lt;/code&amp;gt; in folder &amp;lt;code&amp;gt;RootScripts&amp;lt;/code&amp;gt; compare data with simulation. &lt;br /&gt;
You can use script &amp;lt;code&amp;gt;PlotDataAndSim.C&amp;lt;/code&amp;gt; to compare data (&amp;lt;code&amp;gt;ClatterbridgeData.txt&amp;lt;/code&amp;gt;) and simulation (&amp;lt;code&amp;gt;PlotDose.txt&amp;lt;/code&amp;gt;).  &lt;br /&gt;
Both text files must be in the folder where you run the script. &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPB_build]$ cp /home/username/ProtonPBFolder/ProtonPB_source/RootScripts/PlotDataAndSim.C .&lt;br /&gt;
&lt;br /&gt;
[username@plus1 ProtonPB_build]$ root -l &lt;br /&gt;
&lt;br /&gt;
root [1] .x PlotDataAndSim.C&lt;br /&gt;
&amp;lt;/pre&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This will create &amp;lt;code&amp;gt;BraggPeakComparison.root&amp;lt;/code&amp;gt; file with the following plot:&lt;br /&gt;
&lt;br /&gt;
[[File:ProtonPB_DataSimulation.png]]&lt;br /&gt;
&lt;br /&gt;
You can also compare data (ClatterbridgeData.txt) with simulation done with scoring mesh (&amp;lt;code&amp;gt;DoseLongitudinalMesh.txt&amp;lt;/code&amp;gt;).&lt;br /&gt;
This can be done with script &amp;lt;code&amp;gt;PlotDataAndSimMesh.C&amp;lt;/code&amp;gt;.  &lt;br /&gt;
This script works only if before running it you substitute the commas in &amp;lt;code&amp;gt;DoseLongitudinalMesh.txt&amp;lt;/code&amp;gt; with spaces.  &lt;br /&gt;
Remove also the header in the text file.  &lt;br /&gt;
Save the new text file as &amp;lt;code&amp;gt;DoseLongitudinalMesh_Mod.txt&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[username@plus1 ProtonPB_build]$ cp /home/username/ProtonPBFolder/ProtonPB_source/RootScripts/PlotDataAndSimMesh.C .&lt;br /&gt;
&lt;br /&gt;
[username@plus1 ProtonPB_build]$ root -l &lt;br /&gt;
&lt;br /&gt;
root [1] .x PlotDataAndSimMesh.C&lt;br /&gt;
&amp;lt;/pre&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
This creates &amp;lt;code&amp;gt;BraggPeakComparison_Mesh.root&amp;lt;/code&amp;gt; file with the following plot:&lt;br /&gt;
&lt;br /&gt;
[[File:ProtonPB_DataSimulationMesh.png]]&lt;br /&gt;
&lt;br /&gt;
== Files ==&lt;br /&gt;
&lt;br /&gt;
[[Software/Geant4/Tutorials/Basic/Proton Pencil Beam Files|List of files for Mononenergetic Proton Pencil Beam simulation]].&lt;/div&gt;</summary>
		<author><name>JosephBateman</name></author>
	</entry>
</feed>