When a high-energy cosmic ray — usually a proton or a heavier atomic nucleus — slams into the top of the atmosphere at nearly the speed of light, it collides with an air nucleus and shatters into a spray of secondary particles. Each secondary can itself interact or decay, producing more particles, which produce more again — an extensive air shower that can spread over an area of many square kilometres by the time it reaches the ground.
A independent nucleons each carrying E₀/A — this "superposition" makes iron showers develop higher in the atmosphere (shallower Xmax) with less shower-to-shower fluctuation than protons.Ground-based observatories like the Pierre Auger Observatory in Argentina use arrays of water-Cherenkov detectors spread over thousands of square kilometres to sample the particle "footprint" of a shower and reconstruct the energy and likely composition of cosmic rays whose sources are still one of astrophysics' open mysteries.
A primary cosmic ray enters the top of a simulated 20 km atmosphere column and cascades generation by generation into a branching shower of secondary particles that rains down toward a ground detector array.
Using a Heitler-style cascade model, particle count roughly doubles each generation while energy per particle halves, until the critical energy is reached — the point of shower maximum, Xmax, which shifts with primary energy, particle type, and arrival angle.
Raise the primary energy to watch the cascade grow deeper and wider, switch between a proton, an iron nucleus, and a gamma ray to compare how Xmax shifts, tilt the zenith angle, and toggle the muon component to see which secondaries punch through to the ground.
The highest-energy cosmic ray ever recorded, the "Oh-My-God" particle (~3 × 10²⁰ eV), struck the atmosphere with roughly the kinetic energy of a fast-pitched baseball packed into a single subatomic particle.