% Emacs settings: -*-mode: latex; TeX-master: "manual.tex"; -*-

\section{Divergence\_monitor: A divergence sensitive monitor}
\label{s:div-monitor}
\index{Monitors!Divergence monitor}
%\component{Divergence\_monitor}{System}{$x_\textrm{min}$, $x_\textrm{max}$, $y_\textrm{min}$, $y_\textrm{max}$, $n_\textrm{v}$, $n_\textrm{h}$, $\eta_\textrm{v,max}$, $\eta_\textrm{h,max}$, filename}{}{}
\mcdoccomp{monitors/Divergence_monitor.parms}

The component \textbf{Divergence\_monitor} is a two-dimensional monitor,
which resembles \textbf{PSD\_Monitor}. As for this component,
the detector window is set
by the $x$ and $y$ input coordinates.
\textbf{Divergence\_ monitor} is sensitive to the neutron divergence,
defined by
$\eta_\textrm{h} = \tan^{-1}(v_x/v_z)$ and $\eta_\textrm{v} = \tan^{-1}(v_y/v_z)$.
The neutron counts are being histogrammed
into $n_\textrm{v} \times n_\textrm{h}$ pixels. 
The divergence range accepted is in the vertical direction
$[-\eta_\textrm{v,max}; \eta_\textrm{v,max}]$, and similar for the horizontal
direction.

The output from \textbf{PSD\_monitor} is the integrated counts, $n, I, M_2$,
as well as
three two-dimensional arrays of counts: $n(\eta_\textrm{v},\eta_\textrm{h}),
I(\eta_\textrm{v},\eta_\textrm{h}), M_2(\eta_\textrm{v},\eta_\textrm{h})$.
The arrays are written to a file, \verb+filename+, 
and can be read e.g. by the tool \textbf{MC\_plot}, see the system manual.
