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

4.1  Notational conventions

Simulations generated by McStas use a semi-classical description of the neutron rays to compute the neutron trajectory through the instrument and its interaction with the different components. The effect of gravity is taken into account either in particular components (e.g. Guide_gravity), or more generally when setting an execution flag (-g) to perform gravitation computation. This latter setting is only an approximation and may produce wrong results with some components.

An instrument consists of a list of components through which the neutron ray passes one after the other. The order of components is thus significant since mcstas does not automatically check which component is the next to interact with the neutron ray at a given point in the simulation. Note that in case of a negative propagation time from one component to the next, the neutron ray is by default absorbed as this is often an indication of unphysical conditions.

The instrument is given a global, absolute coordinate system. In addition, every component in the instrument has its own local coordinate system that can be given any desired position and orientation (though the position and orientation must remain fixed for the duration of a single simulation). By convention, the \(z\) axis points in the direction of the beam, the \(x\) axis is perpendicular to the beam in the horizontal plane pointing left as seen from the source, and the \(y\) axis points upwards (see figure 4.1). Nothing in the McStas metalanguage enforces this convention, but if every component used different conventions the user would be faced with a severe headache! It is therefore necessary that this convention is followed by users implementing new components.


PIC


Figure 4.1.: conventions for the orientations of the axes in simulations.


In the instrument definitions, units of length (e.g. component positions) are given in meters and units of angles (e.g. rotations) are given in degrees.

The state of the neutron is given by its position \((x,y,z)\) in meters, its velocity \((v_x, v_y, v_z)\) in meters per second, the time \(t\) in seconds, and the three spin parameters \(\left ( s_x, s_y, s_z \right )\), and finally the neutron weight \(p\) described in 2.