The Cosmic Rays Simulation
One of the components of the CELESTE project uses computer simulations to study what happens when energetic cosmic particles, coming from space, reach the Earth's atmosphere.
What are these particles?
There are protons, electrons, and atomic nuclei traveling through the universe at speeds close to the speed of light, carrying energy far greater than what we can produce in terrestrial accelerators like the LHC. When these particles reach the top of our atmosphere, they trigger a cascade of complex reactions, creating atmospheric showers of secondary particles produced after the initial contact. The CELESTE simulation aims to digitally reproduce this process, allowing students to study it in detail at a professional level.
How is the simulation built?
The simulation is built from code files (programming instructions) written primarily in Python, a programming language. To accurately simulate how particles interact with matter (in this case, the Earth's atmosphere and surface), we use a powerful toolkit called GEANT4, which functions as a highly specialized "library of physical phenomena." This toolkit is used worldwide by physicists in the professional field to simulate the passage of particles through different materials with applications in high-energy physics, nuclear physics, accelerators, and other areas.
One of the crucial aspects of the simulation is the validation of a model of the Earth's atmosphere. For this, the CELESTE project has already developed different versions with varying levels of complexity, for example:
- Single Layer Version: a basic model with atmospheric density and the same composition as at sea level, ideal for initial testing and understanding fundamental concepts.
- Complex Layer Version (approximately 42): the model divides the atmosphere into dozens of layers with different densities and the same composition, according to the reference, allowing the simulation of the passage of the primary particle with a more realistic model of the Earth's atmosphere.
- Dynamic Atmospheric Version (under development): How does the addition of clouds and atmospheric pollutants influence the formation of the atmospheric shower and the arrival of secondary particles at the surface? With this in mind, we will make modifications to the simulation that address these aspects.
The model of the atmosphere and the Earth's surface was made possible using GDML (Geometry Description Markup Language And Its Application), known as a format for describing detector geometries. It allows the addition of atmospheric layers necessary for our study, since it is known that the primary particle will lose energy along its trajectory and interact with atmospheric components (composed of oxygen, nitrogen, argon, and others in smaller proportions), so that the atmospheric shower forms, leaving traces of the primary particle (muon, for example).
The GDML file has the following main structure:
- Definitions: defines physical constants (e.g., eV), quantities, expressions, positions, and global rotations that will be used as a reference throughout the file;
- Materials: definition of materials, isotopes, and elements with their atomic compositions, densities, and fractions.
- Solids: definition of solid blocks (e.g., parallelepipeds and cubes). In the simulation, we define the solids "WorldBox," "atmosphere," and "earth."
- Structure: definition of the geometry hierarchy of a set of volumes. For volume definition, we take the previously defined materials and solids as a reference.
- Setup: configuration of the geometry, taking a reference solid as the top volume, or world.
How do students participate?
The project's operation is entirely remote and collaborative. Students access the computer where the simulation is originally hosted using the SSH protocol—a secure connection that allows remote control of a computer over the internet. The source code is fully managed and stored on an online platform called GitLab, which functions as a "shared drive," allowing multiple people to work on the same project without losing control of code versions. It is also thanks to this platform that each student can have their own "branch," a local branch that allows for parameter changes without damaging those originally established.
In this way, we can modify the simulation configuration files to investigate different scenarios, such as:
- Changing the type of incident particle (protons, electrons, ions, etc.).
- Varying the energy level of the particles to study different phenomena.
This flexibility allows each student or group to customize their experiments according to their research interests and the specific phases of project development.
Currently, we are studying in groups, using a version of the Earth's atmosphere with complex layers, the analysis of output data from different particles and energies. In a trio, each student simulates the code locally and evaluates the outputs, discussing in online meetings what new findings they discovered and what from the simulation could be interesting to use in the project's interactive panel: the Dashboard.
For the interface development stage, we use the Julia language, which stands out for combining high performance, comparable to languages like C and Fortran, with a simple and productive syntax, similar to Python. Together with the Dash library, the development of the dashboard becomes much more practical. The great advantage of this library is that it allows building rich and interactive web interfaces without the need to write HTML, CSS, or JavaScript. The structure of this application is defined by a "layout" that organizes visual components (graphs, tables, sliders, buttons, etc.), and interactivity is controlled through "callbacks," which are Julia functions that respond to user actions, such as selecting an item from a menu, dynamically updating the page content.
The first graphic element is an event carousel, where the user can view various particle shower simulations. Following this, there is a bar graph representing the quantity of particles in the selected event, detailing the shower's composition and showing the abundance of each type of particle generated, such as photons, electrons, muons, and others, chosen from the checklist on the side. Next, we have some line graphs that address fundamental physical characteristics for understanding the phenomenon, such as the relationship between "Density X Altitude," which shows how the atmosphere thins with height, "Velocity X Lorentz Factor," which illustrates relativistic effects in particles near the speed of light (this graph has a point marked according to the Lorentz factor selected in the sidebar), and finally the graph "Lorentz Factor X Extended Lifetime," which explains how the lifetime of unstable particles is extended due to their high speed.
This document aims to document how the cosmic ray simulation process of the CELESTE project is occurring, from the theoretical to the technical and practical aspects of group data analysis, and is constantly updated.