Component Manual for the Xray-Tracing Package McXtrace, version 3.8.6

8  Monitors and detectors

In real scattering experiments, detectors and monitors play quite different roles. One wants the detectors to be as efficient as possible, counting all photons (absorbing them in the process), while the monitors measure the intensity of the incoming beam, and must as such be almost transparent, interacting only with (roughly) 0.1-1% of the photons passing by. In computer simulations, it is of course possible to detect every xray without absorbing it or disturbing any of its parameters. Hence, the two components have very similar functions in the simulations, and we do not distinguish between them. For simplicity, they are from here on just called monitors.

Another important difference between computer simulations and real experiments is that one may allow the monitor to be sensitive to any xray property, as e.g. direction, energy, and divergence, in addition to what is found in real-world detectors (space and time). One may, in fact, let the monitor record correlations between these properties.

When a monitor detects a xray, a number counting variable is incremented: \(n_i = n_{i-1}+1\). In addition, the photon weight \(p_i\) is added to the weight counting variable: \(I_i = I_{i-1} + p_i\), and the second moment of the weight is updated: \(M_{2,i} = M_{2,i-1} + p_i^2\). As also discussed chapter 2, after a simulation of \(N\) rays the detected intensity (in units of photonts/sec.) is \(I_N\), while the estimated errorbar is \(\sqrt {M_{2,N}^2}\).

Several different monitor components have been developed for McXtrace, but we have decided to support only the most important ones. One example of the monitors we have omitted is the single monitor, Monitor, that measures just one number (with errorbars) per simulation. This effect is mirrored by any of the 1- or 2-dimensional components we support, e.g. the PSD_monitor. In case additional functionality of monitors is required, a few lines of code in existing monitors can easily be modified.

Another solution is the “Swiss army knife” of monitors, Monitor_nD, that can handle almost any simulation requirement, but may prove challenging for inexperienced users or users who like to make their own modifications.

8.1 The Monitor McXtrace Component
Identification
Description
Input parameters
Links
Simple intensity monitor
8.2 The E_monitor McXtrace Component
Identification
Description
Input parameters
Links
The energy-sensitive monitor
8.3 The L_monitor McXtrace Component
Identification
Description
Input parameters
Links
The wavelength sensitive monitor
8.4 The PSD_monitor McXtrace Component
Identification
Description
Input parameters
Links
The PSD monitor
8.5 The PSD_monitor_coh McXtrace Component
Identification
Description
Input parameters
Links
The coherent PSD monitor
8.6 The PSD_monitor_4PI McXtrace Component
Identification
Description
Input parameters
Links
A 4 PI steradian spherical monitor.
8.7 The EPSD_monitor McXtrace Component
Identification
Description
Input parameters
Links
Energy-selective PSD monitor
8.8 The W_psd_monitor McXtrace Component
Identification
Description
Input parameters
Links
A power vs. position monitor
8.9 The Monitor_nD McXtrace Component
Identification
Description
Input parameters
Links
A general Monitor for 0D/1D/2D records
8.9.1 The Monitor_nD geometry
8.9.2 The photon parameters that can be monitored
8.9.3 Important options
8.9.4 The output files
8.9.5 Monitor equivalences
8.9.6 Usage examples
8.9.7 Monitoring user variables