Component Manual for the Neutron Ray-Tracing Package McStas, version 3.8.6

2.1  Neutron spectrometer simulations

2.1.1  Monte Carlo ray tracing simulations

The behavior of a neutron scattering instrument can in principle be described by a complex integral over all relevant parameters, like initial neutron energy and divergence, scattering vector and position in the sample, etc. However, in most relevant cases, these integrals are not solvable analytically, and we hence turn to Monte Carlo methods. The neutron ray-tracing Monte Carlo method has been used widely for guide studies [Cop93; Far+02; Sch+04], instrument optimization and design [ZLa04; Lie05]. Most of the time, the conclusions and general behavior of such studies may be obtained using the classical analytic approaches, but accurate estimates for the flux, resolution and generally the optimum parameter set, benefit considerably from MC methods.

Mathematically, the Monte-Carlo method is an application of the law of large numbers [Jam80; GRR92]. Let \(f(u)\) be a finite continuous integrable function of parameter \(u\) for which an integral estimate is desirable. The discrete statistical mean value of \(f\) (computed as a series) in the uniformly sampled interval \(a < u < b\) converges to the mathematical mean value of \(f\) over the same interval.

\begin {equation} \lim _{n \rightarrow \infty } \frac {1}{n} \sum _{i=1, a \leq u_i \leq b}^n f(u_i) = \frac {1}{b-a}\int _a^b f(u) du \end {equation}

In the case were the \(u_i\) values are regularly sampled, we come to the well known midpoint integration rule. In the case were the \(u_i\) values are randomly (but uniformly) sampled, this is the Monte-Carlo integration technique. As random generators are not perfect, we rather talk about quasi-Monte-Carlo technique. We encourage the reader to consult James [Jam80] for a detailed review on the Monte-Carlo method.