\documentclass[11 pt,xcolor={dvipsnames,svgnames,x11names,table}]{beamer}

\usepackage[english]{babel}
\usepackage{polski}


\usetheme[
	bullet=circle,		% Other option: square
	bigpagenumber,		% circled page number on lower right
	topline=true,			% colored bar at the top of the frame
	shadow=false,			% Shading for beamer blocks
	watermark=BG_lower,	% png file for the watermark
	]{Flip}

%\logo{\kern+1.em\includegraphics[height=1cm]{SHiP-3_LightCharcoal}}


\usepackage[lf]{berenis}
\usepackage[LY1]{fontenc}
\usepackage[utf8]{inputenc}

\usefonttheme{professionalfonts}
\usepackage[no-math]{fontspec}
\defaultfontfeatures{Mapping=tex-text}	% This seems to be important for mapping glyphs properly

\setmainfont{Gillius ADF}			% Beamer ignores "main font" in favor of sans font
\setsansfont{Gillius ADF}			% This is the font that beamer will use by default
% \setmainfont{Gill Sans Light}		% Prettier, but harder to read

\setbeamerfont{title}{family=\fontspec{Gillius ADF}}

\input t1augie.fd

%\newcommand{\handwriting}{\fontspec{augie}} % From Emerald City, free font
%\newcommand{\handwriting}{\usefont{T1}{fau}{m}{n}} % From Emerald City, free font
% \newcommand{\handwriting}{}	% If you prefer no special handwriting font or don't have augie

%% Gill Sans doesn't look very nice when boldfaced
%% This is a hack to use Helvetica instead
%% Usage: \textbf{\forbold some stuff}
%\newcommand{\forbold}{\fontspec{Arial}}

\usepackage{graphicx}
\usepackage[export]{adjustbox}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{colortbl}
\usepackage{mathrsfs} 			% For Weinberg-esque letters
\usepackage{cancel}				% For "SUSY-breaking" symbol
\usepackage{slashed}            % for slashed characters in math mode
\usepackage{bbm}                % for \mathbbm{1} (unit matrix)
\usepackage{amsthm}				% For theorem environment
\usepackage{multirow}			% For multi row cells in table
\usepackage{arydshln} 			% For dashed lines in arrays and tables
\usepackage{siunitx}
\usepackage{xhfill}
\usepackage{grffile}
\usepackage{textpos}
\usepackage{subfigure}
\usepackage{tikz}

%\usepackage{hepparticles}
\usepackage[italic]{hepparticles}

\usepackage{hepnicenames}

% Drawing a line
\tikzstyle{lw} = [line width=20pt]
\newcommand{\topline}{%
  \tikz[remember picture,overlay] {%
    \draw[crimsonred] ([yshift=-23.5pt]current page.north west)
             -- ([yshift=-23.5pt,xshift=\paperwidth]current page.north west);}}



% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
\usepackage{tikzfeynman}		% For Feynman diagrams
\usetikzlibrary{arrows,shapes}
\usetikzlibrary{trees}
\usetikzlibrary{matrix,arrows} 				% For commutative diagram
% http://www.felixl.de/commu.pdf
\usetikzlibrary{positioning}				% For "above of=" commands
\usetikzlibrary{calc,through}				% For coordinates
\usetikzlibrary{decorations.pathreplacing}  % For curly braces
% http://www.math.ucla.edu/~getreuer/tikz.html
\usepackage{pgffor}							% For repeating patterns

\usetikzlibrary{decorations.pathmorphing}	% For Feynman Diagrams
\usetikzlibrary{decorations.markings}
\tikzset{
	% >=stealth', %%  Uncomment for more conventional arrows
	vector/.style={decorate, decoration={snake}, draw},
	provector/.style={decorate, decoration={snake,amplitude=2.5pt}, draw},
	antivector/.style={decorate, decoration={snake,amplitude=-2.5pt}, draw},
	fermion/.style={draw=gray, postaction={decorate},
		decoration={markings,mark=at position .55 with {\arrow[draw=gray]{>}}}},
	fermionbar/.style={draw=gray, postaction={decorate},
		decoration={markings,mark=at position .55 with {\arrow[draw=gray]{<}}}},
	fermionnoarrow/.style={draw=gray},
	gluon/.style={decorate, draw=black,
		decoration={coil,amplitude=4pt, segment length=5pt}},
	scalar/.style={dashed,draw=black, postaction={decorate},
		decoration={markings,mark=at position .55 with {\arrow[draw=black]{>}}}},
	scalarbar/.style={dashed,draw=black, postaction={decorate},
		decoration={markings,mark=at position .55 with {\arrow[draw=black]{<}}}},
	scalarnoarrow/.style={dashed,draw=black},
	electron/.style={draw=black, postaction={decorate},
		decoration={markings,mark=at position .55 with {\arrow[draw=black]{>}}}},
	bigvector/.style={decorate, decoration={snake,amplitude=4pt}, draw},
}

% TIKZ - for block diagrams,
% from http://www.texample.net/tikz/examples/control-system-principles/
% \usetikzlibrary{shapes,arrows}
\tikzstyle{block} = [draw, rectangle,
minimum height=3em, minimum width=6em]




\usetikzlibrary{backgrounds}
\usetikzlibrary{mindmap,trees}	% For mind map
\newcommand{\degree}{\ensuremath{^\circ}}
\newcommand{\E}{\mathrm{E}}
\newcommand{\TeV}{\mathrm{TeV}}
\newcommand{\Var}{\mathrm{Var}}
\newcommand{\Cov}{\mathrm{Cov}}
\newcommand\Ts{\rule{0pt}{2.6ex}}       % Top strut
\newcommand\Bs{\rule[-1.2ex]{0pt}{0pt}} % Bottom strut

\graphicspath{{images/}}	% Put all images in this directory. Avoids clutter.

% SOME COMMANDS THAT I FIND HANDY
% \renewcommand{\tilde}{\widetilde} % dinky tildes look silly, dosn't work with fontspec
\newcommand{\comment}[1]{\textcolor{comment}{\footnotesize{#1}\normalsize}} % comment mil	
\newcommand{\Comment}[1]{\textcolor{Comment}{\footnotesize{#1}\normalsize}} % comment bold
\newcommand{\COMMENT}[1]{\textcolor{COMMENT}{\footnotesize{#1}\normalsize}} % comment crazy bold
\newcommand{\Alert}[1]{\textcolor{Alert}{#1}} % louder alert
\newcommand{\ALERT}[1]{\textcolor{ALERT}{#1}} % loudest alert
%% "\alert" is already a beamer pre-defined
\newcommand*{\Scale}[2][4]{\scalebox{#1}{$#2$}}%

\def\Put(#1,#2)#3{\leavevmode\makebox(0,0){\put(#1,#2){#3}}}

\usepackage{gmp}
\usepackage[final]{feynmp-auto}

\usepackage[backend=bibtex,style=numeric-comp,firstinits=true]{biblatex}
\bibliography{bib}
\setbeamertemplate{bibliography item}[text]

\makeatletter\let\frametextheight\beamer@frametextheight\makeatother

% suppress frame numbering for backup slides
% you always need the appendix for this!
\newcommand{\backupbegin}{
	\newcounter{framenumberappendix}
	\setcounter{framenumberappendix}{\value{framenumber}}
}
\newcommand{\backupend}{
	\addtocounter{framenumberappendix}{-\value{framenumber}}
	\addtocounter{framenumber}{\value{framenumberappendix}}
}


\definecolor{links}{HTML}{2A1B81}
%\hypersetup{colorlinks,linkcolor=,urlcolor=links}

% For shapo's formulas:
\def\lsi{\raise0.3ex\hbox{$<$\kern-0.75em\raise-1.1ex\hbox{$\sim$}}}
\def\gsi{\raise0.3ex\hbox{$>$\kern-0.75em\raise-1.1ex\hbox{$\sim$}}}
\newcommand{\lsim}{\mathop{\lsi}}
\newcommand{\gsim}{\mathop{\gsi}}
\newcommand{\wt}{\widetilde}
%\newcommand{\ol}{\overline}
\newcommand{\Tr}{\rm{Tr}}
\newcommand{\tr}{\rm{tr}}
\newcommand{\eqn}[1]{&\hspace{-0.7em}#1\hspace{-0.7em}&}
\newcommand{\vev}[1]{\rm{$\langle #1 \rangle$}}
\newcommand{\abs}[1]{\rm{$\left| #1 \right|$}}
\newcommand{\eV}{\rm{eV}}
\newcommand{\keV}{\rm{keV}}
\newcommand{\GeV}{\rm{GeV}}
\newcommand{\im}{\rm{Im}}
\newcommand{\disp}{\displaystyle}
\def\be{\begin{equation}}
\def\ee{\end{equation}}
\def\ba{\begin{eqnarray}}
\def\ea{\end{eqnarray}}
\def\d{\partial}
\def\l{\left(}
\def\r{\right)}
\def\la{\langle}
\def\ra{\rangle}
\def\e{{\rm e}}
\def\Br{{\rm Br}}
\def\fixme{FIXME}



\def\ARROW{{\color{JungleGreen}{$\Rrightarrow$}}\xspace}
\def\ARROWR{{\color{WildStrawberry}{$\Rrightarrow$}}\xspace}

\author{Jihyun Bhom (IFJ PAN), Marcin Chrzaszcz (CERN)}
\institute{UZH}
\title[HEPLike]{HEPLike}


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

{
\setbeamertemplate{sidebar right}{\llap{\includegraphics[width=\paperwidth,height=\paperheight]{bubble2}}}
\begin{frame}[c]%{\phantom{title page}}
\begin{center}
\begin{center}
	\begin{columns}
		\begin{column}{0.15\textwidth}
{~}
		\end{column}
		\begin{column}{0.02\textwidth}
                  {~}
                  \end{column}
		\begin{column}{0.73\textwidth}
			\flushright \bfseries \Large {HEPLike - tool for experimental likelihood evaluation}
		\end{column}
                \begin{column}{0.02\textwidth}
                  {~}
                  \end{column}

	\end{columns}
\end{center}
	\quad
	\vspace{3em}
\begin{columns}
\begin{column}{0.44\textwidth}
\flushright \vspace{-2.8em} {Jihyun Bhom\\ \small \href{mailto:jihyun.bohm@cern.ch}{jihyun.bohm@cern.ch} \vspace{-0.1em}\small \href{mailto:mchrzasz@cern.ch}\\   Marcin Chrzaszcz\\\vspace{-0.1em}\small \href{mailto:mchrzasz@cern.ch}{mchrzasz@cern.ch}}

%\flushright \vspace{-2.8em} {  Marcin Chrzaszcz\\\vspace{-0.1em}\small \href{mailto:mchrzasz@cern.ch}{mchrzasz@cern.ch}}


\end{column}
\begin{column}{0.53\textwidth}
\hspace{2.0cm}
\includegraphics[height=1.6cm]{cern}{~}
\includegraphics[height=1.6cm]{ifj.png}                                                                                                                        
\end{column}
\end{columns}

\vspace{1em}
	\vspace{1.4cm}

	
	\textcolor{normal text.fg!50!Comment}{(Re)interpreting the results of new physics searches at the LHC, London, April 2-4, 2019}
\end{center}
\end{frame}
}


\begin{frame}\frametitle{HEP results}
\ARROW How do we publish results?
\begin{columns}
\column{0.35\textwidth}
\includegraphics[width=0.95\textwidth]{images/arxiv.png}\\
\pause
\begin{align*}
R_K=0.846^{+0.060 +0.016}_{-0.054 - 0.014}
\end{align*}

\pause
\column{0.65\textwidth}
\begin{center}
\includegraphics[angle=-90,width=0.5\textwidth]{images/FigS8.pdf}\\
\pause
\includegraphics[width=0.75\textwidth]{images/hepdata.png}
\end{center}


\end{columns}


\end{frame}





\begin{frame}\frametitle{HEP results}
\ARROW How are the results used?
\begin{columns}
\column{0.5\textwidth}

\ARROWR Correlations are neglected
\includegraphics[width=0.75\textwidth]{{images/Table_12}.pdf}


\ARROWR Non Linear effects are forgotten
\includegraphics[angle=-90,width=0.75\textwidth]{{images/example}.pdf}



\column{0.5\textwidth}

\ARROWR Errors are being symmetrized
\includegraphics[angle=-90,width=0.75\textwidth]{{images/Fig62aS}.pdf}

{~}\\{~}\\
\end{columns}


\end{frame}


\begin{frame}\frametitle{HEP results}
\ARROW How are the results used?\\{~}\\

\ARROWR Interpreting Upper limits [HLFAV, 90\% UL]:
\begin{align*}
\mathcal{B} (\tau \to \mu \mu e) < 9.9 \times 10^{-9}
\end{align*}
\ARROW People interpret this assuming it's a gaussian centered around $0$ and width $\frac{9.9\times 10^{-9}}{1.64} $.\\
\ARROW Usually a full p-value scan is published: 
\begin{columns}
\column{0.5\textwidth}
\includegraphics[width=0.75\textwidth]{{images/180}.png}

\column{0.5\textwidth}
\includegraphics[width=0.75\textwidth]{{images/dupa}.png}


\end{columns}
\ARROW The examples go on and on...


\end{frame}





\begin{frame}\frametitle{The idea}
\ARROW The theory and experimental community need to work together about proper interpretation.
\pause
\begin{center}
\includegraphics[width=0.95\textwidth]{{images/kim}.jpg}
\end{center}





\end{frame}



\begin{frame}\frametitle{HEPLike}

\ARROW High Energy Physics Likelihood (HEPLike).
\begin{itemize}
\item Open source software.
\item With separate database of measurements.
\item Statistics library.
\item Can be interfaced with existing codes.
\end{itemize}
\ARROW It constructs the experimental likelihoods for you!\\
\ARROW Does work with both the $\chi^2$ and (log-)likelihood fits.\\
\ARROW Useful utilities for creating citations and database search.
\end{frame}


\begin{frame}\frametitle{HEPLike}

\ARROW The are couple of measurement types:
\begin{itemize}                                                                                                                                                                                                                                                                                                                
\item Upper limits,                                                                                                                                                                                                                                                                                                            
\item Single measurement with symmetric uncertainty,                                                                                                                                                                                                                                                                           
\item Single measurement with asymmetric uncertainty,                                                                                                                                                                                                                                                                          
\item Multiple measurements with symmetric uncertainty,                                                                                                                                                                                                                                                                        
\item Multiple measurements with asymmetric uncertainty,                                                                                                                                                                                                                                                                       
\item One dimensional likelihood function,                                                                                                                                                                                                                                                                                     
\item n-dimensional likelihood function.                                                                                                                                                                                                                                                                                       
\end{itemize}                                                                                                                                                                                                                                                                                                                  
                                                                     

\begin{alertblock}{Bonus}
In addition we provide a way for the future that the experiments can publish the dataset.
\end{alertblock}

\end{frame}


\begin{frame}\frametitle{HEPLike - code structure}

\begin{center}
\includegraphics[width=0.99\textwidth]{images/diagram.png}                                                                                                                                                                                                                                                                       

\end{center}



\end{frame}






\begin{frame}\frametitle{Measurement encoding, \texttt{Hl\_Data}}

\ARROW Measurements are stored in \texttt{YAML} file:
\includegraphics[width=0.9\textwidth]{images/yaml.png}    \\                                                   
\includegraphics[width=0.9\textwidth]{images/yaml2.png}                                                       


\end{frame}




\begin{frame}\frametitle{Upper limits, \texttt{HL\_Limit}}

\ARROW Example of published p-value scans:\\
\begin{columns}

\column{0.4\textwidth}

\includegraphics[angle=-90,width=0.95\textwidth]{images/Bs2tautau.pdf}                                                                                                                                                                                                                                                                    

\column{0.6\textwidth}
\ARROW Information coded as:
\includegraphics[width=0.95\textwidth]{images/yaml3.png}

\end{columns}



\end{frame}



\begin{frame}\frametitle{Upper limits, \texttt{HL\_Limit}}

\begin{equation}                                                                                                                                                                                                                                                                                                               
pdf(x) = \frac{1}{2^{1/2} \Gamma(1/2)} x^{1/2 -1} e ^{-x/2},                                                                                                                                                                                                                                                                   
\end{equation}                                                                                                                                                                                                                                                                                                                 
which had the cumulative distribution function defined as:                                                                                                                                                                                                                                                                     
\begin{equation}                                                                                                                                                                                                                                                                                                               
cdf(x)=\frac{1}{\Gamma(1/2) } \gamma(1/2,x/2).                                                                                                                                                                                                                                                                                 
\end{equation}                                           
In the above equations the $\Gamma(x)$ and $\gamma(k,x)$ correspond to Gamma and incomplete gamma functions.                                                                                                                                                                                                                   
By revering the $cdf(x)$ one can obtain the $\chi^2$ value:                                                                                                                                                                                                                                                                      
\begin{equation}                                                                                                                                                                                                                                                                                                               
\chi^2=cdf^{-1}(1-p),                                                                                                                                                                                                                                                                                                          
\end{equation}                                                                          
and if needed the log-likelihood:
\begin{equation}                                                                                                                                                                                                                                                                                                               
-\log(\mathcal{L})= \frac{1}{2}\chi^2, \label{eq:wilks}                                                                                                                                                                                                                                                                        
\end{equation}     
\end{frame}




\begin{frame}\frametitle{Single measurement, symmetric error, \texttt{HL\_Gaussian}}

\ARROW Well this is as simple as:
\begin{center}
\includegraphics[width=0.6\textwidth]{images/yaml4.png}
\end{center}
\ARROW The $\chi^2$ is simple:
\begin{equation}                                                                                                                                                                                                                               
\chi^2 = \frac{(x_{obs}-x)^{2}}{  \sigma_{stat}^{2}+ \sigma_{syst}^{2} },                                                                                                                                                                      
\end{equation}                                                               

\ARROW Wilks theorem can be used to translate to (log-)likelihood.

   
\end{frame}



\begin{frame}\frametitle{Single measurement, symmetric error, \texttt{HL\_Gaussian}}

\ARROW Well this is as simple as:
\begin{center}
\includegraphics[width=0.6\textwidth]{images/yaml4.png}
\end{center}
\ARROW The $\chi^2$ is simple:
\begin{equation}                                                                                                                                                                                                                               
\chi^2 = \frac{(x_{obs}-x)^{2}}{  \sigma_{stat}^{2}+ \sigma_{syst}^{2} },                                                                                                                                                                      
\end{equation}                                                               

\ARROW Wilks theorem can be used to translate to (log-)likelihood.

   
\end{frame}




\begin{frame}\frametitle{Multiple measurement, symmetric error, \texttt{HL\_nDimGaussian}}

\ARROW You need to pass two arguments:
\begin{center}
\includegraphics[width=0.6\textwidth]{images/yaml5.png}
\end{center}
\ARROW From this one constructs the covariance matrix, and evaluates the $\chi^2$:                                                        
\begin{align}                                                                                                                                                                                                                                  
\chi^2 =  V^{T} {\rm Cov}^{-1} V,\label{eq:chi2ndim}                                                                                                                                                                                           
\end{align}                                            

   
\end{frame}


\begin{frame}\frametitle{Measurement, asymmetric error, \texttt{HL\_BifurGaussian}, \texttt{HL\_ndimBifurGaussian}}

\ARROW You need to pass two arguments:
\begin{center}
\includegraphics[width=0.6\textwidth]{images/yaml6.png}
\end{center}   

\ARROW We choose to interpret this as Bifurcated Gaussian:

   \begin{align}                                                                                                        
{\rm Cov}_{i,j}=                                                                                                     
\begin{cases}                                                                                                        
{\rm Corr}_{i,j}~\sigma^{i}_+ \sigma^{j}_+, & \text{if } x^i \geq x^i_{obs} \text{ and }  x^j \geq x^j_{obs} \\      
{\rm Corr}_{i,j}~\sigma^{i}_+ \sigma^{j}_-, & \text{if } x^i \geq x^i_{obs} \text{ and }  x^j < x^j_{obs} \\         
{\rm Corr}_{i,j}~\sigma^{i}_- \sigma^{j}_+, & \text{if } x^i < x^i_{obs} \text{ and }  x^j \geq x^j_{obs} \\         
{\rm Corr}_{i,j}~\sigma^{i}_- \sigma^{j}_-, & \text{if } x^i < x^i_{obs} \text{ and }  x^j < x^j_{obs} \\            
\end{cases}                                                                                                          
\end{align}                                                                                                          

   
\end{frame}




\begin{frame}\frametitle{Likelihoods, \texttt{HL\_ProfLikelihood}, \texttt{HL\_nDimLikelihood}}
   
\ARROW Here we add just the location of \texttt{ROOT} object.\\
\begin{columns}
\column{0.7\textwidth}
  \begin{center}
\includegraphics[width=0.9\textwidth]{images/yaml7.png}\\
\includegraphics[width=0.9\textwidth]{images/yaml8.png}
\end{center}  

\ARROW This is the best way to publish results!!!\\
\ARROW The problem is in what way one should publish the higher dim likelihoods?

   
\column{0.3\textwidth}
\includegraphics[angle=-90,width=0.95\textwidth]{images/Fig2-S.pdf}\\
\includegraphics[angle=-90,width=0.95\textwidth]{images/Fig21.pdf}
\end{columns}   
   
   
   
   
   
\end{frame}



\begin{frame}\frametitle{Publishing data}
   
  \includegraphics[width=0.95\textwidth]{images/patrick.png} 
   

   
   Stolen from P. Owen
\end{frame}



\begin{frame}\frametitle{Publishing data \texttt{HL\_ExpData}}
   
\ARROW The \texttt{YAML} entry:

  \includegraphics[width=0.5\textwidth]{images/yaml9.png}\\
   \ARROW Set the PDF you want to fit:\\ \texttt{double (*fun)(vector<double> par , vector<double> point)}\\
   \ARROW The program will evaluate the (log-)likelihood on the whole dataset for given parameters.\\
   \ARROW You only need a scanning tools and you are done.
   
   
\end{frame}


\begin{frame}\frametitle{Useful functions}


   
\ARROW Search for measurement you need:
\begin{center}
\includegraphics[width=0.9\textwidth]{images/example.png}
\end{center}


   
\ARROW Create citation file:
\begin{center}
\includegraphics[width=0.9\textwidth]{images/example2.png}
\end{center}

   
\end{frame}








\begin{frame}\frametitle{Check it out}

\ARROW The HEPLike code:\\
\url{https://github.com/mchrzasz/HEPLike}
  
\ARROW The HEPLike database:\\
\url{https://github.com/mchrzasz/HEPLikeData}
  
\begin{alertblock}{}
Don't be shy! Give it a spin. Feedback is welcomed.
\end{alertblock}
  
  
   
\end{frame}


\backupbegin

\begin{frame}\frametitle{Backup}
\topline

\end{frame}

\backupend

\end{document}
