%
%  Add W->jj reconstruction and 318 pb-1	  16 March 2005    Pekka 
%
\section{Mass Reconstruction}
\label{sec:massRecon}

In this section, we describe the procedure for determining
the reconstructed top quark mass \mreco in each event and the procedure used to
reconstruct the dijet mass \mjj representing the mass of the
hadronically decaying $W$ boson.  We then
discuss the results of applying these reconstruction techniques.
It is important to remember that \mreco is
not an event-by-event measurement of the top quark mass;
rather it is a quantity whose distribution in the data will be compared
with simulated samples to extract the top quark mass
(see section~\ref{sec:fitting}).
Similarly, the distribution of \mjj will be used to constrain the
calibration of the jet energy scale in the reconstructed events.

Throughout the mass reconstruction, each event is assumed to
be a \ttbar event decaying in the lepton + jets channel, and
the four leading jets are assumed to correspond to the four
quarks from the top and $W$ decays. First, the measured
four-vectors for the identified physics objects in the event
are corrected for known effects, and resolutions
are assigned where needed. Next, for the top quark mass
reconstruction, a \chisq fit is used to extract the reconstructed
mass, so that each event has a particular value of
\mreco and a corresponding \chisq value.
Some events ``fail'' the mass reconstruction and are discarded
when their minimized \chisq exceeds a cut value.
Meanwhile, for the dijet mass reconstruction, the invariant
mass \mjj is calculated for each pair of jets without $b$ tags
among the leading four jets.

\subsection{Inputs to the mass reconstruction}
\label{ssec:inputs}

The \chisq fit takes as input the four-vectors of the various
physics objects identified in the event.  All known
corrections are applied to the jets and charged lepton, and Gaussian
uncertainties are established on the transverse momenta,
since the $\pt$ of each one will be permitted to vary in the fit.
The treatment of the neutrino four-vector is more complicated, since
the $\met$ is a derived quantity, and does not have an uncertainty
independent of the other measured values. The \chisq includes
instead information about a related fundamental quantity,
the unclustered energy, which is described below.

\subsubsection{Jet inputs}
\label{sssec:jetinputs}

The corrections made to the jet four-vectors are described in
detail in Section~\ref{ssec:jetCorr}. To summarize, a series of
corrections are applied to the jet energies in order to determine
the energy of the quark corresponding to each jet. The jet angles
are relatively well measured, and are fixed in the kinematic fit.
The final step of the jet corrections is a \ttbar-specific correction that
treats separately $b$ jets and jets from the $W$ decay, and
in addition provides for the \pt of each jet a resolution that is used in
the \chisq expression.

\subsubsection{Lepton Inputs}
\label{sssec:lepinputs}

The electron four-vector has energy determined by its electromagnetic
calorimeter cluster, and angles defined by the associated track.
The electron energy is corrected for differences in the calorimeter
response depending on where in the tower face the electron enters.
The electron mass is set to zero, and the angles
are taken as perfectly measured quantities.  The transverse momentum
$(\pte = p \sin \theta)$ of the electron has an uncertainty of
\begin{equation}
\frac{\sigma_{\pte}}{\pte} = \sqrt{\left( \frac{0.135}
	{\sqrt{\pte[\gevcnoarg]}}\right)^{2} + (0.02)^{2}}.
\end{equation}

The muon four-vector uses the three-vector of the associated track,
also with a mass of zero.  Track curvature corrections due to chamber
misalignment are applied.
The angles and mass are given no uncertainty; the transverse
momentum has an uncertainty of
\begin{equation}
\frac{\sigma_{\ptmu}}{\ptmu} = 0.0011\cdot\ptmu[\gevcnoarg],
\end{equation}
The uncertainties on measured electron and muon transverse momenta
are obtained from studies of leptonic $Z^0$ decays.

\subsubsection{Neutrino Inputs: Unclustered Energy}
\label{sssec::neutrinoinputs}

The neutrino in a \ttbar event is not observed; its presence
is inferred by an imbalance in the observed transverse momentum.
Therefore, rather than treating the neutrino four-vector
as an independent input to the \chisq fit, the measured quantities,
as varied in the fit, are used to dynamically calculate the
neutrino transverse momentum.

All of the transverse energy in the calorimeter (towers with
$|\eta| < 3.6$) that is not associated with the primary lepton
or one of the leading four jets is considered ``unclustered
energy.'' For towers clustered into a jet that has
$\et>\gev{8}$ and $|\eta|<2.0$, but that is not one of the leading
four jets, the tower momenta are replaced with the jet momentum
after the generic jet corrections described in
section~\ref{sssec:genericJetCorr}.
The rest of the tower momenta are multiplied by a scale factor of
1.4, which is roughly the correction factor for $\gev{8}$ generic jets.
Finally, the unclustered energy includes the energy thought to
enter into the leading four jets from the underlying event,
and excludes the energy thought to fall outside the jet cones
of the leading four jets. This avoids double-counting of energy
that is included in the leading four jet energies after all
corrections.  Each transverse component
of the unclustered energy ($p_x^{UE}$, $p_y^{UE}$) is assigned an
uncertainty of $0.4 \sqrt{\sum\et^{\text{uncl}}}$, where
$\sum\et^{\text{uncl}}$ is the scalar sum of the transverse energy
excluding the primary lepton and leading four jets.
The uncertainty comes from studies of minimum bias events.
\note{Is this jargon?}

The unclustered energy is the observed quantity and the input to
the \chisq fit, but it is related to the missing energy through
the other measured physics objects in the event,
since the $\ppbar$ system has $\pt\approx0$.
The neutrino transverse momentum $\ptnu$ is
calculated at each step of the fit, using the fitted values of
lepton, jet, and unclustered transverse energies:
\begin{equation}
\vec{\ptnu} = -\left(\vec{\pt^{\ell}} + \sum\vec{\ptjet} +
				\vec{p_T^{UE}}\right)
\end{equation}
Note that this quantity, used in the mass fitting procedure,
is different from the missing energy described in
section~\ref{ssec:selection} and used in event selection,
where simpler calorimeter energy corrections are used.

Although this is a complicated input to the fit procedure,
and other treatments of the unclustered energy and missing energy
can be motivated, it has been shown that the $\met$ calculation
does not in fact have a large effect on the results of the \chisq fit.
Various other approaches to correcting the unclustered energy and
assigning resolution were tried, and no changes had any significant
effect on the reconstructed top quark mass resolution.

The mass of the neutrino is fixed at zero, and the longitudinal
momentum, $\pz^{\nu}$, is a free (unconstrained) parameter in
the fit. The initial value of $\pz^{\nu}$ is calculated using the
initial value of the lepton four-vector and the initial $\ptnu$,
assuming that they arise from a $W$ boson at the nominal pole mass.
Since these conditions yield a quadratic equation, there are in
general two solutions for the $\pz^{\nu}$; a separate \chisq fit
is done with each solution used as the initial value of $\pz^{\nu}$.
When the solutions are imaginary, the real part $\pm\:\gev{20}$ are
the two values of $\pz^{\nu}$ used to initialize the fit.

\subsection{Event \chisq fit}
\label{ssec:chisq}

Given the inputs described above, the event-by-event fit for the
reconstructed top quark mass proceeds as follows.  MINUIT is used to
minimize a \chisq where \mreco is a free parameter.
For each event, the \chisq is minimized once for each possible
way of assigning the leading four jets to the four quarks from
the \ttbar decay. Since the two $W$ daughter jets are indistinguishable
in the \chisq expresssion, the number of permutations is
$\frac{4!}{2}=12$. In addition, there are 2 solutions for the initial
value of the neutrino longitudinal momentum, so the minimization
is performed a total of 24 times for each event.
When $b$ tags are present, permutations that assign a tagged jet
to a light quark at parton level are rejected. In the case of
single-tagged events, the number of allowed permutations is six,
and for double-tagged events, it is two. In the rare cases when
an event has three $b$ tags, two of the tagged jets must be
assigned to $b$ quarks. We use the reconstructed top quark mass from
the permutation with the lowest \chisq after minimization.

The \chisq expression has terms for the uncertain measurements of
jet, lepton, and unclustered energies, as well as terms for the
kinematic constraints applied to the system:
\begin{eqnarray}
\label{eq_chi2}
\chisq &=&
\sum_{i = \ell, 4 jets} \frac{(p_T^{i,fit} - p_T^{i,meas})^2}{\sigma_i^2} \nonumber \\
&&+ \sum_{j = x,y} \frac{(p_j^{UE,fit} - p_j^{UE,meas})^2}{\sigma_{UE}^2} \nonumber \\
&&+ \frac{(M_{\ell\nu} - M_W)^2}{\Gamma_W^2}
+ \frac{(M_{jj} - M_W)^2}{\Gamma_W^2} \nonumber \\
&&+ \frac{(M_{b\ell\nu} - \mreco)^2}{\Gamma_t^2}
+ \frac{(M_{bjj} - \mreco)^2}{\Gamma_t^2}.
\end{eqnarray}

The first term constrains the \pt of the lepton and four leading jets to their
measured values within their assigned uncertainties; the second term does
the same for both transverse components of the unclustered energy.
In the remaining four terms, the quantities $M_{\ell\nu}$, $M_{jj}$,
$M_{b\ell\nu}$, and $M_{bjj}$ refer to the invariant mass of the sum
of the four-vectors denoted in the subscripts. For example, $M_{\ell\nu}$
is the invariant mass of the sum of the lepton and neutrino four-vectors.
$M_{W}$ is the pole mass of the $W$ boson, $\gevcc{80.42}$~\cite{r_PDBook},
and \mreco is the free parameter for the reconstructed top quark mass
used in the minimization. The fit is initialized with $\mreco = \gevcc{175}$.
$\Gamma_W$ and $\Gamma_t$ are the total width of the $W$ boson and the
top quark. In order to use the \chisq formalism, the $W$ and
top Breit-Wigner lineshapes are modeled with Gaussian distributions, using the
Breit-Wigner full width at half maximum as the Gaussian sigma.
$\Gamma_{W}$ is $\gev{2.12}$~\cite{r_PDBook}, and $\Gamma_{t}$ is
$\gev{1.5}$~\cite{Oliveira:2001vw}.
Thus these terms provide constraints such that the $W$
masses come out correctly, and the $t$ and $\bar{t}$ masses come out
the same (modulo the Breit-Wigner distribution, here modeled by a
Gaussian, in both cases).

The jet-quark assignment (and $\pz^{\nu}$ solution) with the lowest
\chisq after minimization is selected for each event.  The \chisq
of this combination is denoted \chisqmin (or just \chisq when the
context is unambiguous), and the requirement $\chisqmin<9$
is imposed.
The expected statistical uncertainty on the top quark mass was found to not
change much over a wide range of the value of \chisqcut, even
if the cut values were varied independently for the four event types.
The value used here, $\chisqcut=9$, is close to the minimum of
expected top quark mass uncertainty.
%So at this stage, after mass reconstruction, each event
%either has been rejected or can be described by a single value of this
%reconstructed mass variable. Indeed, the rest of the analysis can be
%performed with nothing more than a list of the reconstructed masses
%for events in various samples that have passed all selection cuts.

\subsection{Dijet Mass and Jet Energy Scale}
\label{ssec:mdijetRecon}

\note{Think about if this is clear as written.}
We reconstruct the dijet mass in the same data sample used to reconstruct
the observed top quark mass, with the exception that there is no \chisq
requirement on the jet-quark assignments under consideration.
The imposition of the \chisq requirement would impose a bias in the dijet
masses being considered and therefore reduce the sensitivity of the
dijet mass distribution to \jes. We elect to reconstruct the dijet 
mass directly from the measured jets four-vector without the use of a 
kinematic fit and to consider all jet-quark assignments in each event made 
of the four highest Et jets. Monte Carlo studies have
shown that the sensitivity of the dijet mass distribution to the \jes
parameter is maximized by considering all dijet mass combinations
possible in each event.  The number of possible assignments
range from one (for events with two $b$ tags) to six (for events with no
$b$ tags).

\subsection{Mass reconstruction results}
\label{ssec:mrecoResults}

Typical reconstructed top quark mass distributions for signal Monte Carlo
($\mtop=\gevcc{178}$) are shown for the four event categories
as the light histograms in \fig{f:sampletemp}. Each event in
the sample that passes both event selection and the $\chisq$
cut contributes exactly one entry to these histograms.
As expected, the distributions peak near the generated mass of
$\gevcc{178}$, but an exact correspondence between the generated
mass and, say, the mean of the reconstructed mass is neither sought
nor expected. Differences can arise when ISR/FSR jets are
selected instead
of the \ttbar decay products; even with the correct jets, the fit
may choose the wrong jet-quark assignment. In particular, the
broader shape, beneath the relatively sharp peak at $\gevcc{178}$,
comprises events where an incorrect permutation has been chosen in
the fit.  The dark histograms in the same figure show the reconstructed
mass distributions for events where the four leading jets correspond to
the four quarks from \ttbar decay, and where
the correct jet-quark assigment is chosen by the fit.
These histograms have much smaller tails than the overall distributions.

\begin{cfigure}
\includegraphics{plots/defaulttopsigtemp_prd}
\caption[\gevcc{178} reconstructed mass templates.]
{The light histograms show the reconstructed top quark mass distribution for the
$\gevcc{178}$ HERWIG \ttbar sample at the nominal jet energy scale.
Overlaid are darker histograms of the reconstructed mass
distributions using the subset of events for which the leading
four jets are matched (within $\Delta R=0.4$) to the four quarks
from the \ttbar decay and the correct jet-quark assignment has
the lowest \chisq.
Distributions are shown for \twotag (upper left), \onetagt (upper
right), \onetagl (lower left), and \zerotag (lower right) events.}
\label{f:sampletemp}
\end{cfigure}

The corresponding dijet mass distributions for the $W$ boson
reconstruction are shown in \fig{f:samplemjjtemp} for the four
subsamples.  \note{Specify each event contributes 1-6 entries.}
One sees a clear $W$ boson mass signal, with a peak near
the nominal $W$ boson mass of \gevcc{80.42}.  The peak becomes
more evident with increasing numbers of $b$-tagged jets in the event, a
consequence of the decreasing number of combinations for $W$ boson jet
daughters.

\begin{cfigure}
\includegraphics{plots/defaultwsigtemp_prd}
\caption[\gevcc{178} dijet mass templates.]
{The reconstructed dijet mass distributions for the
\gevcc{178} HERWIG \ttbar sample at the nominal jet energy scale. 
Overlaid are darker histograms of the reconstructed mass
distributions using the subset of events for which the leading
four jets include two jets matched (within $\Delta R=0.4$)
to the two quarks from the hadronic $W$ decay, and plotting just
the invariant mass of those two jets.
Distributions are shown for \twotag (upper left), \onetagt (upper
right), \onetagl (lower left), and \zerotag (lower right) events.}
\label{f:samplemjjtemp}
\end{cfigure}

Some results of the mass reconstruction on Monte Carlo \ttbar
signal ($\mtop=\gevcc{178}$) and background samples are given
in \tab{t:massRecoMC}. The four subsamples have significantly
different \mreco and \mjj shapes for \ttbar signal, as evidenced
by their reconstructed mass mean and RMS values.
The \chisq cut efficiency is lowest for \twotag events,
especially for the background processes, because there are fewer
allowed jet-quark assignments and thus fewer chances to pass the
\chisq cut. The efficiencies for signal events vary only weakly
with the generated top quark mass, and for the purposes of this
analysis are assumed to be constant.
\note{Could this generate a systematic?}
The means of the background reconstructed mass distributions
are primarily driven by the jet cuts (see \tab{t:eventTypes}).

\begin{table}
\caption[Result of mass reconstruction on Monte Carlo samples.]
{Monte Carlo samples of \ttbar signal and of background processes
with the expected relative weights are run through the \chisq
mass fitter. For signal and background in each of the four event
categories, the table shows the efficiency of the \chisq cut and
the mean and RMS of the resulting reconstructed mass distributions.
The signal sample has $\mtop=\gevcc{178}$, and the nominal jet
energy scale is used for all events.
\note{Need to update \mreco bkgd for Gen5?}
\note{\jes not defined?}
}
\label{t:massRecoMC}
\begin{ruledtabular}
\begin{tabular}{lddddd}
Sample
& \multicolumn{1}{c}{\chisq cut}
& \multicolumn{2}{c}{\mreco (\gevccnoarg)}
& \multicolumn{2}{c}{\mjj (\gevccnoarg)} \\
Description
& \multicolumn{1}{c}{eff.}
& \multicolumn{1}{c}{Mean}
& \multicolumn{1}{c}{RMS}
& \multicolumn{1}{c}{Mean}
& \multicolumn{1}{c}{RMS} \\
\hline
\multicolumn{6}{l}{\textbf{Signal}} \\
\twotag   & 0.65 & 173.9 & 26.6 & 76.8 & 34.5 \\
\onetagt  & 0.85 & 174.0 & 31.8 & 98.1 & 49.1 \\
\onetagl  & 0.80 & 167.4 & 30.8 & 77.8 & 41.7 \\
\zerotag  & 0.91 & 179.3 & 36.9 & 112.6 & 57.9 \\
\hline
\multicolumn{6}{l}{\textbf{Background}} \\
\twotag   & 0.38 & 160.2 & 35.1 & 77.2 & 53.3 \\
\onetagt  & 0.73 & 166.4 & 42.2 & 95.8 & 59.7 \\
\onetagl  & 0.71 & 153.7 & 37.3 & 67.7 & 46.3 \\
\zerotag  & 0.83 & 182.6 & 46.5 & 114.0 & 69.3 \\
\end{tabular}
\end{ruledtabular}
\end{table}

The reconstructed top quark and dijet mass distributions
for the \note{???} events found in the data can be seen
in \fig{f:datamasses}. These events consist of both \ttbar 
signal and background events.
\Fig{f:chi2} shows distributions of \chisq values from the top
quark mass reconstruction in data and
simulated events, where the distributions from simulation contain
the expected mixtures of signal and background events.
Kolmogorov-Smirnov tests, with probability normalized using
many trial distributions randomly selected from the Monte Carlo
predictions, show that the distributions agree well, indicating
that kinematic quantities and resolutions are correctly simulated.

\begin{cfigure}
\includegraphics[height=.38\textheight]{plots/topdatamass_prd}
\includegraphics[height=.38\textheight]{plots/wdatamass_prd}
\caption[Reconstructed masses of data events.]
{The reconstructed top quark mass for events in the data is shown,
with events from the four subsamples represented by
separate stacked histograms.
The top histogram shows the reconstructed top quark mass
\mreco, and the bottom histogram shows the dijet reconstructed
mass \mjj. In the \mjj plot, each event has a different
number of jet pairs, depending on the number of $b$ tags in
the event, but the entries are weighted so that the total
contribution from each event is one unit.
\note{Clarify overflows in the last bin.}
}
\label{f:datamasses}
\end{cfigure}

\begin{cfigure}
\includegraphics{plots/chi2_comp_prd}
\caption[Comparison of \chisq distribution in data and MC.]
{The \chisq distribution is shown for data events and for
signal and background simulated events in the expected ratio.
Distributions are shown for \twotag (upper left), \onetagt (upper right),
\onetagl (lower left), and \zerotag (lower right) events.}
\label{f:chi2}
\end{cfigure}

