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

8.1  A quick tour of instrument examples

8.1.1  Templates

The Templates category is the recommended starting point for new instrument work: skeleton instruments to copy and adapt, covering the most common instrument classes – template and template_simple (bare instrument skeletons), templateTAS (triple-axis, including a basic in-plane UB-matrix transformation for resolution estimation), templateTOF and templateDIFF (time-of-flight and powder diffraction), templateSANS/templateSANS2/templateSANS_MCPL and templateSasView (small-angle scattering, the latter using the SasView_model interface to SasView/sasmodels form factors), templateLaue and templateNMX/templateNMX_TOF (single-crystal Laue diffraction), and Demo_shape_primitives (illustrates the general-purpose shape/geometry components). Instrument parameters are documented in each file’s header (readable via mcdoc) and are designed to cover most instruments of the corresponding class.

8.1.2  Risoe

Historical Risø National Laboratory instruments, including the TAS1 triple-axis spectrometer family described in detail in section 8.3 below. TAS1 was decommissioned along with the DR3 reactor, but its detailed McStas model remains one of the most thoroughly validated example instruments in the distribution (see the model-vs-measurement comparisons in section 8.3.1), and it constitutes the default regression test series for the McStas distribution.

8.1.3  ISIS

Instruments modelled on ISIS spallation-source beamlines, several using the ISIS_moderator source component (built from MCNP moderator calculations): ISIS_CRISP and ISIS_SANS2d (reflectometry and SANS), ISIS_HET, ISIS_LET, ISIS_MERLIN and ISIS_TOSCA_preupgrade (chopper spectrometers), ISIS_GEM and ISIS_OSIRIS (powder diffraction and backscattering), and ISIS_Prisma2, a simple time-of-flight instrument with a RITA-style analyser described in detail in section 8.4 below.

8.1.4  ILL

Cold and thermal guide models for a large number of ILL instruments, several based on detailed technical drawings, e.g. ILL_H15, ILL_H16, ILL_H22 and ILL_H53 (guide systems) feeding instrument-specific models such as ILL_H15_IN6 (a hybrid time-of-flight spectrometer with three monochromators and a Fermi chopper; a usage example of the GROUP and SPLIT keywords, see sections 4.4.2 and 4.4.6 in the Component Manual), ILL_H15_D11 and ILL_H512_D22 (SANS), ILL_H22_D1A/ILL_H22_D1B and ILL_D2B (powder diffraction), ILL_H53_IN14 and ILL_H142_IN12 (triple-axis), ILL_IN5 and ILL_IN4 (time-of-flight), and ILL_H22_VIVALDI/ILL_H143_LADI (Laue diffraction).

8.1.5  ESS

Design studies for the European Spallation Source, built around the ESS_butterfly moderator/source component, e.g. ESS_IN5_reprate (a cold chopper multi-frame spectrometer for the long-pulsed ESS timing structure) and ESS_BEER_MCPL (illustrating MCPL-based event exchange between simulation stages, see the User Manual section on MCPL/event files).

8.1.6  Union_demos, Union_sample_environments, Union_validation

Worked examples of the Union framework (contributed by Mads Bertelsen), which separates sample/environment geometry from physical process definitions and supports multiple scattering within arbitrarily complex, nested sample-environment assemblies. Union_demos/Demonstration is a good first read: several powder samples in cans, a sample holder, and a surrounding cryostat, illustrating the syntax and possibilities of the Union components. See the Component Manual chapter on samples for the underlying Union component reference.

8.1.7  NCrystal

Examples using the NCrystal_sample component, interfacing the external NCrystal library for physically detailed elastic and inelastic scattering from single crystals, powders, and (to some extent) liquids, based on material scattering kernels.

8.1.8  Tests_* categories

A large set of Tests_sources, Tests_optics, Tests_samples, Tests_monitors, Tests_polarization, Tests_union, Tests_grammar, Tests_RNG, Tests_MCPL_etc and Tests_other instruments exercise individual components or language features in isolation. These are the backbone of the McStas regression test suite (run via mctest, see section 3.5.8), but are equally useful as minimal starting points when learning how a specific component behaves. Tests_samples/Samples_vanadium is described in detail in section 8.2 below.

8.1.9  Other facility categories

Further contributed instrument models exist for BNL, DTU, FZ_Jülich, HZB, HighNESS, LLB, Necsa, PSI, SINE2020, SNS, TRIGA and TU Delft, alongside a Mantid category (instruments paired with Mantid IDF export via mcdisplay-mantid_xml, see section 3.5.4) and a Tools category (utility instruments, e.g. for reading back third-party event files via MCPL). Use mcdoc to search across all categories by keyword, component used, or facility name.