% This program can be redistributed and/or modified under the terms
% of the GNU Public License, version 3.
%
% Seth Brown, Ph.D.
% sethbrown@drbunsen.org
%
% Compiled with XeLaTeX
% Dependencies:
%   Fontin Sans font (http://www.exljbris.com/fontinsans.fsrtml)
%
\documentclass{beamer}
\usepackage{pgf}
\usepackage{tikz}
\usepackage{times}
\usepackage[T1]{fontenc}
%\usepackage[mathscr]{eucal}
%\usepackage{mathptmx}
%\usepackage{mathrsfs}
\usepackage{hyperref}
\usepackage{color}
\usepackage{graphicx}
\usepackage{wasysym}
% \usepackage{pgfpagfes}
% \setbeameroption{show notes on second screen}
%\pgfpagesuselayout{4 on 1}[a4paper,border shrink=5mm,landscape]
\usepackage{xcolor}
\usepackage{xcolor,multirow}
%\usepackage[table]{xcolor}
%\usepackage[dvipsnames]{xcolor}
%\usepackage{amsfonts}
%\usepackage{amsmath}
% \usepackage[amssymb]{SIunits}
%\usepackage{natbib}
%\usepackage{amssymb}
\usepackage{hepparticles}
\usepackage{hepnicenames}
\usepackage{hepunits}
\usepackage{tikz}
\usepackage[english]{babel}
%%\usepackage{lmodern}
%\usepackage{feynmp}
% suppress navigation bar
\beamertemplatenavigationsymbolsempty
\usepackage[mathscr]{eucal}
\usepackage{mathrsfs}
\mode<presentation>
{
  \usetheme{bunsen}
  \setbeamercovered{transparent}
  \setbeamertemplate{items}[circle]
}
\newcommand{\Simley}[1]{%
\begin{tikzpicture}[scale=0.15]
    \newcommand*{\SmileyRadius}{1.0}%
    \draw [fill=brown!10] (0,0) circle (\SmileyRadius)% outside circle
        %node [yshift=-0.22*\SmileyRadius cm] {\tiny #1}% uncomment this to see the smile factor
        ;  

    \pgfmathsetmacro{\eyeX}{0.5*\SmileyRadius*cos(30)}
    \pgfmathsetmacro{\eyeY}{0.5*\SmileyRadius*sin(30)}
    \draw [fill=cyan,draw=none] (\eyeX,\eyeY) circle (0.15cm);
    \draw [fill=cyan,draw=none] (-\eyeX,\eyeY) circle (0.15cm);

    \pgfmathsetmacro{\xScale}{2*\eyeX/180}
    \pgfmathsetmacro{\yScale}{1.0*\eyeY}
    \draw[color=red, domain=-\eyeX:\eyeX]   
        plot ({\x},{
            -0.1+#1*0.15 % shift the smiley as smile decreases
            -#1*1.75*\yScale*(sin((\x+\eyeX)/\xScale))-\eyeY});
\end{tikzpicture}%
}%
% set fonts
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{verbatim}

\usepackage{fancyvrb}
\DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small}
\DefineVerbatimEnvironment{example}{Verbatim}{fontsize=\small}
\usepackage{listings}
  \usepackage{courier}
 \lstset{
         basicstyle=\footnotesize\ttfamily, % Standardschrift
         %numbers=left,               % Ort der Zeilennummern
         numberstyle=\tiny,          % Stil der Zeilennummern
         %stepnumber=2,               % Abstand zwischen den Zeilennummern
         numbersep=5pt,              % Abstand der Nummern zum Text
         tabsize=2,                  % Groesse von Tabs
         extendedchars=true,         %
         breaklines=true,            % Zeilen werden Umgebrochen
         keywordstyle=\color{red},
    		frame=b,         
 %        keywordstyle=[1]\textbf,    % Stil der Keywords
 %        keywordstyle=[2]\textbf,    %
 %        keywordstyle=[3]\textbf,    %
 %        keywordstyle=[4]\textbf,   \sqrt{\sqrt{}} %
         stringstyle=\color{white}\ttfamily, % Farbe der String
         showspaces=false,           % Leerzeichen anzeigen ?
         showtabs=false,             % Tabs anzeigen ?
         xleftmargin=17pt,
         framexleftmargin=17pt,
         framexrightmargin=5pt,
         framexbottommargin=4pt,
         %backgroundcolor=\color{lightgray},
         showstringspaces=false      % Leerzeichen in Strings anzeigen ?        
 }

    %\DeclareCaptionFont{blue}{\color{blue}} 

  %\captionsetup[lstlisting]{singlelinecheck=false, labelfont={blue}, textfont={blue}}
  \usepackage{caption}
\DeclareCaptionFont{white}{\color{white}}
\DeclareCaptionFormat{listing}{\colorbox[cmyk]{0.43, 0.35, 0.35,0.01}{\parbox{\textwidth}{\hspace{15pt}#1#2#3}}}
\captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white, singlelinecheck=false, margin=0pt, font={bf,footnotesize}}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes}

%\usepackage{gfsartemisia-euler}
%\usepackage[T1]{fontenc}
\setbeamerfont{frametitle}{size=\LARGE,series=\bfseries}
\tikzstyle{decision} = [diamond, draw, fill=gray!20, 
    text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]
\tikzstyle{block} = [rectangle, draw, fill=blue!10, 
    text width=5em, text centered, rounded corners, minimum height=2em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{cloud} = [draw, ellipse,fill=red!10, node distance=3cm,
    minimum height=2em]

\tikzstyle{every picture}+=[remember picture]


\renewcommand{\PKs}{{\HepParticle{K}{S}{}\xspace}}
% color definitions
\usepackage{color}
\definecolor{uipoppy}{RGB}{225, 64, 5}
\definecolor{uipaleblue}{RGB}{96,123,139}
\definecolor{uiblack}{RGB}{0, 0, 0}

% caption styling
%\DeclareCaptionFont{uiblack}{\color{uiblack}}
%\DeclareCaptionFont{uipoppy}{\color{uipoppy}}
%\captionsetup{labelfont={uipoppy},textfont=uiblack}

% see the macros.tex file for definitions
\include{macros }

% title slide definition
\title{Updates on activities.}
%\subtitle{a bias report}
\author{ Marcin Chrz\k{a}szcz$^{1,2}$ ,  Nicola Serra$^{1}$ }
\institute[UTH, IFJ]
{
 %\begin{tiny}
$ ^1$ University of Zurich , $ ^2$ Institute of Nuclear Physics, Krakow,  
 %\end{tiny}smallsmall
}
  

\date{ \begin{small} $13^{th}$ August 2013 \end{small}}

%--------------------------------------------------------------------
%                           Introduction
%--------------------------------------------------------------------

\begin{document}




\setbeamertemplate{background}
{\includegraphics[width=\paperwidth,height=\paperheight]{frontpage_bg_mine}}
\setbeamertemplate{footline}[default]

\begin{frame}
\vspace{1.1cm}
\begin{columns}
\column{2.75in}
  \titlepage

  \begin{center}
  \includegraphics[height=1.0cm ]{pic/uzh.jpg}
  % \hspace{0.5cm}
  % \includegraphics[height=1.5cm]{pic/babar.jpg}
   \hspace{1cm}
   \includegraphics[height=1.0cm]{pic/ifj.png}
   \hspace{1cm}
   %\includegraphics[height=1.0cm]{pic/SNS.jpg}
   \end{center}      
  \vspace{10cm}
\column{2.0in}
\end{columns}
\end{frame}

%--------------------------------------------------------------------
%                          OUTLINE
%--------------------------------------------------------------------




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




%-------------------------------------------------------------------
%                          Introduction
%-------------------------------------------------------------------
%
% Set the background for the rest of the slides.
% Insert infoline
\setbeamertemplate{background}
 {\includegraphics[width=\paperwidth,height=\paperheight]{slide_bg}}
\setbeamertemplate{footline}[bunsentheme]

\title{Update on analysis}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\setbeamertemplate{background}
 {\includegraphics[width=\paperwidth,height=\paperheight]{slide_bg}}
\setbeamertemplate{footline}[bunsentheme]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Inflatlon}
\subsection{Inflaton}
\begin{frame}\frametitle{Reminder}
\only<1>
{
\begin{enumerate}

\item We wanted to use $B^0 \to J\psi K_s$ as a normalization channel to $B^0 \to K^* X$.

\item We saw some discrepancy between MC of the two channel. 
\item suspicion was it's becouse of mass and lifetime.
\item Idea, compare MC giving the inflaton attributes of $K_s$.

\end{enumerate}
}
\only<2>
{	
	\begin{columns}
\column{2.5in}
 IP\\
  \includegraphics[scale=0.23]{inflaton/KS_IP.png}


\column{2.5in}
IPCHI2	\\
 \includegraphics[scale=0.23]{inflaton/KS_IPCHi2.png}
\end{columns}
	
}

\only<3>
{	
	\begin{columns}
\column{2.5in}
 PT\\
  \includegraphics[scale=0.23]{inflaton/KS_PT.png}


\column{2.5in}
VRTCHI2	\\
 \includegraphics[scale=0.23]{inflaton/KS_VRTCHI2.png}
\end{columns}
	
}

\only<4>
{	
\begin{enumerate}

\item I am starting to sleep better at night :)

\item Need to check the downstream....
\end{enumerate}
}




	\textref {M.Chrz\k{a}szcz, N.Serra 2013}
\end{frame}

%\section{Work done so far}
\section{$K^* \mu \mu$}
\subsection{Isolation optimisation}

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


\only<1>
{	
	Till 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 definitons 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 atrack that has the same primary mother as muon. 
	\item Isolating is the negation of non-isolating. 
\end{itemize}	 
	
	
}

\only<2>
{	
	This definition has potentially dangerous implications.
	  	\begin{itemize}
	  	\item Why very long living particles ($\Lambda$, $K_s$) have to be considered non-isolating?
	  	\item Imagine a long chain of decays. Every of this decay is non-isolating.
	  	\item When we do our analysis we are operating on basis of signal and bck hypothesis.
	  	\item There isnt a 1:1 correspondence between isolating and bck etc.
	  	\end{itemize}	
	  	


}

	\textref {M.Chrz\k{a}szcz, N.Serra 2013}

\end{frame}



\begin{frame}\frametitle{How to train?}
{~}


\only<1>
{	
	Let's go back to the origin. We have our MC sample for signal and bck.\\
	
	\begin{columns}
\column{2.5in}
Background sample\\
  \includegraphics[scale=0.112]{kstmumu/bck.png}


\column{2.5in}
Signal sample	\\
 \includegraphics[scale=0.28]{kstmumu/sig.png}
\end{columns}
	VERY BIG BCK MC!
}

\only<2>
{	
	\begin{enumerate}
	
	
	\item The main point of isolation variable is to fight again combinatorial bck.(example two decays trees are close and one picks something from the other).
	\item We build our bck sample taking from MC truth the candidates that are combinatorial bck. 
		
	\end{enumerate}
		
}
\only<3>
{	
	
	Now I will loose you all :P
	\begin{enumerate}
	
	
	\item We need to swap our signal and bck sample.
	\item Why? Our signal sample contains: signal candidate(4 tracks)+ tracks surrounding this candidate. Our selection should be optimised in a way that we should end up with our single signal candidate without any tracks nearby.
	\item Thats why our signal sample is our background sample.
				
		
	\end{enumerate}
		
}
\only<4>
{	
	\begin{enumerate}

	\item Special module for TupleMaker was written.(need a psichiatras after this)
	\item We define the training variables as Giampi did:+tckchi2+IP.
	\item We put everything inside tmva.
	\item The output of the tmva is then put again in new module of TupleMaker(at this point no psichiatras will be able to help... ).
	\item Then we scan the BDT response space and write how many tracks survive the cut.
	
	
		
	\end{enumerate}
		
}
\only<5>
{	
	\begin{enumerate}

	\item In practice what we do is to scan BDT form 0. to 0.5 and count the tracks for each of the BDT value.
	\item Then our new ntuple will have like 100 isolation parameters.
	\item How to choose the best one?
	\item Well isolation parameter on its own is usless. It has to be combined with other variables in TMVA. Than you can choose the best cut on the BDT.
	
	
		
	\end{enumerate}
		
}

\only<6>
{	
Let's try judge from ROC curve:

 \includegraphics[scale=0.28]{kstmumu/example.png}
		
		
		this is not definitive! But looks promising.\\
		Funny situation. My 20M bck events takes 4 hours to reproduce, but 1M on is stuck on grid on GRID for 12 hours?!?! 
		
}


	\textref {M.Chrz\k{a}szcz, N.Serra 2013}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5555
\begin{frame}\frametitle{$\tau \to 3 \mu$}
{~}


\only<1>
{	
	$\tau \to 3 \mu$ is doing a new approach of isolation paramentr that is the same as giampi did but instead of cuts they use BDT. \\
	With Nico we have a strong opinion it's not the best way to do it. That why I did similar studie for tau23mu as for $K^{*} \mu \mu$. In this case we are going one step further. I am training 5 different isolation parameters for 5 different $\tau$ sources:
	\begin{itemize}
	\item $D \to \tau$
	\item $Ds \to \tau$		
	\item $B \to D \to \tau$
	\item $B \to Ds \to \tau$			
	\item $B \to \tau$	
	\end{itemize}
	
	
}
\only<2>
{	
\begin{enumerate}

\item Does it make any sense to make my life so complicated?
\item YES! 
\item Example: $B \to \tau$ is in $99 \%$ $B \to D \tau X$.
\item This means we if you have D and tau close to each other track from D can go to $\tau$ etc. 
\item In their aproch this truck would be considered non-isolating which is nonsense because it forms a bck candidate!


\end{enumerate}
	
	
}



\only<3>
{	

\begin{enumerate}
\item Again I did all the studies. and i am stuck with ganga to have final ntuples...
\item A bulet proof example that the signal on which you train matters:
\end{enumerate}

	\begin{columns}
\column{2.5in}

  \includegraphics[scale=0.28]{kstmumu/official}


\column{2.5in}

 \includegraphics[scale=0.28]{kstmumu/rejBvsS.png}
\end{columns}






	
}







\end{frame}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%55





\end{document}
