Monoenergetic photon pencil beam

From UCL HEP PBT Wiki

Jump to: navigation, search
m
m
Line 101: Line 101:
</pre>
</pre>
-
You should get this 1D histogram showing the energy deposition in water box:
+
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]]
[[File:/pbt/RadiotherapyWorkbook/skins/common/images/PhotonPB/Edep.png|Energy deposit per event along the beam]]
-
=== Change of physics process ===
+
You can change the physics process, incident photon energy, phantom material, number of slices etc. by
 +
modifying the macro gamma.mac. Use your favorite editor (pico, vi, emacs etc.). For example open the macro with editor pico:
-
You can change the physics process by modifying the macro gamma.mac. The default process is  
+
<pre style="color: #800000; background-color: #dcdcdc">
-
'''emstandard_opt0''' which is used in high energy experiments. Change
+
pico gamma.mac
 +
</pre> 
 +
 
 +
=== Change the physics process ===
 +
 
 +
The default physics process is '''emstandard_opt0''' used in high energy experiments. Change
<pre style="color: #800000; background-color: #dcdcdc">
<pre style="color: #800000; background-color: #dcdcdc">
Line 120: Line 126:
</pre>
</pre>
-
The process '''emlivermore''' is used for low energy physics.
+
The process '''emlivermore''' is used for low energy physics experiments. Now run the code:
-
 
+
-
Now you have to run the code again:
+
<pre style="color: #800000; background-color: #dcdcdc">
<pre style="color: #800000; background-color: #dcdcdc">
Line 130: Line 134:
=== Change the incident particle energy ===
=== Change the incident particle energy ===
-
You can change the incident energy by modifying the macro gamma.mac. The default energy is 20 MeV.
+
The default energy is 20 MeV. This is the energy used in radiotherapy. You can change the value of 20 MeV
-
This energy is used in radiotherapy. You can change its value and check the efect on the energy deposit.
+
-
 
+
-
Change
+
<pre style="color: #800000; background-color: #dcdcdc">
<pre style="color: #800000; background-color: #dcdcdc">
Line 139: Line 140:
</pre>
</pre>
-
to for example  
+
to for example 10 MeV
<pre style="color: #800000; background-color: #dcdcdc">
<pre style="color: #800000; background-color: #dcdcdc">
Line 145: Line 146:
</pre>
</pre>
-
and run the code:
+
and run the macro
<pre style="color: #800000; background-color: #dcdcdc">
<pre style="color: #800000; background-color: #dcdcdc">
Line 176: Line 177:
</pre>
</pre>
-
means that only one particle is generated and incident from a point (x0,y0,z0). The default number of
+
means that only one particle is generated, incident from (x0,y0,z0). The default number of
events is set to 10000. Therefore, 10000 particles are incident to the water box.  
events is set to 10000. Therefore, 10000 particles are incident to the water box.  
-
 
=== Change the material of the phantom ===
=== Change the material of the phantom ===
-
This experiment is to compute the energy deposition of photons in a water box. However,
+
This example is to compute the energy deposition of photons in a water box. However,
-
there is an option to change the box material from water to lead. This can be done in 
+
there is an option to change the box material from water to lead.  
-
gamma.mac.
+
-
Change
+
In gamma.mac change
<pre style="color: #800000; background-color: #dcdcdc">
<pre style="color: #800000; background-color: #dcdcdc">
Line 198: Line 197:
</pre>
</pre>
-
and run the code
+
and run the macro
<pre style="color: #800000; background-color: #dcdcdc">
<pre style="color: #800000; background-color: #dcdcdc">
Line 207: Line 206:
You can change the number of water box slices. The default number is 20. Keep in mind that  
You can change the number of water box slices. The default number is 20. Keep in mind that  
-
if you want to have bigger number of slices you should also modify the DetectorConstruction.hh file in
+
if you want to have more slices you need to modify the file DetectorConstruction.hh in
/PhotonPB_source/include/.
/PhotonPB_source/include/.
-
Change the MaxLayer to your desired value.   
+
In DetectorConstruction.hh change the MaxLayer to your desired value.   
<pre style="color: #800000; background-color: #dcdcdc">
<pre style="color: #800000; background-color: #dcdcdc">
-
const G4int MaxLayer = 20;
+
const G4int MaxLayer = 30;
</pre>
</pre>
-
In gamma.mac you should change the number of slices
+
Then in gamma.mac you need to change the number of slices
<pre style="color: #800000; background-color: #dcdcdc">
<pre style="color: #800000; background-color: #dcdcdc">
-
/photonPB/det/sliceNumber 20
+
/photonPB/det/sliceNumber 30
</pre>
</pre>
-
Since you modified your code (by changing the file DetectorConstruction.hh) you should
+
You modified your code therefore you need to comppile it. In directory PhotonPB_build do
-
compile the code. In your PhotonPB_build directory do
+
<pre style="color: #800000; background-color: #dcdcdc">
<pre style="color: #800000; background-color: #dcdcdc">

Revision as of 13:26, 16 July 2014

Personal tools