At present, the application of the X-ray fluorescence analysis technique has been widely used, such as in the field of biology, petrochemicals, materials, food and so on -. In the X-ray fluorescence measurements, the matrix effects are caused by physical differences in the specimen. The X-ray characteristic fluorescence counts are affected on a known fluorescence analyzer, as well as the analysis accuracy. The Monte Carlo Neutron-Particle Transport Code MCNP5, which was produced by Los Alamos National Laboratory, has become one of the important softwares in the field of simulation and analysis in spectroscopy     . With a relative error of less than 5%, the accuracy of spectral intensity, which is predicted by MCNP5 code, is nearly 95%, and the lower limit of prediction accuracy improves from 90% to 97% for unknown composition specimens . Several models have been established using the MCNP5 code in this work. Different parameters have been set in these models when the physical conditions of the specimen were changed, such as thickness, density, particle size, etc.
2. Theoretical Calculation
The basic hypotheses are conditions when the surface of the specimen is smooth, and the element in the specimen is distributed evenly. Setting the density of the specimen is r, a is the angle between the incident X-ray’s beam and the specimen, and b is the angle between the direction of characteristic X-ray’s beam and the specimen. The incident X-ray’s fluorescence intensity of the primary-sectional unit is represented by , and the characteristic X-ray’s fluorescence intensity is represented by . The characteristic X-rays are excited at the original depth x of the specimen by the incident X-ray’s beam. Generally, the medium between the detector and specimen is air, and the distance between these is very small. Hence, the absorption of air and the detection window are ignored. The actual distance of the incident X-rays through the specimen is . According to the Beer-Lambert Law, the original level of intensity of the incident X-ray fluorescence in the specimen is:
In Equation (1), m is the absorption coefficient of the incident X-rays in the specimen. Assuming that the specimen is represented by S, the wavelength of the incident X-rays is represented by , and m is represented by . Equation (1) can be replaced by Equation (2).
In Equation (2), the combined mass absorption coefficient can instead be when the specimen includes a variety of elements.
In the specimen, the i element is intended to be analyzed. The incident X-ray is absorbed by the i element in a certain probability, and the characteristic X-rays are releasing from the dx layer in the specimen. According to the characteristic of the X-ray’s absorption in the material, the cross-section of the photoelectric effect is larger than the scattering effect (2 - 3 orders of magnitude). Hence, the scattering effect can be ignored in the X-ray fluorescence analysis. If the i element is distributed uniformly in the specimen, and the content of the i element is represented by , the intensity of the characteristic X-ray from the dx layer is as follows:
In Equation (3), the i element is excited by the incident X-rays of wavelength . is the quality absorption coefficient. is the probability of the characteristic X-rays of the i element, which is excited by the incident X-rays of wavelength . is also called the excitation factor.
The characteristic X-rays are released uniformly from all directions, and recorded within the solid angle of the detector only. With the dx layer to direct from the specimen to the detector, the crossing distance of characteristic X-ray is . Hence, the fluorescence intensity of the characteristic X-ray is as follows:
In Equation (4), is the absorption coefficient of the characteristic X-ray of the i element from the specimen. Let Equation (2) and (3) into Equation (4), there are:
(a) The thin thickness
Since the specimen is thin enough, the value of x is very small. Hence, and . Substituting the value into Equation (5), the X-ray characteristic fluorescence intensity is:
The X-ray characteristic fluorescence intensity created from the detector was not theoretically consistent. The matrix effects exist in the interaction of the specimen’s atoms. In addition, the intensity was either actually enhanced or weakened. The characteristic X-rays created by each atom in the thin specimen were independent of each other. In addition, the secondary X-ray fluorescence was not decayed. Therefore, the characteristic X-rays created by the detector can be recorded directly with no absorption or improvement. In this case, the matrix effect does not exist. In Equation (6), the parameters , , , a and were constant for the known X-ray fluorescence analyzer. If:
is called mass thickness. Its unit is mg∙cm2. Then, Equation (6) becomes:
(b) Medium thickness
The medium thickness can be considered since the incident X-rays have not yet reached the level that can penetrate the limit in the specimen. That is, the specimen’s thickness has not reached its saturation thickness. In Equation (5), the thickness of the specimen is integrated from to , then:
If: , Then:
(c) Infinite thickness
Infinite thickness is equivalent to saturated thickness. In an infinite thickness specimen, the thickness is increasing and the X-ray characteristic fluorescence intensity gradually increases from the beginning. When thickness is equivalent to saturation, the intensity reaches the maximum. Even if the thickness is increasing, the intensity holds the line at this condition. In order to assume the thickness of the specimen range from zero to infinity ( ), Equation (5) can be express as Equation (10). Then:
In fact, the specimen’s thickness is often greater than the thickness in incident X-rays through the specimen, especially rock, mineral and soil specimens. However, there are multi-components for these specimens. Interactions exist between the characteristic X-ray photons and the incident X-ray photons for each atom in the specimen. Hence, the characteristic X-ray photons were absorbed to some extent, or improved . In the study conducted by Will JM et al., 50% of the background counts came from Rayleigh scattering or Compton scattering in the X-ray fluorescence spectroscopy analysis .
In addition, the mass absorption coefficient was hard to accurately measure. Hence, some relative measurement methods were used. In the energy dispersive X-ray fluorescence analyzer, the excitation source of the center or ring was applied. In this case, the detector was close to the excitation source, and even overlapped. Therefore, it can be approximated the geometric layout of the analyzer was in the orthogonal relationship, that is, .
Hence, Equation (10) can be simplified to:
Substituting K into Equation (11), then:
3. Monte Carlo Model Descriptions
3.1. Basic Models
The basic model is shown in Figure 3. The model’s origin is at the center of the specimen’s plane. The parallel direction of the specimen is the coordinate Y and the vertical direction of the specimen is the coordinate Z. The specimen’s size is Φ 5 cm × 1 cm. The specific descriptions of these models are shown at sections 2.2 and 2.3.
3.2. Specimen Thickness Descriptions
The specimen’s thickness varied in Figure 1. The other parameters were definite values, and the range of the specimen’s thickness was from 0.00001 mm to 10 mm. The segmented nodes were 0.00001 mm, 0.0001 mm, 0.001 mm, 0.01 mm, 0.1 mm, 1 mm and 10 mm. The segmented step was 10. There were 55 models established with the MCNP5 code in this section.
3.3. Specimen Density Descriptions
In the MCNP5 code, the material card describes the element types and its proportion, and the data card records the calculation. The composition and density of the specimen determine the recorded energy value. In order to analyze the relationship between the specimen’s density and the detector’s response, two types of models were established in this study.
(a) Direct density alteration
In these models, the X-ray characteristic fluorescence counts can directly reflect the detector’s response. Under this condition, the pure element specimen
Figure 1. Geometric layout for the X-ray fluorescence measurement system using the Monte Carlo method.
can be excited, and the element types can determine the recorded energy, but not the size of the value. Hence, the detector’s response can be reflected by the specimen’s density only under the fixed geometry of the excitation source, the detector and the specimen.
(b) Density alteration by adding the matrix material
The specimen was mixed with the matrix material. Moisture was chosen in these models as the typical matrix material. As the proportion of the specimen changed, the density and X-ray characteristic fluorescence counts also changed. In this case, the combined effects of the detector’s response were recorded. In addition, the counts were decided by the specimen’s density, and the proportion between the specimen and matrix material (moisture).
3.4. Specimen Particle Size Descriptions
In section 1, a uniform distribution for the specimen was assumed. However, a specimen with a uniform distribution hardly existed, except for liquid samples, the pure metal or alloy samples through full polishing, and so on. For solid specimens with different contents, the condition of particles with different sizes is the real objective, such as the powder samples, bulk samples, original ore samples, soil samples, etc. The particle sizes impact the background counts of the detector by changing the scattering effects and the absorption for X-rays. In general, analyte particles are called fluorescent particles and non-fluorescent particles. These particles can be divided into regular shapes (such as the sphere, cube, cylinder, etc.) and irregular shapes. For the effect degree for the measurement results, the maximum is the sphere, followed by the cylinder; and the minimum is the cube . In order to simplify these models, there were two assumptions in this study.
(a) The particles in the specimens were all regular spherical shapes, and all the spherical particles were in uniform distribution;
(b) This study did not consider the overlapping of a particle’s boundary layer inside the specimen.
4.1. Specimen Thicknesses
Figure 2 shows the evidence for dividing the specimen thickness as thin, medium and saturated in Equation (5).
For thin specimens (less than 0.0001 mm for Cu), incident X-rays directly pass through these specimens. This part of counts contributed by the excitation source cannot be recorded by the detector. In this case, the absorption and excitation in the specimen are independent of one another. The secondary X-rays were not attenuated. Hence, the absorption effects essentially disappear. The enhancement effects can be ignored. Therefore, the matrix effect does not exist in thin specimens.
In addition, the detector can record the characteristic X-rays directly excited
Figure 2. The relationship between Cu Specimen peak counts and thickness in the Monte Carlo simulation.
by these specimens, but the fluorescence intensity of these X-rays is weak for the thin specimens. Cu’s X-ray characteristic fluorescence peak counts were few. In Figure 2, there was a linear relationship between thin thickness and Cu’s X-ray characteristic fluorescence peak counts, which exhibited good consistency for Equation (7).
In Equation (9), the analyte’s X-ray characteristic fluorescence intensity and its thickness revealed the non-linear relationship for medium thick specimens. This can also be observed in Figure 2. The range of Cu’s medium thickness was from 0.0001 mm to 0.1 mm. At this range, the peak counts for CuKα show a close nonlinear relationship to its thickness.
For saturated thickness specimens, Figure 2 remains consistent with Equation (12). In the XRF analysis, these measurement results were obtained by analyzing the thin layer in saturated thickness specimens. For example, the thickness of 0.1 mm for Cu in Figure 2. Thus, the suitable thicknesses of specimens need to be prepared with the specimen’s processing, especially for powder specimens, in order to avoid unnecessary waste.
Usually, the specimen’s surface is not smooth enough, its humidity may be higher, and its composition is complex. Saturated thick specimens are always non-linear in practice. In Figure 2, the peak counts for CuKα were not correlated to Cu thickness, compared to its non-linear relationship. In these Monte Carlo models, the specimens were pure Cu. Some assumptions were proposed, such as the surface was smooth. Hence, there was no nonlinear feature for saturated thickness Cu in Figure 2.
4.2. Specimen Densities
A) Density impact with no matrix materials
Cu’s X-ray characteristic fluorescence peak coun s increase in the exponential form in increasing the specimen density. In Figure 3, the density reached 0.06
Figure 3. Relationship between Cu Specimen’s peak counts and density in the Monte Carlo simulation (direct density alteration).
t, and the counts were at the maximum. With the continuous increase in density, these counts remain constant after a slight decline. When the density reached 1 , the counts remain at a constant value.
According to Equation (10), the analyte’s X-ray characteristic fluorescence intensity was proportional to its content. Pure Cu content was 100%. Hence, its counts were at a constant value, which is shown in Figure 3.
B) Density impacts with matrix materials
Moisture was set as the matrix material in this study. In decreasing the matrix material’s proportion and increasing the specimen density, the X-ray characteristic fluorescence peak counts increased in the exponential form, as shown in Figure 4.
In Figure 3, when the specimen content is 100% and its density was greater than 1 , the counts were constant for the specimen with no matrix materials. Figure 4 shows the non-linear characteristic. Since the matrix material’s proportion was larger, the specimen’s density was smaller, and the matrix materials (moisture) absorbed most of the X-ray matrix fluorescence counts. With increasing density, the matrix material’s proportion decreased, and the matrix effects weakened. With increasing density, the counts were up to 4,860 cps (Figure 4). Combined together with Figure 3, when the matrix material’s content was 0%, the specimen density tended to achieve its the true value (8.92 for Cu), and the counts of CuKα remained as a constant (approximately 4860 cps). Hence, the matrix effects changed the proportional relationship between X-ray fluorescence intensity and specimen density. This result was consistent with Equation (10) and the actual situation in the XRF analysis.
4.3. Specimen Particle Sizes
As the specimen particle sizes increased, the counts increased on the exponential form, which is shown in Figure 5.
Figure 4. The relationship between Cu Specimen’s peak counts and density in the Monte Carlo simulation (Density alteration by adding the matrix material).
Figure 5. The relationship between Cu Specimen’s peak counts and particle size in the Monte Carlo simulation.
When the particle size was greater than 0.1 mm, the counts remained at a constant value (the maximum count) instead of increasing with the specimen particle size’s increase. The reasons are as follows: When the sizes were small, the specimen’s self-absorption was strong. The scattering effects cannot be ignored. As the sizes were increasing, the counts were rapidly increasing on the non-linear form. The sizes were greater than 0.1 mm, and the scattering effects were to the limit, but this background could be ignored, compared with the X-ray characteristic fluorescence peak counts. Hence, the Cu’s peak counts exhibited a constant value in Figure 5.
This conclusion is the same as the calculations of He Yancai et al. , who deduced relational formulas between the X-ray fluorescence intensity and specimen particle sizes. However, this conclusion was against the study conducted by Xie Zhongxin et al.  and Li Ping et al. , which measured the results using an XRF analyzer. In the Monte Carlo models, the particle size’s distribution was assumed as the idealization (Section 2.4). In He Yancai’s formulas, the specimen particle size’s distribution was also ideal. Hence, Figure 5 was the same as their calculations.
In fact, the specimens must be prepared before measurement, such as surface processing or polishing. In this case, the gap inside these specimens was filled with smaller particles. The scattering effects were reduced, as well as the matrix effects. Then, the specimens after processing were equal to the big particle size’s specimens in the models. Hence, the conclusion in Figure 5 was against the actual measurement results of Xie Zhongxin and Li Ping.
Depending on the basic radioactive decay law, this study obtains the theoretical formulas for X-ray characteristics fluorescence intensity. The factors of the specimen’s properties were discussed, such as thickness, density, particle size and so on. These factors make a conspicuous impact on X-ray characteristics fluorescence intensity in these theoretical formulas. The thicknesses of thin, medium and saturated for these specimens were put forward in the study. Various Monte Carlo models with the specimen’s thickness, density and particle size have been established for XRF measurements. The X-ray characteristic fluorescence peak counts were calculated using the Monte Carlo Neutron-Particle Transport Code MCNP5. These results are consistent with the theoretical formulas. Therefore, these formulas can provide a theoretical correction for matrix correction in X-ray fluorescence analysis. In addition, conclusions calculated using the MCNP5 code can provide technical guidance for specimen preparation.
The presented results receive funding from the national key research and development project of China under contract number 2016YFC0201506.
 Schlichting, I. and Miao, J. (2012) Emerging Opportunities in Structural Biology with X-Ray Free-Electron Lasers. Current Opinion in Structural Biology, 22, 613-626. https://doi.org/10.1016/j.sbi.2012.07.015
 Soni, B.H., Deshpande, M.P., Bhatt, S.V., Chaki, S.H. and Sathe, V. (2013) X-Ray Diffraction, X-Ray Photoelectron Spectroscopy, and Raman Spectroscopy of Undoped and mn-Doped Zno Nanoparticles Prepared by Microwave Irradiation. Journal of Applied Spectroscopy, 79, 901-907. https://doi.org/10.1007/s10812-013-9692-9
 Fujii, K., Young, M.T. and Harris, K.D. (2011) Exploiting Powder X-Ray Diffraction for Direct Structure Determination in Structural Biology: The p2x4 Receptor Trafficking Motif Yeqgl. Journal of Structural Biology, 174, 461-467. https://doi.org/10.1016/j.jsb.2011.03.001
 Calle, I.D.L., Cabaleiro, N., Romero, V., Lavilla, I. and Bendicho, C. (2013) Sample Pretreatment Strategies for Total Reflection X-Ray Fluorescence Analysis: A Tutorial Review. Spectrochimica Acta Part B Atomic Spectroscopy, 90, 23-54. https://doi.org/10.1016/j.sab.2013.10.001
 Ketcham, R.A. and Hanna, R.D. (2014) Beam Hardening Correction for X-Ray Computed Tomography of Heterogeneous Natural Materials. Computers & Geosciences, 67, 49-61. https://doi.org/10.1016/j.cageo.2014.03.003
 Wrobel, P. and Czyzycki, M. (2013) Direct Deconvolution Approach for Depth Profiling of Element Concentrations in Multi-Layered Materials by Confocal Micro-Beam X-Ray Fluorescence Spectrometry. Talanta, 113, 62-67. https://doi.org/10.1016/j.talanta.2013.03.087
 Moosekian, S.R., Jeong, S. and Ryser, E.T. (2014) Inactivation of Sanitizer-Injured Escherichia Coli, o157:h7 on Baby Spinach Using X-Ray Irradiation. Food Control, 36, 243-247. https://doi.org/10.1016/j.foodcont.2013.08.024
 Darwish, M.A.G. (2012) Scanning Electron Microscopy and Energy-Dispersive X-Ray In-vestigations of Gold Grains in Quartz Veins from the Seiga Gold Mine, South Egypt. Microchemical Journal, 102, 38-48. https://doi.org/10.1016/j.microc.2011.11.006
 Zaporozhets, é.V., Malyshev, S.A. and Tyavlovskaya, E.A. (1999) X-Ray Photoelectronic Spectroscopy of the Processes of Interaction between Elements in Contact Layers on Inp. Journal of Applied Spectroscopy, 66, 154-158. https://doi.org/10.1007/BF02679237
 Khattab, K., Boush, M. and Alkassiri, H. (2013) Dose Mapping Simulation Using the Mcnp Code for the Syrian Gamma Irradiation Facility and Benchmarking. Annals of Nuclear Energy, 58, 110-112. https://doi.org/10.1016/j.anucene.2012.11.009
 Zhu, H., Morris, K., Mueller, W., Field, M., Venkataraman, R., Lamontagne, J., et al. (2009) Validation of True Coincidence Summing Correction in Genie 2000 v3.2. Journal of Radioanalytical & Nuclear Chemistry, 282, 205-209. |https://doi.org/10.1007/s10967-009-0148-x
 Hachouf, N., Kharfi, F. and Boucenna, A. (2012) Characterization and Mcnp Simulation of Neutron Energy Spectrum Shift after Transmission through Strong Absorbing Materials and Its Impact on Tomography Reconstructed Image. Applied Radiation & Isotopes, 70, 2355-2361. https://doi.org/10.1016/j.apradiso.2012.06.017
 Vincze, L., Janssens, K., Adams, F., Rivers, M.L. and Jones, K.W. (1995) A General Monte Carlo Simulation of Ed-Xrf Spectrometers. ii: Polarized Monochromatic Radiation, Homogeneous Samples. Spectrochimica Acta Part B Atomic Spectroscopy, 50, 127-147. https://doi.org/10.1016/0584-8547(94)00124-E