Progress on the TRIPOLI-4-Geant 4 coupling

The capability to simulate the transport of charged and/or high-energy hadrons (especially protons) is indispensable for a number of applications. This includes, among others, simulation studies concerned with radiation protection and decommissioning around accelerators and high-intensity laser facilities, as well as beam characterisation in spallation neutron sources. In the context of Monte-Carlo particle transport codes, solving these problems often requires the use of advanced variance-reduction techniques. TRIPOLI-4 is a reference Monte-Carlo particle transport code for the simulation of low-energy ( 20 MeV) neutrons and photons and offers a wide range of sophisticated variance-reduction schemes; however, it cannot be applied to the problems mentioned above because it lacks the capability to transport charged, high-energy


Introduction
The TRIPOLI-4 Monte-Carlo particle-transport code [1] is capable of simulating the transport of neutrons, photons, electrons and positrons in matter.The code is accurately validated for neutron energies between thermal and approximately 20 MeV, which is the common upper limit on the availability of evaluated nuclear data.Electron and positron transport, on the other hand, is less reliant on the availability of nuclear data libraries.For this reason, the upper energy limit for TRIPOLI-4's electromagnetic cascade (e + /e − /γ) is of the order of 1 GeV [2], although systematic and extensive validation has been performed only up to about 10 MeV.
For some applications, the validity ranges indicated above are insufficient.For instance, radiation protection and commissioning/decommissioning of accelerator facilities may require the simulation of other particles (e.g.protons, deuterons, heavy ions. . . ) and/or higher energies.This is the case, for instance, of proton accelerators devoted to cancer therapy, which typically employ proton energies of the order of 250 MeV [3].Another example is given by facilities studying particle acceleration by highintensity laser beams.At the time of writing, this promising technique can accelerate particles (mostly protons and electrons) up to energies of the order of 1 GeV on a micrometric length scale, which is orders of magnitude more efficient than any other existing acceleration technique.As far as radiation protection is concerned, particle energies e-mail: davide.mancusi@cea.frbelow about 200 MeV are again often responsible for most of the dosimetry.
Therefore, it appears that a number of applications related to decommissioning and radiation protection require the ability to simulate the transport of electrons, positrons, photons, protons, neutrons and perhaps heavier ions up to some 250 MeV.This list can also be extended to include spallation neutron sources [4] and accelerator-driven systems (ADS) [5], both of which use spallation reactions induced by high-energy hadron beams (mostly protons) to abundantly produce energetic neutrons.The typical beam energies are slightly higher than the above and range from several hundred MeV to a few GeV.Finally, the ability to transport charged particles is also an essential stepping stone towards the simulation of many types of particle detectors, including (but not limited to) those involved in nuclear-reactor-core instrumentation.At present, the TRIPOLI-4 code is unable to meet the requirements specified by these applications.
One of the most noteworthy alternatives on the market of particle-transport codes is Geant4 [6][7][8], which was originally developed as a toolkit for the simulation of the response of LHC detectors and has been constantly extending its application field towards lower particle energies.An attractive aspect of Geant4 is that it offers a wide choice of physics models for the simulation of particlematter interactions.Nowadays Geant4 is able to simulate transport of a very large number of particle types.It also includes a module for neutron transport using low-energy evaluated nuclear data libraries.
However, although a few variance-reduction schemes have recently been added to Geant4 [8], the toolkit remains mostly focused on analogue transport, which is an inefficient way of estimating e.g. the response of a heavily shielded detector or dosimeter.A large number of histories must be generated in order to obtain an accurate estimate of the desired response.TRIPOLI-4, on the other hand, offers a wide, well-established array of sophisticated variance-reduction solutions for neutron and photon transport that help mitigate this problem.Nevertheless, if one wishes to use TRIPOLI-4 and apply these techniques to the simulation of a Geant4 particle-detector model, one first needs to remodel the detector using TRIPOLI-4, which is inconvenient and error-prone.
In this work, we explore the possibility to couple TRIPOLI-4 to Geant4 in order to treat applications related to radiation protection, decommissioning around accelerators and high-intensity lasers, and spallation neutron sources.This coupled solution essentially allows users to benefit from "the best of both worlds".We briefly describe the implementation of the TRIPOLI-4/Geant4 coupling in Sec. 2. Section 3 presents the first verification results for coupled codes and serves as an illustration of the possible applications.Finally, Sec. 4 lays out the developments which are envisioned to upgrade the coupled code to production and collects our conclusions.

Description of the coupling
Geant4 is not a monolithic transport code, but rather a toolkit, i.e. a set of C++ shared libraries.Users are required to write their own C++ code to describe the problem geometry, the sources, the scores they are interested in, etc. From the developer's point of view, this situation is very practical.The toolkit approach offers a very large number of entry points for further development.This is an essential quality for the coupling because it frees developers from the history-loop straitjacket (source-transportscore-repeat).
The strategy of our development is to extend TRIPOLI-4 and provide new capabilities to TRIPOLI-4 users in a transparent way.For particles which are outside the native scope of TRIPOLI-4, the coupling should delegate the simulation task to Geant4.On the other hand, particles that are produced during the Geant4 transport phase but that can be handled by TRIPOLI-4 should be handed back to the latter.
In the framework of the standard Geant4 transport, one has the possibility to define hooks (actions in the Geant4 parlance), i.e. code snippets that are executed at specific stages of the transport simulation (e.g.before/after the loop, before/after each history, after each event, etc.).The TRIPOLI-4/Geant4 coupling relies heavily on actions for shuffling information back and forth between the two codes.One could say that the actions are actually the backbone of the coupling.
Additionally, the coupling requires carefully synchronised initialisation stages on both sides.This is because there are intra-code module dependencies (e.g.Geant4 primary generator actions must be instantiated after physics lists), as well as inter-code dependencies (e.g.we cannot set the Geant4 pseudo-random-number generator until we are finished with parsing the TRIPOLI-4 input file).In the following, we illustrate a few chosen technical aspects of the coupling.

Pseudo-random number generation
For the sake of reproducibility, it is important that Geant4 and TRIPOLI-4 share a common pseudo-randomnumber generator (PRNG).Both codes offer an abstract PRNG interface; we chose to write an adapter class that wraps TRIPOLI-4's PRNG within the Geant4 API.The reason for this is that the user directly interacts with TRIPOLI-4 through its input file, where they can modify the TRIPOLI-4 PRNG settings.

Geometry
In Geant4, the calculation geometry is typically described by a C++ class with a specific interface.The methods of this class define the volumes and materials used for transport.The source code for the class, along with the rest of the code describing the specific simulation problem the user is interested in (sources, scores, etc.), is compiled and linked with the Geant4 library.
In the context of the coupling, TRIPOLI-4 is able to read and interrogate a Geant4 geometry in the form of a compiled shared library.We have developed a small tool1 to automate compilation and wrapping of the Geant4 geometry classes.Geometries parametrised by UI commands are also supported.Parallel geometries are currently not supported.

Sources (primary generator actions)
Particle sources (called primary generator actions in Geant4) can also be imported in a TRIPOLI-4/Geant4 simulation.Just like in the case of geometries, the source files describing the source are compiled into a shared library and imported by TRIPOLI-4.As for geometries, UI-parametrised Geant4 sources are supported.

Physics list
A Geant4 physics list is an organised collection of models that specifies which particles are to be transported and how transport should be simulated, as a function of particle type and energy.Although physics lists are outside the scope of the TRIPOLI-4/Geant4 coupling, they still play an important role for the user because they essentially determine the accuracy of the Geant4 transport.
The Geant4 user is in principle free to construct their own physics list from scratch.However, for the moment, the TRIPOLI-4/Geant4 coupling only supports the choice of one of the "stock" Geant4 physics lists, the default being FTFP_INCLXX.

Physics
In its most basic use, the TRIPOLI-4/Geant4 coupling can perform particle transport with TRIPOLI-4 in a Geant4 geometry.In this case, only the Geant4 geometry package is involved.However, it is also possible to activate physicscoupling mode.In this mode, Geant4 will transport all particles that are not within the scope of TRIPOLI-4.This includes protons and heavy ions, but also neutrons, photons, electrons and positrons above and below the TRIPOLI-4 energy range.When Geant4 produces particles within the TRIPOLI-4 range, it hands them over to TRIPOLI-4 for further transport.

Scores
Users of the TRIPOLI-4/Geant4 coupling are not be expected to define separate scores for particles treated on either side of the coupling.Instead, they define scores in a normal TRIPOLI-4 input file, and the coupling ensures that TRIPOLI-4 scores are correctly and seamlessly fed from particles from either code.
Yet, it is impossible to feed some score types from the Geant4 side; this is the case, for instance, of point fluxes, which requires knowledge of the double-differential cross section for particle scattering, which is sometimes unavailable.In other cases, it is technically possible to feed the score, but care must be exercised.Consider energy deposition, for instance.Particles that are currently not transported by TRIPOLI-4 (such as nuclei) are assumed to locally depose their kinetic energy.If transport is enabled for these particles via the Geant4 coupling, their contribution must be properly subtracted from the local energy deposition, in order to avoid double counting.

Verification
We now turn to the verification of TRIPOLI-4/Geant4.A rather direct way to verify the coupling is to perform a coupled calculation with a minimal energy range for TRIPOLI-4 and compare the results with a pure Geant4 calculation.If low-energy particles never lead to the production of higher-energy particles, then the two calculation results are expected to be equal (up to statistical fluctuations) above TRIPOLI-4's high cutoff.This "trick" puts rather strict constraints on much of the coupling: for instance, one is led to conclude that scores must be correctly fed if the test passes.We have performed a number of checks using this approach and perfect statistical agreement was found in all cases.
As usual, it is useful to compare the results of the coupled code to some reference calculation code, which can be taken to be MCNP6 [9] or Geant4 itself.However, this is not necessarily a stringent test, because the physics implemented in different transport codes may be different.It is difficult to prove that any observed difference in the final result arises exclusively from the physics and are not due to some bug in the coupling.This is especially pertinent for calculations involving nuclear reactions without evaluated nuclear data.In this case, nuclear-reaction models must be employed to generate the final state of the reaction.The uncertainties here are much larger than for evaluated nuclear data; a factor of two between calculations performed with two different models is not uncommon.

Test case 1: APOLLON laser enclosure
Our first test case is a containment enclosure for the APOLLON laser facility [10].APOLLON is a highintensity laser (10 PW) which belongs to the Interdisciplinary Center on EXtreme Light (CILEX), located in Saclay, France. Figure 1 shows two views of the geometry.The point-wise mixed proton/electron source is placed at the centre, in the place indicated by the cross on the 2D view.The materials involved are aluminium alloys, with the exception of a glass parabola (the red region in the 2D view).The geometry was recreated by hand in Geant4 based on the original MCNPX input file.Note that the Geant4 geometry was used for all the TRIPOLI-4 calculations.
The energy distributions of the source particles (protons and electrons) are most intense at low energy, with a long exponential tail that extends up to about 1 GeV.Both distributions are sharply anisotropic.As far as radiation protection outside the enclosure is concerned, low-energy protons and electrons are unimportant, because they are usually stopped without any secondary production.On the other hand, high-energy protons and electrons can yield large dose contributions, but are suppressed by the shape of the source spectrum.This argument suggests that the largest dose contributions come from intermediate energies; quantitative calculations show that energies up to ∼ 250 MeV are responsible for most of the dosimetry.These energies are clearly outside TRIPOLI-4's native applicability range, at least as far as neutrons are concerned; therefore, the APOLLON enclosure is a good test case for the TRIPOLI-4/Geant4 coupling.For this paper, we only present calculations of neutron fluxes leaving the enclosure and generated by the proton source, but extensive calculations have actually been performed for in-enclosure and out-enclosure fluxes of photons and neutrons generated by both proton and electron sources.
An important remark is due at this point.Protons above a few MeV are quite efficient at inducing nuclear reactions in matter, which often result in the production of neutrons.Above about 150 MeV, evaluated nuclear data are typically not available and reaction events must be simulated using nuclear-reaction models (pre-equilibrium and intra-nuclear cascade models, coupled to statistical deexcitation models).Unfortunately, this comes at a price: large differences among models are to be expected.This makes it quite difficult to compare calculations performed with different transport codes, which do not necessarily employ the same physics models.
Fortunately, the high-energy transport codes we are considering here (Geant4 and MCNP6) do share one nuclear reaction model, namely INCL-ABLA.The version that is shipped with MCNP6 (INCL4.2),however, dates back to 2002 [11]; Geant4, on the other hand, contains the latest C++ version, INCL++ [12].By default, the two model versions behave rather differently, but it is possible to adjust INCL++'s internal parameters to mimic INCL4.2 to some extent.This is the closest we can get to a comparison using the same model.
By comparing the pure Geant4 and the TRIPOLI-4/Geant4 calculations, an interesting observation can be made.The results are statistically compatible, despite the fact that the two codes use independent treatments of neutron transport below 20 MeV (handled by TRIPOLI-4 within the coupled calculation, and by NeutronHP within the Geant4 calculation).This can be interpreted as a verification of the NeutronHP sector against TRIPOLI-4's low-energy neutron transport.Note however that the cross sections used by the two codes are not identical: Geant4 uses the G4NDL library, which is essentially based on ENDF/B-VI, while the TRIPOLI-4 data library is based on JEFF-3.1.1.However, for the purpose of our fixed-source calculations, and for the precision we are seeking, the difference appears to be negligible.
Figure 2 also shows the result of a calculation performed with MCNP6, whose results are very similar to those obtained with TRIPOLI-4/Geant4 below 10 MeV.It is perhaps worth emphasising that MCNP6 cannot be considered as a reference code for these calculations insofar as the choice of the nuclear-reaction model induces an uncertainty on the calculated neutron flux that can be as large as a factor of two.

Test case 2: background estimation in Nucifer at Osiris
Nucifer [13] is a neutrino detector that was deployed near the compact Osiris research reactor core (70 MW).The Nucifer detector is well-suited for the detection of shortbaseline neutrino oscillations due to its short distance (∼ 7.2 m) from the reactor core.However, due to the extreme smallness of neutrino signal (about 1 neutrino event every 5 minutes), it is of capital importance to precisely estimate and possibly suppress any detection background.In the case at hand, one of the sources of background noise is represented by fast neutrons ( 2 MeV) coming from Osiris, which may mimic genuine neutrino events by inducing elastic scattering on nuclei contained in Nucifer's liquid scintillator.These fast neutrons originate from fission events in Osiris's core.They can reach Nucifer after traversing about 3.5 m water (the reactor pool) and 2 m concrete.Figure 3 shows a schematic drawing of the geometry.Extremely few neutrons manage to traverse such enormous thicknesses without losing energy and dropping below the 2 MeV threshold energy, or without being absorbed.For this reason, the calculation of the background rate is presently impossible in Geant4.
It is however possible to tackle this problem using TRIPOLI-4's variance-reduction techniques.First, we performed a criticality simulation of the Osiris reactor core and stored neutrons leaving the core with energy larger than 2 MeV.Since the geometry of the Nucifer detector and its surroundings is modelled with Geant4, we imported the geometry using the TRIPOLI-4/Geant4 coupling and simulated the transport of the stored neutrons with a pure TRIPOLI-4 calculation.The exponentialtransform method was applied, based on an importance map calculated by TRIPOLI-4's INIPOND module and subsequently adjusted by hand.
The calculation yields an attenuation factor for fast neutrons between Osiris and Nucifer of the order of 10 −27 .This estimate, which is conservative, results in an expected elastic-scattering rate in the whole Nucifer detector volume of about 4 × 10 −5 d −1 .This leads to the conclusion   that the background noise induced by fast neutrons in Nucifer can safely be neglected.

Test case 3: n_TOF spallation source
The n_TOF facility [14] is a spallation neutron source located at CERN, which operates with a 20-GeV/c pulsed proton beam and which provides time-of-flight tagging of the neutron energy.One of the foremost advantages of n_TOF is that the energy of the produced neutrons spans more than twelve orders of magnitude, from thermal energies to the GeV range, allowing measurements for a wide range of applications.Accurate characterisation of the neutron source is crucial for these purposes, and some features of the neutron beam must be inevitably determined via numerical simulations.
Recently [15,16], Geant4 simulations of the n_TOF spallation target were published.The studies focus on characterising the neutron beam (energy spectrum, resolution function, etc.) and the inevitable photon contamination.In order to show that the coupling is a suitable tool for this kind of studies, we have redone these simulations using TRIPOLI-4/Geant4.
Figure 5 shows the energy distribution per unit lethargy of neutrons leaving the spallation target in a 10 •cone directed towards the first experimental area (EAR1), as calculated by pure Geant4 and the TRIPOLI-4/Geant4 coupling.The black line represents a Geant4 calculation where molecular binding of hydrogen in water was neglected in scattering of thermal neutrons; this is the option that was used by Lo Meo et al. [15].The blue line represents a Geant4 calculation where molecular binding of hydrogen was correctly accounted for.Finally, the red line is the result of the TRIPOLI-4/Geant4 coupling.The same Geant4 physics list was used for all the calculations.
The zoom panels on the right of Fig. 5 highlight that the most relevant differences appear in the thermal and in the resolved-resonance ranges.As far as thermal scattering is concerned, we remark that the original Geant4 calculation overestimates the thermal flux by as much as 40%, while the other two calculations are statistically compatible.In the 1-10-MeV range, the shape of the spectrum in TRIPOLI-4/Geant4 is different from either Geant4 calculation.This might be due to differences in the nuclear data: as mentioned above, Geant4 uses the G4NDL library, which is essentially based on ENDF/B-VI, while the TRIPOLI-4 data library is based on JEFF-3.1.1.
Another interesting aspect that is not visible from Fig. 5 concerns CPU time.The TRIPOLI-4/Geant4 calculation is about 2.5 times faster than the Geant4 calculation.This is the ratio of CPU times for the whole calculation, and therefore includes the common high-energy transport phase.Moreover, the TRIPOLI-4/Geant4 calculation was run with a low-energy photon cutoff of 1 keV, while the Geant4 calculations used a photon production cut of 1 mm, which corresponds to 101.8 keV in lead.Therefore, we conclude that low-energy neutron transport is sensibly more efficient in TRIPOLI-4 than in Geant4's NeutronHP module.Part of this may be due to the use of implicit capture in TRIPOLI-4, which is unavailable in Geant4.

Perspectives and conclusions
We have described the progress made on the coupling between TRIPOLI-4 and the Geant4 particle-transport toolkit.The coupling allows TRIPOLI-4 to navigate inside Geant4 geometries.Geant4 particle sources can also be imported in TRIPOLI-4.Finally, and most importantly, Geant4 can be used to extend TRIPOLI-4's application scope by adding the capability to transport many additional particles.The coupling is driven from the TRIPOLI-4 side and it is designed in such a way that a TRIPOLI-4 user should be able to run an existing Geant4 calculation through the coupling with minimal additional effort.
The new capabilities of the coupled code have been illustrated by three specific test cases: radiation protection around a high-intensity laser beam, propagation of fast neutrons to a Geant4-modelled detector through severe attenuation, and characterisation of a neutron beam from a spallation source.When possible, TRIPOLI-4/Geant4 calculations have been compared to reference calculations performed with pure Geant4 and MCNP6, in or-der to verify a limited subset of the new features.The TRIPOLI-4/Geant4 results are found to be comparable to those of the other codes, and sensibly faster than equivalent calculations in Geant4.
Finally, we wish to trace the way for the future development of the TRIPOLI-4/Geant4 coupling.First, we need to consolidate the coupling.A sizeable body of V&V work remains to be done if one wished to cover all expected use cases.Further, minor features may need to be added to the code in order to satisfy particular user needs.Moreover, it is possible to boost the usefulness of the coupling by having TRIPOLI-4 feed particles to the Geant4 side of the coupling, which is almost never the case today.In particular, one could implement transport of charged particles produced in reactions which are of common interest for neutron detection, such as (n, f ) and (n, α).This precious capability would pave the way to the detailed simulation of the response of several types of detectors which are outside TRIPOLI-4's scope today.
One limitation of the present version of the TRIPOLI-4/Geant4 coupling is that the user needs to be familiar with Geant4 to define the problem geometry in Geant4's native format.Alternatively, if a ROOT geometry is available, one may attempt conversion to the Geant4 format via GDML export/import.However, no simple solution exists for geometries described in TRIPOLI-4's native format, which is intrinsically different from ROOT's and Geant4's hierarchical geometry representations.One possible way to add support for native TRIPOLI-4 geometries would be to refactor Geant4's navigation behind an abstract interface, into which we could subsequently plug any one of TRIPOLI-4's existing geometry navigation systems.The bottleneck here is represented by the fact that the Geant4 geometry-navigation interface is quite dense.It is unclear to us whether the interface can be adapted to a non-hierarchical geometry engine.

Figure 1 .
Figure 1.Views of the APOLLON enclosure geometry.The 3D view (top) was generated by the Geant4 OpenGL visualisation driver; the 2D view (bottom) was made with T4g, TRIPOLI-4's native visualisation tool.The cross on the 2D view indicates the source position.

Figure 2 .Figure 3 .
Figure 2. Top: energy-differential neutron flux generated by the proton source and leaving the enclosure, as calculated by TRIPOLI-4/Geant4, pure Geant4 and MCNP6.

Figure 4 .
Figure 4. Cross-sectional colour map of neutron flux in the 8-20 MeV group, as calculated by TRIPOLI-4 in the Geant4 Nucifer geometry.

10 −2 10 − 12 Figure 5 .
Figure 5. Energy spectrum of the spallation neutrons emerging from the n_TOF target in a 10 • -cone directed towards the first experimental area (EAR1).Left: full spectrum in log-log scale; top right: zoom on the thermal region in log-linear scale; bottom right: zoom on the resolved-resonance region in log-linear scale.