3.1 Example of application for macroscopic validation, comparison, and reliability for XRMC and Geant4

On this section a comparison between XRMC version 6.5.0-2 (henceforth called XRMC) [54, 55] and Geant4 version 10.02.p02 (henceforth called Geant4) [36–38] Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison… DOI: http://dx.doi.org/10.5772/intechopen.88893

is presented, as well as the validation of both MCCTs using experimental data collected on three different mammographs. For validation the following measurements were performed: exposure (X), kerma, half-value layer (HVL), inverse square law (ISL), and backscattering (BS). Limitations, advantages, and disadvantages of using a general and specific MCCT will be commented too. Absolute and normalized quantities were selected because it is important to know the correction factor for total number of photons generated per mAs per total irradiated area for each equipment (this number is characteristic of each X-ray tube and will change with the time), and the combination of these quantities helps to define the best approximation for this correction factor in the simulation to get results closer to the clinical reality.

It is important to inform that each setup had the data collected with calibrated equipment (electrometers and ionizing chambers) available at their institutions and performed by the same person that developed the application with both MCCTs. The simulated geometries are the same used on the data collection. In the following, a brief description of the measurement equipment and simulated setup is presented:


It is important to evaluate all the available possibilities on the MCCT to get a realistic perspective of the configurations. Because of that, two modes to describe

• IEC 61508–1 (2010–2104)—Functional safety of electrical/electronic/

Theory, Application, and Implementation of Monte Carlo Method in Science and Technology

• IEC 61508–2 (2010–2104)—Functional safety of electrical/electronic/ programmable electronic safety-related systems—Part 2: Requirements for electrical/electronic/programmable electronic safety-related systems

• IEC 61508–3 (2010–2104)—Functional safety of electrical/electronic/

• IEC 61508–4 (2010–2104)—Functional safety of electrical/electronic/ programmable electronic safety-related systems—Part 4: Definitions and

• IEC 61508–5 (2010–2104)—Functional safety of electrical/electronic/

• IEC 61508–6 (2010–2104)—Functional safety of electrical/electronic/ programmable electronic safety-related systems—Part 6: Guidelines on the

• IEC 61508–7 (2010–2104)—Functional safety of electrical/electronic/ programmable electronic safety-related systems—Part 7: Overview of

• IEC 61511–1 (2003–2101)—Functional safety—Safety instrumented systems for the process industry sector—Part 1: Framework, definitions, system,

• IEC 61511–2 (2003–2007)—Functional safety—Safety instrumented systems for the process industry sector—Part 2: Guidelines for the application of IEC

• IEC 61511–3 (2003–2003)—Functional safety—Safety instrumented systems for the process industry sector—Part 3: Guidance for the determination of the

There are two ISO documents under development at the moment: the ISO/DTR 11462–3 Guidelines for implementation of statistical process control (SPC)—Part 3: Reference data sets for SPC software validation and ISO/NP TR 11462–4 Guidelines for implementation of statistical process control (SPC)—Part 4: Reference data sets

On this section a comparison between XRMC version 6.5.0-2 (henceforth called XRMC) [54, 55] and Geant4 version 10.02.p02 (henceforth called Geant4) [36–38]

• ISO/IEC 25010:2011—Systems and software engineering—Systems and software Quality Requirements and Evaluation (SQuaRE)—System and

3.1 Example of application for macroscopic validation, comparison, and

for the determination of safety integrity levels

application of IEC 61508–2 and IEC 61508–3

hardware and software requirements

required safety integrity levels

for measurement process analysis software validation.

reliability for XRMC and Geant4

software quality models

techniques and measures

61511–1

92

abbreviations

programmable electronic safety-related systems—Part 1: General requirements

programmable electronic safety-related systems—Part 3: Software requirements

programmable electronic safety-related systems—Part 5: Examples of methods

the transport model were evaluated on XRMC (transmission (T) and with scattering for dosimetry (D)). In Geant4, the different radiation transport physics models recommended for low energy photons and electrons (standard-option3 (std), penelope (pen), and Livermore (liv)) were also evaluated. Since measurements of the experimental spectra were not possible, different descriptions of the incident spectra modeled by two different references [73, 74] were explored. When nonexperimental spectra are used to simulate dosimetric quantities, it is necessary to take into account the validation of normalized quantities and, if possible, to use semiempirical correction factors to get accurate values for the average number of photons per mAs per total irradiated area. There are different ways on doing it, but the usual are:


mammographs represented by smallest first and third quartiles (in the range of 3 and 2%). For Lorad (Figure 3c) a better accuracy of the results is visible when spectrum from Barnes et al. [74] is used specially with Geant4, because all data for these spectra presented median closer to 0% and the data for catalogued spectra [73] presented medians between 6 and 3%. However, for this mammograph, there is no difference on precision when both modeled spectra are used, being observed that the data between first and third quartiles for Barnes et al. [74] are in the range of 4 and 8% and for catalogued spectra [73] between 10 and 1%. These

Relative difference between simulated and experimental data considering normalized data, with outliers, for different modeled spectra and all studied mammographs: Inspiration (a), M3000 (b), Lorad (c), and all

Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison…

DOI: http://dx.doi.org/10.5772/intechopen.88893

differences between spectra are more evident in Geant4 simulations. All

Figure 3.

95

equipment (d).

the statistical significance of the results. Table 2 presents the χ

all evaluated cases considering a significance level of 0.05.

means these samples are presenting the same distribution.

mammographs presented outliers for the evaluation of the relative differences. In an evaluation of all mammographs studied, one may observe (Figure 3d) that the spectrum from [74] was generally more accurate and precise than the spectra from [73]. In the case of Geant4, the simulated absorbed energy seems to present smaller dispersion than the calculated data based on spectra at the detector entrance surface (observe the first and third quartiles in Figure 3d). Even observing this general tendency on data dispersion, it is not possible to conclude that one calculation methodology for the dosimetric quantities is better than the other, since this tendency was only observed for one of the three studied mammographs (Figure 3b). It is important to note that these are qualitative observations valid for the database (equipment and setups) of this study or similar conditions of energy range and irradiation geometry. To have a quantitative evaluation, one needs to evaluate

The null hypothesis<sup>12</sup> is rejected if p value is smaller than the significance level (values highlighted in gray in Table 2). When the null hypothesis is rejected, in this

<sup>12</sup> χ<sup>2</sup> test null hypothesis: relationship between experimental and simulated data does not exist, which

<sup>2</sup> p value summary to

In both cases, the error estimation of the experimental data as well as the quantification of the statistical fluctuations of the MC method must be taken into account.

The XRMC does not return the absorbed energy or dose as an output information, so to make the comparison of quantities calculated in same conditions possible, the calculations are based on the incoming spectra on the surface of the sensitive volume. The Geant4 application was planned to collect the spectra on the surface of the sensitive volume, and the same calculations applied to XRMC results were used. On the other hand, for Geant4 validation, the absorbed energy in the sensitive volume was used. The statistical fluctuations were based in a sequence of 10 runs with different seeds for each evaluated case, for both MCCTs, and the average and standard deviation of the data were calculated and used on data analyses.

It is important to compare quantitatively experimental to simulated data for validation. Several statistical tests usually may be applied generally: Chi-square (χ 2 ), Anderson-Darling, Kolmogorov-Smirnov, and Walt-Wolfowitz, among others. However, when one has data with error or statistical fluctuation associated, the χ 2 must be applied since it considers this in the nonparametric evaluation between the statistical populations of interest. Another simple way to start an evaluation of the results is to generate comparative plots. Figure 3 presents the graphical comparison of MCCT validations, and Tables 2 and 3 present the χ <sup>2</sup> p value for the validation and the comparison for all simulated conditions and normalized data.

The graphics in Figure 3 present a visual interesting result for the evaluation of the relative difference between experimental and simulated data taking experimental data as reference. It shows that different systems may be better represented by different modeled spectra. The Inspiration setup (Figure 3a) shows similar results for both modeled spectra since all relative differences for median, first and third quartiles, are between 10 and 2%. A small number of outlier data are observed in this case. The M3000 (Figure 3b) evaluation clearly presents better accuracy and precision using spectra from Barnes et al. [74], since it presents all median data closer to 0% and the lowest data dispersion among the three

Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison… DOI: http://dx.doi.org/10.5772/intechopen.88893

#### Figure 3.

the transport model were evaluated on XRMC (transmission (T) and with scattering for dosimetry (D)). In Geant4, the different radiation transport physics models recommended for low energy photons and electrons (standard-option3 (std), penelope (pen), and Livermore (liv)) were also evaluated. Since measurements of the experimental spectra were not possible, different descriptions of the incident spectra modeled by two different references [73, 74] were explored. When nonexperimental spectra are used to simulate dosimetric quantities, it is necessary to take into account the validation of normalized quantities and, if possible, to use semiempirical correction factors to get accurate values for the average number of photons per mAs per total irradiated area. There are different ways on doing it, but

Theory, Application, and Implementation of Monte Carlo Method in Science and Technology

i. to use the ratio of the simulated and experimental KERMA to get a correction factor, generally using primary beam with different kVp and mAs, in the range of energy of interest, collecting the KERMA with the minimization of

ii. to use a normalized quantity, for example, normalized HVL, to evaluate the proximity of the behavior of the simulated and experimental curves and then use a good of fit (GoF) test on the non-normalized HVL to estimate the best correction factor to fit the amplitude of the simulated to the experimental

In both cases, the error estimation of the experimental data as well as the quantification of the statistical fluctuations of the MC method must be taken into

standard deviation of the data were calculated and used on data analyses.

and the comparison for all simulated conditions and normalized data.

of MCCT validations, and Tables 2 and 3 present the χ

It is important to compare quantitatively experimental to simulated data for validation. Several statistical tests usually may be applied generally: Chi-square (χ

must be applied since it considers this in the nonparametric evaluation between the statistical populations of interest. Another simple way to start an evaluation of the results is to generate comparative plots. Figure 3 presents the graphical comparison

The graphics in Figure 3 present a visual interesting result for the evaluation of the relative difference between experimental and simulated data taking experimental data as reference. It shows that different systems may be better represented by different modeled spectra. The Inspiration setup (Figure 3a) shows similar results for both modeled spectra since all relative differences for median, first and third quartiles, are between 10 and 2%. A small number of outlier data are observed in this case. The M3000 (Figure 3b) evaluation clearly presents better accuracy and precision using spectra from Barnes et al. [74], since it presents all median data closer to 0% and the lowest data dispersion among the three

Anderson-Darling, Kolmogorov-Smirnov, and Walt-Wolfowitz, among others. However, when one has data with error or statistical fluctuation associated, the χ

2 ),

2

<sup>2</sup> p value for the validation

The XRMC does not return the absorbed energy or dose as an output information, so to make the comparison of quantities calculated in same conditions possible, the calculations are based on the incoming spectra on the surface of the sensitive volume. The Geant4 application was planned to collect the spectra on the surface of the sensitive volume, and the same calculations applied to XRMC results were used. On the other hand, for Geant4 validation, the absorbed energy in the sensitive volume was used. The statistical fluctuations were based in a sequence of 10 runs with different seeds for each evaluated case, for both MCCTs, and the average and

the usual are:

data.

account.

94

scattering effects or

Relative difference between simulated and experimental data considering normalized data, with outliers, for different modeled spectra and all studied mammographs: Inspiration (a), M3000 (b), Lorad (c), and all equipment (d).

mammographs represented by smallest first and third quartiles (in the range of 3 and 2%). For Lorad (Figure 3c) a better accuracy of the results is visible when spectrum from Barnes et al. [74] is used specially with Geant4, because all data for these spectra presented median closer to 0% and the data for catalogued spectra [73] presented medians between 6 and 3%. However, for this mammograph, there is no difference on precision when both modeled spectra are used, being observed that the data between first and third quartiles for Barnes et al. [74] are in the range of 4 and 8% and for catalogued spectra [73] between 10 and 1%. These differences between spectra are more evident in Geant4 simulations. All mammographs presented outliers for the evaluation of the relative differences. In an evaluation of all mammographs studied, one may observe (Figure 3d) that the spectrum from [74] was generally more accurate and precise than the spectra from [73]. In the case of Geant4, the simulated absorbed energy seems to present smaller dispersion than the calculated data based on spectra at the detector entrance surface (observe the first and third quartiles in Figure 3d). Even observing this general tendency on data dispersion, it is not possible to conclude that one calculation methodology for the dosimetric quantities is better than the other, since this tendency was only observed for one of the three studied mammographs (Figure 3b).

It is important to note that these are qualitative observations valid for the database (equipment and setups) of this study or similar conditions of energy range and irradiation geometry. To have a quantitative evaluation, one needs to evaluate the statistical significance of the results. Table 2 presents the χ <sup>2</sup> p value summary to all evaluated cases considering a significance level of 0.05.

The null hypothesis<sup>12</sup> is rejected if p value is smaller than the significance level (values highlighted in gray in Table 2). When the null hypothesis is rejected, in this

<sup>12</sup> χ<sup>2</sup> test null hypothesis: relationship between experimental and simulated data does not exist, which means these samples are presenting the same distribution.


Table 2. 2

χ

p values for the validation for both MCCTs considering normalized quantities for all studied cases.

test, one may assume that the compared samples are not from the same population (or are not equal). In Table 2, one may see that, in a general evaluation of HVL, the data collected in Inspiration rejects the null hypothesis for Geant4, evoking liv physics list and spectra from Catalogue [73] for data calculated based on the spectrum that reaches the detector surface. The M3000 is not presenting any null hypothesis rejection. Lorad presents three cases of null hypothesis rejection for HVL values all calculated with Geant4 and the spectra from Catalogue [73]: std physics list considering both calculation methods used (based on spectra and simulated absorbed energy) and pen physics list for simulated absorbed energy. The data for Inspiration and Lorad were collected for different target track-additional filtration combination, so it makes it possible to evaluate the results considering this specific setup characteristic. For Lorad it was possible to observe the null hypothesis rejection for different setups simulated taking into account both target track-additional filtration combination. Comparing the MCCTs, the XRMC presented better agreement to the experimental dataset. In Geant4, the liv physics list presented the lowest, and the std physics list presented the largest number of null hypotheses rejection among the three evaluated Geant4 physics lists. The contingency table

Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison…

<sup>2</sup> statistical test was used to evaluate the independence among the possible

<sup>2</sup> p value summary comparing the results of XRMC to

<sup>2</sup> p values larger than the significance level not

<sup>2</sup> p value

<sup>2</sup> p value of 0.10068 for both modeled

transport models evoked by each MCCT and the best modeled spectra. A χ

Geant4-std, Geant4-pen, Geant4-liv) and a χ

DOI: http://dx.doi.org/10.5772/intechopen.88893

for the irradiation area). Table 3 presents the χ

cases evaluated (Table 3) present χ

of 0.49136 for the comparison among the different transport models (XRMC,

spectra were calculated. Both comparisons presented p values above the significance level, showing that not the transport models nor both modeled spectra simulated are not statistically different when normalized data is used (which means comparing the data independently of the total number of photons emitted per mAs

Geant4 for all evaluated cases considering a significance level of 0.05. Most of the

rejecting the null hypothesis. It shows that the simulated data for both MCCTs are not statistically different. The exception was Lorad HVL for Geant4 liv Catalogue for absorbed energy calculation due to the track target-additional filtration combination Mo25Rh. This difference did not affect the evaluation considering all cases for each transport model. In a complete evaluation of the simulated data produced by XRMC, the results are statistically compatible (in agreement) to the ones simu-

The evaluation same as before was performed with the absolute measurements, first applying the theoretical correction factor, and then the semiempirical correction factor was applied to estimate the number of photons emitted per mAs per total irradiated area. Figure 4 presents the qualitative evaluation for all studied cases and

As expected, the relative differences increase when absolute values are compared. This was expected since under this condition the results are dependent of the number of photons emitted per mAs per total irradiated area, considering each setup configuration (peak tension, track target-add filtration combination, and stability of the electrical network associate to the wave rectification of the tube generator). All mammographs presented outlier data, and, in a general observation, one may see that Inspiration setup (Figure 4a) presented again a systematic behavior with median values between 0 and 30% and first and third quartiles between 10 and 80%. In this case, the simulated data overestimated the experimental data. Compared to the results presented in Figure 3a, it suggests that the simulated normalization factor is larger than the experimental one, causing this systematic behavior for normalized HVL to present simulated values that are always

lated by Geant4 when normalized data are taken into account.

absolute values considering the theoretical correction factor.

with χ

Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison… DOI: http://dx.doi.org/10.5772/intechopen.88893

test, one may assume that the compared samples are not from the same population (or are not equal). In Table 2, one may see that, in a general evaluation of HVL, the data collected in Inspiration rejects the null hypothesis for Geant4, evoking liv physics list and spectra from Catalogue [73] for data calculated based on the spectrum that reaches the detector surface. The M3000 is not presenting any null hypothesis rejection. Lorad presents three cases of null hypothesis rejection for HVL values all calculated with Geant4 and the spectra from Catalogue [73]: std physics list considering both calculation methods used (based on spectra and simulated absorbed energy) and pen physics list for simulated absorbed energy. The data for Inspiration and Lorad were collected for different target track-additional filtration combination, so it makes it possible to evaluate the results considering this specific setup characteristic. For Lorad it was possible to observe the null hypothesis rejection for different setups simulated taking into account both target track-additional filtration combination. Comparing the MCCTs, the XRMC presented better agreement to the experimental dataset. In Geant4, the liv physics list presented the lowest, and the std physics list presented the largest number of null hypotheses rejection among the three evaluated Geant4 physics lists. The contingency table with χ <sup>2</sup> statistical test was used to evaluate the independence among the possible transport models evoked by each MCCT and the best modeled spectra. A χ <sup>2</sup> p value of 0.49136 for the comparison among the different transport models (XRMC, Geant4-std, Geant4-pen, Geant4-liv) and a χ <sup>2</sup> p value of 0.10068 for both modeled spectra were calculated. Both comparisons presented p values above the significance level, showing that not the transport models nor both modeled spectra simulated are not statistically different when normalized data is used (which means comparing the data independently of the total number of photons emitted per mAs for the irradiation area).

Table 3 presents the χ <sup>2</sup> p value summary comparing the results of XRMC to Geant4 for all evaluated cases considering a significance level of 0.05. Most of the cases evaluated (Table 3) present χ <sup>2</sup> p values larger than the significance level not rejecting the null hypothesis. It shows that the simulated data for both MCCTs are not statistically different. The exception was Lorad HVL for Geant4 liv Catalogue for absorbed energy calculation due to the track target-additional filtration combination Mo25Rh. This difference did not affect the evaluation considering all cases for each transport model. In a complete evaluation of the simulated data produced by XRMC, the results are statistically compatible (in agreement) to the ones simulated by Geant4 when normalized data are taken into account.

The evaluation same as before was performed with the absolute measurements, first applying the theoretical correction factor, and then the semiempirical correction factor was applied to estimate the number of photons emitted per mAs per total irradiated area. Figure 4 presents the qualitative evaluation for all studied cases and absolute values considering the theoretical correction factor.

As expected, the relative differences increase when absolute values are compared. This was expected since under this condition the results are dependent of the number of photons emitted per mAs per total irradiated area, considering each setup configuration (peak tension, track target-add filtration combination, and stability of the electrical network associate to the wave rectification of the tube generator). All mammographs presented outlier data, and, in a general observation, one may see that Inspiration setup (Figure 4a) presented again a systematic behavior with median values between 0 and 30% and first and third quartiles between 10 and 80%. In this case, the simulated data overestimated the experimental data. Compared to the results presented in Figure 3a, it suggests that the simulated normalization factor is larger than the experimental one, causing this systematic behavior for normalized HVL to present simulated values that are always

Transport models and spectrum

96

Inspiration

M3000

Lorad

All

 M3000

M3000

M3000 (W-25Rh)

Lorad (Mo30Mo)

Lorad (Mo25Rh)

(Mo25Rh)

NA NA

NA

0.9258

NA NA

NA

<0.001

NA

 0.1466

NA

1.0000

 0.7265

(Mo30Mo)

(HVL)

0.3025

0.0687

NA

NA

0.2463

0.1966

0.1481

0.0710

0.2397

0.1564

0.3511

0.2383

0.2494

0.3756

0.1910

0.0331

 1.0000

 0.6826

 1.0000

 1.0000

 1.0000

 1.0000

 0.1454

 0.9993

 1.0000

 0.0290

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.0600

 1.0000

 1.0000

 1.0000

 1.0000

 0.0328 <0.001

 0.9905

 0.3994

 1.0000

 0.9703

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.2405

 1.0000

 0.0102

 1.0000

 1.0000

 1.0000

 1.0000

 0.3842

 0.0018

 1.0000

<0.001

 0.3811

 1.0000

 1.0000

 1.0000

 1.0000

 0.7587

 1.0000

 1.0000

 1.0000

 1.0000

 0.9997 <0.001

<0.001

 0.0597

 1.0000

 0.1113

 1.0000

 1.0000

 1.0000

 1.0000

 0.9999

 1.0000

<0.001

 0.9993

 1.0000

 1.0000

 1.0000

 0.1811

 1.0000

<0.001

 0.3636

 1.0000

 1.0000

 1.0000

 1.0000

 0.0785

 1.0000

 1.0000

 1.0000

 1.0000

 0.1049 <0.001

<0.001

<0.001

Theory, Application, and Implementation of Monte Carlo Method in Science and Technology

<0.001

 0.2069

 1.0000

 0.0817

 1.0000

 1.0000

 1.0000

 1.0000

 0.9998

 1.0000

 NA

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 NA

 1.0000

 1.0000

 1.0000

 1.0000

 NA

 0.5859

 0.3125

 NA

 NA

 1.0000

 0.9988

 NA

(BS)

(HVL)

identification

XRMC\_T–Barnes

XRMC\_T–Catalogue

XRMC\_D–Barnes

XRMC\_D–Catalogue

G4std–Barnes G4std–Barnes–Calc

G4std–Catalogue

G4std–Catalogue–Calc

G4pen–Barnes G4pen–Barnes–Calc

G4pen–Catalogue

G4pen–Catalogue–Calc

G4liv–Barnes G4liv–Barnes–Calc

G4liv–Catalogue

G4liv–Catalogue-Calc

Table 2.

χ

 for both MCCTs considering

 normalized

 quantities for all studied cases.

2 p values for the validation


Table 3.

χ<sup>2</sup>

p values for the comparison between XRMC and Geant4 (references) considering normalized quantities for all studied cases.

smaller than experimental ones. M3000 (Figure 4b) presents few cases with outliers (Geant4 pen transport model and Barnes et al. spectra [74] and XRMC on T mode with Catalogue [73]). As was observed on normalized data (Figure 3b), it presents the best results with median closer to 0% and the first and third quartiles

Relative difference between simulated and experimental data considering absolute data, with theoretical correction and showing outliers, for the different modeled spectra and all studied mammographs: Inspiration

Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison…

(Figure 4c) presents absolute values generally smaller than the experimental data with the median between 14 and 0% and first and third quartiles between 21 and 5% for all evaluated cases. In a general observation of absolute values (Figure 4d), both spectra presented median differences closer to 0%, probably a compensation for the positive systematic tendency presented by Inspiration and the negative systematic tendency presented by Lorad. It shows the importance of evaluating the whole and parts of the database, grouped by characteristics that may influence the simulation, to have better understanding of the curve behaviors and systematic

To better evaluate the significance of the findings in Figure 4, it is important to

Table 4 is presenting the validation for the mammographs that had at least one p value larger than 0.001. For this reason, the Inspiration (HVL), Inspiration (HVL W50Rh), Inspiration (ISL), Inspiration, (ISL Mo30Mo), Inspiration (ISL Mo25Rh), Inspiration (ISL W50Rh), M3000, M3000 (Mo30Mo), Lorad (Mo-XMo), Lorad

<sup>2</sup> p values for the comparison of both MCCTs consid-

validation and the comparison of both MCCTs considering absolute quantities and

ering absolute quantities and all options evaluated, applying theoretical correction factor. It only presented the mammographs that had p values larger than 0.001. For this reason, Inspiration (HVL), Inspiration (HVL Mo25Rh), Inspiration (HVL W50Rh, Inspiration (ISL), Inspiration (ISL W50Rh), Inspiration, M3000 (Mo25Rh), M3000 (W50Rh), M3000, and Lorad are not presented.

<sup>2</sup> p values for the

10 and 35% for all mammographs and different setups evaluated. Lorad

apply a statistical evaluation. Tables 4 and 5 are presenting χ

all mammographs evaluated, applying the theoretical corrections.

tendencies of the simulated results.

(a), M3000 (b), Lorad (c), and all equipment (d).

DOI: http://dx.doi.org/10.5772/intechopen.88893

Figure 4.

(Mo-XRh), and Lorad are not presented.

Table 5 is presenting the χ

Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison… DOI: http://dx.doi.org/10.5772/intechopen.88893

#### Figure 4.

Relative difference between simulated and experimental data considering absolute data, with theoretical correction and showing outliers, for the different modeled spectra and all studied mammographs: Inspiration (a), M3000 (b), Lorad (c), and all equipment (d).

smaller than experimental ones. M3000 (Figure 4b) presents few cases with outliers (Geant4 pen transport model and Barnes et al. spectra [74] and XRMC on T mode with Catalogue [73]). As was observed on normalized data (Figure 3b), it presents the best results with median closer to 0% and the first and third quartiles 10 and 35% for all mammographs and different setups evaluated. Lorad (Figure 4c) presents absolute values generally smaller than the experimental data with the median between 14 and 0% and first and third quartiles between 21 and 5% for all evaluated cases. In a general observation of absolute values (Figure 4d), both spectra presented median differences closer to 0%, probably a compensation for the positive systematic tendency presented by Inspiration and the negative systematic tendency presented by Lorad. It shows the importance of evaluating the whole and parts of the database, grouped by characteristics that may influence the simulation, to have better understanding of the curve behaviors and systematic tendencies of the simulated results.

To better evaluate the significance of the findings in Figure 4, it is important to apply a statistical evaluation. Tables 4 and 5 are presenting χ <sup>2</sup> p values for the validation and the comparison of both MCCTs considering absolute quantities and all mammographs evaluated, applying the theoretical corrections.

Table 4 is presenting the validation for the mammographs that had at least one p value larger than 0.001. For this reason, the Inspiration (HVL), Inspiration (HVL W50Rh), Inspiration (ISL), Inspiration, (ISL Mo30Mo), Inspiration (ISL Mo25Rh), Inspiration (ISL W50Rh), M3000, M3000 (Mo30Mo), Lorad (Mo-XMo), Lorad (Mo-XRh), and Lorad are not presented.

Table 5 is presenting the χ <sup>2</sup> p values for the comparison of both MCCTs considering absolute quantities and all options evaluated, applying theoretical correction factor. It only presented the mammographs that had p values larger than 0.001. For this reason, Inspiration (HVL), Inspiration (HVL Mo25Rh), Inspiration (HVL W50Rh, Inspiration (ISL), Inspiration (ISL W50Rh), Inspiration, M3000 (Mo25Rh), M3000 (W50Rh), M3000, and Lorad are not presented.

Transport models and spectrum

98

Inspiration

M3000

Lorad

All

 M3000

M3000

M3000 (W-25Rh)

Lorad (Mo30Mo)

Lorad (Mo25Rh)

(Mo25Rh)

(Mo30Mo)

(HVL)

0.9777

0.9149

0.2139

0.1595

0.8606

0.7994

0.1660

0.1572

0.9767

0.6809

0.7014

0.6993

 1.0000

 0.1663

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.000

 1.0000

<0.001

 0.9965

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.9998

 1.0000

 1.0000

 1.0000

 0.4828

 1.0000 <0.001

 1.0000

 1.0000

 0.9998

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.9997

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.9637

Theory, Application, and Implementation of Monte Carlo Method in Science and Technology

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.9999

 1.0000

 0.9975

 1.0000

 1.0000

 1.0000

 1.0000

 0.9200

 0.9974

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.9808

 1.0000

 1.0000

 0.9671

 1.0000

 1.0000

 1.0000

 1.0000

 0.6334

 0.9972

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.9999

(BS)

(HVL)

identification

G4std–Barnes G4std–Barnes–Calc

G4std–Catalogue

G4std–Catalogue–Calc

G4pen–Barnes G4pen–Barnes–Calc

G4pen–Catalogue

G4pen–Catalogue–Calc

G4liv–Barnes G4liv–Barnes–Calc

G4liv–Catalogue

G4liv–Catalogue–Calc

Table 3. χ<sup>2</sup> p values for the comparison

 between XRMC and Geant4 (references)

 considering

 normalized

 quantities for all studied cases.

## Theory, Application, and Implementation of Monte Carlo Method in Science and Technology

The χ

<sup>2</sup> test evaluation presented in Table 5 for absolute values shows a similar

result to the ones presented in Table 3 but with a larger number of cases rejecting the null hypothesis and presenting lower p values for each of the studied cases which was expected due to the dependency of the number of photons per mAs for the total area estimated. Only Inspiration ISL Mo25Rh did not present null hypothesis rejection among all evaluated cases. The increase on null hypothesis rejection, comparing XRMC to Geant4, is related to the small statistical fluctuation presented by the MCCTs (between 0.2 and 1.5%) when compared to experimental data. Based on the p values presented in Table 4, one could conclude that both MCCTs are not valid for this kind of simulation. However, the p values presented for normalized data (Tables 2 and 3) show that the tendencies of the normalized quantities for the simulated data using both MCCTs can be considered statistically non-different to the experimental data. Besides that, the absolute data comparison between both MCCTs (Table 4) presented no null hypothesis rejection. In this case, it is important to verify if the total number of photons defined by the theoretical correction factor applied to the spectra produced a systematic tendency on the expected curves. It is important as well to note that the evaluation is consistent when the normalized data shows no significant difference in the validation process. The curves used in this study to estimate the semiempirical correction factor were:

Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison…

• HVL—the curve of KERMA as function of the additional Al filtration thickness

• ISL—the tendency of the KERMA as function of the distance between focal

• BS—the tendency of the KERMA as function of the thickness of the scatterer considering the scatterer (or considering the backscattered radiation) and the tendency of the KERMA as function of the thickness of the scatterer without considering the scatterer (or not considering the backscattered radiation)

All cases used to generate the semiempirical correction factor considered the best GoF test results for the amplitude when applied to the simulated data for one acceleration voltage and track target-additional filtration combination for a specific mammograph. The best value for the amplitude in each case was used as semiempirical correction factor to be applied as a multiplication factor on the theoretical correction factor for the total number of photons per mAs per total irradiated area.

considering absolute quantities and all cases evaluated, applying the semiempirical correction factors to define the number of photons emitted per mAs per total

The application of semiempirical correction factors shows a better approximation for absolute values. When one compares the results corrected by the theoretical factors (Table 4) to the results corrected by theoretical factors associated to semiempirical factors (Table 6), the increase of cases that did not reject the null hypothesis is visible. With the exception of Geant4 std (Barnes et al. [74]), all the other cases that rejected the null hypothesis are all from Catalogue [73] which shows that for absolute values and the semiempirical methodology used to generate the correction factor; spectrum of Barnes et al. [74] was the one that presented better agreement to experimental data. In the overall evaluation for each studied case comparing each MCCT and transport model, three cases simulated using Catalogue

<sup>2</sup> p values for the validation of both MCCTs

<sup>2</sup> p values below the significance level: Genat4 std and liv for

<sup>2</sup> p values are above the

spot and detector surface for the same acceleration voltage

for the same acceleration voltage

DOI: http://dx.doi.org/10.5772/intechopen.88893

Tables 6 and 7 are presenting the χ

Calculated absorbed energy and Geant4 pen. All the other χ

irradiated area.

[73] spectra presented χ

101


#### Table 4.

χ<sup>2</sup> p values for the validation for both MCCTs considering absolute quantities for all studied cases, applying the theoretical correction factors to define the number of photons emitted per mAs per total irradiated area.


#### Table 5.

χ<sup>2</sup> p values for the comparison between XRMC and Geant4 (references) considering absolute quantities for all studied cases, applying the theoretical correction factors to define the number of photons emitted per mAs per total irradiated area.

Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison… DOI: http://dx.doi.org/10.5772/intechopen.88893

The χ <sup>2</sup> test evaluation presented in Table 5 for absolute values shows a similar result to the ones presented in Table 3 but with a larger number of cases rejecting the null hypothesis and presenting lower p values for each of the studied cases which was expected due to the dependency of the number of photons per mAs for the total area estimated. Only Inspiration ISL Mo25Rh did not present null hypothesis rejection among all evaluated cases. The increase on null hypothesis rejection, comparing XRMC to Geant4, is related to the small statistical fluctuation presented by the MCCTs (between 0.2 and 1.5%) when compared to experimental data.

Based on the p values presented in Table 4, one could conclude that both MCCTs are not valid for this kind of simulation. However, the p values presented for normalized data (Tables 2 and 3) show that the tendencies of the normalized quantities for the simulated data using both MCCTs can be considered statistically non-different to the experimental data. Besides that, the absolute data comparison between both MCCTs (Table 4) presented no null hypothesis rejection. In this case, it is important to verify if the total number of photons defined by the theoretical correction factor applied to the spectra produced a systematic tendency on the expected curves. It is important as well to note that the evaluation is consistent when the normalized data shows no significant difference in the validation process. The curves used in this study to estimate the semiempirical correction factor were:


All cases used to generate the semiempirical correction factor considered the best GoF test results for the amplitude when applied to the simulated data for one acceleration voltage and track target-additional filtration combination for a specific mammograph. The best value for the amplitude in each case was used as semiempirical correction factor to be applied as a multiplication factor on the theoretical correction factor for the total number of photons per mAs per total irradiated area.

Tables 6 and 7 are presenting the χ <sup>2</sup> p values for the validation of both MCCTs considering absolute quantities and all cases evaluated, applying the semiempirical correction factors to define the number of photons emitted per mAs per total irradiated area.

The application of semiempirical correction factors shows a better approximation for absolute values. When one compares the results corrected by the theoretical factors (Table 4) to the results corrected by theoretical factors associated to semiempirical factors (Table 6), the increase of cases that did not reject the null hypothesis is visible. With the exception of Geant4 std (Barnes et al. [74]), all the other cases that rejected the null hypothesis are all from Catalogue [73] which shows that for absolute values and the semiempirical methodology used to generate the correction factor; spectrum of Barnes et al. [74] was the one that presented better agreement to experimental data. In the overall evaluation for each studied case comparing each MCCT and transport model, three cases simulated using Catalogue [73] spectra presented χ <sup>2</sup> p values below the significance level: Genat4 std and liv for Calculated absorbed energy and Geant4 pen. All the other χ <sup>2</sup> p values are above the

Transport models and spectrum identification

Table 4.

Transport models and spectrum identification

G4pen–Catalogue–

Calc

Table 5.

100

total irradiated area.

Inspiration (HVL Mo30Mo)

Inspiration (HVL Mo30Mo)

XRMC\_T–Barnes <0.001 0.1035 <0.001 <0.001 XRMC\_T–Catalogue <0.001 <0.001 <0.001 0,0453 XRMC\_S–Barnes NA NA <0.001 <0.001 XRMC\_S–Catalogue NA NA 0.0028 0.8740 G4std–Barnes 0.1174 <0.001 <0.001 <0.001 G4std–Barnes–Calc 0.1250 <0.001 <0.001 <0.001 G4std–Catalogue <0.001 0.9867 <0.001 <0.001 G4std–Catalogue–Calc <0.001 <0.001 <0.001 <0.001 G4pen–Barnes 0.5026 <0.001 <0.001 <0.001 G4pen–Barnes–Calc 0.7886 <0.001 <0.001 <0.001 G4pen–Catalogue <0.001 0.9854 <0.001 <0.001 G4pen–Catalogue–Calc <0.001 <0.001 <0.001 <0.001 G4liv–Barnes 0.1907 <0.001 <0.001 <0.001 G4liv–Barnes–Calc 0.0224 <0.001 <0.001 <0.001 G4liv–Catalogue <0.001 0.9869 <0.001 <0.001 G4liv–Catalogue–Calc <0.001 <0.001 <0.001 <0.001

Theory, Application, and Implementation of Monte Carlo Method in Science and Technology

χ<sup>2</sup> p values for the validation for both MCCTs considering absolute quantities for all studied cases, applying the theoretical correction factors to define the number of photons emitted per mAs per total irradiated area.

> Inspiration (ISL Mo30Mo)

G4std–Barnes 0.9841 0.84732 0.9999 1.000 0.8953 0.05693 G4std–Barnes–Calc 0.0894 0.06821 0.3586 0.5481 0.0249 0.0586 G4std–Catalogue 0.0676 0.0269 0.9685 0.0957 0.6954 0.0568 G4std–Catalogue–Calc 0.05832 0.0384 0.8437 0.7865 0.7864 0.6785 G4pen–Barnes 0.8284 0.0145 0.0725 0.8679 0.0978 0.6604 G4pen–Barnes–Calc 0.6983 0.9421 0.8796 0.5647 0.0413 0.0211 G4pen–Catalogue 0.6753 0.0261 0.2246 0.3540 0.7953 0.7894

G4liv–Barnes 1.0000 0.6735 0.0516 0.7865 0.9999 1.0000 G4liv–Barnes–Calc 0.0768 0.1276 0.6875 0.5694 0.9574 1.0000 G4liv–Catalogue 0.0107 0.0554 0.1534 0.7865 0.7865 0.3451 G4liv–Catalogue–Calc 0.0544 0.0895 0.5674 0.6352 0.4731 0.8966

χ<sup>2</sup> p values for the comparison between XRMC and Geant4 (references) considering absolute quantities for all studied cases, applying the theoretical correction factors to define the number of photons emitted per mAs per

Inspiration (ISL Mo25Rh)

0.9485 0.8475 0.1000 0.0039 0.8796 0.6854

M3000 (Mo30Mo) Lorad (Mo-XMo) Lorad (Mo-XRh)

Inspiration (HVL Mo25Rh)

M3000 (Mo25Rh)

M3000 (W-50Rh)


Table

Transport models and spectrum

103

Inspiration

Inspiration

M3000

Lorad

All

 M3000

M3000

M3000 (W-25Rh)

Lorad (Mo30Mo)

Lorad (Mo25Rh)

(Mo25Rh)

(Mo30Mo)

(ISL)

(BS)

(HVL)

(HVL)

0.9777

0.9149

0.2139

0.1595

0.8606

0.7994

0.1660

0.1572

0.9767

0.6809

0.7014

0.6993

 0.1660

 1.0000

 0.1663

 1.0000

 1.0000

 1.0000

 1.0000

semiempirical

correction factors to define the number of

 1.0000

 1.0000

 0.7994

 1.0000

 0.9212

 0.9994

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.8606

 1.0000

 0.8765

 1.0000

 1.0000

 1.0000

 1.0000

 0.4828

 1.0000

 0.1595

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.9997

 0.0331

 1.0000

 0.0002

 0.4832

 1.0000

 1.0000

 1.0000

 1.0000

 0.0401

 0.1910

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison…

 0.3756

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.9637

 0.2494

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.9999

 0.0710

 1.0000

 0.9975

 1.0000

 1.0000

 1.0000

 1.0000

 0.9200

 0.9974

 0.1481

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.9808

 1.0000

 0.1966

 1.0000

 0.9671

 1.0000

 1.0000

 1.0000

 1.0000

 0.6334

 0.9972

 0.2463

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.9999

DOI: http://dx.doi.org/10.5772/intechopen.88893

identification

G4std–Barnes G4std–Barnes–Calc

G4std–Catalogue

G4std–Catalogue–Calc

G4pen–Barnes G4pen–Barnes–Calc

G4pen–Catalogue

G4pen–Catalogue–Calc

G4liv–Barnes G4liv–Barnes–Calc

G4liv–Catalogue

G4liv–Catalogue–Calc

Table 7. χ<sup>2</sup> p values for the comparison

photons emitted per mAs per total irradiated area.

 between XRMC and Geant4 (references)

 considering

 absolute quantities for all studied cases, applying the

 χ<sup>2</sup> p values for the validation for both MCCTs considering absolute quantities for all studied cases, applying the semiempirical correction factors to define the number of photons emittedper total irradiated area.

 per mAs


Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison… DOI: http://dx.doi.org/10.5772/intechopen.88893

χ<sup>2</sup> p values for the comparison between XRMC and Geant4 (references) considering absolute quantities for all studied cases, applying the semiempirical correction factors to define the numberphotons emitted per mAs per total irradiated area.

Transport models and spectrum

102

Inspiration

Inspiration

M3000

Lorad

All

 M3000

M3000

M3000 (W-25Rh)

Lorad (Mo30Mo)

Lorad (Mo25Rh)

(Mo25Rh)

NA

NA

 1.0000

 0.7265

(Mo30Mo)

(ISL)

(BS)

(HVL)

(HVL)

0.2502

0.0603

NA NA 0.2635

0.1006

0.1182 0.0653 0.1398

0.1263

0.2151 0.2299 0.1946

0.2384

0.7910 0.0301

 absolute quantities for all studied cases, applying the

<0.001

 0.8073

 0.5762

 0.0665

 1.0000 semiempirical

 correction factors to define the number of photons emitted per mAs

 0.9763

 1.0000

 0.1454

 0.8968

<0.001

 0.0357

 0.0490

 0.0428

 0.9863

 1.0000

 1.0000

 0.0521

 0.7092

 0.1349

 0.9977

 0.0690

 1.0000

 1.0000

 0.9734

 1.0000

 0.0528

 0.2694

 0.1112

 0.9979

 0.9703

 1.0000

 1.0000

 1.0000

 1.0000

 1.0000

 0.1435

<0.001

 0.8999

 0.0302

 0.0569

 0.9999

 1.0000

 1.0000

 0.3747

 0.0138

<0.001

 0.9988

<0.001

 0.0381

 0.9675

 0.9999

 1.0000

 0.0467

 0.5643

 1.0000

 0.7587

 1.0000

 1.0000

 0.9982

 1.0000

 0.9897

 0.0597 <0.001

 0.1294

 0.9998

 0.1101

 1.0000

 1.0000

 1.0000

 1.0000

 0.9989

 0.0521

<0.001

 1.0000

<0.001

 0.0457

 1.0000

 0.9997

 1.0000

 0.0819

 0.0211

Theory, Application, and Implementation of Monte Carlo Method in Science and Technology

<0.001

 1.0000

<0.001

 0.3636

 0.9999

 0.8954

 1.0000

 0.0845

 1.0000

 0.0785

 0.8876

 0.8997

 0.9946

 1.0000

 0.1073 <0.001

<0.001

 0.2069

 0.2384

 0.9987

 0.0817

 0.7669

 0.9871

 0.9987

 1.0000

 0.8996

NA

 1.0000

 NA

 1.0000

 0.9990

 0.9990

 1.0000

 NA

NA

<0.001

NA

 1.0000

 NA

 1.0000

 1.0000

 0.8009

 1.0000

 NA

 0.0564

 NA

 0.5859

 0.2123

 NA

NA

NA

 0.82734

 0.1466

NA

 0.0754

 NA

 1.0000

 0.9889

 NA

identification

XRMC\_T–Barnes

XRMC\_T–Catalogue

XRMC\_S–Barnes

XRMC\_S–Catalogue

G4std–Barnes G4std–Barnes–Calc

G4std–Catalogue

G4std–Catalogue–Calc

G4pen–Barnes G4pen–Barnes–Calc

G4pen–Catalogue

G4pen–Catalogue–Calc

G4liv–Barnes G4liv–Barnes–Calc

G4liv–Catalogue

G4liv–Catalogue–Calc

Table 6. χ<sup>2</sup> p values for the validation for both MCCTs considering

per total irradiated area.

significance level. To conclude, the validation of absolute values for all studied cases (column "All" on Table 6), when semiempirical correction factors are applied for both MCCTs, Geant4 MCCT seems to present more sensitivity to the changes in the spectra showing significant differences (not agree) from experimental data for three simulated cases using spectra from Catalogue [73]. This can be due to the more detailed transport of primary and secondary particles. Considering Barnes et al.'s [74] spectra, there is no significant difference between experimental and simulated data considering the results for both MCCTs.

The comparison between both MCCTs after applying the semiempirical correction factor is presented in Table 7. As was expected there was an increase of the p values for the absolute value comparison of both MCCTs (Table 7) when compared to the validation of both MCCTs (Table 6). This is expected since the relative differences presented between simulated results (XRMC compared to Geant4) are smaller than the presented between each MCCT and experimental data. It is also important to note that for the comparison between both MCCTs only differences among the transport models evoked are significant. However, on a validation there may be differences associated to minimal discrepancies between experimental and simulated geometry, discrepancies among the transport models evoked (limitations of each model) and the repeatability of the X-radiation production and technical parameters of the mammograph. In the example presented in this section, the introduction of the modeled primary beam increases one variable to be considered in this context, increasing the error associated to the estimation of total number of proton emitted per mAs per total irradiated area. However, when one uses a code or model available on the X-ray equipment to estimate the dose in a radiological procedure, this person is using a modeled spectra or an estimated average spectra for the equipment and needs to pay attention to the limitations of this methodological choice.

version make the data treatment slower than that used on Geant4 and dependent of several external tools to perform data analyses that are not needed in Geant4. When the experimental spectra of the X-ray equipment (in this example for mammographs) are available, it is better to use the experimental ones and the correction factors associated to it. However, it is important to keep in mind that it should be the spectra generated by the X-ray tube that is being used, since each tube (even the ones with the same characteristics produced by the same manufacturer) may have a difference on efficiency conversion due to minimal differences in its manufacturing. Besides that, a periodical verification of the amplitude correction factor for the number of photons generated per mAs per total irradiated area (or solid angle) must be applied since the tube wear can affect the conversion efficiency due to the deposition of atoms of the track-target on the window surface (by sputtering effect) or by the releasing of atoms from the track-target into the volume

Kolmogorov-Smirnov p values for the comparison between XRMC and Geant4 (references) considering the

spectrum at detector entrance surface for all physics lists and studied cases.

DOI: http://dx.doi.org/10.5772/intechopen.88893

Transport models and spectrum identification Inspiration M3000 Lorad All G4std–Barnes 1.0000 0.8671 1.0000 0.9768 G4std–Catalogue 0.9999 0.9975 1.0000 0.9999 G4pen–Barnes 1.0000 1.0000 1.0000 1.000 G4pen–Catalogue 1.0000 1.0000 0.9999 1.0000 G4liv–Barnes 0.9998 0.8765 1.0000 0.9154 G4liv–Catalogue 1.0000 0.1663 1.0000 0.3687

Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison…

The objective of this chapter was to present the main concepts of validation and

On choosing a MCCT, one needs to pay attention to the characteristics of the application, the capabilities and limitations of the MCCT code, and its computational performance. Besides that, the best MCCT is the one that the AD knows how to use (installing, developing applications, and extracting useful data). To do that the AD needs to have knowledge of a programing language or, at least, to understand the logic of input data in MCCT, to understand the experiment or clinical reality to be described in the simulation, and to have the notions of the processes

Regarding the results for the example used in this chapter the evaluation

• Validation—the statistical evaluation presented no null hypothesis rejection for XRMC results and presented the rejection of null hypothesis for few Geant4

reliability applied to MC application development to dosimetry and imaging, presenting a minimal validation that can be performed by MCCT ADs. It is important to note, as an AD in MC, that it is always valid to have your own experimental data to validate the application in the contour limitations of your problem. If experimental data for validation or modeled data for comparison are not available; at least a reliability test should be performed to ensure the quality of the results

of the tube low pressure air.

Table 9.

4. Final considerations

generated by the MCCT.

presented as follows:

105

and models of transport significant to the study case.

To compare the results generated by both MCCTs directly, the χ <sup>2</sup> Pearson, Anderson-Darling, and Kolmogorov-Smirnov tests were applied on the simulated spectra at the entrance surface of the sensitive volume. These spectra were compared, and all of the studied cases presented p values above the significance level. For χ <sup>2</sup> Pearson test, all p values were 1.0000. The cases that presented larger differences on the validation, such as absolute values for M3000 XRMC and Geant4 based on Catalogue [73] (Tables 8 and 9), presented the lower p values in all statistical tests performed for the comparison of the MCCT.

Another important characteristic of MCCT to take into account is the running time. In this example, the XRMC Transmission mode reduced the running time around 2.5 times compared to Geant4 std physics list, 4 times compared to Geant4 pen physics list and 4.5 compared to Geant4 liv physics list. However, the limitations on simulating the absorbed energy and statistic fluctuations for this XRMC


#### Table 8.

Anderson-Darling p values for the comparison between XRMC and Geant4 (references) considering the spectrum at detector entrance surface for all physics lists and studied cases.

Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison… DOI: http://dx.doi.org/10.5772/intechopen.88893


Table 9.

significance level. To conclude, the validation of absolute values for all studied cases (column "All" on Table 6), when semiempirical correction factors are applied for both MCCTs, Geant4 MCCT seems to present more sensitivity to the changes in the spectra showing significant differences (not agree) from experimental data for three simulated cases using spectra from Catalogue [73]. This can be due to the more detailed transport of primary and secondary particles. Considering Barnes et al.'s [74] spectra, there is no significant difference between experimental and

Theory, Application, and Implementation of Monte Carlo Method in Science and Technology

The comparison between both MCCTs after applying the semiempirical correction factor is presented in Table 7. As was expected there was an increase of the p values for the absolute value comparison of both MCCTs (Table 7) when compared to the validation of both MCCTs (Table 6). This is expected since the relative differences presented between simulated results (XRMC compared to Geant4) are smaller than the presented between each MCCT and experimental data. It is also important to note that for the comparison between both MCCTs only differences among the transport models evoked are significant. However, on a validation there may be differences associated to minimal discrepancies between experimental and simulated geometry, discrepancies among the transport models evoked (limitations of each model) and the repeatability of the X-radiation production and technical parameters of the mammograph. In the example presented in this section, the introduction of the modeled primary beam increases one variable to be considered in this context, increasing the error associated to the estimation of total number of proton emitted per mAs per total irradiated area. However, when one uses a code or model available on the X-ray equipment to estimate the dose in a radiological procedure, this person is using a modeled spectra or an estimated average spectra for the equipment and needs to pay attention to the limitations of this methodolog-

To compare the results generated by both MCCTs directly, the χ

statistical tests performed for the comparison of the MCCT.

spectrum at detector entrance surface for all physics lists and studied cases.

Anderson-Darling, and Kolmogorov-Smirnov tests were applied on the simulated spectra at the entrance surface of the sensitive volume. These spectra were compared, and all of the studied cases presented p values above the significance level.

<sup>2</sup> Pearson test, all p values were 1.0000. The cases that presented larger differences on the validation, such as absolute values for M3000 XRMC and Geant4 based on Catalogue [73] (Tables 8 and 9), presented the lower p values in all

Another important characteristic of MCCT to take into account is the running time. In this example, the XRMC Transmission mode reduced the running time around 2.5 times compared to Geant4 std physics list, 4 times compared to Geant4 pen physics list and 4.5 compared to Geant4 liv physics list. However, the limitations on simulating the absorbed energy and statistic fluctuations for this XRMC

Transport models and spectrum identification Inspiration M3000 Lorad All G4std–Barnes 0.9149 0.6566 0.9671 1.0000 G4std–Catalogue 0.1595 0.0521 0.9975 1.0000 G4pen–Barnes 0.7994 0.1182 1.0000 1.0000 G4pen–Catalogue 0.1572 0.0653 0.9975 0.4832 G4liv–Barnes 0.6809 0.1398 0.8765 1.0000 G4liv–Catalogue 0.6993 0.1263 0.1663 1.0000

Anderson-Darling p values for the comparison between XRMC and Geant4 (references) considering the

<sup>2</sup> Pearson,

simulated data considering the results for both MCCTs.

ical choice.

For χ

Table 8.

104

Kolmogorov-Smirnov p values for the comparison between XRMC and Geant4 (references) considering the spectrum at detector entrance surface for all physics lists and studied cases.

version make the data treatment slower than that used on Geant4 and dependent of several external tools to perform data analyses that are not needed in Geant4.

When the experimental spectra of the X-ray equipment (in this example for mammographs) are available, it is better to use the experimental ones and the correction factors associated to it. However, it is important to keep in mind that it should be the spectra generated by the X-ray tube that is being used, since each tube (even the ones with the same characteristics produced by the same manufacturer) may have a difference on efficiency conversion due to minimal differences in its manufacturing. Besides that, a periodical verification of the amplitude correction factor for the number of photons generated per mAs per total irradiated area (or solid angle) must be applied since the tube wear can affect the conversion efficiency due to the deposition of atoms of the track-target on the window surface (by sputtering effect) or by the releasing of atoms from the track-target into the volume of the tube low pressure air.

## 4. Final considerations

The objective of this chapter was to present the main concepts of validation and reliability applied to MC application development to dosimetry and imaging, presenting a minimal validation that can be performed by MCCT ADs. It is important to note, as an AD in MC, that it is always valid to have your own experimental data to validate the application in the contour limitations of your problem. If experimental data for validation or modeled data for comparison are not available; at least a reliability test should be performed to ensure the quality of the results generated by the MCCT.

On choosing a MCCT, one needs to pay attention to the characteristics of the application, the capabilities and limitations of the MCCT code, and its computational performance. Besides that, the best MCCT is the one that the AD knows how to use (installing, developing applications, and extracting useful data). To do that the AD needs to have knowledge of a programing language or, at least, to understand the logic of input data in MCCT, to understand the experiment or clinical reality to be described in the simulation, and to have the notions of the processes and models of transport significant to the study case.

Regarding the results for the example used in this chapter the evaluation presented as follows:

• Validation—the statistical evaluation presented no null hypothesis rejection for XRMC results and presented the rejection of null hypothesis for few Geant4

cases evaluated considering normalized data. The XRMC presented the best agreement to the experimental data. Considering Geant4 the Livermore was the best physic list option. For absolute quantities calculated by applying semiempirical correction factors, all mammographs presented χ <sup>2</sup> p value under the significance level: one value for Inspiration (HVL) and one M3000 (BS) and few for Lorad (Mo25Rh and Mo30Mo) and Inspiration (ISL). Despite these particular cases of null hypothesis rejection, the overall evaluation for each transport model considering all studied cases presented few null hypothesis rejections for Geant4 MCCT using Catalogue spectra. So, it is recommendable to use spectra from Barnes et al. that were validated using both MCCTs (XRMC and Geant4). The use of only the theoretical correction factor for absolute quantities is not encouraged to perform validation, unless the AD knows pretty well the total number of photons emitted by the tube for the irradiation condition. Normalized data may be used associated to theoretical spectra to understand behaviors and tendencies of dosimetric quantities and to explore the influence of changes in the data acquisition but not to define absolute quantities.


Author details

2 INFN Sezione, Cagliari, Italy

3 Independent Researcher, Brazil

provided the original work is properly cited.

1 Università degli studi di Cagliari, Cagliari, Italy

\*Address all correspondence to: ghoff.gesic@gmail.com

\*, Bruno Golosio1,2, Elaine E. Streck3 and Viviana Fanti1,2

Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison…

DOI: http://dx.doi.org/10.5772/intechopen.88893

© 2019 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium,

Gabriela Hoff<sup>1</sup>

107

The methods to test a MCCT application are indispensable in the good practice of computational dosimetry and imaging because they guarantee the quality of the results, helping on the evaluation of the methodology limitations and making it possible to improve the trustability of the application and its results transposing with safety the "computational world" to the "real world."

Monte Carlo's Core and Tests for Application Developers: Geant4 and XRMC Comparison… DOI: http://dx.doi.org/10.5772/intechopen.88893
