Simulation of the AGATA spectrometer and coupling with ancillary detectors

The design study of the AGATA array began with the development of the AGATA simulation code using GEANT4. The latter played a key part in the final design of the array and provided a cost effective solution for the early development of the tracking algorithm. The code has since been maintained and developed by the collaboration to provide more realistic simulations, with reaction chambers, ancillary detectors and surrounding mechanical structures completing the entire setup.


Introduction
Amongst the fleet of nuclear physics detection systems, large High Purity Germanium (HPGe) arrays are very powerful instruments for nuclear structure studies and γ -ray spectroscopy in particular. The nuclear physics community has designed and operated HPGe arrays that offer a high and unmatched energy resolution and efficiency for several decades. The latest generation of HPGe arrays currently under-construction are the Advanced Gamma Tracking Array, AGATA [1], in Europe and, the Gamma-ray Energy Tracking Array, GRETA [2] in the USA. This new generation of arrays aims at fully reconstructing the interaction sequence of incoming γ rays that do not simply interact via a single photoelectric interaction. This technique subsequently allows the determination of direction of the incoming gamma and the full deposited energy, which increases greatly the photopeak energy efficiency of the array. The design of a e-mail: marc.labiche@stfc.ac.uk (corresponding author) these arrays very much relies on a good determination of the interaction position in the crystal and the tracking algorithm efficiency. While the former is difficult to simulate, modern Monte-Carlo radiation transport codes are great tools to simulate the interaction in a material and to optimise the tracking algorithm and the overall array geometry. Therefore, right from the start of both the AGATA and GRETA projects, just over 20 years ago, a simulation code was developed using the CERN-based GEANT4 for radiation transport code [3,4], which had just started to replace the widely used GEANT3 toolkit. The AGATA code was born. Since then, the AGATA code has been developed tremendously, following along the evolution of GEANT4. Figure 1 shows the simulated AGATA geometry.
While the design phase is now complete, the AGATA code is mostly used for the estimation of the array's performance as the number of crystals increases from one experimental campaign to another and it remains an essential tool for the feasibility studies of new experiments and for data analysis.
In the Sects. 2 and 3, the AGATA code structure and content will be described, and some examples of ancillary detectors included in the distributed package will be presented. Section 4 provides an update of the performance response expected for the 4π array, using the latest tracking algorithm. In Sect. 5 a few examples of advanced simulations including some ancillary detectors will be given. Finally, future development will be presented in the Sect. 6.

Status
The AGATA collaboration continuously maintains the AGATA simulation code with new releases of GEANT4 and provides user support for its installation and execution. The code is now distributed via a GIT repository [5]. All advanced features presented in this article have been produced with GEANT4 10.5 and are currently being tested with the latest versions. The structure of the AGATA code still follows the structure of a native GEANT4 application. However, many new classes for new event generators and ancillary detectors have been added to take advantage of new capabilities in GEANT4 or extend the scope of the simulation code. With most event generators, the simulation output has remained in the ASCII format, which leaves the choice of data analysis tool to the users. The code is distributed with a version of the two tracking methods, the back-tracking algorithm (MGT) and the Orsay forward-tracking algorithm (OFT) [6,7], however, the responsibility is left to the users to acquire the latest versions.

CAD geometry import
A key part of radiation detection simulation work is the definition of the detector geometry. Since radiation interactions occur in all material, simply defining the sensitive volume geometry of the detector is insufficient to provide an accurate prediction of the detector response. Therefore, to take into account interactions in the sensitive volume as well as in surrounding material and predict the impact the latter can have on the detector response, a description as detailed as possible of the entire detector must be implemented in the simulated geometry. In GEANT4, this can be achieved using the native geometry description classes. However, the toolkit AGATA setup at LNL with the CAD imported geometry of the new PRISMA reaction chamber. By transparency, the GDML geometry of the SPIDER array is revealed inside the chamber also provides the option to import Computer Aided Design (CAD) files into the geometry. In the AGATA code, this was successfully carried out using the Geometry Description Markup Language (GDML) interface [8] to import the geometry of new reaction chambers and new auxiliary detectors. The import process comprises different steps. First, the STEP-format file of the ISP 10303-21 CAD standard drawing is converted into a GDML format file. Several open source or commercial software packages are available to the users for this. Commercial software such as FASTRAD usually offer extra utilities that facilitates the material assignment to each volumes. Finally the GDML has to be invoked during the geometry construction. Figure 2 shows the AGATA detector with the new PRISMA [9] reaction chamber and the SPIDER array [10], as used at the Legnaro National Laboratory (LNL). Other CADto-GDML converted geometries that are available include the reaction chamber for VAMOS [11] and for MUGAST [12].

Event generators
New built-in event generator Back in 2004, for the toolkit release 6.0, the GEANT4 collaboration produced a new event generator class called G4GeneralParticleSource (GPS), which gives users a realistic method to simulate the radiation decay of nuclides. The new class allows users to specify spectral, spatial and angular distribution of the primary source particles via macros or command lines. The simulation of the decay is based on ascii data file taken from available nuclear database, which can be completed, corrected or even created directly by users. This feature has been added in the AGATA code as a new event generator option, on top of the original built-in generator G4ParticleGun and the AGATA external event generator class which simply reads as input a list of primary particles defined by their nature, position and momentum as input. The command line to run the Agata executable file with the GPS option is:./Agata -gps.
Alternative generator: In the AGATA simulation package the so-called " Alternative Generator" (AG) has been developed to simulate experiments. This is used to estimate the performance of AGATA and check the feasibility of an experiment or to assist in the analysis of experimental data. Typical applications are for the estimation of peak-shapes and peak separation when performing lifetime measurements using methods based on Doppler Shift, i.e. Recoil-Distance Doppler Shift (RDDS) or Doppler-Shift Attenuation Method. To give realism to the spectra, a background consisting of an exponential shape and discrete γ rays emitted at selected energies can be added with individual intensities. This background has been introduced to model " prompt background" seen in experiments with AGATA and the magnetic spectrometer VAMOS.
When using the AG a " wall-clock time" can also be used. Each event has a start timestamp that is controlled by parameters of the beam in the simulations. The beam is modelled as a bunched beam of a given frequency, bunch width, and intensity given in particles per second (pps). The beam particles are produced with equal probability with the time of each bunch. This way beams that are completely random in their time structure as well as highly bunched beams can be simulated. A continues beam is simulated by matching the bunch width with the bunch frequency. Although this feature can be used to simulate random coincidences or, e.g. the buildup of β-decay background, its main use is to produce simulated data that can be analysed using the software as experimental data starting from γ -ray tracking (grt). Using the AG γ -ray sources can also be added. The sources can be of any nature, i.e. point-like calibration sources or volume sources to model radioactivity from a beam dump, for example. Each added source requires a data file describing the decay of the source as well as its geometry. The source activity, in kBq, is given together with data file to include the source in the simulation. The γ -ray sources and beam-structure share the same wall-clock time, i.e. they are emitted statistically according to activity and beam intensity. This allows the simulation of random coincidences or pile-up in the detectors in the case of high simulated count rate.
Gamma-ray source simulations were implemented to investigate different aspects of efficiency losses in the simulation as compared with experiments in the framework of the paper by Lalović et al. [13].
During a simulation the Alternative Generator generates events with several primary vertices, i.e. particles in the following order: 1. The " prompt background" γ rays are generated. 2. The beam particle is generated.
3. If one or more γ -ray sources have been added, γ rays from possible decays are added.
The creation of the beam particle is taken care of by a class called Incoming_Beam. The Reaction class handles the nuclear reaction. It does not try to calculate or model absolute cross sections. The default is that every beam particle will react in the target, with a depth profile defined by a data file. An energy dependent cross section can be modeled using this file. If no such file is given an equal probability inside the target thickness is used. A second data file gives the angular distribution of the outgoing product. If an energy dependent angular distribution is needed it is possible to have only a fraction of the target active and run several simulations with different angular distributions varying with the energy of the beam at the reaction point. The reaction product is given by the change in Z and A counting from the beam. The levels that are to be excited in the product nuclei (and its partner if this is wanted) and the corresponding intensities can be added.
Each of the four process are given a probability (P T r for transfer reaction etc.) with the following condition P T r + P Fe + P F f + P Ce = 1. (1) satisfied. In each event a random number between 0 and 1 is chosen and used to select the reaction mechanism. Typically one of the probabilities is set to 1 and the other three to 0 but for target-beam-product combinations that are accessible via more than one reaction mechanism it is meaningful to give a non-zero weight to more than one probability. All kinematics are calculated using relativistic expressions. There are however limitations, such as the assumptions made about the fraction of the energy in fission going to kinetic energy of the fragments or into internal excitation of the fragments. Examples of uses of the AG are given in Sect. 5.

Event generation for the AGAPRO analysis package:
The introduction of a " wall-clock time" into the AGATA simulation code gives the possibility to generate events in a format that can be read by the AGAPRO package (see Stézowski et al. in this issue). A code has been written that creates AGATA data format (adf) files that emulates experimental data files after the Pulse-shape analysis step. The wall-clock time step in the output of the GEANT4 simulation is converted into a 10 ns timestamp corresponding to the 100 MHz clock of the  analysed as if from experimental data. Data from ancillary detectors are, as is the case for experimental data, added at the event merger level AGATA DAQ. Each crystal is treated independently, where the energy of the core is given as the sum of all interactions within the assumed shaping time of the amplifier (typically a few microseconds). The same is true for the energies of the segments. The used segmentation is that of the AGATA simulations, which mimics closely but not exactly the real segmentation (the segmentation is defined in an input file). As is the case for the experimental PSA, a maximum of one interaction point is produced per segment. For the simulations the interaction point position is the energy-weighted average position of all energy depositions in the segment. An energy dependent position resolution is then added, making sure that the position stays within the segment. Ancillary detectors can also be added by the use of shared libraries that produced the correct type of adf frame for that ancillary. This procedure is illustrated in Fig. 3.

Position resolution map
In real measurements, the interaction positions from Pulse Shape Analysis (PSA) are extracted with an effective resolution. Therefore, the interaction points from GEANT4 simulations need to be smeared with some resolution before proceeding with tracking. The position resolutions of AGATA detectors were studied in an in-beam experiment based on the energy resolution of Doppler-corrected γ -ray spectra [14], which giving average resolution of ∼2 mm (σ ) for large energy deposited interaction points. By default, a position resolution (σ ) with energy dependence is used to smear the simulated interaction points in x yz directions independently. Here, s 0 = 1.15 mm and s 1 = 2.64 mm are extracted from Table 5 of Ref. [14], E p is the energy deposit of the interaction point in unit of keV. Further investigation of the AGATA position resolution was carried out via a "bootstrapping" method [15]. Clear asymmetries and position dependence were observed for the PSA position resolution. Based on this observation, it is clear that the simulation code would benefit from a position-sensitive position smearing, to make the simulation results more realistic. A position smearing map was created and arranged in a 2 mm grid, the same as the one used for PSA. Considering the geometry of the detectors, the position resolutions are defined in cylindrical coordinate, i.e., in φ, r and z directions for every grid point. To generate the position resolution map, we implemented a new simulation method. In this method, we first obtain the interaction points from a normal AGATA GEANT4 simulation. Then for every interaction point, a pulse shape response is deduced by linear interpolation of the AGATA Data Library (ADL) signal basis in 2 mm grid. The pulse shape responses from one detector are summed up in every event, and a certain noise level is added to generate the simulated pulse shape data. The simulated pulse shape data is then processed through the normal PSA algorithm in the same way as experimental data to obtain the analysed interaction positions. The position resolution of every grid point is extracted by comparing the PSA analysed positions with the GEANT4 simulated ones around this grid point. The position resolution obtained from this method is in general smaller than the 2 mm (σ ) average resolution reported for the experimental data [14], which is expected, since there are effects like neutron damage, cross talk and time alignment in experimental signals making the signal shape deviated from The γ -ray is emitted from particle moving at 0.5c. The response of AGATA 4π array are obtained with 2 mm(σ ) uniform resolution (black) and the resolution map (red) the ADL basis, leading to a worse position resolution. Therefore, a scaling factor is applied to the original resolution map to make the average resolution at 2 mm (σ ). Figure 4 shows the position resolution map obtained for one detector.
To use the resolution map, the closest grid point in the same segment is found for every simulated interaction. Then the resolutions assigned to that grid point are used to smear the original interaction in φ, r and z directions to get a new interaction point. In order to make the new interaction in the same segment as the original one, the closest grid point in the same segment is found for the new interaction and its position is used as the final position of the smeared interaction. Figure 5 shows an example of the AGATA responses with original uniform resolution and with the resolution map. A longer tail is observed with the implementation of resolution map.

Other HPGe arrays
The implementation of AGATA in GEANT4 required the geometry definition of different shapes of crystals. The flexible approach that was developed to achieve this at the design stage of the project has facilitated the implementation of the crystal shape of other HPGe arrays. The crystal shapes of Miniball, Euroball and the USA equivalent of AGATA, GRETINA and GRETA, have all been defined and added to the AGATA code. All of these arrays benefit from the event generators and other utilities developed for AGATA simulations. They can be used as stand alone, coupled to other HPGe array for a hybrid configuration (e.g. AGATA with Miniball), or coupled to the other ancillary detectors.

Ancillary detectors and structures
As for other γ -ray arrays, the performance of AGATA can be enhanced by the detection in coincidence of the gammaemitter nuclei as well as other products characteristic of the reaction of interest. In order to perform as realistic and complete simulation as possible many ancillary detectors have been added to the code over the years by different developers. To avoid clashes with previously defined detectors, each new detector must be given a new identification number. The list of these detectors together with their identification number can be displayed when running the simulation code with the help option (./Agata -h). Amongst these ancillary detectors already coupled to AGATA in real experiment are the FATIMA, PARIS, and SPIDER arrays. The PRISMA spectrometer is the very latest addition. The latter includes a preliminary implementation of the multi-wire proportional chamber and the ionisation chamber at the focal plane, and it relies on the interface available in GEANT4 to import a magnetic field map for the trajectory simulation of heavy ions in the quadrupole and dipole of the spectrometer. Figure 6 illustrates the coupling of the simulated AGATA array with the simulated PRISMA spectrometer. In this example, the magnetic field maps of the dipole and quadrupole were calculated using the original PRISMA simulation code, which was tuned for the detection of the 90 Zr ions with a charge state q = + 30, and were imported into the AGATA simulation code. Just after the target, which is positioned at the centre of AGATA, a pair of 90 Zr ions emerge with the same momentum vector. Each ion of the pair then undergoes the effect of the magnetic field, first in the quadrupole and then in the dipole, where their trajectories completely diverge, leaving only the ions with charge state q = + 30 reaching the focal plane detectors.
Like ancillary detectors, developers of the AGATA code have also defined the geometry of non-sensitive physical

Efficiency
With the increasing number of crystals and the improvement of the electronics and the tracking algorithm, the efficiency of the existing arrays has been measured and compared with simulations. The observed discrepancies have been investigated in [13,16] and are now believed to originate from a reduced active area of each germanium crystal. While in the simulation all crystals of a given shape are all identical with the same intrinsic efficiency, the measured intrinsic efficiency of each crystal is different. Each crystal will have a different impurity concentration, a different neutron damage history, and will see a different electric field distribution once biased. This non-homogeneity of the electric field is mostly observed around the central contact and at the back of the germanium crystal and produces electrically passive areas, which differ in size and lead to a different intrinsic efficiency from one crystal to another. The AGATA code provides the possibility to adjust the thickness of the passive areas for each type of crystal but not for individual ones. The default values are based on crystal scanning measurements and are set to 0.6 mm around the central contact and 1 mm at the back of the crystal, in the geometry files of the code (A180Solid.list). The corresponding simulated average intrinsic efficiency of a crystal is ∼ 86.3% at 1.3 MeV and is ∼ 8% higher than the measured one. When comparing the measured efficiency of the existing array at different γ -ray energy with the simulation, an overestimation up to 12% is observed in the simulation, as presented in [16]. A better agreement is found by increasing arbitrarily the passive area around the central contact and at the back to 2.5 mm and 3 mm, respectively. The average overestimation is then lower than 5%.
The simulated efficiency of the 4π AGATA array as a function of the incident γ -ray energy is presented in Fig. 7. The results are given considering the equivalent response of a calorimeter, i.e. the sum of the energy deposited from all cores with no γ -ray tracking, the sum of all the single cores without add-back and the γ -ray tracking. This was produced with an isotropic mono-energetic source at rest emitting a single γ ray per event. The results can be compared with the initial simulations carried out by Farnea et al. [17] with no reaction chamber. In this work however, OFT, which is the adopted algorithm for the experimental data, was used with all the standard parameters. The impact of the passive area increase in the germanium crystal can be seen for the tracked efficiency. It is very similar to the impact reported in [16] on the core singles efficiency, which match the measured core efficiency. Therefore, the tracked efficiency of the full AGATA array presented in Fig. 7 as well as in Fig. 8, where an aluminium chamber of 2 mm thickness has been added, is Fig. 7 Simulated photopeak efficiency of the AGATA 4π array considering a source at rest in the centre of the array, and different modes of operation: the calorimeter mode (circles), the core single sum (squares) and the γ -ray tracking mode (diamonds). The tracked efficiency with extended germanium passive area is displayed in red. The γ ray energies have been chosen to compare with the results reported in [17]. See text for details  Fig. 7. The blue curve with solid diamond is the equivalent photopeak efficiency with a 2 mm aluminium reaction chamber added considered realistic for a source at rest and low γ -ray multiplicity events. Further simulated efficiency of the full array for a source in motion and at higher multiplicity are provided in Table 1 together with the simulation results obtained with an ideal shell of germanium.

Peak-to-Total ratio
The simulated peak-to-total ratio response of the 4π AGATA array for an isotropic source at rest is given in Fig. 9 as a Fig. 9 Peak-to-Total ratio obtained with the same simulation conditions described in Fig. 7 function of the incoming γ -ray energy. Like for the efficiency in 4.1, the OFT algorithm was used for the tracking, using all standard tracking parameters. The peak-to-total ratio obtained in the calorimeter mode is very similar to the results reported in [17] with the exception of the ratio at 80 keV. The same observation is true with the corresponding efficiency curve. The difference may be due to the thin aluminium layer encapsulating the crystals, which is included in this work. As the incoming γ -ray energy increases the peak-to-total curves obtained with tracking clearly diverge from the calorimeter curves towards lower ratio values. This divergence coincides with the pair production process, which starts to become dominant. Figure 9 shows that the combine reduction of the active area of the crystal and the addition of a 2 mm thick aluminium chamber also deteriorate the peakto-total ratio by a few percent. The largest effect is seen at low γ -ray energies and results mostly from the interactions in the chamber. At higher energies, the penetrating power of γ rays increases. Interactions in the passive areas at the back and around the central contact will more likely happen and this becomes the dominant factor in the reduction of the peak-total ratio. Figure 10 gives an illustration of the benefits that the tracking technique provides when the number of crystals in the array increases. In this simulation a 1 MeV γ ray was emitted isotropically by a point source at rest at the centre of the array. The 2 mm aluminium chamber was included together with the additional passive area in the crystals mentioned in 4.1. This simple result shows how the benefit of tracking is immediate for the peak-to-total ratio even with the smaller number of crystals when this is compared with the sum of the core singles. On the other hand, for the efficiency, it is clear that the benefit of tracking is greater when the num-

Evolution with the number of crystals
Full energy peak efficiency (%) 0. 1  1  99  70  67  70  67   1  1  76  40  35  38  34   10  1  40  8  ber of crystals increases. Although this may not appear like a huge gain in this basic simulation, the benefit of tracking on the efficiency appears huge when coincidence measurements of multiple γ rays are required, as illustrated in 5.1 below.

Advanced simulated response
In this section, the simulation of three different types of AGATA experiments are given as examples.

Example 1 -High-spin decay of 158 Er
The first example is the simulation of a high-spin excitation measurement in 158 Er. For this, an input event file of 10 8 decays was produced using an external event generator, which is also distributed with the AGATA code. For the input of the event generator, we assumed that the 158 Er nuclei were travelling through a gold layer of 19 μg/cm 2 thickness with a kinetic energy of 200 MeV. The excitation of 158 Er nuclei was restricted to the population of states in two high-spin rotational excitation bands: the known normal deformed (ND) band and a super deformed (SD) band. The ND band started from the ground state with J π = 0 + to a 13.4 MeV excitation states with J π = 38 + . The known relative intensities of the transitions were taken into account when randomly populating the excited states of this band, while the intensities for the SD band were set 10 3 times lower. The SD band was assumed to start from an excited state at 10 MeV at spin 23 and extended up to a state at 34.1 MeV of spin 65. An arbitrary transition linking the two bands was also added. This link transition corresponded to an emission of a 4 MeV γ ray from the first state of the SD band and had only one occurrence every 100 events for which the SD band was populated.
The resulting event file contained all the necessary formatted information on the γ emitter 158 Er and on the γ cascade for each events to be used directly as input in the AGATA code. Three simulations were performed with the same input file. The first two were performed with a 3π and a 4π AGATA array and the third with the Euroball array for comparison. With the AGATA array, the OFT tracking algorithm was used to construct the Doppler-corrected energy of γ rays. With Euroball, a separate analysis code was produced to provide the equivalent output information, as no tracking is needed. In all cases, the output was formatted into a ROOT tree [18]. The three ROOT trees were then analysed event by event using a multi-gating technique traditionally used in high-spin experiment analysis [19] to construct a multiple   Figure 11 shows the results obtained for the two AGATA configurations when a 4-γ gating is applied amongst the 21 transitions observed in the SD band. The inset of that figure is a magnification of the 4 MeV region around the linking transition. It is clear that a peak appears at 4 MeV with both configurations, however, with a potential background in that region during a real experiment, the 4π configurations gives a much higher chance to discover such a weak transition. The equivalent energy spectrum obtained with Euroball is given in Fig. 12. Although the sum of the energy measured in neighbouring crystals was not  accounted for in the Euroball simulation analysis, there is no peak to be seen at 4 MeV with this array.

Example 2 -Coulomb excitation of 58 Fe
As a second example of advanced simulations we show a Coulomb excitation experiment. A beam of 222 MeV 58 Fe ions impinge on a 1 mg/cm 2 208 Pb target. The angular distribution of the Coulomb excited ions follow a Rutherford distribution and the excited states are populated according to calculations with the GOSIA code [20]. The SPIDER detector is used as ancillary detector for the back scattered 58 Fe ions. In Fig. 13 the setup as simulated is shown, together with particles from 20 simulated events. Iron ions are shown as blue lines whereas γ rays are illustrated with green lines.
Interaction points from the simulations were packed, smeared, and tracked according to the standard procedure with position independent resolution. Doppler Correction is 5.3 Example 3 -multi-nucleon transfer to 62 Fe As a final example, the simulation of an experiment aiming at measuring lifetimes in moderately neutron-rich iron nuclei [21] is presented. This is a multi-nucleon reaction with a downstream spectrometer. A beam consisting of 238 U ions impinged on a 1 mg/cm 2 think 64 Ni target. A degrader of 5.7 mg/cm 2 natural magnesium was positioned at different distances from the target to simulate a RDDS experiment. Examples of such experiments performed with AGATA and magnetic spectrometers can be found in the review of Bracco et al. [22]. In this simulation a rectangular parallelepiped is used to simulate the geometrical opening of a magnetic spectrometer. AGATA and the schematic spectrometer is shown in Fig. 15. Every ion that passes this volume has its mass and kinetic energy registered and stored in the list-mode output file.
For each simulated event the transfer reaction creates a 62 Fe ion in an excited state, either of the 2 + 1 or 4 + 1 states. The angular distribution of the ions are taken from a data file. To save execution time the ions are also limited to the direction of the opening of the simulated spectrometer. In addition 20 Fig. 16 Simulated γ -ray spectra of the 64 Ni( 238 U, γ 62 Fe) reaction. The VAMOS spectrometer was simulated by its geometrical coverage and a bρ acceptance code. Doppler Correction performed after γ -ray tracking. The insets show the regions 840-900 keV (2 + 1 → 0 + 1 transition) and 1260-1320 keV (4 + 1 → 2 + 1 transition). For details, see text γ rays are emitted, with energies sampled from an exponential background that has been modeled on experimental data from earlier experiments. The interaction from the γ rays in AGATA were packed, smeared, and tracked according to the standard procedure. For the spectrometer part of the simulation, the charge state of each ion was calculated using the Shina model. This allowed to see if the bρ was within limits of the simulated magnetic spectrometer (in this example VAMOS [11,23,24]).
Results of the simulation of the transfer reaction for RDDS measurements are shown in Fig. 16. The black solid line shows the expected spectrum for a target-degrader distance of 40μm. In red dashed γ rays emitted after the start of the degrader are shown. Gamma-rays emitted " in-flight", i.e. between the target and the degrader, are shown in dotted brown. This features allows the use of simulations to estimate peak-shapes to better fit complicated spectra. Finally, spectra for 700μm distance are shown in dashed-dotted blue and dashed-dotted-dotted black. The later is simulated without the 20 supplementary background γ rays.

Outlook
The AGATA collaboration has continued to maintain and develop the AGATA simulation code, whether to take advantage of new features distributed in the latest GEANT4 releases or to expand the range of event generators or the list of ancillary detectors. One future improvement that would benefit the predictive power of the code would be to model the electrical passive area of each crystal, individually, estimating it either indirectly from the manufacturer measured intrinsic efficiency or measuring it directly during the crystal scanning process.
There are also more recent simulation tools which have been developed in recent years within the nuclear physics community and which often aim at providing a complete data analysis and simulation framework. The migration of the AGATA code to some of these frameworks has already started and a version of the code is available in the Nuclear Physics Tool (NPTool) [25] and in the Simultation Toolkit fOr Gamma-ray Spectroscopy (STOGS) [26]. There are plans to do the same with FairRoot [27]. All these frameworks are built directly or virtually on top of the GEANT4 radiation transport code and, since GEANT4 is compatible with GDML (Geometry Description Markup Language) format files, developers have converted the AGATA geometry into GDML to facilitate this migration. For the AGATA collaboration, this is seen as an opportunity to rejuvenate the code and make it accessible to a larger community of researchers.