User and Programmers Guide to the Neutron Ray-Tracing Package McStas, version 3.8.6

2  Monte Carlo Techniques and simulation strategy

This chapter explains the simulation strategy and the Monte Carlo techniques used in McStas. We first explain the concept of the neutron weight factor, and discuss the statistical errors in dealing with sums of neutron weights. Secondly, we give an expression for how the weight factor transforms under a Monte Carlo choice and specialize this to the concept of direction focusing. Finally, we present a way of generating random numbers with arbitrary distributions. More details are available in the Appendix concerning random numbers.

2.1 Neutron spectrometer simulations
2.1.1 Monte Carlo ray tracing simulations
2.2 The neutron weight
2.2.1 Statistical errors of non-integer counts
2.3 Weight factor transformations during a Monte Carlo choice
2.3.1 Direction focusing
2.4 Adaptive and Stratified sampling
2.5 Accuracy of Monte Carlo simulations