\section{\label{sub:xsect}Cross section}

Having presented the preselection yelds on Section \ref{sub:Preselection} we now show the results of the 
efficiencies for $\tau$ ID, b-tagging and trigger for all $t\bar{t}$ channels (only statistical uncertainties are shown).


\begin{table}[h]
%\begin{center}
\begin{tabular}{ccccc}
\hline
Selection  & Relative(\%)  & Cumulative(\%) \\ \hline 
$\tau$ ID &  $ 22.20 \pm 0.24 $ &  $ 22.20 \pm 0.24 $ \\
Trigger  &  $ 84.54 \pm 0.55 \ $ &  $ 18.77 \pm 0.22\ $   \\
b-tagging  &  $ 61.82 \pm 0.55 \ $ &  $ 11.61 \pm 0.16\ $  \\ \hline

\end{tabular}
\caption{$t\overline{t}\rightarrow\tau+jets$ cut flow for taus of Types 1 and 2.} 
%\end{center}
\label{taujets_final12}
\end{table}


\begin{table}[h]
%\begin{center}
\begin{tabular}{ccccc}
\hline
Selection  & Relative(\%)  & Cumulative(\%) \\ \hline 
$\tau$ ID &  $ 12.37 \pm 0.21 $ &  $ 12.37 \pm 0.21 $ \\
Trigger  &  $ 84.79 \pm 0.75 \ $ &  $ 10.49 \pm 0.19\ $   \\
b-tagging  &  $ 59.63 \pm 0.75 \ $ &  $ 6.26 \pm 0.13\ $  \\ \hline

\end{tabular}
\caption{$t\overline{t}\rightarrow\tau+jets$  cut flow for taus of Type 3} 
%\end{center}
\label{taujets_final3}
\end{table}


\begin{table}[h]
%\begin{center}
\begin{tabular}{ccccc}
\hline
Selection  & Relative(\%)  & Cumulative(\%) \\ \hline 
$\tau$ ID &  $ 10.81 \pm 0.20 $ &  $ 10.81 \pm 0.20 $ \\
Trigger  &  $ 83.40 \pm 0.81 \ $ &  $ 9.02 \pm 0.18\ $   \\
b-tagging  &  $ 61.30 \pm 0.82 \ $ &  $ 5.52 \pm 0.12\ $  \\ \hline

\end{tabular}
\caption{$t\overline{t}\rightarrow e+jets$ cut flow for taus of Types 1 and 2} 
%\end{center}
\label{elecjets_final12}
\end{table}

\begin{table}[b]
%\begin{center}
\begin{tabular}{ccccc}
\hline
Selection  & Relative(\%)  & Cumulative(\%) \\ \hline 
$\tau$ ID &  $ 2.25 \pm 0.11 $ &  $ 2.25 \pm 0.11 $ \\
Trigger  &  $ 83.62 \pm 1.77 \ $ &  $ 1.88 \pm 0.09 \ $   \\
b-tagging  &  $ 58.26 \pm 1.76 \ $ &  $ 1.10 \pm 0.06\ $  \\ \hline

\end{tabular}
\caption{$t\overline{t}\rightarrow e+jets$ cut flow for taus of Type 3} 
%\end{center}
\label{elecjets_final3}
\end{table}

%\newpage


\begin{table}[b]
%\begin{center}
\begin{tabular}{ccccc}
\hline
Selection  & Relative(\%)  & Cumulative(\%) \\ \hline 
$\tau$ ID &  $ 3.38 \pm 0.19 $ &  $ 3.38 \pm 0.19 $ \\
Trigger  &  $ 84.44 \pm 2.13 \ $ &  $ 2.86 \pm 0.17\ $   \\
b-tagging  &  $ 61.25 \pm 2.16 \ $ &  $ 1.75 \pm 0.11\ $  \\ \hline

\end{tabular}
\caption{$t\overline{t}\rightarrow \mu +jets$ cut flow for taus of Types 1 and 2.} 
%\end{center}
\label{muonjets_final12}
\end{table}


\begin{table}[b]
%\begin{center}
\begin{tabular}{ccccc}
\hline
Selection  & Relative(\%)  & Cumulative(\%) \\ \hline 
$\tau$ ID &  $ 3.88 \pm 0.21 $ &  $ 3.88 \pm 0.21 $ \\
Trigger  &  $ 82.79 \pm 2.04 \ $ &  $ 3.21 \pm 0.18\ $   \\
b-tagging  &  $ 58.11 \pm 2.05 \ $ &  $ 1.87 \pm 0.11\ $  \\ \hline

\end{tabular}
\caption{$t\overline{t}\rightarrow \mu +jets$ cut flow for taus of Type 3.} 
%\end{center}
\label{muonjets_final3}
\end{table}


\begin{table}[b]
%\begin{center}
\begin{tabular}{ccccc}
\hline
Selection  & Relative(\%)  & Cumulative(\%) \\ \hline 
$\tau$ ID &  $ 21.18 \pm 0.37 $ &  $ 21.18 \pm 0.37 $ \\
Trigger  &  $ 79.56 \pm 0.90 \ $ &  $ 16.85 \pm 0.34 \ $   \\
b-tagging  &  $ 62.83 \pm 0.92 \ $ &  $ 10.59 \pm 0.25\ $  \\ \hline

\end{tabular}
\caption{$t\overline{t}\rightarrow dilepton$ cut flow for taus of Types 1 and 2.} 
%\end{center}
\label{dilep_final12}
\end{table}


\clearpage

\begin{table}[t]
%\begin{center}
\begin{tabular}{ccccc}
\hline
Selection  & Relative(\%)  & Cumulative(\%) \\ \hline 
$\tau$ ID &  $ 14.73 \pm 0.34 $ &  $ 14.73 \pm 0.34 $ \\
Trigger  &  $ 78.78 \pm 1.08 \ $ &  $ 11.60 \pm 0.30\ $   \\
b-tagging  &  $ 63.62 \pm 1.11 \ $ &  $ 7.38 \pm 0.22\ $  \\ \hline

\end{tabular}
\caption{$t\overline{t}\rightarrow dilepton$ cut flow for taus of Type 3.} 
%\end{center}
\label{dilep_final3}
\end{table}

%\newpage



After having computed all efficiencies it is worthy to summarize all of them (in \%) for the different tau types:

\begin{table}[h]
%\begin{center}
\begin{tabular}{ccccc}
\hline
Channel &Preselection  & $\tau$ ID  & Trigger & b-tag \\ \hline 
$t\overline{t}\rightarrow\tau+jets$ &  $ 3.70 \pm 0.02 $ &  $ 22.20 \pm 0.24 $ & $ 18.77 \pm 0.22 $ & $ 11.61 \pm 0.16 $\\
$t\overline{t}\rightarrow e+jets$  &  $ 3.54 \pm 0.02 $ &  $ 10.80 \pm 0.20 $ & $ 9.02 \pm 0.18 $ & $ 5.53 \pm 0.12 $\\
$t\overline{t}\rightarrow \mu +jets$  &  $ 1.67 \pm 0.01 $ &  $ 3.38 \pm 0.19 $ & $ 2.86 \pm 0.17 $ & $ 1.75 \pm 0.11 $\\
$t\overline{t}\rightarrow dilepton$   &  $ 1.36 \pm 0.01 $ &  $ 21.18 \pm 0.37 $ & $ 16.85 \pm 0.34 $ & $ 10.59 \pm 0.25 $\\ \hline
\end{tabular}
\caption{Summary of all selections for taus of Types 1 and 2.} 
%\end{center}
\label{summary12}
\end{table}


\begin{table}[h]
%\begin{center}
\begin{tabular}{ccccc}
\hline
Channel &Preselection  & $\tau$ ID  & Trigger & b-tag \\ \hline 
$t\overline{t}\rightarrow\tau+jets$ &  $ 3.70 \pm 0.02 $ &  $ 12.37 \pm 0.21 $ & $ 10.49 \pm 0.19 $ & $ 6.26 \pm 0.13 $\\
$t\overline{t}\rightarrow e+jets$  &  $ 3.54 \pm 0.02 $ &  $ 2.25 \pm 0.11 $ & $ 1.88 \pm 0.09 $ & $ 1.10 \pm 0.06 $\\
$t\overline{t}\rightarrow \mu +jets$  &  $ 1.67 \pm 0.01 $ &  $ 3.88 \pm 0.21 $ & $ 3.21 \pm 0.18 $ & $ 1.87 \pm 0.11 $\\
$t\overline{t}\rightarrow dilepton$   &  $ 1.36 \pm 0.01 $ &  $ 14.73 \pm 0.34 $ & $ 11.60 \pm 0.30 $ & $ 7.38 \pm 0.22 $\\ \hline
\end{tabular}
\caption{Summary of all selections for taus of Type 3.} 
%\end{center}
\label{summary3}
\end{table}

%\clearpage

Table \ref{event yeild summary1} summarizes the number of events in each channel after the final selection.


\begin{table}[h]
\caption{Final number of events in the two analysis channels.} 
%\begin{ruledtabular}
\begin{tabular}{cccccc}
\hline 
&$\tau$ type I,II
&$\tau$ type I,II (fitted)
&$\tau$ type III
&$\tau$ type III (fitted)&\\
\hline 
data&
386 &
&
459 &
&\\
$t\overline{t}\rightarrow\tau+jets$&
72.04 $\pm$ 0.53&
&
38.82 $\pm$ 0.39&\\
$t\overline{t}\rightarrow e+jets$&
38.35 $\pm$ 0.36&
&
6.52 $\pm$ 0.16&
&\\
$t\overline{t}\rightarrow\mu+jets$&
4.81 $\pm$ 0.14&
&
5.14 $\pm$ 0.14&
&\\
$t\overline{t}\rightarrow l+l$&
6.02 $\pm$ 0.07&
&
4.20 $\pm$ 0.06&
&\\
$t\overline{t}$ total MC&
&
121.22 $\pm$ 0.43&
&
54.68 $\pm$ 0.20&\\
$t\overline{t}$ total fitted&
&
133.04 $\pm$ 17.09&
&
33.12 $\pm$ 15.04&\\
$W$+jets&
17.82 $\pm$ 0.33&
&
11.26 $\pm$ 0.23&
&\\
$Z$+jets&
2.78 $\pm$ 0.14&
&
2.39 $\pm$ 0.12&
&\\
QCD&
&
232.35 $\pm$ 17.09&
&
412.22 $\pm$ 15.04\\
Signal significance&
&
6.77&
&
1.54
&\\
S/B ratio&
&
0.52&
&
0.08\\
\end{tabular}
%\end{ruledtabular}
\label{event yeild summary1} 
\end{table}
%

\clearpage

%The cross section is defined as 
%$\sigma=\frac{Number\, of\, signal\, events}{\varepsilon(t\bar{t})\cdot BR(t\bar{t}\rightarrow \tau+jets)\cdot Luminosity}$. 
%However, we are not simply doing a `counting experiment`, but want to utilize the entire range of NN output. 
The cross section is measured by minimizing the sum of
the negative log-likelihood functions for each bin of both the Types 1 and 2 channel and the Type 3 $\tau$ channel.
These are functions used by MINUIT to perform fits shown in Figs \ref{fig:nnout_type2} and \ref{fig:nnout_type3} 
in Section \ref{sub:NN-variables}. But there $L$ was function of $f(QCD)$ and now we want to use it to measure the cross 
section, so we must express it in terms of $\sigma(\ttbar)$:
\begin{center}
\begin{equation}
L(\sigma, \tilde{N}_{i}, N^{obs}_{i}) \equiv  -\ln(\prod_{i} \frac{\tilde{N}^{N^{obs}_{i}}_{i}}{N^{obs}_{i}!}  e^{-\tilde{N}_{i}})
\label{log_xsec}
\end{equation}
\end{center}

\noindent where \(\tilde{N}_{i} = \sigma \times BR \times \mathcal{L} \times \epsilon(t\bar{t})_{i} + N_{bkg}\) is number 
events predicted in bin $i$ of the data NN distribution and \(N^{obs}_{i}\) is the actual count observed in that bin.
The minimum value of the graph of the function in Eq \ref{log_xsec} is the cross section. 
But, as stressed out in Section \ref{sub:Results-of-the}, we have to take 
into account both signal ($\ttbar$) and electroweak contamination in the loose-tight sample we 
use to model QCD in the high NN region used for 
the measurement. The electroweak component is small and therefore it is kept fixed during the fit and 
subtracted from the loose-tight sample.
However, as dicussed before, the numbers for signal contamination are 5.4\% and 3.0\% for taus types 
1 and 2 and type 3 respectively
when we assumed a $t\bar{t}$ cross section of 7.46 pb. This means that 5.4\% (12.55 events) of 232.35 QCD
events for taus types 1 and 2 are actually $\ttbar$ events and 3.0\% (12.37 events) of 412.22 QCD events 
for taus type 3 are actually $\ttbar$ 
events. 12.55 and 12.37 events represent increases of 9.43\% and 37.35\% on the number of signal events for types 1 and 2
and type 3 respectively. However this is not the final measurement yet since the cross section 
measurement only makes sense if the cross section we measure in the and is the same as the one we have assumed
to normalize $t\bar{t}$ MC samples. This means that we had to iterate back
by normalizing the signal samples until we found a convergence of the cross section. Table 33 summarizes
the iteration process.

\begin{table}[htbp]
\label{est}
\begin{center}
\begin{tabular}{|c|r|r|r|} \hline
Assumed $\sigma(\ttbar)$ (pb)  & signal contamination for types 1 \& 2 (\%) & signal contamination for type 
3 (\%) & measured $\sigma(\ttbar)$ (pb)      \\ \hline

\hline

\multicolumn{1}{|c|}{7.46}  & \multicolumn{1}{c|}{5.4} & \multicolumn{1}{c|}{3.0} & \multicolumn{1}{c|}{8.37} \\ \hline

%$t\bar{t} \rightarrow \mbox{dilepton}$  & \multicolumn{1}{c|}{1.4}   \\ \hline

\multicolumn{1}{|c|}{8.37}  & \multicolumn{1}{c|}{6.1} & \multicolumn{1}{c|}{3.3} & \multicolumn{1}{c|}{8.42} \\ \hline

\multicolumn{1}{|c|}{8.42}  & \multicolumn{1}{c|}{6.2} & \multicolumn{1}{c|}{3.4} & \multicolumn{1}{c|}{8.46} \\ \hline


\multicolumn{1}{|c|}{8.46}  & \multicolumn{1}{c|}{6.2} & \multicolumn{1}{c|}{3.4} & \multicolumn{1}{c|}{8.46} \\ \hline

\end{tabular}
\caption{Cross section iteration process.}
\end{center}
\label{iteration1} 
\end{table}

Table \ref{iteration1} shows that when we assumed a cross section of 8.46 pb we measured the exact same value, which means that we had to take 
into account signal contaminations of 6.2\% (14.40 events) and 3.4\% (14.02 events) for taus types 1 and 2 and 3 respectively. 
This represents an increase in the number of signal events of 10.82\% for types 1 and 2 and 42.33\% for type 3.
By considering such events as part of the signal $\ttbar$  sample we measure for the cross sections:

%\newpage 


\begin{center}$\tau$+jets types 1 and 2 cross section: \[\sigma (t\overline{t}) = 
8.83\;\;_{-1.12}^{+1.14}\;\;({\textrm{stat}})\;\;_{-0.79}^{+0.84}\;\;({\textrm{syst}})\;\;\pm 0.3\;\;({\textrm{lumi}})\;\; \rm{pb,}\]
 \par\end{center}

\begin{center}$\tau$+jets type 3 cross section: \[\sigma (t\overline{t}) = 
6.06\;\;_{-2.62}^{+2.77}\;\;({\textrm{stat}})\;\;_{-0.82}^{+0.88}\;\;({\textrm{syst}})\;\;\pm 0.3\;\;({\textrm{lumi}})\;\; \rm{pb,}\]
\par\end{center}



\begin{center}Combined cross section: \[\sigma (t\overline{t}) = 
8.46\;\;_{-1.04}^{+1.06}\;\;({\textrm{stat}})\;\;_{-0.78}^{+0.84}\;\;({\textrm{syst}})\;\;\pm 0.3\;\;({\textrm{lumi}})\;\; \rm{pb.}\]
\par\end{center}

\noindent The correspondent negative log likelihoods of these measurements are shown in 
Figures \ref{fig:type2_llhood}, \ref{fig:type3_llhood}
and \ref{fig:type123_llhood}. Figures \ref{fig:xsec_pres2_llhood}, \ref{fig:xsec_pres3_llhood} 
and \ref{fig:xsec_pres123_llhood} show zoomed in graphs of the same likelihood functions described above.


All associated systematics concerning this measurement can be seen in Table \ref{cap:Syst1}.

%\newpage

\begin{figure}[h]
\includegraphics[scale=0.38]{plots2/type2_llhood.eps}
\caption{The log likelihood function for type 1 and 2 $\tau$ channel}
\label{fig:type2_llhood}
\end{figure}

%\newpage

\begin{figure}[h]
\includegraphics[scale=0.38]{plots2/type3_llhood.eps}
\caption{The log likelihood function for type 3 $\tau$ channel}
\label{fig:type3_llhood}
\end{figure}


\begin{figure}[b]
\includegraphics[scale=0.38]{plots2/type123_llhood.eps}
\caption{The log likelihood function for all three types combined}
\label{fig:type123_llhood}
\end{figure}

\clearpage

\begin{figure}[h]
\includegraphics[scale=0.38]{plots2/xsec12_pres.eps}
\caption{Zoom in of the log likelihood function for type 1 and 2 $\tau$ channel}
\label{fig:xsec_pres2_llhood}
\end{figure}

%\newpage

\begin{figure}[h]
\includegraphics[scale=0.38]{plots2/xsec3_pres.eps}
\caption{Zoom in of the log likelihood function for type 3 $\tau$ channel}
\label{fig:xsec_pres3_llhood}
\end{figure}


\begin{figure}[b]
\includegraphics[scale=0.38]{plots2/xsecall_pres.eps}
\caption{Zoom in of the log likelihood function for all three types combined}
\label{fig:xsec_pres123_llhood}
\end{figure}

\clearpage


After measuring the combined cross section we observed a significant higher statistical uncertainty value if 
compared to the one we expected to see based on the fact that we have approximately 5 times more 
data than in p17, where the signal contamination was not taken into account (see Appendix \ref{app:xsec_nocont}). 
Further investigation showed that the cut NNelec $>$ 0.9 applied to taus type 2 only was responsible for such
discrepancy. Below we show the same measurement as done above but now with no NNelec cut applied.


Table \ref{event yeild summary2} summarizes the number of events in each channel after final selection.


\begin{table}[h]
\caption{Final number of events in the two analysis channels.} 
%\begin{ruledtabular}
\begin{tabular}{cccccc}
\hline 
&$\tau$ type I,II
&$\tau$ type I,II (fitted)
&$\tau$ type III
&$\tau$ type III (fitted)&\\
\hline 
data&
583 &
&
459 &
&\\
$t\overline{t}\rightarrow\tau+jets$&
85.46 $\pm$ 0.58&
&
38.82 $\pm$ 0.39&\\
$t\overline{t}\rightarrow e+jets$&
175.23 $\pm$ 0.85&
&
6.52 $\pm$ 0.16&
&\\
$t\overline{t}\rightarrow\mu+jets$&
8.98 $\pm$ 0.19&
&
5.14 $\pm$ 0.14&
&\\
$t\overline{t}\rightarrow l+l$&
12.62 $\pm$ 0.10&
&
4.18 $\pm$ 0.06&
&\\
$t\overline{t}$ total MC&
&
282.27 $\pm$ 1.05&
&
54.67 $\pm$ 0.41&\\
$t\overline{t}$ total fitted&
&
260.71 $\pm$ 20.74&
&
35.73 $\pm$ 15.28&\\
$W$+jets&
39.65 $\pm$ 0.50&
&
11.26 $\pm$ 0.25&
&\\
$Z$+jets&
4.56 $\pm$ 0.10&
&
2.38 $\pm$ 0.11&
&\\
QCD&
&
278.04 $\pm$ 20.74&
&
409.62 $\pm$ 15.28\\
Signal significance&
&
10.80&
&
1.67
&\\
S/B ratio&
&
0.80&
&
0.08\\
\end{tabular}
%\end{ruledtabular}
\label{event yeild summary2} 
\end{table}
%

Table below shows the iteration process in this case and  and the cross section measurement follows:

\begin{table}[htbp]
\label{est}
\begin{center}
\begin{tabular}{|c|r|r|r|} \hline
Assumed $\sigma(\ttbar)$ (pb)  & signal contamination for types 1 \& 2 (\%) & signal contamination for type 
3 (\%) & measured $\sigma(\ttbar)$ (pb)      \\ \hline

\hline

\multicolumn{1}{|c|}{7.46}  & \multicolumn{1}{c|}{6.0} & \multicolumn{1}{c|}{3.0} & \multicolumn{1}{c|}{6.84} \\ \hline

%$t\bar{t} \rightarrow \mbox{dilepton}$  & \multicolumn{1}{c|}{1.4}   \\ \hline

\multicolumn{1}{|c|}{6.84}  & \multicolumn{1}{c|}{5.4} & \multicolumn{1}{c|}{2.7} & \multicolumn{1}{c|}{6.91} \\ \hline

\multicolumn{1}{|c|}{6.91}  & \multicolumn{1}{c|}{5.5} & \multicolumn{1}{c|}{2.8} & \multicolumn{1}{c|}{6.92} \\ \hline


\multicolumn{1}{|c|}{6.92}  & \multicolumn{1}{c|}{5.5} & \multicolumn{1}{c|}{2.8} & \multicolumn{1}{c|}{6.92} \\ \hline

\end{tabular}
\caption{Cross section iteration process.}
\end{center}
\label{iteration2} 
\end{table}


%\newpage 


\begin{center}$\tau$+jets types 1 and 2 cross section: \[\sigma (t\overline{t}) = 
7.03\;\;_{-0.56}^{+0.54}\;\;({\textrm{stat}})\;\;_{-0.61}^{+0.65}\;\;({\textrm{syst}})\;\;\pm 0.3\;\;({\textrm{lumi}})\;\; \rm{pb,}\]
 \par\end{center}

\begin{center}$\tau$+jets type 3 cross section: \[\sigma (t\overline{t}) = 
4.36\;\;_{-2.50}^{+2.62}\;\;({\textrm{stat}})\;\;_{-0.61}^{+0.62}\;\;({\textrm{syst}})\;\;\pm 0.3\;\;({\textrm{lumi}})\;\; \rm{pb,}\]
\par\end{center}



\begin{center}Combined cross section: \[\sigma (t\overline{t}) = 
6.92\;\;_{-0.54}^{+0.54}\;\;({\textrm{stat}})\;\;_{-0.60}^{+0.62}\;\;({\textrm{syst}})\;\;\pm 0.3\;\;({\textrm{lumi}})\;\; \rm{pb,}\]
\par\end{center}


As we can see the statistical uncertainty decreases to 0.54 pb, which is in a good agreement with what we would expect if compared 
to the 1.2 pb measured in p17. Appendix \ref{app:xsec_nocont} shows cross section measurements when signal contamination is not
taken into account for both NNelec $>$ 0.9 and no NNelec cut applied. Once again, we observed the difference caused by the 
NNelec requirement.
