KAHIBARO
Discord Login Register

46.8. Calculating Attenuation

Understanding Attenuation in Monte Carlo Simulations

This section focuses on how to calculate attenuation from your GATE radiation shielding simulation, and how to connect your Monte Carlo results with the familiar analytical concept of an attenuation coefficient. You will reuse the transmitted and incident photon information obtained in the previous step, then compute and interpret attenuation quantities.

From Transmission to Attenuation

In your shielding project, you already computed the transmission $T$ for a given shield configuration. Transmission is defined as the fraction of incident photons that pass through the shield and reach a detector region.

If $N_\text{inc}$ is the number of photons that would hit the detector without any shield and $N_\text{trans}$ is the number that hit the detector after passing through the shield, then the transmission is
$$
T = \frac{N_\text{trans}}{N_\text{inc}}.
$$

Attenuation describes the reduction of the beam as it passes through matter. For a monoenergetic, narrow beam in a uniform material, the analytical model predicts
$$
T = \frac{I}{I_0} = e^{-\mu x},
$$
where $I$ is the transmitted intensity, $I_0$ is the incident intensity, $x$ is the material thickness, and $\mu$ is the linear attenuation coefficient.

Your Monte Carlo simulation gives you an estimate of $T$. From that, you can extract an effective attenuation coefficient and compare it with expectations.

For a monoenergetic, narrow photon beam in a uniform material:
$$
T = \frac{I}{I_0} = e^{-\mu x} \quad \Rightarrow \quad \mu = -\frac{1}{x} \ln T.
$$
Use $T = N_\text{trans} / N_\text{inc}$ from your simulation.

Computing the Linear Attenuation Coefficient

Once you have $T$ for a known thickness $x$, you can solve for the effective linear attenuation coefficient $\mu_\text{MC}$ implied by your simulation results.

Use
$$
\mu_\text{MC} = -\frac{1}{x} \ln T
= -\frac{1}{x} \ln \left( \frac{N_\text{trans}}{N_\text{inc}} \right).
$$

In practice, you proceed as follows in your analysis code.

First, compute the transmission:

python
T = N_trans / N_inc

Then compute the attenuation coefficient:

python
import numpy as np
mu_MC = -np.log(T) / thickness   # thickness in cm or mm, be consistent with units

Be very careful about units. If you use $x$ in centimeters, then $\mu_\text{MC}$ will be in $\text{cm}^{-1}$. If you use millimeters, then it will be in $\text{mm}^{-1}$.

It is often useful to put these values in a small table when you test several shield thicknesses:

Thickness $x$$N_\text{inc}$$N_\text{trans}$$T$$\mu_\text{MC}$
1 cm10000004000000.400.916 $\text{cm}^{-1}$
2 cm10000001600000.160.916 $\text{cm}^{-1}$

If your simulation follows the exponential law well, the derived $\mu_\text{MC}$ should be approximately the same for every thickness, within statistical uncertainty.

Using Multiple Thicknesses to Estimate $\mu$

Instead of computing $\mu_\text{MC}$ separately for each thickness, you can fit the exponential relationship across multiple shield thicknesses. This reduces statistical fluctuations and gives a more robust estimate.

Start from
$$
T(x) = e^{-\mu x}.
$$

Take the natural logarithm:
$$
\ln T(x) = -\mu x.
$$

This is a straight line in $x$ with slope $-\mu$ and intercept 0. Using several thickness values $x_i$ and corresponding transmissions $T_i$, you can perform a linear fit of $\ln T_i$ versus $x_i$.

Conceptually, you perform these steps:

  1. For each thickness $x_i$, run a simulation and compute $T_i = N_{\text{trans},i} / N_{\text{inc},i}$.
  2. Compute $y_i = \ln T_i$.
  3. Fit a straight line $y_i = a + b x_i$.
  4. Then $b \approx -\mu_\text{fit}$ and $a$ should be close to zero.

In Python, you might write:

python
import numpy as np
x = np.array([th1, th2, th3])          # thickness values
T = np.array([T1, T2, T3])            # transmission values
y = np.log(T)
# Linear fit: y = a + b x
a, b = np.polyfit(x, y, 1)
mu_fit = -b

This approach makes your estimate of $\mu$ less sensitive to statistical noise in any single simulation.

Linear vs Mass Attenuation Coefficients

The linear attenuation coefficient $\mu$ depends on both the material and its density. It is often useful to work with the mass attenuation coefficient, which removes explicit density dependence and has units of $\text{cm}^2/\text{g}$.

The mass attenuation coefficient $\mu_\rho$ is defined by
$$
\mu_\rho = \frac{\mu}{\rho},
$$
where $\rho$ is the material density.

If you know the density that you used in your GATE material definition, you can convert your Monte Carlo estimate into a mass attenuation coefficient:
$$
\mu_{\rho,\text{MC}} = \frac{\mu_\text{MC}}{\rho}.
$$

For example, if you simulated lead with $\rho = 11.34 \text{ g/cm}^3$ and obtained $\mu_\text{MC} = 1.0 \text{ cm}^{-1}$ at a given gamma energy, then
$$
\mu_{\rho,\text{MC}} = \frac{1.0}{11.34} \approx 0.088 \ \text{cm}^2/\text{g}.
$$

This can be compared directly with tabulated values from data libraries. A small difference is expected due to statistical noise and possibly small differences in physics models, but large discrepancies usually point to issues in the simulation configuration.

Conversion between linear and mass attenuation coefficients:
$$
\mu_\rho = \frac{\mu}{\rho}, \quad \mu = \mu_\rho \rho.
$$
Use consistent units, typically $\mu$ in $\text{cm}^{-1}$ and $\rho$ in $\text{g/cm}^3$.

Interpreting Attenuation Results Physically

Once you have computed $\mu_\text{MC}$ or $\mu_{\rho,\text{MC}}$, you can interpret what your shielding simulation is telling you about the material.

A larger attenuation coefficient means stronger attenuation. For a fixed thickness $x$, higher $\mu$ leads to smaller $T$ and therefore fewer transmitted photons. For two materials with similar thickness, the one with larger $\mu$ is the more effective shield for that photon energy.

Remember that attenuation is strongly energy dependent. At lower gamma energies, photoelectric absorption dominates in high atomic number materials, which leads to large attenuation coefficients. At higher energies, Compton scattering becomes more important and attenuation coefficients usually decrease.

In a Monte Carlo context, there are some important subtleties when interpreting attenuation:

  1. Scattering into the detector: If your detector still counts photons that scatter in the shield and then reach the detector, your measured $T$ may be larger than what a pure narrow-beam exponential model predicts. For a strict comparison with the exponential law, you typically want to count only unscattered or primary photons. In GATE, this can be done by filtering on the particle history or specific process information in your scoring.
  2. Finite beam size or broad beam geometry: If the beam or detector is wide, scattered photons that deviate from the original direction might still reach the detector. This broad beam geometry leads to an effective attenuation that appears smaller than the narrow-beam coefficient.
  3. Detector response: If your detector has an energy window, some scattered photons may deposit too little energy to be counted. This makes the effective attenuation closer to narrow-beam behavior, but now depends on detector configuration, not just the material.

By carefully defining which photons you count in $N_\text{inc}$ and $N_\text{trans}$, you can control how close your Monte Carlo estimate is to the theoretical exponential model and what physical scenario you are matching.

Practical Steps in Your Shielding Project

In the context of your radiation shielding example, a typical workflow for calculating attenuation looks like this:

  1. Choose a shield material and a set of thicknesses, for example 0 cm, 1 cm, 2 cm, and 3 cm.
  2. For each thickness, run a GATE simulation with the same source configuration and same detector geometry. Ensure that you record the number of photons that hit the detector region with and without the shield.
  3. From the no-shield simulation, determine $N_\text{inc}$, the number of incident photons. You can also use the total number of emitted particles if your geometry is simple and all particles would hit the detector without a shield.
  4. For each shield thickness, count $N_\text{trans}$, the number of photons that reach the detector after passing through the shield.
  5. Compute $T$ and then either $\mu_\text{MC}$ directly for each thickness with
    $$
    \mu_\text{MC} = -\frac{1}{x} \ln \left( \frac{N_\text{trans}}{N_\text{inc}} \right)
    $$
    or perform a fit over several $(x, T)$ pairs to estimate $\mu$.
  6. If desired, convert to a mass attenuation coefficient using the known density of the material.
  7. Organize your results in a small table or plot of $\ln T$ versus $x$. A straight line indicates that your simulation follows exponential attenuation well in the chosen setup.

This prepares you for the next step, where you explicitly compare your GATE-based attenuation results with the analytical exponential attenuation law and external reference data, in order to validate both your simulation and your understanding of shielding physics.

Views: 11

Comments

Please login to add a comment.

Don't have an account? Register now!