Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

A single-source photon source model of a linear accelerator for Monte Carlo dose calculation

  • Obioma Nwankwo ,

    Roles Conceptualization, Data curation, Formal analysis, Methodology, Software, Validation, Visualization, Writing – original draft, Writing – review & editing

    Charles.Nwankwo@medma.uni-heidelberg.de

    Affiliations Department of Radiation Oncology, Medical Faculty Mannheim, Heidelberg University, Mannheim, Germany, Medical Radiation Physics/Radiation Protection, Medical Faculty Mannheim, Heidelberg University, Mannheim, Germany

  • Gerhard Glatting,

    Roles Resources, Supervision, Writing – review & editing

    Affiliations Medical Radiation Physics/Radiation Protection, Medical Faculty Mannheim, Heidelberg University, Mannheim, Germany, Medical Radiation Physics, Department of Nuclear Medicine, Ulm University, Ulm, Germany

  • Frederik Wenz,

    Roles Resources, Supervision, Writing – review & editing

    Affiliation Department of Radiation Oncology, Medical Faculty Mannheim, Heidelberg University, Mannheim, Germany

  • Jens Fleckenstein

    Roles Conceptualization, Data curation, Formal analysis, Resources, Software, Validation, Writing – review & editing

    Affiliation Department of Radiation Oncology, Medical Faculty Mannheim, Heidelberg University, Mannheim, Germany

Abstract

Purpose

To introduce a new method of deriving a virtual source model (VSM) of a linear accelerator photon beam from a phase space file (PSF) for Monte Carlo (MC) dose calculation.

Materials and methods

A PSF of a 6 MV photon beam was generated by simulating the interactions of primary electrons with the relevant geometries of a Synergy linear accelerator (Elekta AB, Stockholm, Sweden) and recording the particles that reach a plane 16 cm downstream the electron source. Probability distribution functions (PDFs) for particle positions and energies were derived from the analysis of the PSF. These PDFs were implemented in the VSM using inverse transform sampling. To model particle directions, the phase space plane was divided into a regular square grid. Each element of the grid corresponds to an area of 1 mm2 in the phase space plane. The average direction cosines, Pearson correlation coefficient (PCC) between photon energies and their direction cosines, as well as the PCC between the direction cosines were calculated for each grid element. Weighted polynomial surfaces were then fitted to these 2D data. The weights are used to correct for heteroscedasticity across the phase space bins. The directions of the particles created by the VSM were calculated from these fitted functions. The VSM was validated against the PSF by comparing the doses calculated by the two methods for different square field sizes. The comparisons were performed with profile and gamma analyses.

Results

The doses calculated with the PSF and VSM agree to within 3% /1 mm (>95% pixel pass rate) for the evaluated fields.

Conclusion

A new method of deriving a virtual photon source model of a linear accelerator from a PSF file for MC dose calculation was developed. Validation results show that the doses calculated with the VSM and the PSF agree to within 3% /1 mm.

Introduction

Monte Carlo (MC) dose calculation is considered as the most accurate method of estimating the energy deposited to a medium by ionizing radiation [1]. MC dose calculation in radiation therapy typically starts with a phase space file (PSF) [25] or a virtual source model (VSM) [2, 614] because it is inefficient to repeatedly simulate particle interactions in the static geometries of the linear accelerator [2, 3, 11, 15]. A PSF is derived by simulating the interactions of primary electrons with the relevant geometries of the modeled device and then recording the particles that reach a reference surface downstream the primary particle source. PSFs contain accurate information about the particles reaching the phase space plane [8] and may be used directly for MC dose calculation as employed in previous works [5, 16]. Due to the large number of particles required for MC dose calculation, PSFs used for dose calculation typically contain several million particles which requires several gigabytes of storage space [13].

MC source models on the other hand contain instructions to create (any desired number of) particles whose properties are a good approximation of those generated by the modeled device or of the information stored in a PSF. They are therefore not limited by the latent variance inherent in PSFs due to their finite size and particle recycling, requires only a few kilobytes or storage space and are the most efficient method of generating particles for MC dose calculation [2, 10, 11, 17, 18]. MC source models may be derived by analytical methods from experimental data [6, 12] or from PSF [8, 11, 13, 19]. A limitation of analytical modeling approaches that use experimental data is that the relevant information for the source model (e.g. energy spectrum) may be difficult to obtain and the information derived by these methods are only a rough approximation of the original data [8]. PSFs on the other hand contain accurate information about the properties of the particles and are therefore a good basis for deriving VSMs. PSF-derived source models have been used extensively for modeling megavoltage photon beams [79, 15, 19].

A PSF of a 6 MV Synergy linear accelerator (Elekta AB, Stockholm, Sweden) photon beam was generated and validated in a previous work [5]. Here, we introduce a method to derive a VSM from this reference PSF. Unlike other PSF-based modeling approaches, our generalized source-modeling method neither requires information about the jaws of the linear accelerator [9, 15, 20] nor information/assumption as to the pre-phase space origin of particles [79, 13, 20]. In addition, it is based on a single source in contrast to commonly used multiple-source approach [9, 13]. Unique to our method is the approach to modeling particle directions. Firstly, the phase space plane was divided into a grid of square elements. Thereafter, direction information (average direction cosines along the x-and y-axes and the Pearson correlation coefficient (PCC) between photon energy and direction as well as between the direction cosines) were calculated for the grid elements. Weighted polynomial surfaces fitted to these data constitute our model of particle directions in the VSM. The positions of particles created by the VSM are the input to retrieve their directions from these fitted functions. As our source-modeling method does not require pre- or post-phase space geometric information, it is general in that it can be applied to modeling arbitrarily shaped 2D or 3D surfaces, for example the INTRABEAM device [11].

Materials and methods

2.1 Simulation toolkit, geometric model of linear accelerator and coordinate system

This work was implemented with the Geant4 toolkit [21] (version 4.9.4) for simulating particle transport through matter. The detailed geometry of a linear accelerator was modeled according to available geometric information as shown in Fig 1. The z-axis of the coordinate system is in the direction of the primary beam while the x-y plane is perpendicular to the beam axis as shown in the figure.

thumbnail
Fig 1. Geometric model of an Elekta Synergy linear accelerator and the coordinate system.

https://doi.org/10.1371/journal.pone.0183486.g001

2.2 Phase space file (PSF)

A PSF of the 6 MV photon beam was derived from the detailed simulation of the interactions of primary electrons and their secondary products with the relevant geometries of a linear accelerator and recording the particles that reach a scoring plane. The scoring plane is located in the beam axis at a distance of 16 cm from the primary electron source. The 6 particle variables recorded in the PSF are the position in the x-y plane (x and y), the direction cosines along the x- and y-axes (vx and vy), the energy (e), and the particle type (t). Additional information regarding the generation and validation of the PSF are available in a previous publication [5]. The PSF used for this work contained 46.12 million particles.

2.3 Analysis of the PSF to derive the VSM and particle creation using the VSM

The approach used to derive the VSM from the PSF and the method of creating particles by the VSM will be discussed in the following order

  1. Particle position (x and y)
  2. Energy (e)
  3. Particle direction (vx, vy and vz)
  4. Type (t)

2.3.1 Particle position (x and y).

Analysis of phase space file to derive VSM

The radial position, ri, of each particle stored in the PSF from the origin of the x-y plane was calculated, (1) where i is the index of the particle in the PSF while xi and yi denote its position in the x-y plane. The probability density function (PDF) for the radial positions of particles (number of particles per radial distance interval) was calculated using a bin width of 0.1 mm. The cumulative distribution function (CDF) was inverted and fitted with a 4th order polynomial spline. The fit to the inverted CDF, F−1, represent the model of particle distribution in the VSM.

Creating particle position with the VSM

The radial position, ri, of particles is randomly calculated from F−1 using the inverse transform sampling method [22] as (2) where U1 is a uniform random number within the closed interval [0, 1]. The location of the particle on the x-y plane is calculated from ri on the basis of rotational symmetry upstream the MLC according to the following equation [11, 15] (3) where θ is a uniform random angle [0°, 360°], which is obtained by multiplying a uniform random number U2 with 360.

2.3.2 Energy (e).

Thirty-five energy spectra were derived from the PSF. Each spectrum represents the energies of particles within a radial distance interval (h). The first 25 spectra are for particles the radial distances 0 ≤ r ≤ 50 mm (bin width = 2 mm). The next 9 spectra are for the radial distance interval 50 < r ≤ 95 mm (bin width = 5 mm), while the last spectrum is for particles with r > 95 mm.

The cumulative distribution functions for the energy spectra were inverted and fitted with 5th order polynomial splines (as described in section 2.3.1 for the particle positions). The energy of a particle (ei) was derived from the inverse transform sampling of the corresponding energy spectrum (4) where denotes the inverse cumulative distribution function for the energy spectrum Eh and U3 denotes a uniform random number.

2.3.3 Particle direction.

Analysis of PSF

The phase space plane was divided into a regular grid comprising of 141 x 141 elements. Each element of the grid corresponds to an area of 1 x 1 mm2 in the phase space. The following variables were then calculated for each grid element, j, from the PSF

  1. The average direction cosines of the particles along the x and y axes (), calculated as (5) k ∈ {x,y} and i is the index of the particles in the jth grid element.
  2. The standard error of each average direction cosine (), calculated as (6)
  3. The Pearson correlation coefficient [23] (PCC) between the particle energies (e) and each lateral (along the x- and y-axes) direction cosine , V ∈ {vx,vy}
  4. The PCC () between the lateral direction cosines (vx and vy).

Polynomial surfaces of varying degrees were fitted to these 2D data (7 in total). The inverse variance of the average direction cosines at each bin, j, was used to weight each data point during fitting as done by other authors [2426] to correct for heteroscedasticity (inconsistent variance). In other words, each bin element, j, was assigned a weight wj during fitting, where (7)

This weighting scheme was used for all seven 2D datasets.

Fits to the average direction cosine data (vx and vy)

The phase space was divided into a primary photon region and a secondary (scattered) photon region. Photons in the primary region are defined by the property rT, where r denotes distance from the origin of the coordinate system and T is the distance value considered as the boundary between the two regions. The two regions were determined from the analysis of the PSF. The primary region was considered as all bin elements with particle count equal to or greater than approximately 20% of the number of particles in the bin with the maximum count. A linear and a polynomial surface was then fitted to the primary and secondary regions respectively as expressed in the following equation (8) k’ = y when k = x and vice versa, while are the fit coefficients.

Fits to the standard error of the average direction cosines (σk) and the PCC data (ρeV and ρv)

Polynomial surfaces of varying degrees were fitted to the five 2D data, σk, ρeV and ρv. A single polynomial surface was used to fit both the primary and secondary photon regions (in contrast to the approach used for fitting the data for the average direction cosine). The orders of the polynomial surfaces (in each axis) fitted to ρeV, σk and ρv are 3, 4 and 5 respectively. We denote the fits to these data as , and . The order of the polynomial used to fit each data was decided by the visual inspection of the fits and by the adjusted r-squared value as suggested by previous authors [27].

Calculating photon directions in the VSM

The direction cosine of a photon in the jth bin along the kth-axis (x or y) is calculated in the source model as (9) where is the normally distributed deviation of the direction cosine of the ith photon from the bin average, while and are the average direction cosine of the bin and the standard deviation from the mean respectively, which are derived from functions and .

A previous study showed that in addition to being dependent on position, photon directions also depends on energy [19]. This correlation is the already mentioned ρeV. We also considered the correlation, between the lateral direction cosines (vx and vy) in the source model. These correlations (between photon energy and direction and between the lateral direction cosines) were implemented in the source model through as described in the following paragraphs.

Correlating particle energy and direction

Our technique to incorporating the correlation between energy and direction in the source model is to correlate the uniform random number, U3, that generates photon energies (Eq 4) and the uniform random number U4, that generates the number standard of deviation of the direction cosine of a photon from the bin average. Although the standard deviation of the mean is a normal distribution (hence a normal random number generator is ordinarily expected), a uniform random provides a method to correlate photon energies and their directions. The two uniform random numbers (U3 and U4) were correlated using the sum-of-uniforms (SOU) method [28, 29].

It relevant to briefly describe the SOU method and the approach we used to derive the function relating parameter c [28] and the PCC. Parameter c is a variable that correlates two independent uniform random variables to a given correlation. Firstly, c was specified for the closed interval [0, 10] at a step increment of 0.2. The PCC (between U3 and U4) for each c value was determined by generating two independent sequences of 106 random numbers, which were then correlated using c according to the SOU method. The PCC between the now correlated random number sequences was then calculated. The function of c against PCC was then implemented in the source model and is henceforth referred to as function g.

To correlate U3 and U4 in the VSM during simulation, the PCC () between energy and the direction cosine in the jth bin is retrieved from the function using the position of the photon as the input to the function. The c value that will achieve this correlation () is then determined from function g using as the input. This c and is then used to correlate U3 and U4. Thereafter, the range of U4 is scaled from [0, 1] to the range [–1, 1] using this [30] technique. The purpose of scaling U4 is to cover the domain of the inverse error function [31] (erfinv). The erfinv converts a uniform random number to a normal random number [32], and thus transforms U4 into the normal random number NU. NU is thus the energy-correlated signed number of standard deviation of the direction cosine of a photon from the bin average.

Correlating the lateral direction cosines

It is important to mention at this stage that U4 is generated twice. In other words, two independent random numbers U4x and U4y are correlated to U3. Consequently, NUx and NUy represents number of standard deviations for and respectively. NUx and NUy are correlated against each other using a previously described technique to correlate normal random numbers. Firstly, the PCC between the two direction cosines in the jth bin is retrieved from function . NUx and NUy are then correlated against each other using a previously described method [33] of correlating normal random numbers (10)

Hence, which appears in Eq 9 is calculated as (11)

Direction cosine along the z-axis (vz)

The z-axis in the reference co-ordinate system defines the direction of the primary beam illustrated in Fig 1. The direction cosine of each particle along the z-axis, , was calculated as follows (12)

2.3.4 Type of radiation (t).

The proportion of the different particle types in the PSF was determined. The type of radiation ti (photon or electron) generated by the VSM was determined according to the following equation (13) where U5 is a uniform random number and Pγ is the proportion of photons in the PSF (such that Pγ + Pe = 1).

2.4 Summary of the process of creating photons by the VSM

Fig 2 provides illustrates the process of creating photons in the source model and the interdependency among the photon variable. Six uniform random numbers are used to generate the photon variables in the following sequence

  1. Two uniform random numbers (U1 and U2) are used to generate the position of the photon as described by Eqs 2 and 3.
  2. The energy spectrum corresponding to the radial position of the photon is sampled using the uniform random number U3 as described by Eq 4.
  3. The direction of the photon is calculated as described in section 2.3.3 and depends on both the position and the energy of the photon. Two uniform random numbers U4x and U4y are required for this purpose.
  4. The type of radiation (photon or electron) is generated with the uniform random number U5 independent of the other photon variables.
thumbnail
Fig 2. The figure summarizes the process of creating photons in the source model and the interdependency of the photon variables.

https://doi.org/10.1371/journal.pone.0183486.g002

2.5 Dose calculation and VSM validation

Two sets of calculations were made using the PSF and the VSM. The doses calculated with the PSF [5] were considered as the reference as our goal is to replace the PSF in the original MC dose calculation algorithm with a VSM. The same dose calculation scheme (voxel size, no variance reduction techniques, dose scoring method) described for the PSF [5] was also used for the VSM. The PSF was used as the particle source to calculate the dose to water for five square field sizes (3 x 3 cm2, 5 x 5 cm2, 10 x 10 cm2, 20 x 20 cm2 and 30 x 30 cm2). Thereafter, the particle source was changed to VSM and the doses for the same 5 field sizes were recalculated. The doses were then compared using profile and gamma analysis [34, 35]. The gamma analysis was performed with OmniPro I’mRT software (IBA, Dosimetry GmbH, Schwarzenbruck, Germany) using the 3% / 1 mm and 3% / 2 mm analysis criteria. The threshold dose considered for the gamma analysis was 10% of the maximum dose and a pixel pass rate of at least 95% is deemed as the passing criterion.

Results

3.1 Particle position

Fig 3 shows the distribution of photons in the phase space and our model of particle distribution. Fig 3(i) shows the inverse cumulative distribution function (continuous line) for the radial position of particles. The knots show the boundaries of the 30 segments of the fitting spline. Fig 3(ii) compares the radial positions of the (46.12 million) particles stored in the PSF and those created by the VSM, while Fig 3(iii) and 3(iv) compare their positions on the x-y plane. Fig 3(v) shows the horizontal profiles through the centre of the PSF and VSM phase spaces, i.e. profiles through the centre of Fig 3(iii) and 3(iv). The two vertical lines show the primary and the secondary photon regions as explained in section 2.3.3. Photons in the primary region constitute 95.62% of all photons in the PSF. The separation of the phase space into two regions was useful for modeling photon directions. The results show that this approach is accurate for modeling particle positions in the source model.

thumbnail
Fig 3. Particle positions.

(i) Inverse cumulative distribution function for radial positions of particles (continuous line). The knots show the boundaries of the 30 polynomial segements that make up the fitting spline. (ii) Comparison of the radial positions of the PSF particles and those created by the VSM on the phase space. (iii) Distribution of 46.12 million PSF particles on the x-y plane. (iv) Distribution of 46.12 million VSM particles on the x-y plane. (v) Horizontal profile through the centre of the phase spaces.

https://doi.org/10.1371/journal.pone.0183486.g003

3.2. Energy

Fig 4(i) shows the energy spectrum of all the particles in the VSM and Fig 4(ii) shows the average photon energies as a function of their distance from the centre. The results show that the average photon energy tends to decrease with increasing distance away from the centre. Fig 4(iv) compares the energy spectrum of the photons in the PSF and those created by the VSM for r ≤ 2 mm. The result shows good agreement between the reference (PSF) energy spectrum and the spectrum of the photons created by the VSM. All the energy spectra (for the various distance bins) were visually verified as shown in Fig 4(iv).

thumbnail
Fig 4.

(i) Energy spectrum of all particles in the PSF. (ii) Average energies of photons as a function of distance from the centre of the beam (iii) Fit to the inverse cumulative distribution function for the first energy spectrum (photons with r ≤ 2 mm). The continuous line represents the inverted cumulative distribution function while the knots show the boundaries of the 12 polynomial segments of the fitted spline (iv) Comparison of the energy spectrum of particles stored in the PSF and those created by the VSM for r ≤ 2 mm.

https://doi.org/10.1371/journal.pone.0183486.g004

3.3 Particle directions

Fig 5 shows the result of the analysis of the PSF with respect to photon directions. Fig 5(i) and 5(ii) show the average direction cosines along the x- and y-axis respectively. The pixel values in the subfigures are the result of averaging the direction cosines of all photons within a phase space area of 1 mm2. The threshold distance T, which describes the boundary between the primary and secondary photon regions as expressed in Eq 8 was considered to be 43 mm. The primary photons (as discussed in section 2.3.3) constitute 95.62% of all photons in the phase space. This boundary region between the primary and secondary photons is shown in Fig 3(v).

thumbnail
Fig 5. Analysis of the PSF with respect to particle directions and the model of particle directions in the VSM.

Average direction cosines along the (i) x-axis and 5 (ii) y-axis. (iii) PCC between the lateral direction cosines. (iv) PCC between photon energies and the direction cosines along the x- and (v) PCC between photon energies and the direction cosines along the y-axis. (vi) Function relating parameter c and the PCC.

https://doi.org/10.1371/journal.pone.0183486.g005

Fig 5(iii) shows the PCC between the lateral direction cosines, while Fig 5(iv) and 5(v) show the PCC between photon energies and the direction cosines along the x- and y-axis respectively. The results show that the divergence (lateral direction cosines) of the beam decreases as the photon energy increases. This inference is based on the fact that the PCC value is positive in the region where the average direction cosines are negative; hence the direction cosines are increasing in the positive direction (however, the absolute value is decreasing) as the photon energy increases. Conversely, the PCC values are negative in the region where the average direction cosines are positive (Fig 5(iv) and 5(v) should thus be analyzed in conjunction with Fig 5(i) and 5(ii)), In other words, the beam divergence decreases as the photon energy increases. Fig 5(vi) shows the function relating PCC and parameter c. Parameter c is the variable required to correlate two independent uniform random variables with the sum-of-uniforms method. Weighted polynomial surfaces fitted to these 2D data (including the data for the standard error of the average direction cosines which are not shown) as well the function relating c and PCC constitute our model of photon directions in the VSM.

3.4 Type of radiation

Analysis of the PSF showed that it is composed of 99.3% photons and 0.7% electrons. The type of particle created by the VSM was determined as described in Eq 13.

3.5 Comparison of the doses calculated with PSF and VSM

Fig 6 and Table 1 compare the dose to water calculated using the PSF and VSM as the particle source for 5 field sizes (3x 3 cm2, 5 x 5 cm2, 10 x 10 cm2, 20 x 20 cm2 and 30 x 30 cm2). Fig 6(i) compares the central axis depth dose curves while Fig 6(ii), 6(iii) and 6(iv) compare the lateral profiles at 0 cm, 10 cm and 20 cm depths respectively. Table 1 shows the results of the comparison of the datasets using the gamma analysis method. All the fields pass with the 3% / 1 mm analysis criterion.

thumbnail
Fig 6. Comparison of the calculated dose with the PSF and VSM algorithms.

(i) Central axis depth dose curves. Lateral profiles at (i) 0 mm (ii) 10 cm and (iii) 20 cm depths for field sizes 3 x 3 cm2, 5 x 5 cm2, 10 x 10 cm2, 20 x 20 cm2 and 30 x 30 cm2.

https://doi.org/10.1371/journal.pone.0183486.g006

thumbnail
Table 1. Comparison of the PSF and VSM-calculated central axis dose planes using gamma analysis.

https://doi.org/10.1371/journal.pone.0183486.t001

Discussion

A new method of modeling the phase space of a linear accelerator photon beam using a VSM for MC dose calculation is introduced. Unlike previous VSM implementation methods, our source-modeling approach does not require information about the jaws of the linear accelerator [15, 20] nor pre-phase space information/assumption of the origin of particles [7, 8]. The non-requirement of geometric information regarding the construction of the modeled device makes our approach more general and applicable to modeling arbitrarily shaped 2D and 3D phase space surfaces, such as the INTRABEAM system [11]. Additionally, the non-utilization of pre-phase space geometric information implies that given a PSF, the detailed pre-phase space geometric information about the construction of the source (proprietary data) is not required to derive a source model.

VSMs are commonly implemented using multiple sub-sources placed at different geometric locations [9, 12, 13, 36]. Up to 12 sub-sources have been used for modeling a linear accelerator photon beam [9]. The justification for the use of multiple sources is that particles originating from different components of the linear accelerator have different properties (distributions, energy and directions) while those from the same accelerator components possess similar properties [13]. Hence, the multiple source approaches create particles at the different locations of the components of the linear accelerator. But the PSF is scored/defined on a single plane. Hence, our goal is to demonstrate that it is possible to define a VSM that is located at exactly the position of the phase space plane. We have thus introduced a method to reconstruct the PSF using a single particle source.

Unique to our source modeling is the method of modeling particle directions. Particle directions in other source-modeling approaches require pre-phase space information regarding the origin of the photon [79, 13, 20]. This information is not required with our approach. Our method is to firstly divide the phase space plane into a regular square grid and then group particles according to their location in the phase space plane. Thereafter, direction information (the average direction cosines and their standard errors, the PCC between photon energy and the direction cosines, as well as the PCC between the lateral direction cosines) are calculated for each grid element. Polynomial surfaces fitted to these data constituted our model of particle directions in the VSM. The grid size used for modeling particle directions corresponds to an area of 1 mm2 in the phase space plane. The influence of varying grid size on the accuracy of the VSM was not investigated. Hence, an optimized grid size could yield improved results.

The dose calculated with the PSF was considered as reference in this work because our aim is to demonstrate how to approximate the PSF data with a VSM. The inverse-standard error [24, 3740] and inverse-variance [2426] techniques are commonly used weighting schemes to correct for inconsistent variances [38]. We found the inverse-variance approach as suitable weights for fitting the data on photon directions.

It was shown in a previous work [19] that photon directions also depend on their energies (in addition to being position-dependent). We confirmed this correlation in our analysis of the PSF as shown in Fig 5(iv) and 5(v). We also developed a new method to correlate photon energies and their directions by correlating the uniform random numbers that generate photon energies (U3) to the uniform random number (U4) that generates the number of standard deviation of their direction cosines from the bin average. It is relevant to explain how the correlation of these two uniform random numbers will translate to photon directions that are correlated with their energies.

With the inverse transform sampling method that was used to generate the photon energies, small values of U3 (close to 0) generate low energies; intermediate values (around 0.5) generate the average energies in the spectrum, while large values (close to 1) generate high energies. For the inverse error function [31], low values (close to -1) generates large negative number of standard deviation, intermediate values (close to 0) generate values close to 0, while large values (close to 1) generate large positive number of standard deviation.

To explain how the forgoing translates to photon directions that are correlated to their energies, we first consider the instance of positive correlation, which is the case in the phase space region where the average direction cosines are negative (Fig 5(i), 5(ii), 5(iv) and 5(v)). Although the results show a moderate level of correlation between photon energies and directions, let’s assume a perfect correlation (-1 or 1) of these variables for the purpose of this discussion. High photon energies (generated by large U3 values) will lead to the generation of a positive large number of standard deviation due to the positive correlation between U3 and U4. The effect of adding this large positive number of standard deviation to the average direction cosine of the bin (Eq 9) is that the direction cosine of the photon increases in the positive direction (absolute value is decreased). The implication is that the photon becomes less divergent as the energy of the photon increases. The opposite is true when the photon energy is low. In this case, large negative number of standard deviations is generated (due to the low U3 and U4 values), which increases the lateral direction cosine in the negative direction.

In the case of negative correlation, which is the situation in the region where the direction cosines are positive as can be seen in Fig 5(i), 5(ii), 5(iv) and 5(v), high photon energies generate large negative number of standard deviation, which when added to the positive average direction cosine value leads to a decrease in the lateral direction cosine of the photon. Conversely, the divergence (lateral direction cosine) of the photon increases as photon energy decreases because low U3 values (which generates low photon energies) will lead to large U4 values being generated (due to negative correlation), which in turn translates to a large positive number of standard deviation, which increases the lateral direction cosine (divergence) of the photon.

Conclusion

A method of deriving a virtual photon source model of a linear accelerator from a PSF is introduced. Unique to the approach is the method of handling particle direction, which does not require pre- or post- phase space information. Additionally, the VSM was implemented with a single particle source that is located at the plane where of the PSF was scored. Validation results show a 3% / 1 mm agreement between the doses calculated with the PSF and VSM.

Supporting information

S1 File. Phase space file containing 500,000 particles.

The test file is an N x 6 matrix (N = 500,000). The first column specify the type of radiation (|1| = photon, |2| = electron, |3| = positron), the second column the energy (MV), the 3rd and 4th columns the x and y positions (mm), and the last 2 columns the direction cosines along the x- and y-axis.

https://doi.org/10.1371/journal.pone.0183486.s001

(ZIP)

S2 File. Phase space file containing 500,000 particles.

Same format as S1 File.

https://doi.org/10.1371/journal.pone.0183486.s002

(ZIP)

S3 File. Phase space file containing 500,000 particles.

Same format as S1 File.

https://doi.org/10.1371/journal.pone.0183486.s003

(ZIP)

S4 File. Phase space file containing 500,000 particles.

Same format as S1 File.

https://doi.org/10.1371/journal.pone.0183486.s004

(ZIP)

S1 Dataset. Dataset containing the reference (PSF) central axis dose planes of all field sizes.

https://doi.org/10.1371/journal.pone.0183486.s005

(ZIP)

S2 Dataset. Dataset containing the central axis dose planes calculated using the virtual source model as the particle source.

https://doi.org/10.1371/journal.pone.0183486.s006

(ZIP)

Acknowledgments

We acknowledge the financial support of the Deutsche Forschungsgemeinschaft and Ruprecht-Karls-Universität Heidelberg within the funding programme Open Access Publishing.

References

  1. 1. Spezi E, Lewis G. An overview of Monte Carlo treatment planning for radiotherapy. Radiation protection dosimetry. 2008;131(1):123. pmid:18930928
  2. 2. Chetty IJ, Curran B, Cygler JE, DeMarco JJ, Ezzell G, Faddegon BA, et al. Report of the AAPM Task Group No. 105: Issues associated with clinical implementation of Monte Carlo-based photon and electron external beam treatment planning. Med Phys. 2007;34:4818.
  3. 3. Siebers J, Keall P, Libby B, Mohan R. Comparison of EGS4 and MCNP4b Monte Carlo codes for generation of photon phase space distributions for a Varian 2100C. Physics in medicine and biology. 1999;44(12):3009.
  4. 4. Libby B, Siebers J, Mohan R. Validation of Monte Carlo generated phase-space descriptions of medical linear accelerators. Medical Physics. 1999;26(8):1476–83. pmid:10501046
  5. 5. Fleckenstein J, Jahnke L, Lohr F, Wenz F, Hesser J. Development of a Geant4 based Monte Carlo Algorithm to evaluate the MONACO VMAT treatment accuracy. Z Med Phys. 2013;23(1):33–45. pmid:22921843
  6. 6. Sikora M, Dohm O, Alber M. A virtual photon source model of an Elekta linear accelerator with integrated mini MLC for Monte Carlo based IMRT dose calculation. Phys Med Biol. 2007;52:4449. pmid:17634643
  7. 7. Chetty I, DeMarco J, Solberg T. A virtual source model for Monte Carlo modeling of arbitrary intensity distributions. Med Phys. 2000;27:166. pmid:10659754
  8. 8. Fix MK, Keall PJ, Dawson K, Siebers JV. Monte Carlo source model for photon beam radiotherapy: photon source characteristics. Med Phys. 2004;31:3106. pmid:15587664
  9. 9. Fix MK, Stampanoni M, Manser P, Born EJ, Mini R, Rüegsegger P. A multiple source model for 6 MV photon beam dose calculations using Monte Carlo. Phys Med Biol. 2001;46(5):1407. pmid:11384062
  10. 10. Spezi E, Volken W, Frei D, Fix M. A virtual source model for Kilo-voltage cone beam CT: Source characteristics and model validation. Med Phys. 2011;38:5254. pmid:21978069
  11. 11. Nwankwo O, Clausen S, Schneider F, Wenz F. A virtual source model of a kilo-voltage radiotherapy device. Phys Med Biol. 2013;58(7):2363. pmid:23492906
  12. 12. Fippel M, Haryanto F, Dohm O, Nüsslin F, Kriesen S. A virtual photon energy fluence model for Monte Carlo dose calculation. Med Phys. 2003;30:301. pmid:12674229
  13. 13. Deng J, Guerrero T, Ma C, Nath R. Modelling 6 MV photon beams of a stereotactic radiosurgery system for Monte Carlo treatment planning. Phys Med Biol. 2004;49(9):1689. pmid:15152924
  14. 14. Deng J, Jiang SB, Kapur A, Li J, Pawlicki T, Ma C. Photon beam characterization and modelling for Monte Carlo treatment planning. Physics in medicine and biology. 2000;45(2):411. pmid:10701512
  15. 15. von Wittenau AES, Cox L, Bergstrom P Jr, Chandler W, Siantar CLH, Mohan R. Correlated histogram representation of Monte Carlo derived medical accelerator photon-output phase space. Med Phys. 1999;26:1196. pmid:10435519
  16. 16. Clausen S, Schneider F, Jahnke L, Fleckenstein J, Hesser J, Glatting G, et al. A Monte Carlo based source model for dose calculation of endovaginal TARGIT brachytherapy with INTRABEAM and a cylindrical applicator. Z Med Phys. 2012.
  17. 17. Sikora M, Alber M. A virtual source model of electron contamination of a therapeutic photon beam. Phys Med Biol. 2009;54:7329. pmid:19926911
  18. 18. Sempau J, Sanchez-Reyes A, Salvat F, ben Tahar HO, Jiang S, Fernandez-Varea J. Monte Carlo simulation of electron beams from an accelerator head using PENELOPE. Physics in medicine and biology. 2001;46(4):1163. pmid:11324958
  19. 19. Grevillot L, Frisson T, Maneval D, Zahra N, Badel J, Sarrut D. Simulation of a 6 MV Elekta Precise Linac photon beam using GATE/GEANT4. Phys Med Biol. 2011;56(4):903. pmid:21248389
  20. 20. Fix MK, Keller H, R√ºegsegger P, Born EJ. Simple beam models for Monte Carlo photon beam dose calculations in radiotherapy. Medical Physics. 2000;27(12):2739–47. pmid:11190957
  21. 21. Agostinelli S, Allison J, Amako Ka, Apostolakis J, Araujo H, Arce P, et al. GEANT4-a simulation toolkit. Nuclear instruments and methods in physics research section A: Accelerators, Spectrometers, Detectors and Associated Equipment. 2003;506(3):250–303.
  22. 22. Martinez WL, Martinez AR. Computational Statistics Handbook with MATLAB, Third Edition. Florida, USA: CRC Press; 2015.
  23. 23. Lee Rodgers J, Nicewander WA. Thirteen ways to look at the correlation coefficient. The American Statistician. 1988;42(1):59–66.
  24. 24. Zorn ME, Gibbons RD, Sonzogni WC. Weighted least-squares approach to calculating limits of detection and quantification by modeling variability as a function of concentration. Analytical Chemistry. 1997;69(15):3069–75. pmid:21639327
  25. 25. Nelson JP, Kennedy PE. The use (and abuse) of meta-analysis in environmental and natural resource economics: an assessment. Environmental and resource economics. 2009;42(3):345–77.
  26. 26. Fedewa MV, Das BM, Evans EM, Dishman RK. Change in weight and adiposity in college students: a systematic review and meta-analysis. American journal of preventive medicine. 2014;47(5):641–52. pmid:25241201
  27. 27. Kletting P, Schimmel S, Kestler H, Hänscheid H, Luster M, Fernandez M, et al. Molecular radiotherapy: The NUKFIT software for calculating the time-integrated activity coefficient. Medical Physics. 2013;40(10).
  28. 28. Willemain RT, Desautels AP. A method to generate autocorrelated uniform random numbers. Journal of statistical computation and simulation. 1993;45(1–2):23–31.
  29. 29. Chen J-T. Using the sum-of-uniforms method to generate correlated random variates with certain marginal distribution. European journal of operational research. 2005;167(1):226–42.
  30. 30. Mathworks. Random Numbers Within a Specific Range—MATLAB & Simulink. http://de.mathworks.com/help/matlab/math/floating-point-numbers-within-specific-range.html Accessed on 2 June 2017 [03/07/2017]. Available from: http://de.mathworks.com/help/matlab/math/floating-point-numbers-within-specific-range.html.
  31. 31. Weisstein EW. "Inverse Erf." From MathWorld—A Wolfram Web Resource. http://mathworld.wolfram.com/InverseErf.html Accessed on 2 June 2017 [2 June 2017].
  32. 32. Giles M. Approximating the erfinv function. GPU Computing Gems. 2011;2:109–16.
  33. 33. Bonate PL. Pharmacokinetic-Pharmacodynamic Modeling and Simulation. 2 ed. New York, USA: Springer US; 2011.
  34. 34. Low DA, Harms WB, Mutic S, Purdy JA. A technique for the quantitative evaluation of dose distributions. Med Phys. 1998;25:656. pmid:9608475
  35. 35. Depuydt T, Van Esch A, Huyskens DP. A quantitative evaluation of IMRT dose distributions: refinement and clinical assessment of the gamma evaluation. Radiother Oncol. 2002;62(3):309–19. pmid:12175562
  36. 36. Ma C-M. Characterization of computer simulated radiotherapy beams for Monte-Carlo treatment planning. Radiation Physics and Chemistry. 1998;53(3):329–44.
  37. 37. Havránek T. Rose effect and the euro: is the magic gone? Review of World Economics. 2010;146(2):241–61.
  38. 38. Saxonhouse GR. Estimated parameters as dependent variables. The American Economic Review. 1976:178–83.
  39. 39. Lewis JB, Linzer DA. Estimating regression models in which the dependent variable is based on estimates. Political Analysis. 2005;13(4):345–64.
  40. 40. Nelson JP. Cigarette advertising regulation: A meta-analysis. International Review of Law and Economics. 2006;26(2):195–226.