The emerging field of high-energy atmospheric physics studies how high-energy
particles are produced in thunderstorms, in the form of terrestrial

We first present our theoretical description of the RREA process, which is
based on and incremented over previous published works. This analysis confirmed
that the avalanche is mainly driven by electric fields and the ionisation and
scattering processes determining the minimum energy of electrons that can run away,
which was found to be above

To investigate this point further, we then evaluated the probability to
produce a RREA as a function of the initial electron energy and of the
magnitude of the electric field. We found that the stepping methodology in
the particle simulation has to be set up very carefully in Geant4. For
example, a too-large step size can lead to an avalanche probability reduced
by a factor of 10 or to a 40 % overestimation of the average electron
energy. When properly set up, both Geant4 models show an overall good
agreement (within

In a second simulation set-up, we compared the physical characteristics of the avalanches produced by the four models: avalanche (time and length) scales, convergence time to a self-similar state and energy spectra of photons and electrons. The two Geant4 models and REAM showed good agreement on all parameters we tested. GRRR was also found to be consistent with the other codes, except for the electron energy spectra. That is probably because GRRR does not include straggling for the radiative and ionisation energy losses; hence, implementing these two processes is of primary importance to produce accurate RREA spectra. Including precise modelling of the interactions of particles below 10 keV (e.g. by taking into account molecular binding energy of secondary electrons for impact ionisation) also produced only small differences in the recorded spectra.

In 1925, Charles T. R. Wilson proposed that thunderstorms could emit a
“measurable amount of extremely penetrating radiation of

Observationally different types of high-energy emissions have been identified
coming from thunderclouds, naturally categorised by duration.
Microsecond-long bursts of photons, which were first observed from space

Seconds to minutes or even hours long

TGFs were predicted to create a neutron emission on the millisecond duration,
with associated isotope production

Following the idea of

The difference in duration between TGFs and

For fields significantly below the thermal runaway critical electric field

As a note, one can find in the literature that

In the energy regime of a kilo-electronvolt (keV) to a hundred
mega-electronvolts (MeV), the evolution of electrons is mostly driven by
electron impact ionisation

In the case of electric fields above the RREA threshold
(

For illustrative purposes, we now consider the one-dimensional deterministic
case, which results in an analytical solution of the electron energy
spectrum. We make the system deterministic by assuming that the differential
cross-section is a delta function at

Consider a population of electrons in one dimension with space coordinate

In reality, there are important differences compared to the one-dimensional
deterministic case described previously, which we propose to discuss
qualitatively for understanding the Monte Carlo simulations evaluated in this
study. During collisions, electrons deviate from the path parallel to

The effects discussed above prevent a straightforward analytical derivation
of the RREA characteristics in three dimensions, but what remains is the
important notion that the physics is completely driven by the intermediate
energy electron production. “Intermediate” means they are far above
ionisation threshold (

Apart from analytical calculations, the physics behind TGFs, TGF afterglows
and

Both simplifications can be implemented in different ways, leading to
different efficiencies and accuracies.

As we indicated in Sect.

In the context of high-energy atmospheric physics, the computer codes that
were used are either general purpose codes developed by large collaborations
or custom-made codes programmed by smaller groups or individuals. Examples of
general purpose codes that were used are Geant4

In Sect.

The test set-ups of the two types of simulations (RREA probability and RREA characteristics) are described in the Supplement, together with the data we generated and figures in the Supplement comparing several characteristics of the showers. The Geant4 source codes used in this study are also provided (see Sects. 6 and 7).

The data we discuss in the next sections were produced by the general purpose code Geant4 (with several set-ups) and two custom-made codes – GRRR and Runaway Electron Avalanche Model (REAM) – which we describe below. However, we do not describe comprehensively all the processes, models or cross-sections used by the different codes, but provide, in Sect. S13 in the Supplement, a table mentioning all implemented processes and models, including all references.

Geant4 is a software toolkit developed by the European Organization for
Nuclear Research (CERN) and a worldwide collaboration

By default, Geant4 follows all primary particles down to zero energy. A
primary particle is defined as a particle with more energy than a threshold
energy

The GRRR is a time-oriented code for
the simulation of energetic electrons propagating in air and can handle
self-consistent electric fields. It is described in detail in the Supplement
of

REAM is a three-dimensional Monte Carlo
simulation of the relativistic runaway electron avalanche (also referred to as
runaway breakdown), including electric and magnetic fields

In the scope of this study, it is important to point out that REAM limits the time step size of the particles so that the energy change within one time step cannot be more than 10 %. The effect of reducing this factor down to 1 % was tested and did not make any noticeable difference in the resulting spectra. The comparative curves are presented in Sect. S10 in the Supplement.

In Monte Carlo simulations, particles propagate in steps, collide and
interact with surrounding media by means of cross-sections (and their
derivatives). A step is defined by the displacement of a particle between two
collisions. As it is presented in Sects.

During steps, charged particles can lose energy (and momentum) by collisions
and also change in energy (and momentum) when an electric fields is present.
To guarantee accuracy, energies should be updated frequently enough. An
accurate method would be to exponentially sample step lengths with

Using these probabilities along a given step length or duration, there is a chance that no interactions happen, but the energy of the particle is guaranteed to be updated correctly.

In the Geant4 documentation, the stepping method presented in the previous
section is referred to as the “the integral approach to particle transport”.
This method is set up by default in Geant4 for impact ionisation and
bremsstrahlung. However, the way it is implemented does not exactly follow
what was described in the previous section. The description of the exact
implementation is out of the scope of this article but is presented in
detail in

The first method is to tweak the value of the

The second method is to implement a step limiter process (or maximum
acceptable step). By default, this max step (

As a first comparison test, we estimated the probability for an electron to
accelerate into the runaway regime and produce a RREA, given its initial
energy

Relativistic avalanches probabilities calculated from Geant4
simulations for a specific point

As a test case, we calculated the probability to produce RREAs as a function
of

As explained in Sect.

In Fig.

The most important difference between Geant4 and GRRR is present for energies

For low electron energy (

The RREA probability data for REAM are also displayed in Fig. 2a as the red curves. The three REAM level curves show significantly higher noise than the Geant4 data, mainly because the latter used 1000 electron seeds, whereas the former used only 100. The algorithms used to calculate the level curves were also found to impact the noise level. Nevertheless, the noise level is low enough to be able to evaluate the consistency between the codes. REAM shows a consistency with Geant4 (O1 and O4) within less than 12 % in the full parameter range and less than 5 % in some part of it. The most apparent deviations between REAM and Geant4 O1/O4 can be noticed for a seed electron energy range between 50 and 300 keV, for the 50 % and 90 % level curves, where there is a systematic, statistically significant difference in the probability for REAM compared to Geant4 (REAM requiring about a 10 % larger electric field or primary electron energy to reach the 90 % or 50 % contour levels). However, we do not expect such a small difference to significantly affect the characteristics of the RREA showers, such as the multiplication factors or the mean energies of the RREA electrons. To test this quantitatively, a detailed comparison of the most important characteristics of the RREA showers obtained with the four models is presented in the following section.

In Fig.

We compared the output of the four models over 12 different electric field
magnitudes from

Figures

The best fit values of the two models to the simulation data are given in
Table

By “combining”, we mean that the four values are averaged and the rule

In addition, both values are also consistent with each other, leading to the final
value of

Values of the parameters of the fits (with 95 % confidence
intervals) for the simulations' data for avalanche scale in space and time,
using the models described by Eqs. (

The photon and electron energy spectra of a RREA is known to converge in time to a self-similar solution,
where its shape is not evolving anymore, even if the number of particles
continues growing exponentially. It may also be referred to as the
“self-sustained state” or the “steady state” in the literature. At least
five avalanche lengths (or avalanche times) are required to be able to assert
that this state is reached. We propose to estimate this time by looking at
the mean electron energy evolution as a function of time. Notice that, as
already mentioned in the beginning of Sect.

In Fig.

The Supplement (Sect. S6) presents all the comparison spectra we obtained for
photons, electrons and positrons for the electric field between 0.60 and
3.0 MV m

After the RREA electron spectra have reached self-similar state (which requires
at least five avalanche lengths or times), we recorded the energy spectrum in a
plane at a given distance (which is different for each electric field). Then,
we fitted it with an exponential spectrum model

Mean electron energies at self-similar state (for distance record)
for different electric field magnitudes. The data points are fitted with the
model presented in Sect.

Values of the parameters of the fits (with 95 % confidence intervals)
for the electron mean energies using
Eq. (

In Fig.

Figure

In Fig.

In Fig.

The error bars in the relative differences represent the uncertainty due to the inherent Poisson statistics when evaluating particle counts. The Geant4 O1 and O4 models are consistent for the full energy range, except a small discrepancy below 20 keV, which can be attributed to different physical models, with O4 being more accurate in principle. In this case, it cannot be attributed to recording methods, since they are exactly the same for both Geant4 models. At 10 keV, the two Geant4 spectra are about 80 % larger than REAM. With increasing energy, the discrepancy reduces and reaches 0 % at 100 keV. Above 100 keV, the three models show consistent spectra. There may be some discrepancy above 30 MeV, but it is hard to conclude since the uncertainty interval is relatively large.

As just presented, the main noticeable discrepancy between O1/O4 and REAM is
present below 100 keV. As far as we know, there is no reason to argue that
Geant4 gives a better result than REAM in this range, or vice versa. One way
to find out which model is the most accurate could be to compare these
results with real measurements. Are such measurement possible to obtain? Any
photon that an instrument could detect has to travel in a significant amount
of air before reaching detectors. The average path travelled in the atmosphere
by a 100 keV photon in 12 km altitude air is

In addition to what is presented so far in this article, the following points
should also be mentioned when comparing the results of the codes. The
corresponding plots are available in the Supplement.

The mean parallel (to the

The electron to (bremsstrahlung) photon ratio

The positron spectra have relatively low statistics (on the order of a few hundred particles recorded) and are all quite consistent within the relatively large uncertainties.

In the photon spectra obtained from particle records at fixed times,
REAM seems to show significantly less (at least a factor of 10) photon counts
than the two Geant4 models for most of the electric field magnitudes. For
some fields, it even shows a lack of high-energy photons, with a sharp cut at
about 30 MeV. It seems to point to a problem in the record method,
explaining why we chose not to discuss these spectra in the main article. The
spectra produced by the Geant4 O1 and O4 models for this case are consistent
with one another for all the

We have investigated the results of three Monte Carlo codes able to simulate
RREAs, including the effects of
electric fields up to the classical breakdown field, which is

We first proposed a theoretical description of the RREA process that is
based on and incremented over previous published works. Our analysis confirmed
that the relativistic avalanche is mainly driven by electric fields and the
ionisation and scattering processes determining

Then, we estimated the probability to produce a RREA from a given electron
energy (

The advantage of using more sophisticated cross-sections able to accurately
take into account low-energy particles could be probed by comparing directly
the O1 and O4 models. They showed minor differences that are mainly visible
only for high

In a second part, we produced RREA simulations from the four models and
compared the physical characteristics of the produced showers. The two Geant4
models and REAM showed good agreement on all the parameters we tested. GRRR
also showed overall good agreement with the other codes, except for the
electron energy spectra. That is probably because GRRR does not include
straggling for the radiative and ionisation energy losses, hence implementing
these two processes is of primary importance to produce accurate RREA
spectra. By comparing O1 and O4, we also pointed out that including precise
modelling of the interactions of particles below

From the experience of this study, we give the following general
recommendations concerning RREA simulations:

Codes should be checked/tested/benchmarked using standard test set-ups. In the Supplement, we provide a precise description of such tests. In Sect. 7 of this article, we provide links to download the full data set we obtained for the codes we tested (Geant4 with two set-ups, REAM and GRRR), as well as processing scripts. We also provide the source code of the Geant4 codes.

Custom-made codes should be make available to other researchers or at least the results they give for standard tests.

In order to make it possible to compare results from different studies, the methodology used to derive a given quantity should be rigorously chosen and presented clearly somewhere.

Extending the recommendations of

Concerning the usage of Geant4 for simulating RREA:

Default settings are not able to simulate RREA accurately. To get accurate RREA results,
one of the following tweaks is possible:

Changing the

Setting up a step limitation process (or a maximum acceptable step) to 1 mm or less will significantly increase the required computation time.

Using the single (Coulomb) scattering model instead of multiple scattering
(the two previous tweaks relying on the multiple scattering algorithm)
will substantially increase the necessary computation time. This is because
multiple scattering algorithms were invented to make the simulation run
faster by permitting to use substantially larger (usually

In the “Code and data availability” section, we provide a link to Geant4 example source codes implementing these three methods.

Compared to using the default Møller/Bhabha scattering models for ionisation, the usage of more accurate cross-sections, e.g. taking into account the electrons' molecular binding energies (as done for the Livermore or Penelope models), only leads to minor differences.

The full simulation output data of the four
models are available through
the following link:

The scripts used to process these data to make the figures of the Supplement
are available in the following repository:

The full GRRR source code is available in the following repository:

The Geant4 source code for the RREA probability simulations is available in
the following repository:

The Geant4 source code for the RREA characterisation simulations is available
in the following repository:

Table

On the other hand, if

Computation time needed by different Geant4 configurations for the
simulation of the same physical problem, relative to the Geant4 O1

The supplement related to this article is available online at:

DS, CR and GD designed the tests. DS, CR and GD wrote most of the manuscript. DS, GD and CR conducted the data analysis and made the figures and tables. DS carried out the Geant4 simulations and provided the data. AL carried out the GRRR simulations and provided the data. JRD and KMAI carried out the REAM simulations and provided the data. NO, KMAI, JRD, UE, ABS and ISF provided important feedback on and review of the text.

The authors declare that they have no conflict of interest.

This work was supported by the European Research Council under the European Union's Seventh Framework Programme (FP7/2007–2013)/ERC grant agreement no. 320839 and the Research Council of Norway under contracts 208028/F50 and 223252/F50 (CoE). For part of the results of this work, it was necessary to use the Fram computer cluster of the UNINETT Sigma2 AS, under project no. NN9526K.

Gabriel Diniz is supported by the Brazilian agency CAPES. Casper Rutjes acknowledges funding by FOM project no. 12PR3041, which also supported Gabriel Diniz's 12-month stay in the Netherlands. Ivan S. Ferreira thanks CNPqs grant PDE(234529/2014-08) and also FAPDF grant no. 0193.000868/2015, 03/2015.

This material is based in part upon work supported by the Air Force Office of Scientific Research under award no. FA9550-16-1-0396. The authors would like to thank the two referees, Ashot Chilingarian and an anonymous referee, for their valuable comments and suggestions that helped to improve the quality of this work. Edited by: Josef Koller Reviewed by: Ashot Chilingarian and one anonymous referee