\chapter{Reweighting Factors}
	\label{chapter_reweghting_factors}

	The weight as a function of the generated $z_{vtx}$ was computed as 
\begin{eqnarray}	
	w_{z}(z_{vtx}^{gen}) & = & 0.999 - 1.272\times 10^{-3}*z_{vtx}^{gen} \mbox{ for electrons} \\
	w_{z}(z_{vtx}^{gen}) & = & 0.982 - 4.966\times 10^{-3}*z_{vtx}^{gen} \mbox{ for positrons} 
\end{eqnarray}
	The weight as a function of the generated $Q^2$ was computed as
\begin{eqnarray}	
	w_{Q^2}(Q^2_{gen}) & = & 1.464 - 0.1385\times 10^{-3}*\log_{10}(Q^2_{gen}) \mbox{ for electrons} \\
	w_{Q^2}(Q^2_{gen}) & = & 1.5542 + -0.2147\times 10^{-3}*\log_{10}(Q^2_{gen}) \mbox{ for positrons} 
\end{eqnarray}
	The weight function to account for the tracking veto was provided by the ZEUS tracking group, and will not be discussed here.

	The effects of the reweighting are shown in figures \ref{figure_reweighting_e_ARD} and \ref{figure_reweighting_p_ARD}.  It can be seen from the figures that the reweighting procedure greatly improves the overal description of $Q^2$ for both samples.  The $z_{vtx}$  distribution for all ZEUS monte carlo is generated to empirically match the data for the run ranges considored.  The difference in shape of the $z_{vtx}$ distribution shown for positron data in figure \ref{figure_reweighting_p_ARD} is because the monte carlo was generated before the end of data taking, and the $z_{vtx}$ distribution used does not represent that of the final data sample.  
\begin{figure}[htbp]
	\begin{center}
		\includegraphics[draft=false, width=1.\textwidth]{/home/hwolfe/thesis/thesis_plots/reweighting_control_plot_e_ARIADNE}

	\end{center}
		\caption[Monte Carlo Reweighting for the $e^{-}p$ Sample]{
			\fixspacing{Plots comparing detector level distributions of $e^{-}p$ data versus ARIADNE.  The two upper plots show $Q^2$, while the bottom two show $z_{vtx}$.  The left two plots show distributions without monte carlo reweighting, while the right two show the same data distributions, but compared to reweighted monte carlo.  The monte carlo distributions have been area-normalized to the data.  Below each distribution, a ratio plot is shown of data/ARIADNE.  A linear $\chi^2$ fit is shown for each ratio.}
		}
	\label{figure_reweighting_e_ARD}
\end{figure}

\begin{figure}[htbp]
	\begin{center}
		\includegraphics[draft=false, width=1.\textwidth]{/home/hwolfe/thesis/thesis_plots/reweighting_control_plot_p_ARIADNE}

	\end{center}
		\caption[Monte Carlo Reweighting for the $e^{+}p$ Sample]{
			\fixspacing{Plots comparing detector level distributions of $e^{+}p$ data versus ARIADNE.  All details as in figure \ref{figure_reweighting_e_ARD}.}
		}
	\label{figure_reweighting_p_ARD}
\end{figure}
