User and Programmers’ Guide to the X Ray-Tracing Package McXtrace, version 3.8.6

6.1  Notational conventions

Simulations generated by McXtrace use a semi-classical description of the x-rays to compute the x-ray trajectory through the instrument and its interaction with the different components.

An instrument consists of a list of components through which the x-ray ray passes one after the other. The order of components is thus significant since McXtrace does not automatically check which component is the next to interact with the x-ray at a given point in the simulation. Note that in case of a negative propagation length from one component to the next, the x-ray is by default absorbed as this is often an indication of unphysical conditions. If a large part of the simulated rays are absorbed on account of this a warning is issued, as this is often caused by a misplaced component.

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 fig. 6.1). Nothing in the McXtrace 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 6.1.: conventions for the orientations of the axis 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 x-ray is given by its position \((x,y,z)\) in \(\mathrm {m}\), its wavevector \((k_x, k_y, k_z)\) in \(\text {\AA }^{-1}\), the time in \(\mathrm {s}\),, the phase \(\phi \) in \(\mathrm {rad}\), and a polarisation vector \(\left ( E_x, E_y, E_z \right )\), and finally the x-ray weight \(p\) in photons \(\mathrm {s}^{-1}\) as described in chapter 4.