45.2. Creating the World
Table of Contents
Understanding the Role of the World
In any GATE simulation, the world is the outermost volume that contains everything else. All detectors, sources, phantoms, and shielding volumes must be placed inside this world. For the gamma ray detector example, creating a sensible world is the first concrete geometry step. It sets the simulation scale and the material environment around your detector, which in turn influences scattering, attenuation, and the performance of your model.
GATE uses the world as the root of the geometry tree. Every new volume you create later will have a parent volume, and at the top of that hierarchy is always the world. If the world is too small, particles or detector components may be placed outside it, which leads to geometry errors or lost particles. If it is extremely large, the simulation may waste resources transporting particles through regions that do not matter. The aim is to choose a size and material that are realistic for the problem but still practical to simulate.
Choosing World Dimensions
For a single scintillation detector exposed to gamma rays, you typically do not need a huge environment. The detector itself is usually just a few centimeters in size, and the source will be placed nearby. The world must be large enough that gamma rays which escape the detector do not immediately hit the world boundary. If a particle reaches the world boundary, it leaves the simulation and no further interactions are tracked. This can artificially reduce scatter if the world is too small.
A common strategy is to choose world dimensions several times larger than the largest distance from the source to the detector or any shielding. For example, if your detector plus source arrangement fits comfortably within 20 cm, a cubic world with side length 1 m is often sufficient for a beginner example. This gives room for scattered photons and any later additions, such as extra shielding or support structures.
In OpenGATE with Python, the world dimensions are usually specified as a three component vector, for example:
$$
\text{world\_size} = (L_x, L_y, L_z)
$$
Each component is a length in GATE units, for example millimeters. If you choose a 1 m cube, you can express this as 1000 mm along each axis.
For this example, a practical rule is:
World side length $\geq 5$ times the largest linear size of your detector and source arrangement.
This rule is not exact physics, but it keeps your first simulations safe from trivial geometry problems.
Selecting the World Material
The world material defines what fills all space that is not occupied by any other volume. For a bench top gamma ray detector, the surrounding environment is usually air. Using air as the world material is realistic and also has a low density, so most photons either reach the detector or escape without excessive attenuation.
In GATE, standard materials such as air, water, and vacuum come from the Geant4 material database. When you define the world, you specify a material name that matches one of these predefined materials. Typical choices for gamma ray detector simulations are:
| World material | Typical use case |
|---|---|
| Air | Laboratory or room environment |
| Vacuum | Idealized tests, remove external scattering |
| Water | Homogeneous medium, often for dosimetry studies |
For the gamma ray detector example, air is the natural choice because real detectors are usually used in air filled rooms. This allows you to include realistic air scatter if you extend the example later with more complex setups. If your aim is to focus only on intrinsic detector response without any external scatter, you might consider vacuum, but that is less typical for an introductory detector example.
Use a realistic world material for the physical situation you want to model. For a laboratory gamma detector example, air is usually the correct choice.
Defining the World in the Simulation
In OpenGATE with Python, you do not create the world as a normal volume like other objects. The simulation object provides a predefined world that you can configure. Once you have created the simulation object, you can modify the world size and material through its attributes. Conceptually the steps are:
- Access the world volume from the simulation.
- Set the world size along $x$, $y$, and $z$.
- Set the world material name.
Although the detailed Python syntax is covered in earlier chapters, for this example you should think in terms of a clear design. Decide on specific numerical values before writing code. For instance, you might set:
A cubic world with side length $L = 1\ \text{m}$, expressed as $1000\ \text{mm}$ in each direction.
World material: standard air from the Geant4 material database.
Once this is conceptually fixed, you can consistently place the detector and source inside the world so that there is enough free space around them. The world is usually centered at the origin of the coordinate system, so coordinates $(0, 0, 0)$ correspond to the center of the world. You will place the detector and the source positions relative to this origin in later sections of the example.
Practical Considerations for the Gamma Detector Example
For the gamma detector project, you are primarily interested in the spectrum produced by the scintillation crystal. That spectrum depends on the interactions inside the detector material, but it can also be influenced by scattered photons from the surrounding medium. A simple world with air is sufficient to capture the basic behavior, without introducing complicated structures.
At this early stage, avoid making the world too small. If you later add shielding or support structures that are close to the edges, you may need to adjust the world size and rerun the simulation. It is better to start with a reasonably large world and then refine if needed.
Finally, remember that every other volume in the simulation must have the world as its top-level ancestor. Once the world is defined, you are ready to add the detector volume inside it and then configure the gamma source that will irradiate the detector.
Views: 10
KAHIBARO