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

B.1  Run-time calls and functions (mcxtrace-r)

Here we list a number of preprogrammed macros and functions which may ease the task of writing component and instrument definitions. By convention macros are in upper case whereas functions are in lower case.

B.1.1  Photon propagation

Propagation routines perform all necessary operations to transport x-rays from one point to an other. Except when using the special ALLOW_BACKPROP; call prior to executing any PROP_* propagation, the x-rays which have negative propagation lengths are removed automatically.

B.1.2  Coordinate and component variable retrieval

B.1.3  Coordinate transformations

B.1.4  Mathematical routines

B.1.5  Output from detectors

Details about using these functions are given in the McXtrace User Manual.

B.1.6  Ray-geometry intersections

B.1.7  Random numbers

By default McXtrace uses a 64-bit KISS (“Keep It Simple Stupid”) algorithm for generating pseudo random numbers, which runs on both CPU and GPU/OpenACC. The classic Mersenne Twister[MN98] algorithm remains available as a CPU-only, build-time alternative (see chapter 7.3).