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

1  Introduction to McStas

Efficient design and optimization of neutron spectrometers are formidable challenges, which are efficiently treated by Monte Carlo simulation techniques. When McStas version 1.0 was released in October 1998, except for the NISP/MCLib program [Nis], no existing package offered a general framework for the neutron scattering community to tackle the problems currently faced at reactor and spallation sources. The McStas project was designed to provide such a framework.

McStas is a fast and versatile software tool for neutron ray-tracing simulations. It is based on a meta-language specially designed for neutron simulation. Specifications are written in this language by users and automatically translated into efficient simulation codes in ISO-C. The present version supports both continuous and pulsed source instruments, and includes a library of standard components with in total around 130 components. These enable to simulate all kinds of neutron scattering instruments (diffractometers, spectrometers, reflectometers, small-angle, back-scattering,...) for both continuous and pulsed sources.

The core McStas package is written in ISO-C, with various tools based on Perl and Python and is freely available for download from the McStas website [Mcs]. The package is actively being developed and supported by DTU Physics, Institut Laue Langevin (ILL), Paul Scherrer Institute and the Niels Bohr Institute (NBI). The system is well tested and is supplied with several examples and with an extensive documentation. Besides this manual, a separate component manual exists.

1.1 Development of Monte Carlo neutron simulation
1.2 Scientific background
1.2.1 The goals of McStas
1.3 The design of McStas
1.4 Overview