1. Introduction
For cancer patients, radiotherapy has become one of the most important choices for treatment. Advanced techniques such as intensity-modulated radiation therapy (IMRT) and volumetric modulated arc therapy (VMAT) are likely to offer different dose distributions. Therefore, accurate dose calculation and treatment planning are crucial. For recent linear accelerators, there are two types of treatment mode currently in use. The first mode is flattening filter (FF), and the other flattening filter-free (FFF). FF beams use a cone-shaped high Z metal filter in order to create uniform dose distribution across the field; this approach was used for years in conventional radiotherapy. However, this filter causes beam hardening and reduces the dose rate. FFF beams have been introduced with modern linacs and with advanced radiotherapy techniques such as IMRT and VMAT, where small beamlets are delivered; therefore, field flattening is no longer needed. By removing this filter, the dose became non-uniform, with a higher central dose and a significantly increased dose rate [
1]. This allows faster treatment delivery, reduced treatment times, and lower out-of-field doses. In specific clinical scenarios, the use of flattening filter -free (FFF) beams also can improve treatment efficiency; however, careful planning is vital to minimize any possible increase in scatter radiation to healthy tissues. With the growing implementation of FFF beams in modern radiotherapy, accurate modeling of their unique dose distributions is essential for precise delivery of treatment, optimization of tumor control, and reducing the impact on healthy organs.
In radiotherapy treatment, the most fundamental element is the accuracy of the dose calculation algorithms that are used. However, most of the currently available software programs use a variety of approximation techniques in order to reduce the required time for dose calculations [
2]. Zaman et al. (2019) highlighted that commonly used treatment planning algorithms such as the Anisotropic Analytical Algorithm (AAA) and Acuros XB, have limited ability to accurately calculate the radiation dose in heterogeneous media [
3]. While these algorithms provide faster dose calculations, they are based on several approximations which reduce their accuracy.
The most precise and realistic dose calculation method currently available is the Monte Carlo (MC) approach, which accurately calculates head scatter and accounts for tissue heterogeneity. A completely full linear accelerator (linac) head can be built using several available Monte Carlo codes, such as EGSnrc, GEANT4, Fluka, and MCNP, which can be utilized to simulate complete treatment settings [
1,
4,
5,
6]. A medical linear accelerator (linac) generates high-energy X-rays or electrons for cancer treatment. In photon mode, the electrons strike a tungsten target to produce X-rays, while in electron mode, the electron beam is directly used for treatment.
MC modelling is mainly based on modelling different linac head parts in terms of dimensions, geometry, and accurate material composition, which are provided by the manufacturer. This virtual linac can undergo MC commissioning to provide the initial beam parameters of the incident electron that include its energy, the full width half maximum (FWHM) of the incident electron beam, and its angular distribution, which are not typically provided by linac manufacturers [
7]. Thus, these parameters can be found by comparing the Monte Carlo data of the model with measured data, which includes comparison of percentage depth dose (PDD), lateral profiles, and output factors.
Compared to traditional treatment planning algorithms, the MC method requires longer computational time [
8,
9]. However, with the introduction of increasingly advanced computers and variance reduction strategies, MC methods are becoming more practical in radiotherapy planning systems [
10,
11]. New methods for treatment planning have emerged recently that combine GPU-accelerated Monte Carlo simulation techniques with linac head models to reduce dose computation time while maintaining high precision [
11,
12,
13,
14,
15]. By utilizing a specific virtual clinical linac machine and GPU parallel processing, fast and reliable dose calculations can be performed, making them suitable for adaptive and real-time radiotherapy workflows. Therefore, a virtual validated model, which accurately represents the head components and beam characteristics, can serve as a foundational input for such GPU-based MC platforms.
In the literature, few studies have modelled linac operation at 10 MV photon beam energies for different manufacturers and different applications [
16,
17,
18,
19,
20,
21,
22]. Existing work often targets specific objectives, such as comparing treatment plans. Other studies have investigated head scatter, particularly electron and neutron contamination, in order to estimate secondary cancer risk [
18,
23]. However, most of these available studies did not include FFF mode and did not perform comprehensive validation of the linac model.
The aims of this study involved modelling, fine-tuning, and validating a Varian Clinac iX linac operating at 10 MV photon energy for FF and FFF beams. This model was chosen because it contains detailed information about the treatment head, whereas newer systems such as the Varian TrueBeam offer limited access to internal design details due to proprietary restrictions.
The method involves linac head modelling using BEAMnrc, then adjusting the incident electron parameters (energy, FWHM, angular divergence) to match the MC-simulated PDD, lateral profiles, and output factors, with commissioning data measured using DOSXYZnrc. Secondly, the model was validated by comparing the MC profiles for different field sizes with measured data in both FF and FFF modes. Finally, the increase in dose rate for the FFF beam compared to the FF beam was calculated for different field sizes.
2. Methods and Results
2.1. Linac MC Model
To build a virtual model of a Varian 10 MV photon Clinac iX, BEAMnrc (EGSnrc version 2023) MC code was used to build a linac in both beam modes [
24]. The linac model was built using different prebuild MC modules in BEAMnrc (as shown in
Figure 1). The modelled head components involve the target (SLABS), primary collimator (CON3R), flattening filter (FLATTFILT) (removed for FFF mode), secondary collimators (JAWS), and multileaf collimator (MLCE). The materials and their density used in Monte Carlo modelling are based on data provided by the manufacturer. Incident electron parameters can be modified in the BEAMnrc/EGSnrc MC code at source number 19, which is defined as “Elliptical beam with a Gaussian distribution.”
For water tank modelling, DOSXYZnrc (EGSnrc) MC code was used for dose scoring with three-dimensional voxelized geometry [
25]. With a voxel size of 0.5 × 0.5 × 0.5 cm
3, the water tank model had a total of 85 × 85 × 73 voxels. The dimension of the modelled water tank is 42.5 × 42.5 × 36.5 cm
3. All simulations for tunning the model (
Section 2.2.1,
Section 2.2.2 and
Section 2.2.3) were performed with a field size of 10 × 10 cm
2 and an SSD of 100 cm. In DOSXYZnrc, the BEAM treatment head simulation (full head), which is source number 9, was used to simulate the dose distributions. To achieve a statistical uncertainty of less than 1% in the field, the number of histories was different for each Monte Carlo simulation.
The “.pegs” file used for materials cross-section data for BEAMnrc is 700ICRU, and for DOSXYZnrc is a 521ICRU. 700ICRU uses a higher photon cutoff (700 keV) compared to 521ICRU to reduce simulation time by neglecting soft photon contributions.
Several variance reduction strategies, including range rejection and directed bremsstrahlung splitting, were applied to reduce simulation time. For other Monte Carlo parameters, default values for EGSnrc parameters were used. The energy cutoffs for electrons are set to 0.01 MeV, and the cutoffs for photons are set to 0.7 MeV. Utilizing the photon splitting number technique, DOSXYZnrc computation efficiency was increased.
All simulations were run on a PC with an 11th Gen Intel(R) Core (TM) i7-11700 @ 2.50 GHz 2.50 GHz processor. The installed RAM was 32 GB, and it ran a 64-bit operating system, Windows 11.
2.2. Tuning of the Linac MC Model
The simulated FF and FFF MC data were compared with commissioning data from hospitals in order to find the precise values of incident electron parameters, which includes its energy, FWHM, and angular divergence. The comparison considers PDD, dose profiles, output factors, and lateral profiles for different field sizes. The commissioning data were collected using a water tank fitted with an IBA dosimetry CC13 ionization chamber. The IBA CC13 ionization chamber is a cylindrical dosimeter used for accurate radiation dose measurements. The sensitive volume for this dosimeter is approximately 0.1 cm3, which ensures high precision and reliability. A detector offset correction of −1.8 mm was applied to account for the effective point of measurement and to improve dose accuracy. The measurement process in the IBA CC13 chamber is subject to systematic uncertainties, including potential errors in detector calibration, positioning inaccuracies, environmental factors, and spatial resolution limitations, with uncertainties ranging from 1 to 2%. Electron energy, FWHM, and angular distribution can be altered in BEAMnrc to tune incident electron parameters. These parameters can be modified in source 19 (Elliptical beam with Gaussian distributions in X and Y), which was used to model the beam in the BEAMnrc input file.
2.2.1. Effect of Electron Energy on PDD
The optimal energy for incident electrons was specified for the model by comparing the MC PDD curves for the different incident electron energies with measured data. The monoenergetic electron energies that were tested ranged from 9.0 to 10.5 MeV in 0.1 MeV increments at 100 cm SSD. For each simulation, 5 × 107 histories were used to achieve a statistical error of less than 1%. The statistical uncertainties in the Monte Carlo calculations are less than 0.8% in-field and approximately 2 to 5% out-of-field. Gamma analysis was used to provide quantifiable comparison between the calculated and measured data. For the gamma analysis, the percentage difference is represented as a percentage (%), and distance-to-distance agreement is represented in millimeters (mm). In this study, two criteria were used, which were 2%/2 mm and 1%/1 mm. For each of these criteria, the gamma index (GI) is used to compare how closely the measured radiation doses match the MC-simulated doses. A GI value < 1 means that the measured dose is within an acceptable range of the planned dose, indicating good agreement between the two. This suggests that the treatment was delivered accurately enough to achieve the intended outcome. On the other hand, a GI value < 0.5 is a stricter criterion, meaning the measured dose must be even closer to the planned dose, showing very precise agreement.
Table 1 compares the simulated PDD curves to the measured data for the studied electron energies. An MC simulation was performed to up to a 35 cm depth in MC water phantom.
Figure 2 shows some of the simulated PDD curves compared to measured data, which vary slightly with different incident electron energies. However, according to the gamma analysis (as indicated in
Table 1), the optimal incidence electron energy was chosen to be 9.5 MeV. The gamma analysis results for the 2%/2 mm criterion for 9.5 MeV energy were 97.5% for
GI < 1 and 94.3% for
GI < 0.5. Also, the 1%/1 mm criterion for this energy showed the highest agreement. For all simulations, statistical uncertainty of less than 1% was achieved. The 9.5 MeV energy level was used for the second step of tuning the model study based on this investigation. For surface dosimetry, the chosen voxel size was considered to be large for such a high-gradient region. Thus, this model is not valid for surface dosimetry and needs to be validated in the future.
2.2.2. Tuning of Lateral Profiles with FWHM
After determining the best electron energy for the 10 MV model from the PDD comparison, the next step was to determine the model’s optimal FWHM value. This was accomplished by comparing simulated lateral profiles in both directions with measured data. In this stage, FWHMs ranging from 0.1 cm to 0.5 cm in 0.05 increments in both the x- and y-directions were employed. Then, the calculated lateral profiles for FF and FFF were compared with measured data for both directions at a depth of 1.5 cm. In total, 4 × 107 histories were used for all FWHM simulations to achieve a statistical error of less than 1%. Gamma analysis also was used to compare the calculated data with measured data for each value of FWHM.
Based on the tuning of electron energy, 9.5 MeV electron energy was used to tune the FWHM. Thus, the FWHM of electron beam spot on the target was adjusted to compare the calculated lateral profiles to measured ones for both directions. The incident electron beam could be an elliptical or circular beam.
As shown in
Figure 3 and
Table 2, by using gamma analysis, the best FWHM for the studied FWHM was found to be 0.1 cm in both directions. Although an elliptical beam was used, the spot shape ended up being circular based on the simulation results. Thus, the 0.1 cm FWHM circular spot was selected as the best value for this linac model. As illustrated in
Figure 3, the lateral profile was clearly affected by the FWHM of the incident electron.
2.2.3. Tuning of the Lateral Profile with Angular Divergence of Incident Electrons
After determining the optimal incident electron energy and the best FWHM of the incident electron, the linac MC model was tuned further by changing the mean angular divergence. In increments of 0.01°, the lateral profiles of the model were produced with angular divergences ranging from 0.01° to 0.1°. This was achieved to further reduce discrepancies between the calculated and measured data. In total, 4 × 10
7 histories were used for all angular divergence simulations to achieve a statistical error less than 1% for both beam modes. Also, gamma analysis was used to compare the calculations with measured data. The impact of the angular divergence of electron incident on the lateral profile was examined by matching the beam profiles to measured data.
Table 3 and
Figure 4 show the calculated MC angular divergence profiles for a 10 × 10 cm
2 field size compared to the measured profile. Gamma analysis demonstrated that all angles had substantially very close results within the range tested. Gamma analysis with both criteria produced slightly better results at 0.07° angular divergence; thus, this value was chosen for the study.
2.2.4. Validation of the Model: Output Factor Comparison, Lateral Profiles for Different Field Sizes
Based on the established parameters from the above steps, the model was validated by comparing the output factors with the measurement. The output factors were computed at a depth of 5 cm, and the SSD was fixed at 95 cm, which is the measured data configuration. The simulated OFs were calculated as a ratio of the dose for a specific field size to the dose for a field size of 10 × 10 cm2 and then compared with the measured data. The field sizes involved in this comparison were 3, 4, 5, 7, 10, 15, 20, and 30 cm2.
Then, the lateral profiles were compared with measurements for the field sizes 1, 2, 3, 4, 5, 6, 8, 10, 20, and 30 cm2. These field sizes were chosen based on available measured data from the commissioning process.
A. Comparison of Output Factors for Different Field Sizes
For the output factor MC calculation, a number of simulations were run with the chosen electron parameters of 9.5 MeV for the incident electron energy, 0.1 cm FWHM, and 0.07° angular divergence. A comparison of the output factors for various field sizes for FF and FFF beams, from 3 × 3 to 30 × 30 cm
2, is presented in
Table 4. A deviation of less than 1.8% was found for all field sizes from the simulation, which indicates reasonable agreement. This suggests that the model’s selected parameters for incident electrons are reasonable for the studied range, allowing it to be used for studies in the future.
B. Lateral Profiles for Different Field Sizes
Careful validations were required to ensure that the model performs accurately. In addition, it is very important to investigate the accuracy of the flattening filter model; this can be achieved by validating the model for several field sizes. Therefore, multiple simulations were conducted to validate the selected parameters across different field sizes, which are 3 × 3, 4 × 4, 6 × 6, 8 × 8, 10 × 10, 20 × 20, and 30 × 30 cm
2 for both the FF and FFF beam modes, as shown in
Figure 5. It is clear from the figure that the model accurately matches the measured data, within acceptable level of differences. It is important to note that statistical uncertainties for the MC simulation increased for the large fields 20 × 20 and 30 × 30 cm
2, due to that fact that larger field sizes require a large number of histories, which increases the simulation time dramatically. Large field comparison for FF mode indicates that the model of the flattening filter is accurate. Thus, this validated model can be used with high accuracy in future studies.
Also, the validation of the model was extended to include small field sizes, including 1 × 1, 2 × 2, 3 × 3, 4 × 4, and 5 × 5 cm
2, as shown in
Figure 6. The comparison was performed for FF beams only. As illustrated in
Figure 6, the calculated and measured dose distributions showed agreement within acceptable tolerance limits for clinical commissioning (e.g., <2%/2 mm gamma criterion). This confirms the accuracy of the model for small-field beams.
C. Comparison of Dose Rate Between FF and FFF
A comparison of FF and FFF beams (
Table 5) showed that FFF beams produce a higher dose rate for all field sizes. This is because removing flattening filters increases photon fluence. The dose rate is increased almost four times by removing the flattening filter and is decreased slightly for larger field sizes. These findings are consistent with earlier Monte Carlo research that found that employing FFF beams increased dose rates by 3.5 to 5 times, depending on field size and photon energy [
22,
26,
27].
3. Discussion
This work involved the modelling, tuning, and validation of a 10 MV Varian Clinac iX linear accelerator. The model showed good agreement with measured data across all validated profiles. The optimal incident electron energy for this model was found to be 9.5 MeV, with a circular spot size for FWHM of 0.1 cm and an angular divergence of 0.07°. The lateral profile is affected by the incident electron FWHM and angular divergence, as well as accurate modelling of head components, namely the primary collimator, flattening filter, secondary collimator, and multileaf collimator. The PDD was sensitive to electron energies, as well as accurate modelling of head components, namely the target and the flattening filter. In order to validate the whole model of the flattening filter, larger field sizes must be included in the validation to reflect the accuracy of its modeling.
In this study, a voxel resolution of 0.5 × 0.5 × 0.5 cm
3 was used, which gave a 0.125 cm
2 voxel size for all simulations. Even though it is limited for a small field and surface dose dosimetry, this resolution is considered sufficient to capture the gradual variation in dose with depth and is consistent with previous Monte Carlo modeling studies [
16,
28]. For future work, especially for surface dose analysis, finer voxel sizes may be used to model dose buildup and steep gradients more accurately.
In the literature, there are very few studies published on modelling 10 MV linacs for Varian. In 2011, Chibani et al. modelled five Varian linacs with different 21EX energy models, which are 4, 6, 10, 15, and 18 MV [
16]. They used GEPTS Monte Carlo code. This study was one of the first to consider linac modelling for Varian. For the 10 MV model in their study, the best values were found to be 10.2 MeV for the electron energy, 0.3 cm FWHM, and 0° angular divergence. Their validation of the models included limited small and large field sizes, as well as the output factor. The modelled commissioning data agreed with measured data within 1.2% [
16]. However, the Varian model in their study was 21EX, which is different than Clinac iX that was modelled in this study. In 2017, Yani et al. modelled a Varian Clinac iX 10 MV; however, they validated the model for small field dosimetry values only, which were 1 × 1, 2 × 2, 3 × 3, 4 × 4, and 5 × 5 cm
2 field sizes [
18]. The basic parameters were taken from a previous study conducted by their group in 2015 [
29] that validated the 10 MV Varian Clinac iX model using 10 × 10 cm
2, indicating that the optimal energy for the model is 10.3 MeV, with 0.1 cm FWHM. These results are higher energy than the current study, but their optimal FWHM is comparable to ours.
On the other hand, removing the flattening filter increases photon fluence, which is the main cause of the observed higher dose per history for FFF beams, which is about four times for 10 MV Varian Clinac iX. These results are in agreement with literature. In 2006, Vassiliev et al. showed in an experimental study that removing the flattening filter from a clinical linear accelerator (Varian Clinac 21EX) significantly increase the dose rate—by approximately 2.3 times for 6 MV and 5.5 times for 18 MV—compared to conventional flattened beams [
27]. These results were supported and confirmed by another Monte Carlo study that was performed by the same research group [
26]. Also, a recent Monte Carlo study in 2025 showed an increase in dose rate after removing the flattening filter [
1]. These studies confirm that removal of the flattening filter substantially increases photon fluence and dose rate, supporting the results observed in this work.
4. Conclusions
This study successfully developed and validated a Monte Carlo model of the Varian Clinac iX 10 MV linear accelerator, covering both FF and FFF modes across a broad range of small and large field sizes. The acquired data demonstrated that the PDD curves were significantly impacted by the energy of the incident electrons. The PDD curves were insensitive to the FWHM of the electron beam. The lateral dose profile curves were significantly influenced by the original electron beam width FWHM. The lateral profile was not greatly affected by the electron beam’s angular spread.
Optimization of electron beam parameters resulted in highly accurate dose calculations. This is a critical step for precise radiotherapy treatment planning. While the current validation is comprehensive for standard fields, future work should focus on extending the model’s application to more complex clinical scenarios, such as simulations involving computational phantoms or patient-specific data. This validated model provides a solid foundation for improving treatment accuracy and patient safety, ultimately supporting enhanced clinical outcomes for advanced radiotherapy techniques.
Using Monte Carlo simulations, head scatter and out-of-field dose, which are influenced by the presence or absence of a flattening filter, can be assessed and evaluated. These kinds of radiation are greatly impacted by linac head components and beam configuration. Thus, precise estimation of all doses will improve treatment safety and precision.
With the use of an accurate full head MC model, researchers can precisely evaluate different and advanced radiation treatments to balance tumor control and the risk of developing secondary cancer.