# X-ray reflectivity

X-ray reflectivity (sometimes known as X-ray specular reflectivity, X-ray reflectometry, or XRR) is a surface-sensitive analytical technique used in chemistry, physics, and materials science to characterize surfaces, thin films and multilayers.[1][2][3][4] It is related to the complementary techniques of neutron reflectometry and ellipsometry.

Diagram of x-ray specular reflection

The basic idea behind the technique is to reflect a beam of x-rays from a flat surface and to then measure the intensity of x-rays reflected in the specular direction (reflected angle equal to incident angle). If the interface is not perfectly sharp and smooth then the reflected intensity will deviate from that predicted by the law of Fresnel reflectivity. The deviations can then be analyzed to obtain the density profile of the interface normal to the surface.

The technique appears to have first been applied to x-rays by Lyman G. Parratt in 1954.[5] Parratt's initial work explored the surface of copper-coated glass, but since that time the technique has been extended to a wide range of both solid and liquid interfaces.

The basic mathematical relationship which describes specular reflectivity is fairly straightforward. When an interface is not perfectly sharp, but has an average electron density profile given by ${\displaystyle \rho _{e}(z)}$, then the X-ray reflectivity can be approximated by:[2]:83

${\displaystyle R(Q)/R_{F}(Q)=\left|{\frac {1}{\rho _{\infty }}}{\int \limits _{-\infty }^{\infty }{e^{iQz}\left({\frac {d\rho _{e}}{dz}}\right)dz}}\right|^{2}}$

Here ${\displaystyle R(Q)}$ is the reflectivity, ${\displaystyle Q=4\pi \sin(\theta )/\lambda }$, ${\displaystyle \lambda }$ is the x-ray wavelength (typically copper's K-alpha peak at 0.154056 nm), ${\displaystyle \rho _{\infty }}$ is the density deep within the material and ${\displaystyle \theta }$ is the angle of incidence. Below the critical angle ${\displaystyle Q (derived from Snell's law), 100% of incident radiation is reflected, ${\displaystyle R=1}$. For ${\displaystyle Q\gg Q_{c}}$, ${\displaystyle R\sim Q^{-4}}$. Typically one can then use this formula to compare parameterized models of the average density profile in the z-direction with the measured X-ray reflectivity and then vary the parameters until the theoretical profile matches the measurement.

For films with multiple layers, X-ray reflectivity may show oscillations with Q (angle/wavelength), analogous to the Fabry-Pérot effect. The period of these oscillations can be used to infer layer thicknesses, interlayer roughnesses, electron densities and their contrasts, and complex refractive indices (which depend on atomic number and atomic form factor), for example using the Abeles matrix formalism or the recursive Parratt-formalism as follows:

${\displaystyle X_{j}={\frac {R_{j}}{T_{j}}}={\frac {r_{j,j+1}+X_{j+1}e^{2ik_{j+1,z}d_{j}}}{1+r_{j,j+1}X_{j+1}e^{2ik_{j+1,z}d_{j}}}}e^{-2ik_{j,z}d_{j}}}$

where Xj is the ratio of reflected and transmitted amplitudes between layers j and j+1, dj is the thickness of layer j, and rj,j+1 is the Fresnel coefficient for layers j and j+1

${\displaystyle r_{j,j+1}={\frac {k_{j,z}-k_{j+1,z}}{k_{j,z}+k_{j+1,z}}}}$

where kj,z is the z component of the wavenumber. For specular reflection where the incident and reflected angles are equal, Q used previously is two times kz because ${\displaystyle Q=k_{incident}+k_{reflected}}$. With conditions RN+1 = 0 and T1 = 1 for an N-interface system (i.e. nothing coming back from inside the semi-infinite substrate and unit amplitude incident wave), all Xj can be calculated successively. Roughness can also be accounted for by adding the factor

${\displaystyle r_{j,j+1,rough}=r_{j,j+1,ideal}e^{-2k_{j,z}k_{j+1,z}\sigma _{j}^{2}}}$

where ${\displaystyle \sigma }$ is a standard deviation (aka roughness).

Thin film thickness and critical angle can also be approximated with a linear fit of squared incident angle of the peaks ${\displaystyle \theta ^{2}}$ in rad2 vs unitless squared peak number ${\displaystyle N^{2}}$ as follows:

${\displaystyle \theta ^{2}=({\frac {\lambda }{2d}})^{2}N^{2}+\theta _{c}^{2}}$.

## Curve fitting

X-ray reflectivity measurements are analyzed by fitting to the measured data a simulated curve calculated using the recursive Parratt's formalism combined with the rough interface formula. The fitting parameters are typically layer thicknesses, densities (from which the index of refraction ${\displaystyle n}$ and eventually the wavevector z component ${\displaystyle k_{j,z}}$ is calculated) and interfacial roughnesses. Measurements are typically normalized so that the maximum reflectivity is 1, but normalization factor can be included in fitting, as well. Additional fitting parameters may be background radiation level and limited sample size due to which beam footprint at low angles may exceed the sample size, thus reducing reflectivity.

Several fitting algorithms have been attempted for X-ray reflectivity, some of which find a local optimum instead of the global optimum. The Levenberg-Marquardt method finds a local optimum. Due to the curve having many interference fringes, it finds incorrect layer thicknesses unless the initial guess is extraordinarily good. The derivative-free simplex method also finds a local optimum. In order to find global optimum, global optimization algorithms such as simulated annealing are required. Unfortunately, simulated annealing may be hard to parallelize on modern multicore computers. Given enough time, simulated annealing can be shown to find the global optimum with a probability approaching 1,[6] but such convergence proof does not mean the required time is reasonably low. In 1998,[7] it was found that genetic algorithms are robust and fast fitting methods for X-ray reflectivity. Thus, genetic algorithms have been adopted by the software of practically all X-ray diffractometer manufacturers and also by open source fitting software.

Fitting a curve requires a function usually called fitness function, cost function, fitting error function or figure of merit (FOM). It measures the difference between measured curve and simulated curve, and therefore, lower values are better. When fitting, the measurement and the best simulation are typically represented in logarithmic space.

From mathematical standpoint, the ${\displaystyle \chi ^{2}}$ fitting error function takes into account the effects of Poisson-distributed photon counting noise in a mathematically correct way:

${\displaystyle F=\sum _{i}{\frac {(x_{simul,i}-x_{meas,i})^{2}}{x_{meas,i}}}}$.

However, this ${\displaystyle \chi ^{2}}$ function may give too much weight to the high-intensity regions. If high-intensity regions are important (such as when finding mass density from critical angle), this may not be a problem, but the fit may not visually agree with the measurement at low-intensity high-angle ranges.

Another popular fitting error function is the 2-norm in logarithmic space function. It is defined in the following way:

${\displaystyle F={\sqrt {\sum _{i}(\log x_{simul,i}-\log x_{meas,i})^{2}}}}$.

Needless to say, in the equation data points with zero measured photon counts need to be removed. This 2-norm in logarithmic space can be generalized to p-norm in logarithmic space. The drawback of this 2-norm in logarithmic space is that it may give too much weight to regions where relative photon counting noise is high.

### Open source software

Diffractometer manufacturers typically provide commercial software to be used for X-ray reflectivity measurements. However, several open source software packages are also available: GenX[8] is probably the most popular[citation needed] open source X-ray reflectivity curve fitting software. It is implemented in the Python programming language and runs therefore on both Windows and Linux Motofit[9] runs in the IGOR Pro environment, and thus cannot be used in open-source operating systems such as Linux. Micronova XRR[10] runs under Java and is therefore available on any operating system on which Java is available.