Browse Source

Updates to tau studies and adds Feb 8 presentation

Caleb Fangmeier 6 years ago
parent
commit
1a3a35a708
31 changed files with 2118 additions and 171 deletions
  1. BIN
      docs/presentation_2018_02_08/16x9_seal03.jpg
  2. BIN
      docs/presentation_2018_02_08/CMSlogo.png
  3. 63 0
      docs/presentation_2018_02_08/beamerthemebjeldbak.sty
  4. BIN
      docs/presentation_2018_02_08/figures/Generated_tau_vs_Selected_tau.png
  5. BIN
      docs/presentation_2018_02_08/figures/Tau_Efficiency.png
  6. BIN
      docs/presentation_2018_02_08/figures/Tau_Purity.png
  7. BIN
      docs/presentation_2018_02_08/figures/Truth_Matching.png
  8. BIN
      docs/presentation_2018_02_08/figures/Yield_For_events_with_0_Tau.png
  9. BIN
      docs/presentation_2018_02_08/figures/Yield_For_events_with_0_Tau_NewSR.png
  10. BIN
      docs/presentation_2018_02_08/figures/Yield_For_events_with_1_Tau.png
  11. BIN
      docs/presentation_2018_02_08/figures/Yield_For_events_with_1_Tau_NewSR.png
  12. BIN
      docs/presentation_2018_02_08/figures/Yield_For_events_with_2_or_more_Tau.png
  13. BIN
      docs/presentation_2018_02_08/figures/Yield_Ignoring_Taus.png
  14. 33 0
      docs/presentation_2018_02_08/main.aux
  15. BIN
      docs/presentation_2018_02_08/main.dvi
  16. 1337 0
      docs/presentation_2018_02_08/main.log
  17. 15 0
      docs/presentation_2018_02_08/main.nav
  18. 0 0
      docs/presentation_2018_02_08/main.out
  19. BIN
      docs/presentation_2018_02_08/main.pdf
  20. 0 0
      docs/presentation_2018_02_08/main.snm
  21. 172 0
      docs/presentation_2018_02_08/main.tex
  22. 0 0
      docs/presentation_2018_02_08/main.toc
  23. BIN
      docs/presentation_2018_02_08/nebraska-n.png
  24. 32 0
      docs/presentation_2018_02_08/v0.10_mll.txt
  25. 32 0
      docs/presentation_2018_02_08/v1.01_jetPtCut20.txt
  26. 32 0
      docs/presentation_2018_02_08/v1.01_jetPtCut25.txt
  27. 32 0
      docs/presentation_2018_02_08/v1.01_jetPtCut30.txt
  28. 1 1
      filval-python
  29. 212 0
      jet_pt_studies.py
  30. 4 3
      publish.py
  31. 153 167
      yields.py

BIN
docs/presentation_2018_02_08/16x9_seal03.jpg


BIN
docs/presentation_2018_02_08/CMSlogo.png


+ 63 - 0
docs/presentation_2018_02_08/beamerthemebjeldbak.sty

@@ -0,0 +1,63 @@
+% Insipired by Cameron Bracken's theme originally posted
+% here: http://cameron.bracken.bz/beamer-template
+% January 2009
+
+% Modifications done by Martin Bjeldbak Madsen
+% June 2014
+\mode<presentation>
+
+\RequirePackage{tgpagella}
+
+% \DeclareOptionBeamer{titlepage}{\PassOptionsToPackage{titlepage=#1}{beamertheme-Inner}}
+% \ProcessOptionsBeamer
+
+\useoutertheme[subsection=false,shadow]{miniframes}
+\useinnertheme{default}
+\usefonttheme{serif}
+
+\setbeamertemplate{footline} % show slide number on all slides but the first
+{%
+  \ifnum\c@framenumber=1
+  \else
+    \begin{beamercolorbox}[wd=0.95\paperwidth,right,dp=2ex]{page number}
+      \insertframenumber/\inserttotalframenumber%
+    \end{beamercolorbox}
+  \fi%
+  \begin{beamercolorbox}[colsep=1.25pt]{lower separation line foot}
+  \end{beamercolorbox}
+}
+
+% \ifnum\c@framenumber=1
+\usebackgroundtemplate{\includegraphics[width=1.3\paperwidth]{16x9_seal03.jpg}}
+% \else
+% \fi%
+
+% Display a slide before the current section with overview inf
+% \AtBeginSection[]
+% {%
+%    \begin{frame}
+%        \frametitle{Overview}
+%        \tableofcontents[currentsection,hideothersubsections]
+%    \end{frame}
+% }
+
+\setbeamerfont{title like}{shape=\scshape}
+\setbeamerfont{frametitle}{shape=\scshape}
+\setbeamerfont{section in head/foot}{shape=\scshape,size=\tiny}
+
+\setbeamertemplate{navigation symbols}{} % hide bottom nav buttons
+\setbeamercovered{transparent} % don't hide strip-teased bullet points
+
+% \definecolor{barcolor}{HTML}{77C4D3} % teal
+\definecolor{barcolor}{HTML}{DD0000} % teal
+\setbeamercolor{lower separation line head}{bg=barcolor}
+\setbeamercolor{lower separation line foot}{bg=barcolor}
+\setbeamercolor{normal text}{fg=black,bg=white}
+\setbeamercolor{alerted text}{fg=red}
+\setbeamercolor{example text}{fg=black}
+\setbeamercolor{structure}{fg=black}
+
+\setbeamercolor{palette tertiary}{fg=black,bg=black!10}
+\setbeamercolor{palette quaternary}{fg=black,bg=black!10}
+
+\mode<all>

BIN
docs/presentation_2018_02_08/figures/Generated_tau_vs_Selected_tau.png


BIN
docs/presentation_2018_02_08/figures/Tau_Efficiency.png


BIN
docs/presentation_2018_02_08/figures/Tau_Purity.png


BIN
docs/presentation_2018_02_08/figures/Truth_Matching.png


BIN
docs/presentation_2018_02_08/figures/Yield_For_events_with_0_Tau.png


BIN
docs/presentation_2018_02_08/figures/Yield_For_events_with_0_Tau_NewSR.png


BIN
docs/presentation_2018_02_08/figures/Yield_For_events_with_1_Tau.png


BIN
docs/presentation_2018_02_08/figures/Yield_For_events_with_1_Tau_NewSR.png


BIN
docs/presentation_2018_02_08/figures/Yield_For_events_with_2_or_more_Tau.png


BIN
docs/presentation_2018_02_08/figures/Yield_Ignoring_Taus.png


+ 33 - 0
docs/presentation_2018_02_08/main.aux

@@ -0,0 +1,33 @@
+\relax 
+\providecommand\hyper@newdestlabel[2]{}
+\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument}
+\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined
+\global\let\oldcontentsline\contentsline
+\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}
+\global\let\oldnewlabel\newlabel
+\gdef\newlabel#1#2{\newlabelxx{#1}#2}
+\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
+\AtEndDocument{\ifx\hyper@anchor\@undefined
+\let\contentsline\oldcontentsline
+\let\newlabel\oldnewlabel
+\fi}
+\fi}
+\global\let\hyper@last\relax 
+\gdef\HyperFirstAtBeginDocument#1{#1}
+\providecommand\HyField@AuxAddToFields[1]{}
+\providecommand\HyField@AuxAddToCoFields[2]{}
+\@writefile{nav}{\headcommand {\slideentry {0}{0}{1}{1/1}{}{0}}}
+\@writefile{nav}{\headcommand {\beamer@framepages {1}{1}}}
+\@writefile{nav}{\headcommand {\slideentry {0}{0}{2}{2/2}{}{0}}}
+\@writefile{nav}{\headcommand {\beamer@framepages {2}{2}}}
+\@writefile{nav}{\headcommand {\slideentry {0}{0}{3}{3/3}{}{0}}}
+\@writefile{nav}{\headcommand {\beamer@framepages {3}{3}}}
+\@writefile{nav}{\headcommand {\slideentry {0}{0}{4}{4/4}{}{0}}}
+\@writefile{nav}{\headcommand {\beamer@framepages {4}{4}}}
+\@writefile{nav}{\headcommand {\slideentry {0}{0}{5}{5/5}{}{0}}}
+\@writefile{nav}{\headcommand {\beamer@framepages {5}{5}}}
+\@writefile{nav}{\headcommand {\beamer@partpages {1}{5}}}
+\@writefile{nav}{\headcommand {\beamer@subsectionpages {1}{5}}}
+\@writefile{nav}{\headcommand {\beamer@sectionpages {1}{5}}}
+\@writefile{nav}{\headcommand {\beamer@documentpages {5}}}
+\@writefile{nav}{\headcommand {\def \inserttotalframenumber {5}}}

BIN
docs/presentation_2018_02_08/main.dvi


File diff suppressed because it is too large
+ 1337 - 0
docs/presentation_2018_02_08/main.log


+ 15 - 0
docs/presentation_2018_02_08/main.nav

@@ -0,0 +1,15 @@
+\headcommand {\slideentry {0}{0}{1}{1/1}{}{0}}
+\headcommand {\beamer@framepages {1}{1}}
+\headcommand {\slideentry {0}{0}{2}{2/2}{}{0}}
+\headcommand {\beamer@framepages {2}{2}}
+\headcommand {\slideentry {0}{0}{3}{3/3}{}{0}}
+\headcommand {\beamer@framepages {3}{3}}
+\headcommand {\slideentry {0}{0}{4}{4/4}{}{0}}
+\headcommand {\beamer@framepages {4}{4}}
+\headcommand {\slideentry {0}{0}{5}{5/5}{}{0}}
+\headcommand {\beamer@framepages {5}{5}}
+\headcommand {\beamer@partpages {1}{5}}
+\headcommand {\beamer@subsectionpages {1}{5}}
+\headcommand {\beamer@sectionpages {1}{5}}
+\headcommand {\beamer@documentpages {5}}
+\headcommand {\def \inserttotalframenumber {5}}

+ 0 - 0
docs/presentation_2018_02_08/main.out


BIN
docs/presentation_2018_02_08/main.pdf


+ 0 - 0
docs/presentation_2018_02_08/main.snm


+ 172 - 0
docs/presentation_2018_02_08/main.tex

@@ -0,0 +1,172 @@
+
+% rubber: module pdftex
+
+\documentclass[english,aspectratio=43,8pt]{beamer}
+\usepackage{graphicx}
+\usepackage{amssymb}
+\usepackage{booktabs}
+\usepackage{siunitx}
+\usepackage{subcaption}
+\usepackage{marvosym}
+\usepackage{verbatim}
+\usepackage[normalem]{ulem}  % Needed for /sout
+
+\newcommand{\pb}{\si{\pico\barn}}%
+\newcommand{\fb}{\si{\femto\barn}}%
+\newcommand{\invfb}{\si{\per\femto\barn}}
+\newcommand{\GeV}{\si{\giga\electronvolt}}
+
+\hypersetup{colorlinks=true,urlcolor=blue}
+
+\usetheme[]{bjeldbak}
+
+\begin{document}
+
+  \title[]{Modified Jet $P_T$ Requirement in TTTT X-Section Measurement}
+  \author[C. Fangmeier]{\textbf{Caleb Fangmeier}}
+  \institute[UNL]{University of Nebraska \-- Lincoln}
+  \date{TTTT Working Meeting | February 8, 2018}
+
+  \titlegraphic{%
+  \begin{figure}
+      \includegraphics[width=1in]{CMSlogo.png}\hspace{0.75in}\includegraphics[width=1in]{nebraska-n.png}
+  \end{figure}
+  }
+
+  \begin{frame}[plain]
+      \titlepage%
+  \end{frame}
+
+  % \begin{frame}{Introduction}
+  %     \begin{itemize}
+  %         \item \textbf{Goal:} Investigate how the TTTT cross-section measurement could be improved by adding taus to the lepton selection.
+  %         \item To avoid the work of modifying the existing analysis looper to include taus, a simple ``mock''\footnote{\url{https://github.com/cfangmeier/FTAnalysis/tree/tau_studies/studies/tau}} analysis was implemented from scratch which attempts to replicate the main features of the real analysis.
+  %         \item Runs on same \texttt{CMS4} nTuples as existing analysis.
+  %     \end{itemize}
+  % \end{frame}
+
+  \begin{frame}{Yields, Jet $P_T>40$ (current)}
+    \begin{tabular}{lllllll}
+      & $ttW$      & $ttZ$      & $ttH$      & Total       & Data        & $tttt$      \\
+      \hline\hline
+      CRZ &  1.08$\pm$ 0.43 & 36.28$\pm$14.61 &  1.55$\pm$ 0.78 & 38.91$\pm$14.64 & - &  0.44$\pm$ 0.02 \\
+      SR1 & 55.40$\pm$22.31 & 15.90$\pm$ 6.40 & 18.26$\pm$ 9.17 & 89.56$\pm$24.96 & - &  2.11$\pm$ 0.08 \\
+      SR2 &  4.73$\pm$ 1.90 &  2.01$\pm$ 0.81 &  2.40$\pm$ 1.21 &  9.14$\pm$ 2.39 & - &  0.97$\pm$ 0.04 \\
+      SR3 &  1.05$\pm$ 0.42 &  0.56$\pm$ 0.22 &  0.77$\pm$ 0.39 &  2.37$\pm$ 0.61 & - &  0.66$\pm$ 0.03 \\
+      SR4 &  0.33$\pm$ 0.13 &  0.00$\pm$ 0.00 &  0.35$\pm$ 0.17 &  0.68$\pm$ 0.22 & - &  0.39$\pm$ 0.02 \\
+      SR5 &  5.24$\pm$ 2.11 &  1.94$\pm$ 0.78 &  2.36$\pm$ 1.19 &  9.54$\pm$ 2.54 & - &  1.28$\pm$ 0.05 \\
+      SR6 &  0.68$\pm$ 0.27 &  0.30$\pm$ 0.12 &  0.44$\pm$ 0.22 &  1.42$\pm$ 0.37 & - &  0.85$\pm$ 0.03 \\
+      SR7 &  0.30$\pm$ 0.12 &  0.00$\pm$ 0.00 &  0.21$\pm$ 0.11 &  0.51$\pm$ 0.16 & - &  0.56$\pm$ 0.02 \\
+      SR8 &  0.23$\pm$ 0.09 &  0.12$\pm$ 0.05 &  0.09$\pm$ 0.04 &  0.44$\pm$ 0.11 & - &  0.46$\pm$ 0.02 \\
+      SR9 &  0.32$\pm$ 0.13 &  0.27$\pm$ 0.11 &  0.12$\pm$ 0.06 &  0.71$\pm$ 0.18 & - &  0.36$\pm$ 0.01 \\
+      SR10 &  0.06$\pm$ 0.02 &  0.02$\pm$ 0.01 &  0.07$\pm$ 0.04 &  0.15$\pm$ 0.04 & - &  0.32$\pm$ 0.01 \\
+      SR11 &  0.10$\pm$ 0.04 &  0.00$\pm$ 0.00 &  0.02$\pm$ 0.01 &  0.12$\pm$ 0.04 & - &  0.48$\pm$ 0.02 \\
+      SR12 &  4.46$\pm$ 1.80 &  5.91$\pm$ 2.38 &  3.93$\pm$ 1.97 & 14.30$\pm$ 3.58 & - &  0.93$\pm$ 0.04 \\
+      SR13 &  0.16$\pm$ 0.06 &  0.56$\pm$ 0.23 &  0.32$\pm$ 0.16 &  1.04$\pm$ 0.28 & - &  0.18$\pm$ 0.01 \\
+      SR14 &  0.00$\pm$ 0.00 &  0.13$\pm$ 0.05 &  0.11$\pm$ 0.05 &  0.24$\pm$ 0.08 & - &  0.12$\pm$ 0.00 \\
+      SR15 &  0.29$\pm$ 0.12 &  0.38$\pm$ 0.15 &  0.33$\pm$ 0.17 &  1.00$\pm$ 0.25 & - &  0.36$\pm$ 0.01 \\
+      SR16 &  0.12$\pm$ 0.05 &  0.13$\pm$ 0.05 &  0.15$\pm$ 0.08 &  0.40$\pm$ 0.10 & - &  0.33$\pm$ 0.01 \\
+      SR17 &  0.06$\pm$ 0.02 &  0.18$\pm$ 0.07 &  0.09$\pm$ 0.05 &  0.33$\pm$ 0.09 & - &  0.42$\pm$ 0.02 \\
+    \end{tabular}
+    \centering
+    \texttt{%
+      Exp UL: 14.92 +7.79 -4.89 fb \\
+      Sig: 1.737 (p-value: 0.041) \\
+      Mu: 1.000 (+0.717 -0.608) }
+  \end{frame}
+
+
+  \begin{frame}{Yields, Jet $P_T>30$}
+    \begin{tabular}{lllllll}
+      & $ttW$      & $ttZ$      & $ttH$      & Total       & Data        & $tttt$      \\
+      \hline\hline
+      CRZ &  1.19$\pm$ 0.48 & 39.95$\pm$16.09 &  1.73$\pm$ 0.87 & 42.87$\pm$16.12 & - &  0.46$\pm$ 0.02 \\
+      SR1 & 55.00$\pm$22.15 & 15.05$\pm$ 6.06 & 16.67$\pm$ 8.37 & 86.72$\pm$24.44 & - &  1.22$\pm$ 0.05 \\
+      SR2 &  8.28$\pm$ 3.34 &  4.27$\pm$ 1.72 &  4.55$\pm$ 2.28 & 17.10$\pm$ 4.39 & - &  1.19$\pm$ 0.05 \\
+      SR3 &  3.02$\pm$ 1.22 &  0.84$\pm$ 0.34 &  1.95$\pm$ 0.98 &  5.80$\pm$ 1.60 & - &  0.89$\pm$ 0.04 \\
+      SR4 &  1.13$\pm$ 0.45 &  0.23$\pm$ 0.09 &  1.05$\pm$ 0.53 &  2.41$\pm$ 0.70 & - &  0.96$\pm$ 0.04 \\
+      SR5 &  4.92$\pm$ 1.98 &  1.77$\pm$ 0.71 &  1.94$\pm$ 0.98 &  8.62$\pm$ 2.32 & - &  0.71$\pm$ 0.03 \\
+      SR6 &  0.98$\pm$ 0.39 &  0.53$\pm$ 0.21 &  0.81$\pm$ 0.41 &  2.32$\pm$ 0.60 & - &  0.80$\pm$ 0.03 \\
+      SR7 &  0.60$\pm$ 0.24 &  0.06$\pm$ 0.02 &  0.45$\pm$ 0.23 &  1.11$\pm$ 0.33 & - &  0.78$\pm$ 0.03 \\
+      SR8 &  0.43$\pm$ 0.17 &  0.19$\pm$ 0.08 &  0.27$\pm$ 0.14 &  0.89$\pm$ 0.23 & - &  0.95$\pm$ 0.04 \\
+      SR9 &  0.17$\pm$ 0.07 &  0.26$\pm$ 0.10 &  0.10$\pm$ 0.05 &  0.53$\pm$ 0.13 & - &  0.14$\pm$ 0.01 \\
+      SR10 &  0.07$\pm$ 0.03 &  0.04$\pm$ 0.02 &  0.06$\pm$ 0.03 &  0.17$\pm$ 0.04 & - &  0.26$\pm$ 0.01 \\
+      SR11 &  0.24$\pm$ 0.10 &  0.00$\pm$ 0.00 &  0.08$\pm$ 0.04 &  0.32$\pm$ 0.11 & - &  0.78$\pm$ 0.03 \\
+      SR12 &  4.86$\pm$ 1.96 &  6.31$\pm$ 2.54 &  3.96$\pm$ 1.99 & 15.13$\pm$ 3.77 & - &  0.72$\pm$ 0.03 \\
+      SR13 &  0.21$\pm$ 0.08 &  0.81$\pm$ 0.33 &  0.52$\pm$ 0.26 &  1.54$\pm$ 0.43 & - &  0.32$\pm$ 0.01 \\
+      SR14 &  0.03$\pm$ 0.01 &  0.41$\pm$ 0.17 &  0.31$\pm$ 0.15 &  0.74$\pm$ 0.23 & - &  0.25$\pm$ 0.01 \\
+      SR15 &  0.31$\pm$ 0.13 &  0.42$\pm$ 0.17 &  0.24$\pm$ 0.12 &  0.98$\pm$ 0.25 & - &  0.18$\pm$ 0.01 \\
+      SR16 &  0.09$\pm$ 0.03 &  0.06$\pm$ 0.02 &  0.22$\pm$ 0.11 &  0.36$\pm$ 0.12 & - &  0.30$\pm$ 0.01 \\
+      SR17 &  0.14$\pm$ 0.06 &  0.27$\pm$ 0.11 &  0.18$\pm$ 0.09 &  0.60$\pm$ 0.15 & - &  0.67$\pm$ 0.03 \\
+    \end{tabular}
+    \centering
+    \texttt{%
+      Exp UL: 17.53 +9.72 -5.95 fb \\
+      Sig: 1.529 (p-value: 0.063) \\
+      Mu: 1.000 (+0.830 -0.660)
+}
+  \end{frame}
+
+  \begin{frame}{Yields, Jet $P_T>25$}
+    \begin{tabular}{lllllll}
+      & $ttW$      & $ttZ$      & $ttH$      & Total       & Data        & $tttt$      \\
+      \hline\hline
+      CRZ &  1.31$\pm$ 0.53 & 42.41$\pm$17.08 &  1.83$\pm$ 0.92 & 45.54$\pm$17.11 & - &  0.47$\pm$ 0.02 \\
+      SR1 & 51.59$\pm$20.78 & 14.04$\pm$ 5.65 & 14.34$\pm$ 7.20 & 79.97$\pm$22.71 & - &  0.85$\pm$ 0.03 \\
+      SR2 & 11.05$\pm$ 4.45 &  5.04$\pm$ 2.03 &  5.90$\pm$ 2.96 & 21.99$\pm$ 5.72 & - &  1.03$\pm$ 0.04 \\
+      SR3 &  5.01$\pm$ 2.02 &  1.80$\pm$ 0.73 &  3.15$\pm$ 1.58 &  9.96$\pm$ 2.66 & - &  1.03$\pm$ 0.04 \\
+      SR4 &  2.41$\pm$ 0.97 &  0.75$\pm$ 0.30 &  1.93$\pm$ 0.97 &  5.08$\pm$ 1.40 & - &  1.39$\pm$ 0.06 \\
+      SR5 &  4.05$\pm$ 1.63 &  1.58$\pm$ 0.63 &  1.59$\pm$ 0.80 &  7.21$\pm$ 1.92 & - &  0.45$\pm$ 0.02 \\
+      SR6 &  1.60$\pm$ 0.64 &  0.80$\pm$ 0.32 &  1.04$\pm$ 0.52 &  3.43$\pm$ 0.89 & - &  0.67$\pm$ 0.03 \\
+      SR7 &  0.85$\pm$ 0.34 &  0.23$\pm$ 0.09 &  0.58$\pm$ 0.29 &  1.66$\pm$ 0.46 & - &  0.75$\pm$ 0.03 \\
+      SR8 &  0.66$\pm$ 0.27 &  0.06$\pm$ 0.03 &  0.50$\pm$ 0.25 &  1.23$\pm$ 0.37 & - &  1.38$\pm$ 0.06 \\
+      SR9 &  0.14$\pm$ 0.06 &  0.14$\pm$ 0.06 &  0.05$\pm$ 0.03 &  0.34$\pm$ 0.09 & - &  0.07$\pm$ 0.00 \\
+      SR10 &  0.08$\pm$ 0.03 &  0.10$\pm$ 0.04 &  0.07$\pm$ 0.04 &  0.25$\pm$ 0.06 & - &  0.18$\pm$ 0.01 \\
+      SR11 &  0.28$\pm$ 0.11 &  0.04$\pm$ 0.02 &  0.13$\pm$ 0.07 &  0.46$\pm$ 0.13 & - &  0.94$\pm$ 0.04 \\
+      SR12 &  4.98$\pm$ 2.01 &  6.41$\pm$ 2.58 &  3.74$\pm$ 1.88 & 15.13$\pm$ 3.77 & - &  0.60$\pm$ 0.02 \\
+      SR13 &  0.30$\pm$ 0.12 &  0.77$\pm$ 0.31 &  0.75$\pm$ 0.38 &  1.83$\pm$ 0.51 & - &  0.34$\pm$ 0.01 \\
+      SR14 &  0.13$\pm$ 0.05 &  0.71$\pm$ 0.29 &  0.52$\pm$ 0.26 &  1.35$\pm$ 0.39 & - &  0.39$\pm$ 0.02 \\
+      SR15 &  0.22$\pm$ 0.09 &  0.32$\pm$ 0.13 &  0.17$\pm$ 0.09 &  0.71$\pm$ 0.18 & - &  0.12$\pm$ 0.00 \\
+      SR16 &  0.10$\pm$ 0.04 &  0.27$\pm$ 0.11 &  0.21$\pm$ 0.11 &  0.59$\pm$ 0.16 & - &  0.24$\pm$ 0.01 \\
+      SR17 &  0.20$\pm$ 0.08 &  0.27$\pm$ 0.11 &  0.29$\pm$ 0.14 &  0.76$\pm$ 0.20 & - &  0.82$\pm$ 0.03 \\
+    \end{tabular}
+    \centering
+    \texttt{%
+      Exp UL: 17.81 +9.59 -5.96 fb \\
+      Sig: 1.469 (p-value: 0.071) \\
+      Mu: 1.000 (+0.851 -0.670)
+}
+  \end{frame}
+
+  \begin{frame}{Yields, Jet $P_T>20$}
+    \begin{tabular}{lllllll}
+      & $ttW$      & $ttZ$      & $ttH$      & Total       & Data        & $tttt$      \\
+      \hline\hline
+        CRZ &  1.31$\pm$ 0.53 & 42.41$\pm$17.08 &  1.83$\pm$ 0.92 & 45.54$\pm$17.11 & - &  0.47$\pm$ 0.02 \\
+        SR1 & 51.59$\pm$20.78 & 14.04$\pm$ 5.65 & 14.34$\pm$ 7.20 & 79.97$\pm$22.71 & - &  0.85$\pm$ 0.03 \\
+        SR2 & 11.05$\pm$ 4.45 &  5.04$\pm$ 2.03 &  5.90$\pm$ 2.96 & 21.99$\pm$ 5.72 & - &  1.03$\pm$ 0.04 \\
+        SR3 &  5.01$\pm$ 2.02 &  1.80$\pm$ 0.73 &  3.15$\pm$ 1.58 &  9.96$\pm$ 2.66 & - &  1.03$\pm$ 0.04 \\
+        SR4 &  2.41$\pm$ 0.97 &  0.75$\pm$ 0.30 &  1.93$\pm$ 0.97 &  5.08$\pm$ 1.40 & - &  1.39$\pm$ 0.06 \\
+        SR5 &  4.05$\pm$ 1.63 &  1.58$\pm$ 0.63 &  1.59$\pm$ 0.80 &  7.21$\pm$ 1.92 & - &  0.45$\pm$ 0.02 \\
+        SR6 &  1.60$\pm$ 0.64 &  0.80$\pm$ 0.32 &  1.04$\pm$ 0.52 &  3.43$\pm$ 0.89 & - &  0.67$\pm$ 0.03 \\
+        SR7 &  0.85$\pm$ 0.34 &  0.23$\pm$ 0.09 &  0.58$\pm$ 0.29 &  1.66$\pm$ 0.46 & - &  0.75$\pm$ 0.03 \\
+        SR8 &  0.66$\pm$ 0.27 &  0.06$\pm$ 0.03 &  0.50$\pm$ 0.25 &  1.23$\pm$ 0.37 & - &  1.38$\pm$ 0.06 \\
+        SR9 &  0.14$\pm$ 0.06 &  0.14$\pm$ 0.06 &  0.05$\pm$ 0.03 &  0.34$\pm$ 0.09 & - &  0.07$\pm$ 0.00 \\
+        SR10 &  0.08$\pm$ 0.03 &  0.10$\pm$ 0.04 &  0.07$\pm$ 0.04 &  0.25$\pm$ 0.06 & - &  0.18$\pm$ 0.01 \\
+        SR11 &  0.28$\pm$ 0.11 &  0.04$\pm$ 0.02 &  0.13$\pm$ 0.07 &  0.46$\pm$ 0.13 & - &  0.94$\pm$ 0.04 \\
+        SR12 &  4.98$\pm$ 2.01 &  6.41$\pm$ 2.58 &  3.74$\pm$ 1.88 & 15.13$\pm$ 3.77 & - &  0.60$\pm$ 0.02 \\
+        SR13 &  0.30$\pm$ 0.12 &  0.77$\pm$ 0.31 &  0.75$\pm$ 0.38 &  1.83$\pm$ 0.51 & - &  0.34$\pm$ 0.01 \\
+        SR14 &  0.13$\pm$ 0.05 &  0.71$\pm$ 0.29 &  0.52$\pm$ 0.26 &  1.35$\pm$ 0.39 & - &  0.39$\pm$ 0.02 \\
+        SR15 &  0.22$\pm$ 0.09 &  0.32$\pm$ 0.13 &  0.17$\pm$ 0.09 &  0.71$\pm$ 0.18 & - &  0.12$\pm$ 0.00 \\
+        SR16 &  0.10$\pm$ 0.04 &  0.27$\pm$ 0.11 &  0.21$\pm$ 0.11 &  0.59$\pm$ 0.16 & - &  0.24$\pm$ 0.01 \\
+        SR17 &  0.20$\pm$ 0.08 &  0.27$\pm$ 0.11 &  0.29$\pm$ 0.14 &  0.76$\pm$ 0.20 & - &  0.82$\pm$ 0.03 \\
+    \end{tabular}
+    \centering
+    \texttt{%
+      Exp UL: 17.81 +9.59 -5.96 fb \\
+      Sig: 1.469 (p-value: 0.071) \\
+      Mu: 1.000 (+0.851 -0.670)
+}
+  \end{frame}
+
+\end{document}

+ 0 - 0
docs/presentation_2018_02_08/main.toc


BIN
docs/presentation_2018_02_08/nebraska-n.png


+ 32 - 0
docs/presentation_2018_02_08/v0.10_mll.txt

@@ -0,0 +1,32 @@
+>>> [!] no card name specified, so using v0.10_mll/card_tttt_srcr.txt
+>>> Making card
+>>> Running combine [combine -M Asymptotic v0.10_mll/card_tttt_srcr.txt --noFitAsimov  2>&1 | tee v0.10_mll/card_tttt_srcr.log]
+>>> Running combine for significance [combine -M ProfileLikelihood v0.10_mll/card_tttt_srcr.txt --significance -t -1 --expectSignal=1  2>&1 | tee -a v0.10_mll/card_tttt_srcr.log]
+>>> Running combine for mu [combine -M MaxLikelihoodFit v0.10_mll/card_tttt_srcr_asimov.txt --robustFit=1 --saveShapes --saveWithUncertainties  -n name 2>&1 | tee -a v0.10_mll/card_tttt_srcr.log]
+------------------------------
+  Exp UL: 14.92 +7.79 -4.89 fb
+  Sig: 1.737 (p-value: 0.041)
+  Mu: 1.000 (+0.717 -0.608)
+------------------------------
+>>> [!] no card name specified, so using v0.10_mll/card_tttt_srcr.txt
+18
+$\ttW$      &$\ttZ$      &$\ttH$      &Total       &Data        &$\tttt$      \\
+\hline\hline
+CRZ &  1.08$\pm$ 0.43 & 36.28$\pm$14.61 &  1.55$\pm$ 0.78 & 38.91$\pm$14.64 & 0 &  0.44$\pm$ 0.02 \\
+SR1 & 55.40$\pm$22.31 & 15.90$\pm$ 6.40 & 18.26$\pm$ 9.17 & 89.56$\pm$24.96 & 0 &  2.11$\pm$ 0.08 \\
+SR2 &  4.73$\pm$ 1.90 &  2.01$\pm$ 0.81 &  2.40$\pm$ 1.21 &  9.14$\pm$ 2.39 & - &  0.97$\pm$ 0.04 \\
+SR3 &  1.05$\pm$ 0.42 &  0.56$\pm$ 0.22 &  0.77$\pm$ 0.39 &  2.37$\pm$ 0.61 & - &  0.66$\pm$ 0.03 \\
+SR4 &  0.33$\pm$ 0.13 &  0.00$\pm$ 0.00 &  0.35$\pm$ 0.17 &  0.68$\pm$ 0.22 & - &  0.39$\pm$ 0.02 \\
+SR5 &  5.24$\pm$ 2.11 &  1.94$\pm$ 0.78 &  2.36$\pm$ 1.19 &  9.54$\pm$ 2.54 & - &  1.28$\pm$ 0.05 \\
+SR6 &  0.68$\pm$ 0.27 &  0.30$\pm$ 0.12 &  0.44$\pm$ 0.22 &  1.42$\pm$ 0.37 & - &  0.85$\pm$ 0.03 \\
+SR7 &  0.30$\pm$ 0.12 &  0.00$\pm$ 0.00 &  0.21$\pm$ 0.11 &  0.51$\pm$ 0.16 & - &  0.56$\pm$ 0.02 \\
+SR8 &  0.23$\pm$ 0.09 &  0.12$\pm$ 0.05 &  0.09$\pm$ 0.04 &  0.44$\pm$ 0.11 & - &  0.46$\pm$ 0.02 \\
+SR9 &  0.32$\pm$ 0.13 &  0.27$\pm$ 0.11 &  0.12$\pm$ 0.06 &  0.71$\pm$ 0.18 & - &  0.36$\pm$ 0.01 \\
+SR10 &  0.06$\pm$ 0.02 &  0.02$\pm$ 0.01 &  0.07$\pm$ 0.04 &  0.15$\pm$ 0.04 & - &  0.32$\pm$ 0.01 \\
+SR11 &  0.10$\pm$ 0.04 &  0.00$\pm$ 0.00 &  0.02$\pm$ 0.01 &  0.12$\pm$ 0.04 & - &  0.48$\pm$ 0.02 \\
+SR12 &  4.46$\pm$ 1.80 &  5.91$\pm$ 2.38 &  3.93$\pm$ 1.97 & 14.30$\pm$ 3.58 & - &  0.93$\pm$ 0.04 \\
+SR13 &  0.16$\pm$ 0.06 &  0.56$\pm$ 0.23 &  0.32$\pm$ 0.16 &  1.04$\pm$ 0.28 & - &  0.18$\pm$ 0.01 \\
+SR14 &  0.00$\pm$ 0.00 &  0.13$\pm$ 0.05 &  0.11$\pm$ 0.05 &  0.24$\pm$ 0.08 & - &  0.12$\pm$ 0.00 \\
+SR15 &  0.29$\pm$ 0.12 &  0.38$\pm$ 0.15 &  0.33$\pm$ 0.17 &  1.00$\pm$ 0.25 & - &  0.36$\pm$ 0.01 \\
+SR16 &  0.12$\pm$ 0.05 &  0.13$\pm$ 0.05 &  0.15$\pm$ 0.08 &  0.40$\pm$ 0.10 & - &  0.33$\pm$ 0.01 \\
+SR17 &  0.06$\pm$ 0.02 &  0.18$\pm$ 0.07 &  0.09$\pm$ 0.05 &  0.33$\pm$ 0.09 & - &  0.42$\pm$ 0.02 \\

+ 32 - 0
docs/presentation_2018_02_08/v1.01_jetPtCut20.txt

@@ -0,0 +1,32 @@
+>>> [!] no card name specified, so using v1.01_jetPtCut20/card_tttt_srcr.txt
+>>> Making card
+>>> Running combine [combine -M Asymptotic v1.01_jetPtCut20/card_tttt_srcr.txt --noFitAsimov  2>&1 | tee v1.01_jetPtCut20/card_tttt_srcr.log]
+>>> Running combine for significance [combine -M ProfileLikelihood v1.01_jetPtCut20/card_tttt_srcr.txt --significance -t -1 --expectSignal=1  2>&1 | tee -a v1.01_jetPtCut20/card_tttt_srcr.log]
+>>> Running combine for mu [combine -M MaxLikelihoodFit v1.01_jetPtCut20/card_tttt_srcr_asimov.txt --robustFit=1 --saveShapes --saveWithUncertainties  -n name 2>&1 | tee -a v1.01_jetPtCut20/card_tttt_srcr.log]
+------------------------------
+  Exp UL: 17.81 +9.59 -5.96 fb
+  Sig: 1.469 (p-value: 0.071)
+  Mu: 1.000 (+0.851 -0.670)
+------------------------------
+>>> [!] no card name specified, so using v1.01_jetPtCut20/card_tttt_srcr.txt
+18
+$\ttW$      &$\ttZ$      &$\ttH$      &Total       &Data        &$\tttt$      \\
+\hline\hline
+CRZ &  1.31$\pm$ 0.53 & 42.41$\pm$17.08 &  1.83$\pm$ 0.92 & 45.54$\pm$17.11 & 0 &  0.47$\pm$ 0.02 \\
+SR1 & 51.59$\pm$20.78 & 14.04$\pm$ 5.65 & 14.34$\pm$ 7.20 & 79.97$\pm$22.71 & 0 &  0.85$\pm$ 0.03 \\
+SR2 & 11.05$\pm$ 4.45 &  5.04$\pm$ 2.03 &  5.90$\pm$ 2.96 & 21.99$\pm$ 5.72 & - &  1.03$\pm$ 0.04 \\
+SR3 &  5.01$\pm$ 2.02 &  1.80$\pm$ 0.73 &  3.15$\pm$ 1.58 &  9.96$\pm$ 2.66 & - &  1.03$\pm$ 0.04 \\
+SR4 &  2.41$\pm$ 0.97 &  0.75$\pm$ 0.30 &  1.93$\pm$ 0.97 &  5.08$\pm$ 1.40 & - &  1.39$\pm$ 0.06 \\
+SR5 &  4.05$\pm$ 1.63 &  1.58$\pm$ 0.63 &  1.59$\pm$ 0.80 &  7.21$\pm$ 1.92 & - &  0.45$\pm$ 0.02 \\
+SR6 &  1.60$\pm$ 0.64 &  0.80$\pm$ 0.32 &  1.04$\pm$ 0.52 &  3.43$\pm$ 0.89 & - &  0.67$\pm$ 0.03 \\
+SR7 &  0.85$\pm$ 0.34 &  0.23$\pm$ 0.09 &  0.58$\pm$ 0.29 &  1.66$\pm$ 0.46 & - &  0.75$\pm$ 0.03 \\
+SR8 &  0.66$\pm$ 0.27 &  0.06$\pm$ 0.03 &  0.50$\pm$ 0.25 &  1.23$\pm$ 0.37 & - &  1.38$\pm$ 0.06 \\
+SR9 &  0.14$\pm$ 0.06 &  0.14$\pm$ 0.06 &  0.05$\pm$ 0.03 &  0.34$\pm$ 0.09 & - &  0.07$\pm$ 0.00 \\
+SR10 &  0.08$\pm$ 0.03 &  0.10$\pm$ 0.04 &  0.07$\pm$ 0.04 &  0.25$\pm$ 0.06 & - &  0.18$\pm$ 0.01 \\
+SR11 &  0.28$\pm$ 0.11 &  0.04$\pm$ 0.02 &  0.13$\pm$ 0.07 &  0.46$\pm$ 0.13 & - &  0.94$\pm$ 0.04 \\
+SR12 &  4.98$\pm$ 2.01 &  6.41$\pm$ 2.58 &  3.74$\pm$ 1.88 & 15.13$\pm$ 3.77 & - &  0.60$\pm$ 0.02 \\
+SR13 &  0.30$\pm$ 0.12 &  0.77$\pm$ 0.31 &  0.75$\pm$ 0.38 &  1.83$\pm$ 0.51 & - &  0.34$\pm$ 0.01 \\
+SR14 &  0.13$\pm$ 0.05 &  0.71$\pm$ 0.29 &  0.52$\pm$ 0.26 &  1.35$\pm$ 0.39 & - &  0.39$\pm$ 0.02 \\
+SR15 &  0.22$\pm$ 0.09 &  0.32$\pm$ 0.13 &  0.17$\pm$ 0.09 &  0.71$\pm$ 0.18 & - &  0.12$\pm$ 0.00 \\
+SR16 &  0.10$\pm$ 0.04 &  0.27$\pm$ 0.11 &  0.21$\pm$ 0.11 &  0.59$\pm$ 0.16 & - &  0.24$\pm$ 0.01 \\
+SR17 &  0.20$\pm$ 0.08 &  0.27$\pm$ 0.11 &  0.29$\pm$ 0.14 &  0.76$\pm$ 0.20 & - &  0.82$\pm$ 0.03 \\

+ 32 - 0
docs/presentation_2018_02_08/v1.01_jetPtCut25.txt

@@ -0,0 +1,32 @@
+>>> [!] no card name specified, so using v1.01_jetPtCut25/card_tttt_srcr.txt
+>>> Making card
+>>> Running combine [combine -M Asymptotic v1.01_jetPtCut25/card_tttt_srcr.txt --noFitAsimov  2>&1 | tee v1.01_jetPtCut25/card_tttt_srcr.log]
+>>> Running combine for significance [combine -M ProfileLikelihood v1.01_jetPtCut25/card_tttt_srcr.txt --significance -t -1 --expectSignal=1  2>&1 | tee -a v1.01_jetPtCut25/card_tttt_srcr.log]
+>>> Running combine for mu [combine -M MaxLikelihoodFit v1.01_jetPtCut25/card_tttt_srcr_asimov.txt --robustFit=1 --saveShapes --saveWithUncertainties  -n name 2>&1 | tee -a v1.01_jetPtCut25/card_tttt_srcr.log]
+------------------------------
+  Exp UL: 17.81 +9.59 -5.96 fb
+  Sig: 1.469 (p-value: 0.071)
+  Mu: 1.000 (+0.851 -0.670)
+------------------------------
+>>> [!] no card name specified, so using v1.01_jetPtCut25/card_tttt_srcr.txt
+18
+$\ttW$      &$\ttZ$      &$\ttH$      &Total       &Data        &$\tttt$      \\
+\hline\hline
+CRZ &  1.31$\pm$ 0.53 & 42.41$\pm$17.08 &  1.83$\pm$ 0.92 & 45.54$\pm$17.11 & 0 &  0.47$\pm$ 0.02 \\
+SR1 & 51.59$\pm$20.78 & 14.04$\pm$ 5.65 & 14.34$\pm$ 7.20 & 79.97$\pm$22.71 & 0 &  0.85$\pm$ 0.03 \\
+SR2 & 11.05$\pm$ 4.45 &  5.04$\pm$ 2.03 &  5.90$\pm$ 2.96 & 21.99$\pm$ 5.72 & - &  1.03$\pm$ 0.04 \\
+SR3 &  5.01$\pm$ 2.02 &  1.80$\pm$ 0.73 &  3.15$\pm$ 1.58 &  9.96$\pm$ 2.66 & - &  1.03$\pm$ 0.04 \\
+SR4 &  2.41$\pm$ 0.97 &  0.75$\pm$ 0.30 &  1.93$\pm$ 0.97 &  5.08$\pm$ 1.40 & - &  1.39$\pm$ 0.06 \\
+SR5 &  4.05$\pm$ 1.63 &  1.58$\pm$ 0.63 &  1.59$\pm$ 0.80 &  7.21$\pm$ 1.92 & - &  0.45$\pm$ 0.02 \\
+SR6 &  1.60$\pm$ 0.64 &  0.80$\pm$ 0.32 &  1.04$\pm$ 0.52 &  3.43$\pm$ 0.89 & - &  0.67$\pm$ 0.03 \\
+SR7 &  0.85$\pm$ 0.34 &  0.23$\pm$ 0.09 &  0.58$\pm$ 0.29 &  1.66$\pm$ 0.46 & - &  0.75$\pm$ 0.03 \\
+SR8 &  0.66$\pm$ 0.27 &  0.06$\pm$ 0.03 &  0.50$\pm$ 0.25 &  1.23$\pm$ 0.37 & - &  1.38$\pm$ 0.06 \\
+SR9 &  0.14$\pm$ 0.06 &  0.14$\pm$ 0.06 &  0.05$\pm$ 0.03 &  0.34$\pm$ 0.09 & - &  0.07$\pm$ 0.00 \\
+SR10 &  0.08$\pm$ 0.03 &  0.10$\pm$ 0.04 &  0.07$\pm$ 0.04 &  0.25$\pm$ 0.06 & - &  0.18$\pm$ 0.01 \\
+SR11 &  0.28$\pm$ 0.11 &  0.04$\pm$ 0.02 &  0.13$\pm$ 0.07 &  0.46$\pm$ 0.13 & - &  0.94$\pm$ 0.04 \\
+SR12 &  4.98$\pm$ 2.01 &  6.41$\pm$ 2.58 &  3.74$\pm$ 1.88 & 15.13$\pm$ 3.77 & - &  0.60$\pm$ 0.02 \\
+SR13 &  0.30$\pm$ 0.12 &  0.77$\pm$ 0.31 &  0.75$\pm$ 0.38 &  1.83$\pm$ 0.51 & - &  0.34$\pm$ 0.01 \\
+SR14 &  0.13$\pm$ 0.05 &  0.71$\pm$ 0.29 &  0.52$\pm$ 0.26 &  1.35$\pm$ 0.39 & - &  0.39$\pm$ 0.02 \\
+SR15 &  0.22$\pm$ 0.09 &  0.32$\pm$ 0.13 &  0.17$\pm$ 0.09 &  0.71$\pm$ 0.18 & - &  0.12$\pm$ 0.00 \\
+SR16 &  0.10$\pm$ 0.04 &  0.27$\pm$ 0.11 &  0.21$\pm$ 0.11 &  0.59$\pm$ 0.16 & - &  0.24$\pm$ 0.01 \\
+SR17 &  0.20$\pm$ 0.08 &  0.27$\pm$ 0.11 &  0.29$\pm$ 0.14 &  0.76$\pm$ 0.20 & - &  0.82$\pm$ 0.03 \\

+ 32 - 0
docs/presentation_2018_02_08/v1.01_jetPtCut30.txt

@@ -0,0 +1,32 @@
+>>> [!] no card name specified, so using v1.01_jetPtCut30/card_tttt_srcr.txt
+>>> Making card
+>>> Running combine [combine -M Asymptotic v1.01_jetPtCut30/card_tttt_srcr.txt --noFitAsimov  2>&1 | tee v1.01_jetPtCut30/card_tttt_srcr.log]
+>>> Running combine for significance [combine -M ProfileLikelihood v1.01_jetPtCut30/card_tttt_srcr.txt --significance -t -1 --expectSignal=1  2>&1 | tee -a v1.01_jetPtCut30/card_tttt_srcr.log]
+>>> Running combine for mu [combine -M MaxLikelihoodFit v1.01_jetPtCut30/card_tttt_srcr_asimov.txt --robustFit=1 --saveShapes --saveWithUncertainties  -n name 2>&1 | tee -a v1.01_jetPtCut30/card_tttt_srcr.log]
+------------------------------
+  Exp UL: 17.53 +9.72 -5.95 fb
+  Sig: 1.529 (p-value: 0.063)
+  Mu: 1.000 (+0.830 -0.660)
+------------------------------
+>>> [!] no card name specified, so using v1.01_jetPtCut30/card_tttt_srcr.txt
+18
+$\ttW$      &$\ttZ$      &$\ttH$      &Total       &Data        &$\tttt$      \\
+\hline\hline
+CRZ &  1.19$\pm$ 0.48 & 39.95$\pm$16.09 &  1.73$\pm$ 0.87 & 42.87$\pm$16.12 & 0 &  0.46$\pm$ 0.02 \\
+SR1 & 55.00$\pm$22.15 & 15.05$\pm$ 6.06 & 16.67$\pm$ 8.37 & 86.72$\pm$24.44 & 0 &  1.22$\pm$ 0.05 \\
+SR2 &  8.28$\pm$ 3.34 &  4.27$\pm$ 1.72 &  4.55$\pm$ 2.28 & 17.10$\pm$ 4.39 & - &  1.19$\pm$ 0.05 \\
+SR3 &  3.02$\pm$ 1.22 &  0.84$\pm$ 0.34 &  1.95$\pm$ 0.98 &  5.80$\pm$ 1.60 & - &  0.89$\pm$ 0.04 \\
+SR4 &  1.13$\pm$ 0.45 &  0.23$\pm$ 0.09 &  1.05$\pm$ 0.53 &  2.41$\pm$ 0.70 & - &  0.96$\pm$ 0.04 \\
+SR5 &  4.92$\pm$ 1.98 &  1.77$\pm$ 0.71 &  1.94$\pm$ 0.98 &  8.62$\pm$ 2.32 & - &  0.71$\pm$ 0.03 \\
+SR6 &  0.98$\pm$ 0.39 &  0.53$\pm$ 0.21 &  0.81$\pm$ 0.41 &  2.32$\pm$ 0.60 & - &  0.80$\pm$ 0.03 \\
+SR7 &  0.60$\pm$ 0.24 &  0.06$\pm$ 0.02 &  0.45$\pm$ 0.23 &  1.11$\pm$ 0.33 & - &  0.78$\pm$ 0.03 \\
+SR8 &  0.43$\pm$ 0.17 &  0.19$\pm$ 0.08 &  0.27$\pm$ 0.14 &  0.89$\pm$ 0.23 & - &  0.95$\pm$ 0.04 \\
+SR9 &  0.17$\pm$ 0.07 &  0.26$\pm$ 0.10 &  0.10$\pm$ 0.05 &  0.53$\pm$ 0.13 & - &  0.14$\pm$ 0.01 \\
+SR10 &  0.07$\pm$ 0.03 &  0.04$\pm$ 0.02 &  0.06$\pm$ 0.03 &  0.17$\pm$ 0.04 & - &  0.26$\pm$ 0.01 \\
+SR11 &  0.24$\pm$ 0.10 &  0.00$\pm$ 0.00 &  0.08$\pm$ 0.04 &  0.32$\pm$ 0.11 & - &  0.78$\pm$ 0.03 \\
+SR12 &  4.86$\pm$ 1.96 &  6.31$\pm$ 2.54 &  3.96$\pm$ 1.99 & 15.13$\pm$ 3.77 & - &  0.72$\pm$ 0.03 \\
+SR13 &  0.21$\pm$ 0.08 &  0.81$\pm$ 0.33 &  0.52$\pm$ 0.26 &  1.54$\pm$ 0.43 & - &  0.32$\pm$ 0.01 \\
+SR14 &  0.03$\pm$ 0.01 &  0.41$\pm$ 0.17 &  0.31$\pm$ 0.15 &  0.74$\pm$ 0.23 & - &  0.25$\pm$ 0.01 \\
+SR15 &  0.31$\pm$ 0.13 &  0.42$\pm$ 0.17 &  0.24$\pm$ 0.12 &  0.98$\pm$ 0.25 & - &  0.18$\pm$ 0.01 \\
+SR16 &  0.09$\pm$ 0.03 &  0.06$\pm$ 0.02 &  0.22$\pm$ 0.11 &  0.36$\pm$ 0.12 & - &  0.30$\pm$ 0.01 \\
+SR17 &  0.14$\pm$ 0.06 &  0.27$\pm$ 0.11 &  0.18$\pm$ 0.09 &  0.60$\pm$ 0.15 & - &  0.67$\pm$ 0.03 \\

+ 1 - 1
filval-python

@@ -1 +1 @@
-Subproject commit 111a2f24eb792dc40db991a810bcf6bf90a60fa3
+Subproject commit 9275e55ed3d691c4c48505eaa4a463a51ddbcc9f

+ 212 - 0
jet_pt_studies.py

@@ -0,0 +1,212 @@
+#!/usr/bin/env python
+import re
+import numpy as np
+import matplotlib.pyplot as plt
+
+from filval.plotting import (decl_plot, render_plots, hist_plot, Plot, generate_dashboard, hists_to_table)
+from filval.histogram import hist, hist_add
+
+X_TICKS = ['CRZ', 'CRW']+[f'SR{i}' for i in range(1, 17)]
+
+
+def read_yields(tag, postfit=False):
+    import ROOT
+    f = ROOT.TFile.Open(f'data/JetPtStudies/{tag}/mlfit.root')
+    hists = {'tttt': hist(f.Get('shapes_prefit/SS/tttt')),
+             'ttw': hist(f.Get('shapes_prefit/SS/ttw')),
+             'ttz': hist(f.Get('shapes_prefit/SS/ttz')),
+             'tth': hist(f.Get('shapes_prefit/SS/tth'))
+             }
+    try:
+        hists['fakes_mc'] = hist(f.Get('shapes_prefit/SS/fakes_mc'))
+    except:
+        print(tag, 'has no fakes_mc')
+        hists['fakes_mc'] = None
+    return hists
+
+
+def set_xticks():
+    plt.xticks([x-0.5 for x in range(1, 19)], X_TICKS, rotation=60)
+
+
+@decl_plot
+def plot_yields(bJetPt):
+    """\
+[SR Definitions](https://github.com/cfangmeier/FTAnalysis/blob/new_baseline/analysis/misc/signal_regions.h#L127)
+    """
+    _, ((ax_tttt, ax_ttw), (ax_ttz, ax_tth)) = plt.subplots(2, 2)
+    if bJetPt == 25:
+        cut_40 = read_yields('v1.0.4_JetPtCut40')
+        cut_35 = read_yields('v1.0.4_JetPtCut35')
+        cut_30 = read_yields('v1.0.4_JetPtCut30')
+        cut_25 = read_yields('v1.0.4_JetPtCut25')
+        cut_20 = read_yields('v1.0.4_JetPtCut20')
+    else:  # bJetPt == 20
+        cut_40 = read_yields('v1.0.4_bJetPtCut20JetPtCut40')
+        cut_35 = read_yields('v1.0.4_bJetPtCut20JetPtCut35')
+        cut_30 = read_yields('v1.0.4_bJetPtCut20JetPtCut30')
+        cut_25 = read_yields('v1.0.4_bJetPtCut20JetPtCut25')
+        cut_20 = read_yields('v1.0.4_bJetPtCut20JetPtCut20')
+
+    def do_plot(axis, key):
+        plt.sca(axis)
+        hist_plot(cut_40[key], label="Jet $P_T>$40", include_errors=True)
+        hist_plot(cut_35[key], label="Jet $P_T>$35", include_errors=True)
+        hist_plot(cut_30[key], label="Jet $P_T>$30", include_errors=True)
+        hist_plot(cut_25[key], label="Jet $P_T>$25", include_errors=True)
+        hist_plot(cut_20[key], label="Jet $P_T>$20", include_errors=True)
+        plt.title(key)
+        set_xticks()
+
+    do_plot(ax_tttt, 'tttt')
+    do_plot(ax_ttw, 'ttw')
+    plt.legend()
+    do_plot(ax_ttz, 'ttz')
+    do_plot(ax_tth, 'tth')
+
+    tables = []
+    for cut, label in zip([cut_40, cut_35, cut_30, cut_25, cut_20],
+                        ["Jet $P_T>$40", "Jet $P_T>$35", "Jet $P_T>$30", "Jet $P_T>$25", "Jet $P_T>$20"]):
+        tables.append(f'<h3>{label}</h3>')
+        tables.append(hists_to_table([cut['tttt'], cut['ttw'], cut['tth'], cut['ttz']],
+                                     column_labels=X_TICKS, row_labels=['TTTT', 'TTW', 'TTH', 'TTZ']))
+    return ''.join(tables)
+
+
+@decl_plot
+def plot_yields_ratio():
+    _, ((ax_tttt, ax_ttw), (ax_ttz, ax_tth)) = plt.subplots(2, 2)
+    cut_40 = read_yields('v1.0.4_JetPtCut40')
+    cut_35 = read_yields('v1.0.4_JetPtCut35')
+    cut_30 = read_yields('v1.0.4_JetPtCut30')
+    cut_25 = read_yields('v1.0.4_JetPtCut25')
+    cut_20 = read_yields('v1.0.4_JetPtCut20')
+
+    def do_plot(axis, key):
+        plt.sca(axis)
+        c35 = (cut_35[key][0] / cut_40[key][0], *cut_35[key][1:])
+        c30 = (cut_30[key][0] / cut_40[key][0], *cut_30[key][1:])
+        c25 = (cut_25[key][0] / cut_40[key][0], *cut_25[key][1:])
+        c20 = (cut_20[key][0] / cut_40[key][0], *cut_25[key][1:])
+        hist_plot(c35, label="Jet $P_T>$35")
+        hist_plot(c30, label="Jet $P_T>$30")
+        hist_plot(c25, label="Jet $P_T>$25")
+        hist_plot(c20, label="Jet $P_T>$20")
+        plt.title(key)
+        axis.set_ylim((0, 10))
+        set_xticks()
+
+    do_plot(ax_tttt, 'tttt')
+    plt.legend()
+    do_plot(ax_ttw, 'ttw')
+    do_plot(ax_ttz, 'ttz')
+    do_plot(ax_tth, 'tth')
+
+
+@decl_plot
+def plot_signal_over_background(tags):
+    cuts = [read_yields(tag) for tag in tags]
+
+    def clean_label(label):
+        return label.replace('_', r'\_')
+
+    def do_plot_significance(hists, label):
+        background = hist_add(hists['ttw'], hists['ttz'], hists['tth'])
+        tttt = hists['tttt']
+        ttw = hists['ttw'][0]
+        ttz = hists['ttz'][0]
+        tth = hists['tth'][0]
+        sigma2_bg = (0.4*ttw)**2 + (0.4*ttz)**2 + (0.5*tth)**2
+        if hists['fakes_mc'] is not None:
+            fakes_mc = hists['fakes_mc']
+            background = hist_add(background, fakes_mc)
+            sigma2_bg += (0.2*fakes_mc[0])**2
+        ratio = tttt[0] / np.sqrt(tttt[0] + background[0] + sigma2_bg), *tttt[1:]
+        hist_plot(ratio, label=clean_label(label))
+
+    plt.sca(plt.subplot(221))
+    for cut, tag in zip(cuts, tags):
+        signal = cut['tttt']
+        hist_plot(signal, label=clean_label(tag))
+    set_xticks()
+    plt.ylabel('TTTT')
+    plt.ylim((0, 10))
+
+    plt.sca(plt.subplot(222))
+    for cut, tag in zip(cuts, tags):
+        background = hist_add(cut['ttw'], cut['ttz'], cut['tth'])
+        hist_plot(background, label=clean_label(tag))
+    set_xticks()
+    plt.ylabel('TTW+TTZ+TTH+MCFakes')
+    plt.ylim((0, 10))
+
+    plt.sca(plt.subplot(212))
+    for cut, tag in zip(cuts, tags):
+        do_plot_significance(cut, tag)
+    set_xticks()
+    plt.ylabel(r'SIG / $\sqrt{SIG+BG + \sigma_{BG}^2}$')
+
+    plt.legend()
+    tables = []
+    for cut, tag in zip(cuts, tags):
+        tables.append(f'<h3>{tag}</h3>')
+        tables.append(hists_to_table([cut['tttt'], cut['ttw'], cut['tth'], cut['ttz']],
+                                     column_labels=X_TICKS, row_labels=['TTTT', 'TTW', 'TTH', 'TTZ']))
+    return ''.join(tables)
+
+
+@decl_plot
+def plot_sigs(include_fakes):
+    """\
+    Significances above only include TTZ, TTW, TTH, and (optionally) MC-Fakes(TTBar) backgrounds.
+    """
+
+    def get_sig(tag):
+        regex = re.compile('Sig: ([0-9.]+)')
+        ext = '' if include_fakes else '_nofakes'
+        with open(f'data/JetPtStudies/{tag}{ext}.txt') as f:
+            sig = float(regex.findall(f.read())[0])
+        return sig
+
+    sigs_b25 = {n: get_sig(f'v1.0.4_JetPtCut{n}') for n in [40, 35, 30, 25, 20]}
+    sigs_b20 = {n: get_sig(f'v1.0.4_bJetPtCut20JetPtCut{n}') for n in [40, 35, 30, 25, 20]}
+
+    plt.scatter(*zip(*sigs_b25.items()), label="bJetMinPt=25")
+    for key, val in sigs_b25.items():
+        plt.text(key, val-0.1, f'{key}: {val:0.3f}')
+
+    plt.scatter(*zip(*sigs_b20.items()), label="bJetMinPt=20")
+    for key, val in sigs_b20.items():
+        plt.text(key, val+0.1, f'{key}: {val:0.3f}')
+
+    plt.ylabel('Significance')
+    plt.xlabel('Jet $P_T$ Cut')
+    plt.xticks([20, 25, 30, 35, 40])
+    plt.xlim((18, 43))
+    plt.ylim((0, 3.0))
+    plt.legend()
+
+
+def main():
+    sig_o_bg = plot_signal_over_background, (['v1.0.4_JetPtCut40', 'v1.0.4_JetPtCut25', 'v1.0.4_JetPtCut20'],)
+    sig_o_bg2 = plot_signal_over_background, (['v1.0.4_JetPtCut25', 'v1.0.4_bJetPtCut20JetPtCut25'],)
+
+    plots = [
+        Plot((plot_yields, (25,)), 'Prefit Yields (bJetPt>25)'),
+        Plot((plot_yields, (20,)), 'Prefit Yields (bJetPt>20)'),
+        Plot(plot_yields_ratio, 'Prefit Yields Relative to Baseline'),
+        Plot((plot_sigs, (True,)), 'Significances with Fakes'),
+        Plot((plot_sigs, (False,)), 'Significances w/o Fakes'),
+        Plot(sig_o_bg, 'Binned Yields with variable JetPt'),
+        Plot(sig_o_bg2, 'Binned Yields with variable bJetPt'),
+    ]
+
+    render_plots(plots, to_disk=False)
+    generate_dashboard(plots, 'New Baseline Yields - Various JetPt Cuts',
+                       output='new_baseline_yields_jet_pt_cuts.html',
+                       source=__file__,
+                       )
+
+
+if __name__ == '__main__':
+    main()

+ 4 - 3
publish.py

@@ -3,14 +3,15 @@ from datetime import datetime as dt
 from subprocess import run
 
 dir_name = f'yields_{dt.strftime(dt.now(), "%Y_%m_%d_%H")}'
-remote = 'caleb@fangmeier.tech:/var/www/tttt/tau/'
+par_dir = "tau"
+remote = f'caleb@fangmeier.tech:/var/www/tttt/{par_dir}/'
 run(('rm', '-rf', dir_name))
 run(('mkdir', '-p', dir_name+'/output'))
-run(('cp', '-r', 'data', dir_name))
+# run(('cp', '-r', 'data', dir_name))
 run(('cp', '-r', 'output', dir_name))
 
 run(('scp', '-r', dir_name, remote))
-print(f'Data available at https://tttt.fangmeier.tech/tau/{dir_name}/')
+print(f'Data available at https://tttt.fangmeier.tech/{par_dir}/{dir_name}/')
 
 
 

+ 153 - 167
yields.py

@@ -3,21 +3,37 @@ import numpy as np
 import matplotlib.pyplot as plt
 
 from filval.result_set import ResultSet
-from filval.histogram import hist, hist2d, hist_add, hist_norm, hist_scale, hist2d_norm
+from filval.histogram import hist, hist2d, hist_add, hist_sub, hist_div, hist_norm, hist_scale, hist2d_norm
 from filval.plotting import (decl_plot, render_plots, hist_plot, hist_plot_stack, hist2d_plot,
                              Plot, generate_dashboard, hists_to_table)
 
-an_tttt = ([0.47, 0.33, 0.18, 0.78, 0.49, 0.52, 0.33, 0.49],
-           [0, 0, 0,  0, 0, 0, 0, 0], [0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5])
-an_ttw = ([2.29663, 0.508494, 0.161166, 1.03811, 0.256401, 0.127582, 0.181522, 0.141659],
-          [0, 0, 0,  0, 0, 0, 0, 0], [0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5])
-an_ttz = ([0.974751, 0.269195, 1e-06, 0.395831, 0.0264703, 0.06816, 0.8804, 0.274265],
-          [0, 0, 0,  0, 0, 0, 0, 0], [0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5])
-an_tth = ([1.13826, 0.361824, 0.162123, 0.683917, 0.137608, 0.0632719, 0.554491, 0.197864],
-          [0, 0, 0,  0, 0, 0, 0, 0], [0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5])
+
+def set_xticks():
+    x_ticks = [f'SR{i}' for i in range(1, 17)]
+    plt.xticks([x for x in range(1, 17)], x_ticks, rotation=60)
+
+
+def get_sr(rs, tau_category, tm=False):
+    if tm:
+        if tau_category == 0:
+            return hist(rs.SRs_0tmtau)
+        if tau_category == 1:
+            return hist(rs.SRs_1tmtau)
+        elif tau_category == 2:
+            return hist(rs.SRs_2tmtau)
+    else:
+        if tau_category == -1:
+            return hist(rs.ignore_tau_SRs)
+        elif tau_category == 0:
+            return hist(rs.SRs_0tau)
+        elif tau_category == 1:
+            return hist(rs.SRs_1tau)
+        elif tau_category == 2:
+            return hist(rs.SRs_2tau)
+
 
 @decl_plot
-def plot_yield_grid(rss, tau_category=-1):
+def plot_yield_grid(tau_category=-1):
     r"""## Event Yield
 
     The event yield for the eight signal regions defined in AN-17-115. Data is normalized
@@ -36,61 +52,43 @@ def plot_yield_grid(rss, tau_category=-1):
     Truth-matched taus are those that match within $\delta R < 0.3$ with gen-level taus that pass the flag `fromHardProcessDecayed`.
     """
 
-    def get_sr(rs, tm=False):
-        if tm:
-            if tau_category == 0:
-                return hist(rs.SRs_0tmtau)
-            if tau_category == 1:
-                return hist(rs.SRs_1tmtau)
-            elif tau_category == 2:
-                return hist(rs.SRs_2tmtau)
-        else:
-            if tau_category == -1:
-                return hist(rs.ignore_tau_SRs)
-            elif tau_category == 0:
-                return hist(rs.SRs_0tau)
-            elif tau_category == 1:
-                return hist(rs.SRs_1tau)
-            elif tau_category == 2:
-                return hist(rs.SRs_2tau)
-
     _, ((ax_tttt, ax_ttw), (ax_ttz, ax_tth)) = plt.subplots(2, 2)
-    tttt, ttw, ttz, tth = [get_sr(rs) for rs in rss]
-    tm_tttt, tm_ttw, tm_ttz, tm_tth = [get_sr(rs, True) for rs in rss]
+    tttt, ttw, ttz, tth = [get_sr(rs, tau_category) for rs in rss]
+    tm_tttt, tm_ttw, tm_ttz, tm_tth = [get_sr(rs, tau_category, True) for rs in rss]
 
     plt.sca(ax_tttt)
-    hist_plot(tttt, title='TTTT', stats=False, label='Mock', include_errors=True)
-    if tau_category == -1 and len(tttt[0]) == len(an_tttt[0]):
-        hist_plot(an_tttt, title='TTTT', stats=False, label='AN')
-    elif tau_category >= 0:
-        hist_plot(tm_tttt, title='TTTT', stats=False, label='Truth-Matched Taus', include_errors=True)
+    plt.title('TTTT')
+    hist_plot(tttt, stats=False, label='Mock Analysis', include_errors=True)
+    if tau_category >= 0:
+        hist_plot(tm_tttt, stats=False, label='Truth-Matched Taus', include_errors=True)
     plt.ylim((0, None))
+    set_xticks()
 
     plt.sca(ax_ttw)
-    hist_plot(ttw, title='TTW', stats=False, label='Mock', include_errors=True)
-    if tau_category == -1 and len(tttt[0]) == len(an_tttt[0]):
-        hist_plot(an_ttw, title='TTW', stats=False, label='AN')
-    elif tau_category >= 0:
-        hist_plot(tm_ttw, title='TTW', stats=False, label='Truth-Matched Taus', include_errors=True)
+    plt.title('TTW')
+    hist_plot(ttw, stats=False, label='Mock Analysis', include_errors=True)
+    if tau_category >= 0:
+        hist_plot(tm_ttw, stats=False, label='Truth-Matched Taus', include_errors=True)
     plt.ylim((0, None))
+    set_xticks()
     plt.legend()
 
     plt.sca(ax_ttz)
-    hist_plot(ttz, title='TTZ', stats=False, label='Mock', include_errors=True)
-    if tau_category == -1 and len(tttt[0]) == len(an_tttt[0]):
-        hist_plot(an_ttz, title='TTZ', stats=False, label='AN')
-    elif tau_category >= 0:
-        hist_plot(tm_ttz, title='TTZ', stats=False, label='Truth-Matched Taus', include_errors=True)
+    plt.title('TTZ')
+    hist_plot(ttz, stats=False, label='Mock Analysis', include_errors=True)
+    if tau_category >= 0:
+        hist_plot(tm_ttz, stats=False, label='Truth-Matched Taus', include_errors=True)
     plt.ylim((0, None))
+    set_xticks()
     plt.xlabel('Signal Region')
 
     plt.sca(ax_tth)
-    hist_plot(tth, title='TTH', stats=False, label='Mock', include_errors=True)
-    if tau_category == -1 and len(tttt[0]) == len(an_tttt[0]):
-        hist_plot(an_tth, title='TTH', stats=False, label='AN')
-    elif tau_category >= 0:
-        hist_plot(tm_tth, title='TTH', stats=False, label='Truth-Matched Taus', include_errors=True)
+    plt.title('TTH')
+    hist_plot(tth, stats=False, label='Mock Analysis', include_errors=True)
+    if tau_category >= 0:
+        hist_plot(tm_tth, stats=False, label='Truth-Matched Taus', include_errors=True)
     plt.ylim((0, None))
+    set_xticks()
     plt.xlabel('Signal Region')
 
     def to_table(hists):
@@ -99,17 +97,14 @@ def plot_yield_grid(rss, tau_category=-1):
 
     tables = '<h2>Mock</h2>'
     tables += to_table([tttt, ttw, ttz, tth])
-    if tau_category == -1:
-        tables += '<h2>AN</h2>'
-        tables += to_table([an_tttt, an_ttw, an_ttz, an_tth])
-    elif tau_category >= 0:
+    if tau_category >= 0:
         tables += '<h2>TM Taus</h2>'
         tables += to_table([tm_tttt, tm_ttw, tm_ttz, tm_tth])
     return tables
 
 
 @decl_plot
-def plot_yield_v_gen(rss, tau_category=-1):
+def plot_yield_v_gen(tau_category=-1):
     r"""## Event Yield Vs. # of Generated Taus
 
     """
@@ -148,7 +143,7 @@ def plot_yield_v_gen(rss, tau_category=-1):
 
 
 @decl_plot
-def plot_nGen_v_nSel(rss):
+def plot_nGen_v_nSel():
     _, ((ax_tttt, ax_ttw), (ax_ttz, ax_tth)) = plt.subplots(2, 2)
     tttt, ttw, ttz, tth = [hist2d(rs.nGen_v_RecoTaus_in_SR) for rs in rss]
 
@@ -174,7 +169,7 @@ def plot_nGen_v_nSel(rss):
 
 
 @decl_plot
-def plot_yield_stack(rss):
+def plot_yield_stack():
     r"""## Event Yield - Stacked
 
     The event yield for the eight signal regions defined in AN-17-115. Data is normalized
@@ -192,7 +187,7 @@ def plot_yield_stack(rss):
 
 
 @decl_plot
-def plot_lep_multi(rss, dataset):
+def plot_lep_multi(dataset):
     _, (ax_els, ax_mus, ax_taus) = plt.subplots(3, 1)
     els = list(map(lambda rs: hist_norm(hist(rs.nEls)), rss))
     mus = list(map(lambda rs: hist_norm(hist(rs.nMus)), rss))
@@ -217,20 +212,20 @@ def plot_lep_multi(rss, dataset):
 
 
 @decl_plot
-def plot_sig_strength(rss):
+def plot_sig_strength(tau_category, tm):
     r""" The signal strength of the TTTT signal defined as
 
-    $\frac{S}{\sqrt{S+B}}$
+    $\frac{S}{\sqrt{S+B+\sigma_B^2}}$
 
     """
-    tttt, ttw, ttz, tth = map(lambda rs: hist(rs.SRs), rss)
+    tttt, ttw, ttz, tth = map(lambda rs: get_sr(rs, tau_category, tm), rss)
     bg = hist_add(ttw, ttz, tth)
-    strength = tttt[0] / np.sqrt(tttt[0] + bg[0])
+    strength = tttt[0] / np.sqrt(tttt[0] + bg[0] + bg[1]**2)
     hist_plot((strength, tttt[1], tttt[2]), stats=False)
 
 
 @decl_plot
-def plot_event_obs(rss, dataset, in_signal_region=True):
+def plot_event_obs(dataset, in_sr=True):
     r"""The distribution of $N_{jet}$, $N_{Bjet}$, MET, and $H_T$ in either all events
     or only signal region (igoring taus) events.
 
@@ -245,7 +240,7 @@ def plot_event_obs(rss, dataset, in_signal_region=True):
 
     def _plot(ax, obs):
         plt.sca(ax)
-        if in_signal_region:
+        if in_sr:
             h = {'MET': rs.met_in_SR,
                  'HT': rs.ht_in_SR,
                  'NJET': rs.njet_in_SR,
@@ -255,7 +250,8 @@ def plot_event_obs(rss, dataset, in_signal_region=True):
                  'HT': rs.ht,
                  'NJET': rs.njet,
                  'NBJET': rs.nbjet}[obs]
-        hist_plot(hist(h), stats=False, label=dataset, xlabel=obs)
+        hist_plot(hist(h), stats=False, label=dataset)
+        plt.xlabel(obs)
 
     _plot(ax_njet, 'NJET')
     _plot(ax_nbjet, 'NBJET')
@@ -264,7 +260,7 @@ def plot_event_obs(rss, dataset, in_signal_region=True):
 
 
 @decl_plot
-def plot_event_obs_stack(rss, in_signal_region=True):
+def plot_event_obs_stack(in_signal_region=True):
     r"""
 
     """
@@ -293,25 +289,51 @@ def plot_event_obs_stack(rss, in_signal_region=True):
     _plot(ax_ht, 'HT')
     _plot(ax_met, 'MET')
 
-# @decl_plot
-# def plot_s_over_b(rss):
-#     def get_sr(rs):
-#         h = None
-#         if tau_category == 0:
-#             h = rs.SRs_0tmtau_diff_nGenTau
-#         if tau_category == 1:
-#             h = rs.SRs_1tmtau_diff_nGenTau
-#         elif tau_category == 2:
-#             h = rs.SRs_2tmtau_diff_nGenTau
-#         return hist2d_norm(hist2d(h), norm=1, axis=0)
-#
-#     _, ((ax_tttt, ax_ttw), (ax_ttz, ax_tth)) = plt.subplots(2, 2)
-#     tttt =
-#     ttw, ttz, tth = [get_sr(rs) for rs in rss]
-#     pass
 
 @decl_plot
-def plot_tau_efficiency(rss):
+def plot_s_over_b(tau_category):
+
+    tttt, ttw, ttz, tth = [get_sr(rs, tau_category) for rs in rss]
+    sig = get_sr(rss[0], tau_category, tm=True)
+    fake_tttt = hist_sub(tttt, sig)
+
+    total_bg = hist_add(fake_tttt, ttw, ttz, tth)
+
+    plt.subplot(3, 1, 1)
+    hist_plot(total_bg, include_errors=True, label="TTV+TTH+Fake TTTT")
+    hist_plot(sig, include_errors=True, label="Truth Matched TTTT")
+    plt.ylabel('\\# Events')
+    plt.ylim((0, 5.5))
+    set_xticks()
+    plt.legend()
+
+    plt.subplot(3, 1, 2)
+    hist_plot(hist_div(sig, total_bg), label="ratio", color='k')
+    plt.ylabel('Ratio')
+    plt.ylim((0, 2.7))
+    set_xticks()
+
+    plt.subplot(3, 1, 3)
+    bg_vals, bg_errs, _ = total_bg
+    sig_vals, _, _ = sig
+    den = np.sqrt(sig_vals + bg_vals + bg_errs**2)
+    sig = sig_vals / den, *sig[1:]
+
+    hist_plot(sig, color='k')
+    plt.ylabel(r'$S/\sqrt{S+B+\sigma_B^2}$')
+    plt.ylim((0, 0.5))
+    set_xticks()
+
+    # tables = '<h2>Mock</h2>'
+    # tables += to_table([total_bg, ttw, ttz, tth])
+    # if tau_category >= 0:
+    #     tables += '<h2>TM Taus</h2>'
+    #     tables += to_table([tm_tttt, tm_ttw, tm_ttz, tm_tth])
+    # return tables
+
+
+@decl_plot
+def plot_tau_efficiency():
     _, ((ax_tttt, ax_ttw), (ax_ttz, ax_tth)) = plt.subplots(2, 2)
     tttt, ttw, ttz, tth = list(map(lambda rs: hist(rs.tau_efficiency_v_pt), rss))
 
@@ -324,14 +346,16 @@ def plot_tau_efficiency(rss):
         hist_plot(h, stats=False, label=dataset, include_errors=True)
         plt.text(200, 0.05, dataset)
         plt.xlabel(r"$P_T$(GeV)")
+        plt.ylim((0, 1.1))
 
     _plot(ax_tttt, 'TTTT')
     _plot(ax_ttw, 'TTW')
     _plot(ax_ttz, 'TTZ')
     _plot(ax_tth, 'TTH')
 
+
 @decl_plot
-def plot_tau_purity(rss):
+def plot_tau_purity():
     _, ((ax_tttt, ax_ttw), (ax_ttz, ax_tth)) = plt.subplots(2, 2)
     tttt, ttw, ttz, tth = list(map(lambda rs: hist(rs.tau_purity_v_pt), rss))
 
@@ -344,6 +368,7 @@ def plot_tau_purity(rss):
         hist_plot(h, stats=False, label=dataset, include_errors=True)
         plt.text(200, 0.05, dataset)
         plt.xlabel(r"$P_T$(GeV)")
+        plt.ylim((0, 1.1))
 
     _plot(ax_tttt, 'TTTT')
     _plot(ax_ttw, 'TTW')
@@ -352,119 +377,80 @@ def plot_tau_purity(rss):
 
 
 if __name__ == '__main__':
-    data_path = 'data/output_testing/'
+    ext = ""
+    # ext = "_dr03"
+    data_path = f'data/TauStudies/output{ext}/'
     save_plots = False
-    # First create a ResultSet object which loads all of the objects from root file
-    # into memory and makes them available as attributes
+
     rss = (ResultSet("tttt", data_path+'yield_tttt.root'),
            ResultSet("ttw", data_path+'yield_ttw.root'),
            ResultSet("ttz", data_path+'yield_ttz.root'),
            ResultSet("tth", data_path+'yield_tth.root'))
 
-    # Next, declare all of the (sub)plots that will be assembled into full
-    # figures later
-    yield_tau_ignore_tau = plot_yield_grid, (rss, -1)
-    yield_tau_0tau = plot_yield_grid, (rss, 0)
-    yield_tau_1tau = plot_yield_grid, (rss, 1)
-    yield_tau_2tau = plot_yield_grid, (rss, 2)
-
-    tttt_event_obs_in_sr = plot_event_obs, (rss, 'TTTT'), {'in_signal_region': True}
-    ttw_event_obs_in_sr = plot_event_obs, (rss, 'TTW'), {'in_signal_region': True}
-    ttz_event_obs_in_sr = plot_event_obs, (rss, 'TTZ'), {'in_signal_region': True}
-    tth_event_obs_in_sr = plot_event_obs, (rss, 'TTH'), {'in_signal_region': True}
+    tttt_event_obs_in_sr = plot_event_obs, ('TTTT',), {'in_sr': True}
+    ttw_event_obs_in_sr = plot_event_obs, ('TTW',), {'in_sr': True}
+    ttz_event_obs_in_sr = plot_event_obs, ('TTZ',), {'in_sr': True}
+    tth_event_obs_in_sr = plot_event_obs, ('TTH',), {'in_sr': True}
 
-    tttt_event_obs = plot_event_obs, (rss, 'TTTT'), {'in_signal_region': False}
-    ttw_event_obs = plot_event_obs, (rss, 'TTW'), {'in_signal_region': False}
-    ttz_event_obs = plot_event_obs, (rss, 'TTZ'), {'in_signal_region': False}
-    tth_event_obs = plot_event_obs, (rss, 'TTH'), {'in_signal_region': False}
+    tttt_event_obs = plot_event_obs, ('TTTT',), {'in_sr': False}
+    ttw_event_obs = plot_event_obs, ('TTW',), {'in_sr': False}
+    ttz_event_obs = plot_event_obs, ('TTZ',), {'in_sr': False}
+    tth_event_obs = plot_event_obs, ('TTH',), {'in_sr': False}
 
-    tttt_lep_multi = plot_lep_multi, (rss, 'TTTT')
-    ttw_lep_multi = plot_lep_multi, (rss, 'TTW')
-    ttz_lep_multi = plot_lep_multi, (rss, 'TTZ')
-    tth_lep_multi = plot_lep_multi, (rss, 'TTH')
+    tttt_lep_multi = plot_lep_multi, ('TTTT',)
+    ttw_lep_multi = plot_lep_multi, ('TTW',)
+    ttz_lep_multi = plot_lep_multi, ('TTZ',)
+    tth_lep_multi = plot_lep_multi, ('TTH',)
 
-    yield_v_gen_0tm = plot_yield_v_gen, (rss, 0)
-    yield_v_gen_1tm = plot_yield_v_gen, (rss, 1)
-    yield_v_gen_2tm = plot_yield_v_gen, (rss, 2)
-    nGen_v_nSel = plot_nGen_v_nSel, (rss,)
-
-    tau_efficiency = plot_tau_efficiency, (rss, )
-    tau_purity = plot_tau_purity, (rss, )
+    yield_v_gen_0tm = plot_yield_v_gen, (0,)
+    yield_v_gen_1tm = plot_yield_v_gen, (1,)
+    yield_v_gen_2tm = plot_yield_v_gen, (2,)
+    nGen_v_nSel = plot_nGen_v_nSel
 
     # Now assemble the plots into figures.
     plots = [
-        Plot([[yield_tau_ignore_tau]],
+
+        Plot((plot_yield_grid, (-1,)),
              'Yield Ignoring Taus'),
-        Plot([[yield_tau_0tau]],
-             'Yield For events with 0 Tau'),
-        Plot([[yield_tau_1tau]],
-             'Yield For events with 1 Tau'),
-        Plot([[yield_tau_2tau]],
-             'Yield For events with 2 or more Tau'),
-
-        # Plot([[yield_v_gen_0tm]],
-        #      'Yield For events with 0 TM Tau Vs Gen Tau'),
-        # Plot([[yield_v_gen_1tm]],
-        #      'Yield For events with 1 TM Tau Vs Gen Tau'),
-        # Plot([[yield_v_gen_2tm]],
-        #      'Yield For events with 2 TM Tau Vs Gen Tau'),
-        Plot([[nGen_v_nSel]],
+        Plot((plot_yield_grid, (0,)), 'Yield For events with 0 Tau'),
+        Plot((plot_s_over_b, (0,)), 'Real TTTT and Total BG - 0 Tau'),
+        Plot((plot_yield_grid, (1,)), 'Yield For events with 1 Tau'),
+        Plot((plot_s_over_b, (1,)), 'Real TTTT and Total BG - 1 Tau'),
+        Plot((plot_yield_grid, (2,)), 'Yield For events with 2 or more Tau'),
+        Plot((plot_s_over_b, (2,)), 'Real TTTT and Total BG - 2 or more Tau'),
+        Plot(nGen_v_nSel,
              r'#Generated tau vs. #Selected tau'),
-
-        Plot([[tttt_lep_multi]],
+        Plot(tttt_lep_multi,
              'Lepton Multiplicity - TTTT'),
-        Plot([[ttw_lep_multi]],
+        Plot(ttw_lep_multi,
              'Lepton Multiplicity - TTW'),
-        Plot([[ttz_lep_multi]],
+        Plot(ttz_lep_multi,
              'Lepton Multiplicity - TTZ'),
-        Plot([[tth_lep_multi]],
+        Plot(tth_lep_multi,
              'Lepton Multiplicity - TTH'),
-        Plot([[tttt_event_obs_in_sr]],
+        Plot(tttt_event_obs_in_sr,
              'TTTT - Event Observables (In SR)'),
-        Plot([[ttw_event_obs_in_sr]],
+        Plot(ttw_event_obs_in_sr,
              'TTW - Event Observables (In SR)'),
-        Plot([[ttz_event_obs_in_sr]],
+        Plot(ttz_event_obs_in_sr,
              'TTZ - Event Observables (In SR)'),
-        Plot([[tth_event_obs_in_sr]],
+        Plot(tth_event_obs_in_sr,
              'TTH - Event Observables (In SR)'),
 
-        Plot([[tau_efficiency]],
+        Plot(plot_tau_efficiency,
              'Tau Efficiency'),
-        Plot([[tau_purity]],
+        Plot(plot_tau_purity,
              'Tau Purity'),
-        # Plot([[tttt_event_obs]],
-        #      'TTTT - Event Observables (All Events)'),
-        # Plot([[ttw_event_obs]],
-        #      'TTW - Event Observables (All Events)'),
-        # Plot([[ttz_event_obs]],
-        #      'TTZ - Event Observables (All Events)'),
-        # Plot([[tth_event_obs]],
-        #      'TTH - Event Observables (All Events)'),
-
-        # Plot([[yield_notau]],
-        #      'Yield Without Tau'),
-        # Plot([[yield_tau_stack]],
-        #      'Yield With Tau Stacked'),
-        # Plot([[yield_notau_stack]],
-        #      'Yield Without Tau Stacked'),
-        # Plot([[yield_tau_stack],
-        #       [yield_notau_stack]],
-        #      'Event Yield, top: with tau, bottom: no tau'),
-        # Plot([[sig_strength_tau],
-        #       [sig_strength_notau]],
-        #      'Signal Strength'),
-        # Plot([[event_obs_stack]],
-        #      'Event Observables'),
     ]
 
     # Finally, render and save the plots and generate the html+bootstrap
     # dashboard to view them
     render_plots(plots, to_disk=save_plots)
     if not save_plots:
-        generate_dashboard(plots, 'TTTT Yields',
-                           output='yields.html',
+        with open(data_path+'config.yaml') as f:
+            config_txt = f.read()
+        generate_dashboard(plots, 'Tau Studies',
+                           output=f'tau_studies{ext}.html',
                            source=__file__,
-                           ana_source=("https://github.com/cfangmeier/FTAnalysis/commit/"
-                                       "0cbdac4509391fffb9fff87d0521b7dd0a30a55c"),
-                           config=data_path+'config.yaml'
+                           config=config_txt
                            )