KAHIBARO
Discord Login Register

Creating the Source

Choosing a Suitable Source Model

In a radiation shielding study you are interested in how a barrier attenuates radiation, not in the full complexity of a real laboratory source. For a first simulation it is usually best to start with a simple, idealized source that is easy to understand, then refine it later if needed.

A typical starting point is a monoenergetic gamma source that emits photons in a well defined direction toward the shield. This allows a clean comparison with analytical attenuation formulas and lets you focus on the shielding behavior itself.

Later, you can extend the source description to include realistic emission spectra, finite source sizes, or angular distributions if your study requires them.

Defining Source Geometry and Position

The source must be placed in the geometry so that its emitted particles encounter the shield in a controlled way. In a basic attenuation setup the arrangement is usually:

Source → Air gap → Shield → Air gap → Detector or scoring region.

In your detector construction class you will already have defined the shield volume and some surrounding world material. The source is not defined as a volume in most basic Geant4 setups, but its position in space is. You choose a point in the coordinate system where particles will start.

For a simple planar shielding test you can imagine the shield centered around the origin, with its normal along the $z$ axis. Then a natural choice is to place the source at some negative $z$ value on that axis, for example at $(0, 0, -d)$, where $d$ is the distance from the shield front face. Using global coordinates, you will use this position when you configure your primary generator, so that every emitted gamma starts at this point and flies toward the shield.

If you later want to model an extended source, such as a radioactive plate or a volume of activity, you will keep the same overall geometry but use a position distribution instead of a single point.

Configuring a Monoenergetic Gamma Source

For beginners the most straightforward way to create a source is to use G4ParticleGun in your PrimaryGeneratorAction class. The gun creates one primary particle per event with properties that you configure in C++.

Inside the constructor of your PrimaryGeneratorAction, you typically create a G4ParticleGun object, choose the gamma particle, set its energy, position, and direction, and keep these defaults for all events.

A typical abstract setup for the shielding example includes:

A particle type set to the gamma definition from the Geant4 particle table.
An energy corresponding to the photon you want to study, for example 662 keV for a typical Cs-137 line, or another test energy of your choice.
A position at a fixed point upstream of the shield, such as $(0, 0, -d)$ in global coordinates.
A direction that points from the source toward the shield, for example along the positive $z$ axis.

With this configuration, every event consists of one gamma ray traveling along the same straight line into the shielding slab. This is ideal when you want to measure transmission and directly compare the transmitted fraction with analytical attenuation laws that use a narrow, parallel beam.

For a monoenergetic collimated beam, always set a fixed particle type, a fixed energy, a fixed position, and a fixed direction. This is essential if you want to compare your simulation to simple analytical attenuation formulas.

If you want to test different energies, two approaches are common. You can recompile after changing the energy in the source code, which keeps the run configuration simple. Or, more flexibly, you can prepare a way to change the energy from a macro command, which avoids recompilation and is useful for scans over several energies.

Choosing an Angular Distribution

The angular distribution of emitted photons strongly affects how they interact with the shield. For a first radiation shielding study there are three common angular setups.

A perfectly collimated beam has all photons moving in exactly the same direction, for instance along the positive $z$ axis. This approximates an ideal narrow beam and is usually the starting point for comparing to analytical exponential attenuation.

A small angular spread models a beam with limited divergence, similar to a real source behind a collimator. You can generate directions within a small cone around the nominal direction. This gives a more realistic beam but still mostly forward going photons.

An isotropic source emits photons equally in all directions. This models an uncollimated radioactive source in open space. In this case, only a fraction of photons will hit the shield. Transmission and dose distribution then depend not only on shield thickness but also on geometry and distance.

Initially, for studying material attenuation coefficients and thickness effects, you usually select a perfectly collimated beam, because it isolates the shielding property and simplifies interpretation. Once you understand the basic behavior, you can introduce isotropic emission if you want to approach realistic laboratory conditions.

For attenuation vs thickness studies, use a collimated beam with a single direction. For realistic source exposure studies, consider an isotropic or partially collimated angular distribution.

Selecting Source Energy and Spectrum

The photon energy is one of the most important parameters in a radiation shielding simulation, because the attenuation length, dominant interaction processes, and scattered radiation all depend on it.

In many teaching or benchmark problems you use monoenergetic photons. Some typical choices are:

Low energy photons, for instance a few hundred keV, where the photoelectric effect contributes significantly, especially in high-Z materials like lead.
Intermediate energies of a few MeV, where Compton scattering dominates in most materials.
Higher energies where pair production begins to play a role in high-Z shields.

In a basic example it is recommended to start with a single photon energy, because it produces a simple exponential attenuation curve for transmission through a uniform shield when the beam is narrow and scattering out of the beam is treated as a loss.

If you need a more realistic source, such as a medical isotope or a bremsstrahlung spectrum, you must define an energy spectrum instead of a single value. This can be done with more advanced source tools that can sample from user defined distributions.

For the initial shielding chapter, monoenergetic photons are sufficient and keep the focus on the shielding behavior rather than the source complexity.

When you analyze shielding, always record or document the photon energy used. Attenuation is strongly energy dependent, and meaningful comparisons require the same energy conditions.

Using GPS for More Complex Sources

If you want to move beyond a simple particle gun without rewriting C++ code every time, the General Particle Source (GPS) can be used to configure the source via macro commands. This is especially convenient for radiation shielding because you may want to scan different energies, source sizes, or angular distributions.

With GPS you can define:

Point, line, surface, or volume sources, which enable you to approximate extended radioactive sources.
Various angular distributions, including isotropic, cone limited, or user defined directional patterns.
Energy distributions, from monoenergetic to Gaussian or tabulated spectra.

In the context of the shielding example, GPS is useful if you want to change the source characteristics from the macro file between runs. For instance, you could run one series with a narrow beam, then another with an isotropic source, without recompiling the application.

Even when you use GPS, the geometric idea is the same. You place the source region upstream of the shield, select how it emits photons, and then evaluate how many photons reach or pass through the shield and with which energies.

For absolute beginners, starting with G4ParticleGun in your own PrimaryGeneratorAction class is typically clearer. Once you are comfortable with that, you can explore GPS to gain flexibility for more realistic shielding scenarios.

Views: 7

Comments

Please login to add a comment.

Don't have an account? Register now!