\documentclass[]{beamer}
\setbeamertemplate{navigation symbols}{}
\usepackage{beamerthemesplit}
\useoutertheme{infolines}
\usecolortheme{dolphin}
%\usetheme{Warsaw}
\usetheme{progressbar} 
\usecolortheme{progressbar}
\usefonttheme{progressbar}
\useoutertheme{progressbar}
\useinnertheme{progressbar}
\usepackage{graphicx}
%\usepackage{amssymb,amsmath}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\newcommand\abs[1]{\left|#1\right|}
\usepackage{iwona}
\usepackage{hepparticles}
\usepackage{hepnicenames}
\usepackage{hepunits}
\progressbaroptions{imagename=images/lhcb}
%\usetheme{Boadilla}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
\definecolor{mygreen}{cmyk}{0.82,0.11,1,0.25}
\setbeamertemplate{blocks}[rounded][shadow=false]
\addtobeamertemplate{block begin}{\pgfsetfillopacity{0.8}}{\pgfsetfillopacity{1}}
\setbeamercolor{structure}{fg=mygreen}
\setbeamercolor*{block title example}{fg=mygreen!50,
bg= blue!10}
\setbeamercolor*{block body example}{fg= blue,
bg= blue!5}





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\beamersetuncovermixins{\opaqueness<1>{25}}{\opaqueness<2->{15}}
\title{MatrixNet, TMVA, Isolation}  
\author{\underline{Marcin Chrzaszcz}$^{1,2}$, Tatiana Likhomanenko$^{3,4}$,\\ Andrey Ustyuzhanin$^{3,4}$}
\date{\today} 

\begin{document}

{
\institute{$^1$ University of Zurich, $^2$ Institute of Nuclear Physics, $^3$ Yandex, $^4$ Kurchatov Institute}
\setbeamertemplate{footline}{} 
\begin{frame}
\logo{
\vspace{2 mm}
\includegraphics[height=1cm,keepaspectratio]{images/ifj.png}~
\includegraphics[height=1cm,keepaspectratio]{images/uzh.jpg}}

  \titlepage
\end{frame}
}

\institute{UZH,IFJ} 


\section[Outline]{}
\begin{frame}
\tableofcontents
\end{frame}

%normal slides
\section{Isolation variables}

\begin{frame}\frametitle{Iso optimisation}
{~}


\only<1>
{	
	Until now every analysis that used track isolation parameter used the ones develeloped and optimised for $B_s \to \mu \mu$.
	This is based on an abstract definitions of isolating and non-isolating tracks:
	\begin{itemize}
	\item Non-isolating track to a given track($\mu$ from $B_s \to \mu \mu$ for example) will be a track that has the same primary mother as muon. 
	\item Isolating is the negation of non-isolating. 
\end{itemize}	

	
}
\end{frame}
\begin{frame}\frametitle{Iso optimisation}
\only<1>
{	This definition may lead to false implications 
	  	\begin{itemize}
	  	\item In detector we don't know reconstruct the full event.
	  	\item So we don't have the same information that we have on MC
	  	\item The idea is to train Signal vs Background.
	  	\item Idea developed for $\tau \to 3\mu$
	  	
	 	\end{itemize}	
	  	
}

\end{frame}
\begin{frame}\frametitle{Iso optimisation}
\only<1>
{	
\includegraphics[scale=.4]{images/rejBvsS.png}

}
\end{frame}
\begin{frame}\frametitle{Iso optimisation}

\only<1>
{	
For each event you build instead:
	  	\begin{itemize}
	  	\item Isolation is defined for tracks in the event.
	  	\item You have to move from track bases to even bases.
	  	\item Usually ideas: take mean, min, etc.
	  	\item See which performs better in final MVA
	  	\end{itemize}	
		}
\end{frame}

	
\section{MVA traing}

\subsection{Folding technique}
\begin{frame}\frametitle{Folding data}
{~}



There is one basic truth when it comes to MC:	

\only<2>
{
	\includegraphics[scale=.25]{images/size.png}
}
\only<3>
{
	\includegraphics[scale=.25]{images/size.png}\\
	\begin{Huge}
	How to get more training set?
	\end{Huge}
		
}
\end{frame}

\begin{frame}\frametitle{Folding Data Set, How to}
{~}
\begin{center}
\only<1>
{
\begin{large}
Take your data Set:
\end{large}\\
\includegraphics[scale=.4]{images/data1.png}

}
\only<2>
{
\begin{large}
Reshuffle it
\end{large}\\
\includegraphics[scale=.4]{images/data2.png}

}

\only<3>
{
\begin{large}
Divide it into folds:
\end{large}\\
\includegraphics[scale=.4]{images/data3.png}

}


\only<4>
{
\begin{large}
Train $i^{th}$ fold using $n-1$ folds
\end{large}\\
\includegraphics[scale=.4]{images/data4.png}

}

\only<5>
{
\begin{itemize}
\item Using this simple technique we increase our training sample size :)
\item One can better tune your TMVa.
\item Procedure is bias free.


\end{itemize}
}



\end{center}
\end{frame}
\subsection{Folding results}
\begin{frame}\frametitle{Folding results}
{~}
\begin{itemize}
\item For $\PB \to \PKstar \mu \mu$ we used 10 folds.
\item Train TMVA and MatrixNet.
\item See the gain in the yields.
\end{itemize}


\end{frame}

\begin{frame}\frametitle{Preselection}
{~}
\begin{itemize}
\item Apply the following presection cuts:
\begin{enumerate}
\item PID cuts for $\PK$, $\Ppi$.
\item $\PKstar$ mass cut.
\item $cc$ vetos.
\item Trigger as in 2011
\item Swap:$\Ppi \longleftrightarrow \PK$, $\Ppi \longleftrightarrow \Pmu$, $\PK \longleftrightarrow \Pmu$
\item $\Pphi$ veto
\item $\PBs$ veto.
\item $\Lambda_b$ veto.
\end{enumerate}
\end{itemize}


\end{frame}

\begin{frame}\frametitle{MatrixNet/TMVa training}
{~}
\begin{itemize}
\item Put the standard variables inside classifiers:
\begin{enumerate}
\item Isolations
\item B\_DIRA\_OWNPV
\item P, PT
\item VERTEX\_CHI2
\item LF, LFE, FD
\item PID
\end{enumerate}
\end{itemize}
\end{frame}



\begin{frame}\frametitle{MatrixNet/TMVa ROCs}
{~}
\only<1>
{
\begin{columns}
\column{2.5in}
TMVA\\
\includegraphics[scale=.16]{images/ROC_BDTG.png}
\column{2.5in}
MATRIXNET\\
\includegraphics[scale=.16]{images/MNROC.png}

\end{columns}
}

\only<2>
{
\begin{itemize}
\item All folds have the same ROC curve prediction.
\item Good agreement between the folds.
\end{itemize}
}


\end{frame}




%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}\frametitle{Results}
{~}
\only<1>
{
After optimisation of FOM: $\dfrac{s}{s+b}$
Fit to full $q^2$ range
\begin{columns}
\column{2.5in}
TMVA\\
\includegraphics[scale=.18]{images/BDTG_0_944_0_1_19.png}
\column{2.5in}
MATRIXNET\\
\includegraphics[scale=.18]{images/MN_06_01_19.png}

\end{columns}
}


\only<2>
{
\begin{center}

\begin{tabular}{ |c||c|c||c|c||c|c| }
  \hline
  $q^2$  &\multicolumn{2}{|c|}{Last BDT} &  \multicolumn{2}{|c|}{NEW BDT} & \multicolumn{2}{|c|}{MatrixNet}\\ \hline \hline
 $[GeV^2]$ & Signal & Bck & Signal & Bck & Signal & Bck  \\ \hline
  $0.1,2$ & $407$ & $58$ & $407$ & $27$ & $405$ & $41$ \\ \hline
  $2, 4.3$ & $202$ & $95$ & $232$ & $75$ & $233$ & $66$ \\ \hline 
  $4.3, 8.68$ & $573$ & $170$ & $599$ & $180$ & $644$ & $174$ \\ \hline 
  $10.09, 12.86$ & $508$ & $93$ & $515$ & $109$ & $516$ & $115$ \\ \hline 
  $14.18, 16$ & $310$ & $49$ & $322$ & $48$ & $346$ & $39$ \\ \hline 	
  $16, 19$ & $359$ & $34$ & $374$ & $32$ & $385$ & $34$ \\ \hline 	

\end{tabular}

\end{center}
}


\end{frame}
\section{Conclusions}
\begin{frame}\frametitle{Conclusions}
{~}

\begin{enumerate}
\item New MVAs perform better then the old one.
\item Ready for $2fb^{-1}$ data.
\item Have one more trick we want to try :)
\item Once we freeze 2012 we will do the same to 2011 data.

\end{enumerate}
Questions:
\begin{enumerate}
\item Is FOM $\dfrac{s}{sqrt(s+b)}$ really the right one to use? 
\item Maybe some toy MC studies?
\item Investigate the angle efficiency on MC.

\end{enumerate}


\end{frame}




\end{document}