This class of components models the sample of the experiment. This is by far the most challenging part of an xray scattering instrument to model. However, for purpose of simulating instrument performance, details of the samples are rather unimportant, allowing for simple approximations. On the contrary, for full virtual experiments it is of importance to have realistic and detailed sample descriptions. McXtrace contains both simple and detailed samples.
An important component class is elastic Bragg scattering from an ideal powder. The component PowderN models a powder scatterer with reflections given in an input file. The component includes absorption, incoherent scattering, direct beam transmission and can assume concentric shape, i.e. can be used for modelling sample enviroments.
Next type is Bragg scattering from single crystals. Two types of single crystal components exist in McXtrace at present: Bragg_crystal (in the optics category) and Single_crystal. Bragg_crystal is in fact most often used as a monchromator crystal. It models a crystal where peak broadening is dominated by the Darwin width. Currently it only handles a single defined reflection. If more than one is wanted this could be accomplished by using two instances in a GROUP and dynamically choose between them with a WHEN-statement. For details on the GROUP and WHEN constructs see the main McXtrace user manual [Knu+14]
Much more general, the component Single_crystal is a single crystal sample (with multiple scattering) that allows the input of an arbitrary unit cell and a list of structure factors, read from a LAZY / Crystallographica file. This component also allows anisotropic mosaicity and \(\Delta d/d\) lattice space variation.
Isotropic small-angle scattering is simulated in Saxs_Spheres, which models scattering from a collection of hard spheres (dilute colloids). Furthermore, a whole series of sample components modelling various SAXS standard sample types are available in the contrib component library section.
In sample components, we use a notation common for scattering experiments, where the wave vector transfer is denoted the scattering vector \begin {equation} \label {eq:q-transfer} \boldsymbol {q} \equiv \boldsymbol {k}_\mathrm {i} - \boldsymbol {k}_\mathrm {f} . \end {equation} In analygo, the energy transfer is given by \begin {equation} \label {eq:w-transfer} \hbar \omega \equiv E_\mathrm {i} - E_\mathrm {f} = \frac {\hbar ^2}{2 m_\mathrm {n}} \left ( k_\mathrm {i}^2 - k_\mathrm {f}^2 \right ) . \end {equation}
Within many samples, the incident beam is attenuated by scattering and absorption, so that the illumination varies considerably throughout the sample. For single crystals, this phenomenon is known as secondary extinction [Bac75], but the effect is important for all samples. In analytical treatments, attenuation is difficult to deal with, and is thus often ignored, making a thin sample approximation. In Monte Carlo simulations, the beam attenuation is easily taken care of, as will be shown below. In the description, we ignore multiple scattering, which is however implemented in some sample components.
The sample has an absorption cross section per unit cell of \(\sigma _c^a\) and a scattering cross section per unit cell of \(\sigma _c^s\). The x-ray path length in the sample before the scattering event is denoted by \(l_1\), and the path length within the sample after the scattering is denoted by \(l_2\), see figure 7.1. We then define the inverse penetration lengths as \(\mu ^s = \sigma _c^s / V_c\) and \(\mu ^a = \sigma _c^a / V_c\), where \(V_c\) is the volume of a unit cell. Physically, the attenuation along this path follows \begin {equation} f_\mathrm {att}(l) = \exp (- l (\mu ^s + \mu ^a)) , \end {equation} where the normalization \(f_\mathrm {att}(0)=1\).
The probability for a given x-ray to be scattered from within the interval \([ l_1 ; l_1+dl ]\) will be \begin {equation} P(l_1) dl = \mu ^s f_\mathrm {att}(l_1) dl , \end {equation} while the probability for a x-ray to be scattered from within this interval into the solid angle \(\Omega \) and not being scattered further or absorbed on the way out of the sample is \begin {equation} P(l_1,\Omega ) dl d\Omega = \mu ^s f_\mathrm {att}(l_1) f_\mathrm {att}(l_2) \gamma (\Omega ) d\Omega dl , \end {equation} where \(\gamma (\Omega )\) is the directional distribution of the scattered x-rays, and \(l_2\) is determined by Monte Carlo chocies of \(l_1\), \(\Omega \), and from the sample geometry, see e.g. figure 7.1.
In our Monte-Carlo simulations, we may choose the scattering parameters by making a Monte-Carlo choice of \(l_1\) and \(\Omega \) from a distribution different from \(P(l_1,\Omega )\). By doing this, we must adjust \(\pi _i\) according to the probability transformation rule (3.2). If we e.g. choose the scattering depth, \(l_1\), from a flat distribution in \([ 0 ; l_\mathrm {full} ]\), and choose the directional dependence from \(g(\Omega )\), we have a Monte Carlo probability \begin {equation} f(l_1,\Omega ) = g(\Omega ) / l_\mathrm {full} , \end {equation} \(l_\mathrm {full}\) is here the path length through the sample as taken by a non-scattered x-ray (although we here assume that all simulated x-rays are being scattered). According to (3.2), the x-ray weight factor is now adjusted by the amount \begin {equation} \label {sampleprob} \pi _i(l_1,\Omega ) = \mu ^s l_\mathrm {full} \exp \left [ - (l_1+l_2) (\mu ^a + \mu ^s) \right ] \frac {\gamma (\Omega )}{g(\Omega )} . \end {equation}
In analogy with the source components, it is possible to define ”interesting” directions for the scattering. One will then try to focus the scattered x-rays, choosing a \(g(\Omega )\), which peaks around these directions. To do this, one uses (7.7), where the fraction \(\gamma (\Omega )/g(\Omega )\) corrects for the focusing. One must choose a proper distribution so that \(g(\Omega ) > 0\) in every interesting direction. If this is not the case, the Monte Carlo simulation gives incorrect results. All samples have been constructed with a focusing and a non-focusing option.
There is still room for much more development of functionality in McXtrace samples.