Monoenergetic photon pencil beam

From UCL HEP PBT Wiki

Jump to: navigation, search
m
Line 60: Line 60:
The macro produces a root file with 1D histogram showing the energy deposition in  
The macro produces a root file with 1D histogram showing the energy deposition in  
-
the water box along the beam line. It also produces a text file with energy and dose
+
the water box along the beam line. It also produces a text file ""DoseFile.txt"" with  
-
deposited at each slice of the water box. This is an example output with the default settings:
+
energy and dose deposited at each slice of the water box. This is an example output  
-
physics process-emstandard_opt0 and incident gamma energy of 20 MeV.  
+
with the default settings: physics process emstandard_opt0 and incident gamma energy of 20 MeV.  
<pre style="color: #800000; background-color: #dcdcdc">
<pre style="color: #800000; background-color: #dcdcdc">
Line 90: Line 90:
  The run consists of 10000 gamma of 20 MeV through 20 cm  of Water (density: 1 g/cm3 )
  The run consists of 10000 gamma of 20 MeV through 20 cm  of Water (density: 1 g/cm3 )
</pre>
</pre>
 +
 +
This is a 1D histogram showing the energy deposition in water box. The histogram comes
 +
from the Gamma.root files which is created after the simulation. 
[[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 by modifying the macro gamma.mac. The default process is
 +
""emstandard_opt0"" which is used in high energy experiments. Change
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
/photonPB/phys/addPhysics emstandard_opt0
 +
</pre>
 +
 +
to
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
/photonPB/phys/addPhysics emlivermore
 +
</pre>
 +
 +
The process ""emlivermore"" is used for low energy physics.
 +
 +
Now you have to run the code again:
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
./photonPB gamma.mac
 +
</pre>
 +
 +
=== Change the incident particle energy ===
 +
 +
You can change the incident energy by modifying the macro gamma.mac. The default energy is 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">
 +
/gun/energy 20 MeV
 +
</pre>
 +
 +
to for example
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
/gun/energy 10 MeV
 +
</pre>
 +
 +
and run the code:
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
./photonPB gamma.mac
 +
</pre>
 +
 +
Keep in mind that the primary particle generation is done at /PhotonPB/src/PrimaryGeneratorAction.cc
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
fParticleGun  = new G4ParticleGun(1);
 +
G4ParticleDefinition* particle = G4ParticleTable::GetParticleTable()->FindParticle("proton");
 +
fParticleGun->SetParticleDefinition(particle);
 +
fParticleGun->SetParticleEnergy(160*MeV); 
 +
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
 +
   
 +
...
 +
 +
G4double x0 = -0.5*(fDetector->GetAbsorSizeX());
 +
G4double y0 = 0.*cm, z0 = 0.*cm;
 +
 +
...
 +
 +
fParticleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
 +
</pre>
 +
 +
The line
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
fParticleGun  = new G4ParticleGun(1);
 +
</pre>
 +
 +
means that only one particle is generated and incident from coordinates x0,y0,z0. The default number of
 +
events is set to 10000. Therefore 10000 particles are incident to the water box.
 +
 +
 +
=== Change the material of the phantom ===
 +
 +
This experiment 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 the
 +
gamma.macro.
 +
 +
Change
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
/photonPB/det/setMat Water
 +
</pre>
 +
 +
to
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
/photonPB/det/setMat Lead
 +
</pre>
 +
 +
and run the code
 +
 +
<pre style="color: #800000; background-color: #dcdcdc">
 +
./photonPB gamma.mac
 +
</pre>

Revision as of 10:12, 16 July 2014

Personal tools