\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}

\usepackage{emerald}
\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{\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 mild
\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}}

\newcommand{\vect}[1]{\boldsymbol{#1}}
\newcommand{\params}{\Xi}
\newcommand{\Eobsi}{E'_i}
\newcommand{\phiobsi}{\phi'_i}
\newcommand{\Etruei}{E_i}
\newcommand{\phitruei}{\phi_{i}}
\newcommand{\Eobsij}{E'_{ij}}
\newcommand{\phiobsij}{\phi'_{ij}}
\newcommand{\Etrueij}{E_{ij}}
\newcommand{\phitrueij}{\phi_{ij}}
\newcommand{\obs}{\mathrm{obs}}
\newcommand{\true}{\mathrm{true}}
\newcommand{\Like}{\mathcal{L}}
\newcommand{\ntot}{{n_\mathrm{tot}}}
\newcommand{\ntotj}{{n_{\mathrm{tot},j}}}
\newcommand{\diff}{\mathrm{d}}
\newcommand{\cblue}[1]{{\color[rgb]{0.1, 0.0, 0.6} #1}}
\newcommand{\cgreen}[1]{{\color[rgb]{0.0, 0.6, 0.1} #1}}
\newcommand{\corange}[1]{{\color[rgb]{0.9, 0.5, 0.0} #1}}
\newcommand{\cbluewhen}[2]{{\color#2[rgb]{0.1, 0.0, 0.6} #1}}
\newcommand{\cgreenwhen}[2]{{\color#2[rgb]{0.0, 0.6, 0.1} #1}}
\newcommand{\corangewhen}[2]{\vspace{-1.4mm}{\color#2[rgb]{0.9, 0.3, 0.0} #1}}
\newcommand{\vrel}{v_{\mathrm{rel}}}
\newcommand{\mn}{m_{\rm nuc}}
\newcommand{\mx}{m_\chi}
\newcommand{\nc}{\newcommand}


\setbeamercolor{section in toc}{fg=darkgray}

\AtBeginSection[]
{
  \begin{frame}<beamer>
    \frametitle{Outline}
  \begin{columns}[t]
	\column{0.8\textwidth}
	\tableofcontents[sections={1},currentsection]
        \vspace{3mm}
	\tableofcontents[sections={2},currentsection]
        \vspace{3mm}
	\tableofcontents[sections={3},currentsection]
  \end{columns}	
  \end{frame}
}

\setbeamertemplate{subsection in head/foot shaded}
{\textcolor{structure!80!black}{\insertsubsectionhead}}
\setbeamertemplate{subsection in head/foot}{\textcolor{black}\insertsubsectionhead}



\author{ {\fontspec{Trebuchet MS}Marcin Chrz\k{a}szcz} (Universit\"{a}t Z\"{u}rich, IFJ PAN)}
\institute{UZH}
\title[Introduction to GAMBIT]{Introduction to GAMBIT}



\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.75\textwidth}
			\flushright\fontspec{Trebuchet MS}\bfseries \Huge {GAMBIT}
		\end{column}
                \begin{column}{0.02\textwidth}
                  {~}
                  \end{column}
                \begin{column}{0.23\textwidth}
                 % \hspace*{-1.cm}
                  \vspace*{-3mm}
                  \includegraphics[width=0.6\textwidth]{lhcb-logo}
                  \end{column}
	        
	\end{columns}
\end{center}
	\quad
	\vspace{3em}
\begin{columns}
\begin{column}{0.44\textwidth}
\flushright \vspace{-1.8em} {\fontspec{Trebuchet MS} \Large Marcin Chrząszcz\\\vspace{-0.1em}\small \href{mailto:mchrzasz@cern.ch}{mchrzasz@cern.ch}}

\end{column}
\begin{column}{0.53\textwidth}
\includegraphics[height=1.3cm]{uzh-transp}{~}{~}
\includegraphics[height=1.1cm]{ifj.png}
\end{column}
\end{columns}

\vspace{1em}
		\footnotesize\textcolor{gray}{Universit\"{a}t Z\"{u}rich, \\ Institute of Nuclear Physics, Polish Academy of Science}\normalsize\\
\vspace{0.5em}

	\textcolor{normal text.fg!50!Comment}{KEK meeting, KEK\\October 29, 2015}
\end{center}
\end{frame}
}




\begin{frame}
\frametitle{The GAMBIT Collaboration}

26 Members, 15 institutions, 9 countries \\
8 Experiments, 4 major theory codes \vspace{2mm}

\scriptsize
\begin{columns}
\column{0.7\textwidth}
\begin{tabular}{l l}
\textbf{Fermi-LAT} &  J.\ Conrad, J.\ Edsj\"o, G.\ Martinez\\
                   & \P.\ Scott\vspace{0.5mm}\\
\textbf{ATLAS} &  A.\ Buckley, P.\ Jackson, C.\ Rogan,\\
               & A.\ Saavedra, M.\ White\vspace{0.5mm}\\
\textbf{CTA} &  C. Bal\'azs, T.\ Bringmann, \\
             & J.\ Conrad, M.\ White\vspace{0.5mm}\\
\textbf{HESS} &  J.\ Conrad \vspace{0.5mm}\\
\textbf{LHCb} &  M.\ Chrz\k{a}szcz, N.\ Serra\vspace{0.5mm}\\
\textbf{IceCube} &  J.\ Edsj\"o, C.\ Savage, P.\ Scott\vspace{0.5mm}\\
\textbf{AMS-02} &  A.\ Putze\vspace{0.5mm}\\
\textbf{CDMS, DM-ICE} &  L. Hsu\vspace{0.5mm}\\
\textbf{XENON/DARWIN} &  J.\ Conrad\vspace{0.5mm}\\
\textbf{Theory} &  P.\ Athron, C. Bal\'azs, T.\ Bringmann, \\
                & J.\ Cornell, L.\ Dal, J.\ Edsj\"o, B.\ Farmer,\\
                & A.\ Krislock, A.\ Kvellestad, M.\ Pato, \\
                & F.\ Mahmoudi, A.\ Raklev, C.\ Savage,\\
                & P.\ Scott, C.\ Weniger, M.\ White \\	
\end{tabular}
\column{0.4\textwidth}
\end{columns}

\begin{textblock}{45}(73,13)
  \includegraphics[width=\linewidth]{Logo2full}\\	
  \includegraphics[width=\linewidth]{GroupPhoto}
\end{textblock}

\end{frame}

\begin{frame}
\frametitle{Modules}

Physics Modules
\begin{itemize}
\corange{\item ColliderBit} ATLAS and CMS likelihoods
\corange{\item DarkBit} Dark Matter searches
\corange{\item FlavBit} -- flavour physics inc. $g-2$, $b\rightarrow s\gamma$, $B$ decays (new channels, theory uncerts, LHCb likelihoods)
\corange{\item SpecBit} -- generic BSM spectrum object, providing RGE running, masses, mixings, etc via interchangeable interfaces to different RGE codes
\corange{\item DecayBit} -- decay widths for all relevant SM \& BSM particles
\corange{\item EWPOBit} -- precision tests (mostly by interface to FeynHiggs, alt. SUSY-POPE)
\end{itemize}

+\corange{ScannerBit}: manages statistics, parameter sampling and optimisation algorithms

\end{frame}


\begin{frame}
\frametitle{Backends: mix and match}

\begin{itemize}

\item GAMBIT modules consist of a number of standalone \textbf{module functions}
\item Module functions can depend on each other, or they can require specific functions from \textbf{backends}
\item Backends are external code libraries (DarkSUSY, FeynHiggs, etc) that include different functions 
\item GAMBIT automates and abstracts the interfaces to backends $\rightarrow$ backend functions are tagged according to \alert{what they calculate}
\item $\rightarrow$ with appropriate module design, \alert{different backends and their functions can be used interchangeably}
\item GAMBIT dynamically adapts to use whichever backends are actually present on a user's system (+ provides details of wtf it did of course)
\end{itemize}

\only<2>{
\begin{textblock}{110}(10,30)
\includegraphics[width=\textwidth]{backendshot}
\end{textblock}
}

\end{frame}

\begin{frame}
\frametitle{GAMBIT: a toy example}
\centering
\includegraphics[width=0.9\textwidth]{coreChainDiagram_example_wlogo}	
\end{frame}

\begin{frame}
\frametitle{Dependency Resolution}

\uncover<1>
{
 \begin{itemize}
    \item Module functions and backend functions get arranged into a \textbf{dependency tree}
    \item Starting with requested observables and likelihoods, fills each dependency and backend requirement
    \item Obeys rules at each step: allowed models, allowed backends, constraints from input file, etc
    \item $\rightarrow$ tree constitutes a directed acyclic graph
    \item $\rightarrow$ GAMBIT uses graph-theoretic methods to `solve' the graph to determine function evaluation order
\end{itemize}

}

\visible<1>
{
  \includegraphics[width=\textwidth]{GAMBIT_active_functor_graph}
}

\only<2>{
\begin{textblock}{73}(45,17)
\includegraphics[width=\textwidth, trim = 0 0 8000 0, clip=true]{GAMBIT_active_functor_graph}
\end{textblock}
}

\end{frame}


\begin{frame}
\frametitle{Hierarchical Model Database}

\begin{itemize}
  \item Models are defined by their parameters and relations to each other
  \item Models can inherit from \textbf{parent models}
  \item Points in child models can be \textbf{automatically translated} to ancestor models
  \item \textbf{Friend models} also allowed (cross-family translation)
  \item Model dependence of every module/backend function is tracked $\implies$ \alert{maximum safety, maximum reuse}
\end{itemize}

\includegraphics[width=0.8\textwidth]{GAMBIT_model_hierarchy}

\end{frame}



\begin{frame}
\frametitle{Expansion: adding new functions}

Adding a new module function is easy:
\begin{enumerate}
\item Declare the function to GAMBIT in a module's \textbf{rollcall header}\begin{itemize}
  \item Choose a capability
  \item Declare any \textbf{dependencies}
  \item Declare any \textbf{backend requirements}
  \item Declare any specific \textbf{allowed models}
  \item other more advanced declarations also available
\end{itemize}
\includegraphics[width=\textwidth]{rollcallshot}
\item Write the function as a simple C$++$ function\\(one argument: the result)
\end{enumerate}


\end{frame}

\begin{frame}
\frametitle{Other nice technical features}
\begin{itemize}
\item \textbf{Scanners}: MultiNest, Diver (diff.\ evolution), PIKAIA (genetic algorithms), GreAT (MCMC)
\item \textbf{Statistics}: Bayesian, Profile Likelihood, later full Neyman
\item Mixed-mode \textbf{MPI + openMP}, mostly automated
\item diskless generalisation of various Les Houches Accords
\item \textbf{BOSS}: dynamic loading of C++ classes from backends (!)
\item \textbf{all-in or module standalone} modes -- easily implemented from single cmake script
\item \textbf{automatic getters} for obtaining, configuring + compiling backends\footnote{if a backend breaks, won't compile and/or kills your dog, blame the\\\protect{\hspace{5mm}} authors (not us\ldots unless we \textbf{are} the authors\ldots)}  
\item \textbf{flexible output streams} (ASCII, databases, binary, \ldots)
\item more more more\ldots
\end{itemize}
\end{frame}



\begin{frame}
\frametitle{Closing remarks}

\begin{itemize}
\item{Robust analysis of dark matter and BSM physics requires multi-messenger global fits}
\item{GAMBIT is coming:}\begin{itemize}
\item[$\rightarrow$]{Global fits to many models for the first time}
\item[$\rightarrow$]{Better global fits to familiar ones}
\item[$\rightarrow$]{Highly modular, usable and extendable public code}
\item[$\rightarrow$]{Faster, more complete and more consistent theory explorations + experimental analysis prototyping} 
\end{itemize}
\end{itemize}

\end{frame}


\backupbegin   

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

\end{frame}

\backupend			

\end{document}
