Investigation of variance reduction techniques on photon fluence and dose calculation efficiency for Elekta Agility head using EGSnrc MC code

The aim of this study is to investigate the effects of these Variance reduction techniques on photon fluence and dose calculation efficiency. Different VRTs available in the BEAMnrc code were used to investigate the simulation efficiency for a 6 MV photon beam from an Elekta Agility head. The optimum combination of directional bremsstrahlung splitting (DBS) and bremsstrahlung cross-section enhancement (BCSE) techniques was investigated for photon fluence and dose calculation efficiency. Further combinations with other VRTs were performed. As a result, the combination of DBS and BCSE was most efficient combination for both efficiencies. Furthermore, the combination of DBS and BCSE with photon splitting VRT in DOSXYZnrc further maximized the efficiency. The setting for combining different VRTs that maximize the photon fluence efficiency at the surface of the phantom can be different to those that maximize the dose efficiency inside the phantom. Different VRT combinations, as presented in this study, can improve the simulation efficiency.


Introduction
The improvements in radiation therapy techniques, such as adaptive radiotherapy (ART), have improved daily target coverage and organs at risk by taking into account any changes in the patient geometry throughout the course of their treatment [1,2].ART has increased the confidence in boosting target radiation dose and using fewer fractions [3].However, this requires an increased precision of the linear accelerator (Linac) model and the associated dose calculations.
Different Linacs have different multileaf collimator (MLC) designs to ensure fast and accurate dose delivery.For example, the Agility head, manufactured by Elekta, has 160 leaves of 0.5 cm width at its isocentre that focus with a 0.325 cm offset from the source, thus no backup collimator is required [4,5].Such a design and associated characteristics improve dose distribution, particularly for complicated plans such as volumetric modulated arc therapy (VMAT) for ART.
Monte Carlo (MC) calculations are considered to be the most accurate dose calculation algorithms currently available and, in some situations, the only technique that can provide a reliable dose distribution [6,7].There are many reliable MC codes available such as the EGSnrc MC simulation (BEAMnrc and DOSXYZnrc) system [8].However, the main limitation of implementing a full MC simulation in a clinical setting is the length of time required for such a clinical routine to achieve a sufficiently low statistical uncertainty [9].The simulation time depends on a number of parameters, such as the number of particles simulated (histories), the geometry complexity and size, the computational hardware available, and the desired statistical uncertainty [9].
There are techniques that can be used to reduce simulation time while improving the precision of the simulation itself.These techniques include advanced computational hardware performance, parallel computing, and variance reduction techniques [10,11].Even in a complicated problem, variance reduction techniques (VRTs) can significantly reduce the simulation time while calculating the quantity of interest to the desired statistical uncertainty.In EGSnrc MC, there are many VRTs that can be used, either solely or in combination, to increase simulation efficiency.These include particle splitting, photon forcing, bremsstrahlung crosssection enhancement (BCSE), and bremsstrahlung splitting [8].Various studies have investigated the performance and the simulation efficiency of these VRTs on different Linacs with different energies [12][13][14][15].
In this study, these VRTs will be investigated on a 6 MV photon beam from an Elekta Linac with Agility head using the BEAMnrc and DOSXYZnrc MC codes, which have not been investigated to date in the literature.Consequently, the efficiency of photon fluence and dose calculations will be examined for both photon beams with and without electron contamination.

BEAMnrc MC user code
The computational model of the Elekta Linac with Agility head was built using the BEAMnrc user code, which is part of the EGSnrc MC code system and 6 MV photon beam was simulated [8].The beam source number 19 (Elliptical beam with gaussian distribution in X and Y) was used [16].The model was used to generate data for a 10 × 10 cm 2 field size defined at 100 cm and a source-to-surface distance (SSD) of 100 cm.The default values for EGSnrc parameters were used.The electron and photon transport cut-off energies were 0.01 MeV and 0.7 MeV, respectively.The same values were used for the low-energy production threshold for electron and photon.
In the BEAMnrc code, there are different VRTs which include bremsstrahlung photon splitting, split particle, photon forcing, range rejection, and bremsstrahlung cross-section enhancement.Each of these techniques was investigated separately in order to find the most efficient VRT and was compared with a normal (analog) simulation.Then the combination of different VRTs were investigated to maximize the efficiency of photon fluence and dose.The following section will describe the basic concept of these techniques and will show the values of certain input parameters for each technique.However, for further details about each VRT, the reader is referred to the relevant literature [11][12][13][14][15].

Bremsstrahlung photon splitting
The aim of implementing the bremsstrahlung photon splitting technique in the BEAMnrc code is to improve the statistics of bremsstrahlung photon production [8].In the EGSnrc (version 2020), the BEAMnrc MC user code comes with only two bremsstrahlung photon splitting techniques, namely, uniform and directional bremsstrahlung splitting.
In uniform bremsstrahlung splitting (UBS), the split photons (number of times, NBRSPL) are sampled from the same bremsstrahlung production distribution of the electron that underwent the bremsstrahlung event and have the same probability independent of energy and direction.That is, tracking all secondary charged particles created by split photons, even those that are not aimed at the region of interest, uses more central processing unit (CPU) time.In this technique, a "Russian roulette" option can be used, which is applied to the secondary charged particles.In this study, a splitting number of 500 was used with and without the Russian roulette option.
The directional bremsstrahlung splitting (DBS) algorithm, unlike UBS, analyses the direction of the photon.If the photons are directed into the splitting field, defined by a field radius and SSD, then the photons survive.If the photons are not directed into the splitting field then they are subject to the Russian roulette option with a set survival threshold.Therefore, with a straightforward modification of the bremsstrahlung production cross-section, the directional dependence of the photons can be calculated in advance to save considerable simulation time [10].In addition, if the contaminant dose is of interest, the electron splitting (an option to DBS) can be used to recover the charged particles and thus avoid high-weight electrons from compromising fluence or dose statistics.In this study, the DBS was used with and without the electron splitting function.The NBRSPL was 500 and the field radius was 10 cm with a 100 cm SSD for both cases.

Bremsstrahlung cross-section enhancement
The BCSE technique is a VRT that is implemented mainly to increase the bremsstrahlung production cross-section for a given media [17].In the BCSE technique, the bremsstrahlung cross-sections of this media, as defined by the user, are enhanced by a factor given by the enhancement constant and a power.In addition, BCSE can be used with other VRTs.In this study, the enhancement constant was 10 and the enhancement power was 0. Then, the BCSE was used with DBS to optimize the simulation efficiency according to the two steps given in the BEAMnrc manual [8,17]; at first, different enhancement constant values were used with a range of NBRSPL values, then the efficiency (ε) of each simulation was calculated using where T i is the simulation CPU time for run i, and s 2 is the average statistical variance on the fluence or dose.
In the second step, the quantity N i /ε N i was fitted versus (N i − 1) using Kawrakow's model [15]: where N i is the NBRSPL used for simulation i, and A 0 , A 1 , and A 2 are polynomial coefficients.Finally, the optimum NBRSPL can be calculated, which is equal to A 0 A 2 [6,14].This would save time as there is no need for exhaustive runs.

Range rejection
This technique is not a true VRT, but rather an approximate efficiency improvement technique (AEIT) [8].Here, the range of charged particles is calculated and their energies deposited locally if they do not leave the current region with an energy greater than the range rejection cut-off energy (ECUTRR).This approximation can lead to inaccuracies which can be reduced by using a maximum charged particle energy (ESAVE_global), where range rejection is not considered above this value.In this study, ESAVE_global with range rejection was used with two values, 1 MeV and 2 MeV.In both cases, the ESAVE in the target was set to 0.7 MeV.This technique was used alone as well as in combination with other VRTs.

Other VRT
Splitting electrons or photons (icm_split) at a specific component module (CM) can improve the simulation efficiency, especially for a phantom dose calculation [8].This is not related to the bremsstrahlung splitting mentioned above.In this study, this VRT was used alone and in combination with other VRTs, and the splitting photons was performed with and without electron splitting.In both cases, the icm_split was at the last CM in the Linac model.
Another VRT in BEAMnrc is the photon forcing technique, which improves the statistics of scattered photons where the interaction is meagre, such as in lowdensity regions or thin layers.This technique was introduced mainly to study the generation of contaminant electrons in photon beams [8].In this study, this technique was used alone as well as in combination with other VRTs.

DOSXYZnrc MC user code
A water tank was modelled via the DOSXYZnrc user code, which has dimensions of 20.25 cm, in the X and Y directions, and 40.25 cm in the Z direction [19].The dose distribution of the photon beam (mentioned in Section 2.1) was simulated using the "Beam treatment head simulation" option as a source.
In DOSXYZnrc, the photon splitting VRT option (n_split) available should not be confused with the bremsstrahlung splitting or particle splitting (icm_split) in BEAMnrc mentioned previously.However, in the photon splitting technique, as the photon enters the DOSXYZnrc geometry, the photon is split a number of times (n_split), each with a weight of 1/n_split.In this way, the dose statistics can be compromised by contaminant electrons if the photon splitting option is used with a BEAM simulation source.This is due to the number of contaminant electrons with higher weight being low compared with split photons.To avoid this, either the incoming electrons (contaminant) from BEAMnrc can be excluded by setting the incident particle option in DOSXYZnrc to photons only or by using the splitting charged particles (e_split) option available with n_split; however, if electron contamination is of interest, the latter is recommended [8].In this study, both cases were used to find the optimum VRT combination for dose calculation from a photon beam with contaminant electrons and from a photon beam only, assuming in this latter case that electron contamination is not of interest.

Simulation efficiency
The simulation efficiency for each run was calculated using Equation (1) for the calculation of two quantities, photon fluence and dose.For the photon fluence calculation, the efficiency evaluation was performed in a circular scoring zone with a radius of 2.5 cm at the bottom of the Linac model.The number of histories used in each simulation was 7 million, as the efficiency is almost independent of the number of histories [10].For the dose calculation, the efficiency evaluation was performed at the depth of the maximum dose, 1.5 cm.In both quantities, the efficiency of each VRT was investigated, after which the best combination of different VRTs for photon beams, with and without electron contamination, was determined.All the simulations were performed on a Linux Ubuntu PC with a 3.4 GHz AMD 9 5950X 16-processor CPU and 32 Gb of RAM.

Photon fluence and dose efficiency
First, the photon fluence efficiency was investigated for each VRT individually, in BEAMnrc, as shown in Table 1.As can be seen, there is a significant increase in the photon fluence efficiency for each VRT compared with analog simulation, except for range rejection, with both energies.The UBS technique increased the efficiency by a factor of 17.6 and 1.6 with and without Russian roulette, respectively.On the other hand, the DBS technique increased the photon fluence by a factor of up to 100 compared with the analog simulation, and by a factor of 5.7 compared with UBS with Russian roulette.
For dose calculation efficiency, the greatest efficiency was gained when DBS was used, which increased the efficiency by a factor of 295 compared with the analog simulation, and a factor of 5.9 compared with the UBS with Russian roulette.Therefore, the DBS technique can clearly be considered the most efficient VRT for both photon fluence and dose calculation.This is in full agreement with previous studies [8,[12][13][14][15]18].

Optimisation of DBS with and without BCSE technique
As the DBS was the most efficient for both photon fluence and dose calculation, the NBRSPL in DBS, that allows for peak efficiency, was investigated for photon splitting with and without charged particle splitting.For photon fluence, the peak efficiency was found to be with an NBRSPL of 750 for photon splitting only (without charged particle splitting), as shown in Figure 1 (BCSE0 curve).On the other hand, for the photon splitting with charged particle splitting, the peak efficiency was found when NBRSPL was set to 150, as shown in Figure 2 (BCSE0 curve).This shows that including charged particle splitting in DBS affects the peak NBRSPL for photon splitting only, thus requiring reoptimisation.The results for the dose efficiency showed that an NBRSPL of 20,000 allowed for peak efficiency for photon splitting only and 10,000, for photon splitting with charged particle splitting.
The combination of DBS with BCSE was investigated for the photon fluence and dose efficiencies.For photon fluence efficiency, the DBS with a range of NBRSPL values from 250 to 5000 for photon splitting only was combined with different cross-section enhancement factors, f, of 10, 20, and 30. Figure 1 shows the photon fluence efficiency as a function of f and NBRSPL.It can be clearly seen that the combination of BCSE with DBS, in general, increased the efficiency over that of the peak efficiency of DBS alone (NBRSPL of 750).Although the combination of 2000 and 20, NBRSPL and f respectively, gave the maximum efficiency, which increased the efficiency by a factor of up to 2.5 over the peak efficiency of DBS alone, different f, NBRSPL pairs resulted in comparable efficiencies.
Then, by following the steps provided in Section 2.2.2, the optimum NBRSPL was calculated to be 3223 and the optimum combination was achieved with f set to 20, which yielded an efficiency that was up to 2.6 times greater than the peak efficiency of DBS alone.On the other hand, for photon splitting with charged particle splitting, the peak efficiency was achieved when the pair 550, 20 was used, which increased the efficiency by a factor of up to 1.4 over the peak efficiency of DBS alone (NBRSPL of 150) (Figure 2).Consequently, the optimum NBRSPL was calculated to be 567 and the optimum combination was achieved with f set to 20, which increased the efficiency by a factor of 1.55 over the peak efficiency of DBS alone.
Additionally, the effects of the combination of DBS with BCSE on dose calculation efficiency for photon splitting only, and photon with charged particle splitting were investigated, as shown in Figures 3 and 4, respectively.For photon splitting only, the results showed that the pair 25000, 10 resulted in an efficiency that was greater by 7% than the peak efficiency of DBS alone.For photon splitting with charged particle splitting, the pair 30,000, 10 resulted in an efficiency that was greater by 5% the peak efficiency of DBS alone.As a result, the efficiency gain by using BCSE with DBS might well be small if the time spent in the phantom (DOSXYZnrc) is a large fraction of the total simulation time.In addition, such a fraction might affect the optimum setting for DBS/BCSE.Almatani (2021) investigated the dose calculation efficiency only of VRTs for a 6 MV photon beam from an Elekta Synergy Linac [15].It was found that NBRSPLs of 10,000 and 15,000 with f set to 20 represented the optimum combination for DBS with BCSE techniques for photon splitting with and without electron splitting, respectively.The differences in the optimum combination settings, compared with the current study, might be due to the differences in the Linac heads or the simulation parameters used.Almatani (2021) used an Elekta Linac with an MLCi2 head, which has an MLC consisting of 80 leaves (40 leaf pairs) with a backup collimator.On the other hand, the Agility head, used in this study, consists of 160 leaves (80 leaf pairs) with no backup collimator.In addition, Almatani (2021) included the incoming electrons (contaminant) from BEAMnrc in DOSXYZnrc for the photon splitting-only case, while contaminant electrons were excluded in this study for the photon splitting only.

Different VRTs combination for photon fluence efficiency
The combination of different VRTs with the optimum combination was examined, as shown in Table 2.The maximum efficiency was achieved when the optimum combination was combined with a range rejection technique (2 MeV) where the efficiency was 29% greater than when DBS was optimally combined with BCSE alone.On the other hand, the combination of photon forcing or splitting photon (icm_split) techniques with the optimum combination was actually found to decrease the efficiency.
For photon splitting with charged particle splitting, the use of any VRT with the optimum combination of DBS with BCSE (i.e.567, 20) increased the efficiency by at least 59% over the optimum efficiency.The maximum efficiency was achieved when the range rejection technique with 2 MeV was combined with the optimum     combination, where the efficiency was increased by a factor of 4.5 compared with the optimum combination of DBS with BCSE alone.

Different VRT combinations for dose calculation efficiency
The combination of different VRTs with the optimum combination was investigated, as shown in Table 3.For photon splitting only, the efficiency dropped when the optimum combination of DBS with BCSE was combined with any VRT except splitting photon (icm_split = 10), where the efficiency was up to 2.5 times greater than that of the optimum combination.Furthermore, combining DBS (25,000), BCSE (10), and icm_split (10) with range rejection (1 MeV) increased the efficiency by up to 5% compared to when range rejection was otherwise excluded.
For the photon splitting with charged particle splitting, the optimum combination efficiency was increased when any VRT was used.Maximum efficiency was obtained when the icm_split (10 splits for each photon and electron) was combined with the optimum combination where the efficiency was increased by a factor of up to 15 over the optimum combination.Furthermore, combining DBS (30,000), BCSE (10), and icm_split (10) with range rejection (2 MeV) increased the efficiency by a factor of 3.6 compared with the combination without range rejection.Thus, the settings for DBS, BCSE, icm_split, and range rejection that maximized the dose efficiency are different to those that maximize the photon fluence efficiency (DBS, BCSE, and range rejection).This might be due to the significant fraction of the simulation time required for transporting particles in the phantom; consequently, the icm_split setting might affect the optimum settings for DBS and BCSE.

Optimisation of DOSXYZnrc photon splitting
The use of the photon splitting (n_split) VRT option in the DOSXYZnrc code in combination with the optimum combination of DBS and BCSE was investigated.Figure 5 shows the combination of DBS (25000) and BCSE (10) with different n_split values.The results showed that the maximum efficiency was achieved when n_split was set to 30, where the efficiency was increased by a factor of up to 6 over the optimum combination efficiency.
For the photon splitting with charged particle splitting part of the investigation, one must consider that the charged particles that reach the surface of the DOSXYZnrc/phantom geometry can also be split by using the e_split option in conjunction with the n_split option to avoid fat electrons from compromising dose statistics [16].As recommended in the DOSXYZnrc manual, to achieve maximum efficiency, e_split should be set to the same value as n_split.In this study, therefore, the e_split and n_split were set to be equal, the results of which showed that when the optimum combination was used in conjunction with photon and charged particle splitting, and setting both the e_split/ and n_split to 65, yielded an efficiency that was up to 23 times larger than the optimum combination efficiency alone (the results are not shown for the sake of brevity).Then, combining DBS (30000), BCSE (10), and n_split (65) with range rejection (2 MeV) increased the efficiency by a factor of 2.3 compared with the combination without range rejection.Almatani (2021) found that when the DBS (15,000), BCSE (20), and range rejection (2 MeV) are combined with the optimum n_split, which was found to be 35, this resulted in the maximum dose calculation efficiency for photon splitting only [15].For photon splitting with charged particle splitting, the maximum efficiency was found when DBS (10,000), BCSE (20), and range rejection (2 MeV) were combined with the optimum n_split/e_split, which was found to be 55.When compared with the current findings, the differences apparent might again be due to the simulation parameters used or the differences in the Linac heads used in each simulation.
As a result, for dose calculation efficiency, using photon splitting (n_split with/without e_split) with the optimum combination of DBS and BCSE rather than using split photon (icm_split with/without split electron) is more efficient.This shows that the simulation of the transport through air in the BEAMnrc is less efficient than the transport in the DOSXYZnrc although slightly faster but higher statistical uncertainty [20].This is due to the better spatial distribution of contaminant electrons in DOSXYZnrc code.Therefore, the DOSXYZnrc geometry, rather than the BEAMnrc, should include the air gap between the jaws and the phantom to allow for greater efficiency [20].

Conclusion
The effects of different VRTs alone or in combination on the efficiency of the photon fluence and dose calculation of a 6 MV photon from an Elekta Linac with an Agility head were investigated.The investigation included the effects on the photon beam simulation efficiency with and without contaminant electrons.The setting that gave the optimum combination of DBS and BCSE that maximized the photon fluence efficiency was different from that maximized the dose calculation's efficiency.In addition, using range rejection or splitting particles and range rejection with optimum combination increased the efficiency further for the photon fluence and dose calculations.Finally, using photon and electron splitting (n_split and e_split) in DOSXYZnrc was more efficient than using splitting particle (icm_split) in BEAMnrc for dose calculation.

Figure 2 .
Figure 2. Photon fluence efficiency as a function of BCSE and NBRSPL (for photon and charged particle splitting).

Figure 3 .
Figure 3. Dose calculation efficiency as a function of BCSE and NBRSPL (for photon splitting only).

Figure 4 .
Figure 4. Dose calculation efficiency as a function of BCSE and NBRSPL (for photon and charged particle splitting).

Figure 5 .
Figure 5.The ratio of dose calculation efficiency when the optimum combination of DBS and BCSE are combined with different photon splittings (n_split) over the optimum combination of DBS and BCSE alone.

Table 1 .
Ratio of photon fluence and dose efficiency (ε) compared with analog efficiency (ε analog ) for different VRT.

Table 2 .
Ratio of photon fluence efficiency (ε) over the optimum efficiency (DBS/BCSE, ε opt ) using different VRTs for photon splitting only, and photon with charged particle splitting.

Table 3 .
Ratio of dose efficiency (ε) over the optimum efficiency (DBS/BCSE, ε opt ) using different VRTs for photon splitting only, and photon with charged particle splitting.