46.2. Creating the Source
Table of Contents
Defining the Source for a Shielding Simulation
In a radiation shielding example, the source is the reference against which you compare different materials and thicknesses. Your goal is not to build a realistic clinical imaging system, but to create a simple, controllable beam of photons that passes through a slab and lets you measure transmission and attenuation.
This section focuses on how to set up such a source in GATE, and on the specific choices that make shielding simulations easier to interpret.
Role of the Source in Shielding Studies
For shielding, you generally want a well defined beam:
You want to know the initial photon energy very precisely, so you can compare transmission with the analytical exponential attenuation law.
You want a known and stable particle rate or total number of histories, so that statistical uncertainties are easy to control.
You want a defined direction and beam size, so that almost all photons actually hit the shield and your transmission measurements are efficient.
In practice, this usually means a monoenergetic, collimated gamma source pointing toward a flat slab of material.
Basic Source Configuration in GATE
In an OpenGATE style Python script, you start by creating a generic particle source, then specify particle type, position, direction, energy and activity or number of particles. The exact structure of the script is covered in earlier chapters, so here we focus on the choices that are specific to shielding.
A typical initialization looks like:
source = sim.add_source("gamma_source", "GenericSource")From this point, you assign all the properties that make this a convenient shielding source.
Choosing a Gamma Source for Shielding
Shielding studies almost always use photons. You can pick energies that match common radionuclides or standard test conditions. For example, 662 keV is often used because it corresponds to the main gamma line of Cs 137 and there are many experimental attenuation data sets at this energy.
To create a gamma source:
source.particle = "gamma"In a pure shielding example, you usually do not care about the details of radioactive decay, branching ratios, or emission of multiple gammas per decay. Instead, you represent the source as a simple monoenergetic photon beam, even if experimentally that beam would come from a radionuclide.
If you later want to match a specific radionuclide more realistically, that belongs to the chapter on radioactive sources. For the shielding example, keep the gamma source as simple as possible.
Point Source vs Beam Geometry
There are two common geometric setups for the shielding source.
A point source that emits towards the shield, sometimes with a narrow angular spread.
A parallel or pencil beam that approximates a laboratory beam geometry.
From the perspective of a simple exponential attenuation test, a narrow pencil beam aligned with the detector area behind the shield is the easiest to interpret. It reduces geometric effects and gives a nearly uniform fluence over a small region of interest.
A point source is slightly more realistic for a sealed source in a lab, but then the inverse square law plays a role. If your shield is thick or placed close to the source, the varying source to detector distance across the detector surface can complicate the analysis.
For a first example, a parallel beam is recommended. You can approximate a parallel beam either by placing a small source far away or by using a small box source placed just in front of the shield with a well defined direction.
Placing the Source Relative to the Shield
The shield is usually a slab placed perpendicular to, for example, the z axis. Suppose the shield slab is centered at $z = 0$ and has thickness $d$. Then its front face might be at $z = -d/2$ and its back face at $z = +d/2$.
You can place your source upstream of the front face, for example at $z = -z_{0}$, where $z_{0}$ is large enough to avoid being inside the shield. A simple example is:
source.position.type = "point"
source.position.translation = [0, 0, -10 * cm]The exact distance is not critical as long as the source is clearly outside any volume. A modest distance, such as 10 cm or 20 cm in front of the shield, is typically sufficient.
To approximate a small beam that covers a specific detector area behind the shield, you can instead use a box source with a transverse size similar to the detector and a very small thickness in z, placed just before the shield. For example:
source.position.type = "box"
source.position.size = [2 * cm, 2 * cm, 1 * mm]
source.position.translation = [0, 0, -d/2 - 0.5 * mm]This produces a flat, nearly parallel beam if combined with a fixed direction.
Defining the Source Direction
For a simple, collimated beam that hits the shield normally, you want all photons to travel along the positive z direction:
source.direction.type = "fixed"
source.direction.inline = [0, 0, 1]This gives a beam perpendicular to the shield plane and a straightforward path length through the material equal to the slab thickness.
Avoid isotropic emission for the core shielding example, because it wastefully sends many photons away from the shield, which reduces simulation efficiency and makes transmission calculations more noisy.
If you want to mimic a finite collimator opening, you can use an angular distribution with a small cone around the forward direction, but that is an additional step and not necessary for the basic project.
Choosing the Photon Energy
For attenuation studies, a monoenergetic source is best, because the exponential attenuation law is written for a given photon energy:
$$
I(x) = I_0 \, e^{-\mu(E)x},
$$
where $I(x)$ is the transmitted intensity after thickness $x$, $I_0$ is the incident intensity, and $\mu(E)$ is the linear attenuation coefficient at energy $E$.
In GATE, a monoenergetic gamma source is defined by a single energy value:
source.energy.type = "mono"
source.energy.mono = 662 * keVYou can change this value to test how shielding performance changes with energy. For example, you might repeat your simulation at 122 keV, 511 keV, and 662 keV and later compare the measured effective attenuation coefficients.
For shielding simulations, use a monoenergetic gamma source whenever you want to compare with the exponential attenuation law. Mixing energies in one run complicates the interpretation of the measured transmission.
If you want to test several energies in a single script, the recommended approach is to loop over energies and run separate simulations, each with its own output files and random seed.
Activity, Number of Particles, and Simulation Time
In a shielding example, what matters most is the statistical precision of your transmission estimate. You typically control this by choosing the total number of gamma histories rather than by modeling a realistic activity over a specific time.
There are two equivalent strategies:
Specify a high activity and a total simulation time. GATE then samples a corresponding number of decays.
Specify directly the number of particles or the number of events to simulate.
For a conceptually simple shielding study, it is easier to think in terms of number of primaries. In OpenGATE this is commonly set with:
source.n = 1e6This asks for one million primary gammas. You can adjust the value based on the width of your transmission uncertainty. Since transmission is estimated from the number of photons that pass through the shield, the relative statistical uncertainty scales approximately as $1/\sqrt{N}$, where $N$ is the number of transmitted photons.
If you prefer to connect to activity, you can set:
source.activity = 1 * MBq
sim.timing.total_time = 10 * sGATE will then sample an appropriate number of decays. The resulting number of simulated photons will still determine the precision, and the physical activity value is mainly useful if you want to relate counts to real acquisition times.
Transmission uncertainty decreases approximately as $1/\sqrt{N}$, where $N$ is the number of transmitted photons. To reduce uncertainty by a factor of 2, you must quadruple the number of simulated primary gammas.
Summary of a Practical Shielding Source
Putting all these pieces together, a practical source definition for a first shielding example might look like:
source = sim.add_source("gamma_source", "GenericSource")
source.particle = "gamma"
source.position.type = "point"
source.position.translation = [0, 0, -10 * cm]
source.direction.type = "fixed"
source.direction.inline = [0, 0, 1]
source.energy.type = "mono"
source.energy.mono = 662 * keV
source.n = 1e6This gives you a simple, straight, monoenergetic beam. It is ideal for measuring transmitted photons behind different shielding slabs and, in later sections of the project, comparing your Monte Carlo results with the analytical exponential attenuation law.
Views: 10
KAHIBARO