Monte Carlo modeling

Many physical processes are sufficiently complex that, while we might be able to write down an expression describing the process, the expression will be too complex to solve analytically. Often the expression will involve a multi-dimensional integral which can not be solved using numerical integration routines in a practical amount of CPU time. Monte Carlo simulation is an alternative.

Consider a simple problem that is readily solved using analytical techniques - computing the area of a circle of radius r. We can write down an expression for the area and solve it - Integral from -r to r of the sqrt(r^2-x^2) dx = pi r^2. Alternatively, we could take an approach based on random selection of test points. Consider the bounding from x = [-r,+r], and y = [-r,+r]. If we select number pairs where each dimension is evenly distributed on the interval [-r, +r], we can test whether the pair falls within a circle of radius r. If we repeat the experiment hundreds or thousands of times, we will find that the fraction f of times the point falls within the circle times the area of the bounding square approaches the integral of the circle.

The simple scheme of integrating complex expressions based on randomly sampling the distribution can be readily extended to far more complex problems. In the case of electron transport, the complex expression combines scattering in three-dimensions with energy loss. In addition, we can consider characteristic and Bremsstrahlung x-ray production.

The basic model used by most Monte Carlo applications to simulate trajectory of an electron in a material sample is conceptually quite simple. The track of an electron is a straight line unless it scatters off of an atom. The distance between scattering events is determined by a random number chosen from an exponential distribution with mean scattering length determined by the material properties. When the atom scatters, it loses energy but not primarily as you might expect from the scattering process. The scattering process is assumed to be “elastic” or without energy loss. The energy loss comes from a series of small inelastic events which are averaged together and modeled as a mean energy loss per unit of path length. This energy loss approximation is called the continuous slowing approximation (CSA). It works well at energies much greater than the mean ionization potential (tens to hundreds of eV). Other mechanisms for kinetic energy loss such as inner shell ionization are ignored because they happen so infrequently. The trajectory of the electron is tracked through the sample region. Special care is taken to handle transitions between different materials.

Introducing x-ray production and measurement is a little bit more complex. X-rays (and auger electrons) are the result of ionization of an atom in the material. The rate of ionization is determined by the ionization cross section and the elemental density. Once ionized an atom can equilibrate through auger production or x-ray production. The relative rate of these two processes is determined by the fluorescence yield. Each ionized shell has a different fluorescence yield.

The energy of the x-ray is determined by the ionized shell and the source shell from which the electron which relaxes into the ionized shell comes. Typically the ionized shell is one of the K, LI, LII, LIII, MI, MII, MIII, MIV, or MV shells. The ionized shell can be filled by an electron in a less tightly bound shell. So an ionized K shell can be filled by L-shell or M-shell electrons. The relative amount of each transition is called the line weight and has been measured for only a handful of elements. NISTMonte uses the best available information.

Bremsstrahlung radiation is produced when a moving charge accelerates (or equivalently decelerates).

Both Bremsstrahlung and characteristic radiation production happen infrequently (~once every few hundred electrons) so computing a thousand x-ray spectrum directly takes hundreds of thousands of electron trajectories. This is very inefficient. Instead NISTMonte takes a less physical but more efficient approach. At each scattering point, NISTMonte computes the probability of x-ray generation and models this like a fraction of an x-ray. The fractional x-ray is tracked to the detector to model absorption by the sample material and the unabsorbed portion of the fractional x-ray is accumulated in the detector. The result is that the detectors accumulate non-integral sums of x-ray events. While strictly speaking it is not possible to measure a fractional x-ray, the recorded signal has far better fidelity than the more physically realistic alternative.