\section{Saxs\_spheres: A model of dilute hard spheres in solution for SAXS-use}
\index{Samples!SAXS}
\index{Samples!Dilute colloid medium}
\index{Diffraction}
\index{Small angle scattering}
\label{saxs_spheres}

\mcdoccomp{samples/Saxs_spheres.parms}

%The component {\bfseries Sans\_spheres} models a sample of small independent
%spheres of radius $R$, which are uniformly distributed
%in a rectangular volume $x_w \times y_h \times z_t$ with a volume
%fraction $\phi$. The absorption cross section density for the spheres
%is $\sigma_a$ (in units of m$^{-1}$), specified
%for neutrons at 2200 m/s. Absorption and incoherent scattering
%from the medium is neglected.
%The difference in scattering length density
%(the contrast) between the hard spheres and the medium is called $\Delta \rho$.
%$d$ denotes the distance to the (presumed circular) SANS detector of radius $R$.
%
%A usage example of this component can be found in the \verb+Neutron site/tests/SANS+ instrument from the \verb+mcgui+.
%
%\subsection{Small-angle scattering cross section}
%The neutron intensity scattered into a solid angle $\Delta \Omega$
%for a flat isotropic SANS sample in transmission geometry
%is given by \cite{ILLblue}:
%\begin{equation}
%I_s(q) = \Psi \Delta\Omega T A z_\mathrm{max} \frac{d\sigma_v}{d\Omega}(q) ,
%\end{equation}
%where $\Psi$ is the neutron flux, $T$ is the sample transmission,
%$A$ is the illuminated sample area, and $z_\mathrm{max}$ the length of
%the neutron path through the sample.
%
%In this component, we consider only scattering from a thin solution
%of monodisperse hard spheres of radius $R$, where the volume-specific
%scattering cross section is given by \cite{ILLblue}
%\begin{equation}
%\frac{d\sigma_v}{d\Omega}(q) =
%  n (\Delta\rho)^2 V^2 f(q)  ,
%\end{equation}
%where $f(q) = \left( 3\frac{\sin(qR)-qR\cos(qR)}{(qR)^3} \right)^2$,
%$n$ is the number density of spheres, and $V = 4 / 3 \pi R^3$ is the
%sphere volume. (The density is thus $n = \phi/V$.)
%
%Multiple scattering is ignored.
%
%\subsection{Algorithm}
%All neutrons, which hit the sample volume, are scattered.
%(Hence, no direct beam is simulated.)
%For scattered neutrons, the following steps are taken:
%\begin{enumerate}
%\item Choose a value of $q$ uniformly in the interval $[0;q_\mathrm{max}]$.
%\item Choose a polar angle, $\alpha$,
%  for the {\bfseries q}-vector uniformly in $[0;\pi]$.
%\item Scatter the neutron according to $(q,\alpha)$.
%\item Calculate and apply the correct weight factor correction.
%\end{enumerate}
%
%\subsection{Calculating the weight factor}
%The scattering position is found by a Monte Carlo choice uniformly
%along the whole (unscattered) beam path with the sample, length $l_\mathrm{full}$, giving
%$f_l = 1/l_\mathrm{full}$. The direction focusing on the detector gives
%(in an small angle approximation) $f_\Omega = d^2 / (\pi R_\mathrm{det}^2)$.
%
%Hence, the total weight tranformation factor becomes % (more explanation to come)
%\begin{equation}
%\pi_j = l_\mathrm{full} (\pi R_\mathrm{det}^2 / d^2)/(4 \pi)
%  n (\Delta\rho)^2 V^2 f(q) \exp(-\mu_a l) ,
%\end{equation}
%where $\mu_a$ is the linear attenuation factor due to absorption
%and $l$ is the total neutron path length within the sample.
%
%This component does NOT simulate absolute intensities. This latter depends on the detector parameters. \index{Bugs}
%
%Some alternative implementations exist as contributed components.
%
%The \verb+SANS+ test/example instrument exists in the distribution for this component.
