\documentclass[11pt,a4paper,titlepage]{book}

\usepackage{a4}                        % A4 papirstoerrelse
%\usepackage[danish]{babel}             % Dansk orddeling osv.
\usepackage[latin1]{inputenc}          % \ae \oe \aa
\usepackage{amsmath}                   % Matematiske kommandoer
\usepackage{amssymb}                   % Matematiske symboler
\usepackage[dvips]{graphicx}           % Import af pakke til .eps haandtering
\usepackage{epsfig}                    %Import af pakke til blandet .ps og .tex
\usepackage{color}                     % Farvet tekst
\usepackage{latexsym}                  % Latex symboler
\usepackage{helvet,courier}            % cpp2latex fonts
%\newcommand{\eq}[1]{\begin{equation}#1\end{equation}}
\newcommand{\eq}[1]{\begin{equation*}#1\end{equation*}}
%\newcommand{\eqar}[1]{\begin{eqnarray}#1\end{eqnarray}}
\newcommand{\eqar}[1]{\begin{eqnarray*}#1\end{eqnarray*}}
\newcommand{\bra}[1]{\ensuremath{\left< #1\right\vert}}
\newcommand{\ket}[1]{\ensuremath{\left\vert #1\right>}}
\newcommand{\innerp}[2]{\bra{#1} \left. #2\right>}
\newcommand{\cel}{$^{\circ}$C }
\renewcommand{\tt}[1]{\text{#1}}
%\newcommand{\fed}[1]{\ensuremath{\mathbf{#1}}}
\newcommand{\fed}[1]{\text{{\boldmath $#1$}}}
\renewcommand{\u}{\ensuremath{\uparrow}}
\renewcommand{\d}{\ensuremath{\downarrow}}
\newcommand{\taubold}{\mbox{\boldmath $\tau$}}

\addtolength{\hoffset}{-2cm}

\begin{document}
\begin{center}
{\huge Solutions to McStas hands-on exercise \\ Reactor source diffractometer + TAS}
\\[10pt]
{\large by Linda Udby \today}
\end{center}
\newpage

\section*{Source and monitors}

\subsection*{3.}
The unit of the intensity parameter $I_1$ is n/(s*cm$^2$*ster), where the cm$^2$ is the area of the source. The source is focusing at at an area $dA$=0.1m$\times$0.1m monitor at $r=$1 m distance.
\subsection*{4.}
Notice that all simulated neutron rays are monitored by the PSD and the full spectrum is respesented in the 0.1-10 \AA{} range as shown in the left part of Figure \ref{fig:focusarea100cm2}. The intensity at the PSD is 1e14 n/s and it covers approximately $d\Omega=(0.1/1 \rm{rad})^2 = 0.01\rm{ster}$, corresponding to a source intensity of $\frac{1e14 \rm{n/s}}{0.01\rm{ster}}=1e16$ n/(s*ster).
%\includegraphics[width=0.6\textwidth]{sim/ex_5.1.4/mcstas.sim.ps}
\begin{figure}[!h]
\includegraphics[angle=-90,width=0.6\textwidth]{sim/ex_5.1.4/mcstas.sim.ps}
\includegraphics[angle=-90,width=0.6\textwidth]{sim/ex_5.1.5/mcstas.sim.ps}
\caption{\label{fig:focusarea100cm2} Beamprofile and wavelength distribution at 1m from the 100 cm$^2$ source with a focus area of 100 cm$^2$. In the left part of the figure the full wavelength spectrum is traced, in the right only  $\lambda=4\pm 0.001$\AA{} is traced.}
\end{figure}

\subsection*{5.}
The intensity on the PSD has decreased to 4e10 n/s since we are now tracing only part of the full spectrum, see the right part of Figure \ref{fig:focusarea100cm2}.

\subsection*{6.}
The estimated solid angle of a $dA$=0.1m$\times$0.1m monitor at $r=$1 m distance is 0.01 ster since $\Omega [\rm ster]=dA/r^2$. The source is emitting $I_1$=1e14 n/(s*cm$^2$*ster) but in a source area of 100 cm$^2$. Hence the total emitted intensity should be 1e14 n/(s*cm$^2$*ster)*100 cm$^2$=  1e16 n/(s*ster). Since the PSD covers 0.01 ster, the observed intensity should be 1e14 n/s if all the emitted rays hitting the detector are traced (i.e. if the focusing solid angle is as big or larger than the one spanned by the PSD). This is also what is observed in the left part of Figure \ref{fig:focusarea100cm2}.
The intensity for the full spectrum is the same in a 100cm$^2$ size monitor whether the focus area is 100cm$²$ as in the left part of Figure \ref{fig:focusarea100cm2} or the focus area is 400 cm $²$ an in Figure \ref{fig:otherfocusareas},
 but smaller if the focus area is smaller than the angle covered by the PSD as in the right part of Figure \ref{fig:otherfocusareas} since not all rays which could possibly hit the detector are traced.

If the number of traced neutron rays is increased, the number of rays traced to the monitors increase.  The intensity on the monitors however does not change, the statistics simply improve ('Err' decreases).
%\includegraphics[width=0.6\textwidth]{sim/ex_5.1.6_focusarea0.1/mcstas.sim.ps}
%\includegraphics[angle=-90,width=0.6\textwidth]{sim/ex_5.1.6_focusarea100cm2/mcstas.sim.ps}
\begin{figure}[!h]
\includegraphics[angle=-90,width=0.6\textwidth]{sim/ex_5.1.6_focusarea400cm2/mcstas.sim.ps}
\includegraphics[angle=-90,width=0.6\textwidth]{sim/ex_5.1.6_focusarea1cm2/mcstas.sim.ps}
\caption{\label{fig:otherfocusareas} Beamprofile and wavelength distribution 1m from the 100 cm$^2$ source with a focus area of 400 cm$^2$ (left) and 1 cm$^2$ (right).}
\end{figure}

\section*{Monochromator}
\subsection*{3.}
For $\lambda=$4\AA{} neutrons, $k_i=\frac{2*pi}{\lambda}=1.5708$\AA{}$^{-1}$, which gives a scattering angle off the monochromator of
$$
2\theta_M=2*\sin^{-1}{\frac{\kappa_{\rm{PG}(200)}}{2*k_i}} = 73.21^\circ
$$
\subsection*{5.}
For Bragg scattering the monochromator itself must be rotated by $\Omega_M=2\theta_M /2$. The intensity at the sample position in a scan of teh rotation angle of the monochromator is shown in Figure \ref{fig:firstomegascan}.
\begin{center}
\begin{figure}[!h]
\includegraphics[width=0.45\textwidth]{ex_5.2.5_focusw0.02_focush0.02.eps}
\includegraphics[width=0.45\textwidth]{ex_5.2.5_spec.eps}
\caption{\label{fig:firstomegascan} (Left) A scan of the monochromator rotation angle. The curve is a fit to a Gaussian.(Right) The neutron spectrum at OMM=36.6}
\end{figure}
\end{center}

\subsection*{6.}
In order to get first, second etc order neutrons ($\lambda=4,4/2,\hdots 4/n$\AA{}) scattered from the monochromator with scattering angle $\theta_M=90^\circ$ one would need to find a material with a scattering vector of
$$
\kappa= 2k_i \cdot \sin(\theta) =2.221 \rm{\AA{}}^{-1}
$$
From Figure \ref{fig:secondomegascan} it is seen that a Bragg reflection is found at OMM=45 and that
\begin{center}
\begin{figure}[!h]
\includegraphics[width=0.45\textwidth]{ex_5.2.6omscan.eps}
\includegraphics[width=0.46\textwidth]{ex_5.2.6spec.eps}
\caption{\label{fig:secondomegascan} (Left) A scan of the monochromator rotation angle for $2\theta_M=73.21^\circ$. The curve is a fit to a Gaussian.(Right) The neutron spectrum at OMM=45.0}
\end{figure}
\end{center}

\subsection*{7.}
When the scattering angle is set to reflect second order ($n=2$) neutrons from the monochromator
$$
2\theta=2\cdot\sin^{-1}{\frac{\kappa \lambda}{4\pi n}}= 41.41^\circ
$$
it is seen in Figure \ref{fig:thirdomegascan} that a Bragg reflection with wavelength 2\AA{} is found at the sample position when turning the monochromator to $\Omega_M=\theta=20.7$.

\begin{center}
\begin{figure}[!h]
\includegraphics[width=0.45\textwidth]{ex_5.2.7omscan.eps}
\includegraphics[width=0.45\textwidth]{ex_5.2.7spec.eps}
\caption{\label{fig:thirdomegascan} (Left) A scan of the monochromator rotation angle for $2\theta_M=90^\circ$. The curve is a fit to a Gaussian.(Right) The neutron spectrum at OMM=20.7}
\end{figure}
\end{center}

\section*{Vanadium Sample}
The incoherent scattering from the Vanadium is seen in Figure \ref{fig:4pi}
\begin{center}
\begin{figure}[!h]
\includegraphics[angle=-90,width=0.6\textwidth]{sim/ex_5.3.1//PSD_4pi.sim.ps}
\caption{\label{fig:4pi} The scattering from the Vanadium sample }
\end{figure}
\end{center}

\section*{Powder Sample}
The scattering on the detector from the 'powder sample' with two reflections is shown in Figure \ref{fig:bananaPowder2}.
\begin{center}
\begin{figure}[!h]
\includegraphics[angle=-90,width=0.6\textwidth]{sim/ex_5.4.1/detector.dat.ps}
\caption{\label{fig:bananaPowder2} The scattering pattern from the Powder sample with two reflections }
\end{figure}
\end{center}

The sacttering from the realistic powder sample is shown in 
\begin{center}
\begin{figure}[!h]
\includegraphics[angle=-90,width=0.6\textwidth]{sim/ex_5.4.2/detector.dat.ps}
\caption{\label{fig:bananaPowderN} The scattering pattern from the realistic powder sample }
\end{figure}
\end{center}

\end{document}

