Newer
Older
Presentations / Zurich_group / 30_06_2014 / MMatrix.tex
@mchrzasz mchrzasz on 13 Aug 2014 11 KB update
  1. \documentclass[xcolor=svgnames]{beamer}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage[english]{babel}
  4. \usepackage{polski}
  5. %\usepackage{amssymb,amsmath}
  6. %\usepackage[latin1]{inputenc}
  7. %\usepackage{amsmath}
  8. %\newcommand\abs[1]{\left|#1\right|}
  9. \usepackage{amsmath}
  10. \newcommand\abs[1]{\left|#1\right|}
  11. \usepackage{hepnicenames}
  12. \usepackage{hepunits}
  13. \usepackage{color}
  14.  
  15. \setbeamertemplate{footline}{\insertframenumber/\inserttotalframenumber}
  16. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
  17. \definecolor{mygreen}{cmyk}{0.82,0.11,1,0.25}
  18.  
  19.  
  20. \usetheme{Sybila}
  21.  
  22. \title[Unfolding for counting experiments]{Unfolding for counting experiments}
  23. \author{Marcin Chrz\k{a}szcz$^{1,2}$, Nicola Serra$^{1}$}
  24. \institute{$^1$~University of Zurich,\\ $^2$~Institute of Nuclear Physics, Krakow}
  25. \date{\today}
  26. \begin{document}
  27. % --------------------------- SLIDE --------------------------------------------
  28. \frame[plain]{\titlepage}
  29. \author{Marcin Chrz\k{a}szcz}
  30. % ------------------------------------------------------------------------------
  31. % --------------------------- SLIDE --------------------------------------------
  32.  
  33. \institute{~(UZH, IFJ)}
  34.  
  35. \section{Introduction}
  36.  
  37.  
  38. \begin{frame}\frametitle{Reminder 1 - Constructing Matrix unfolding}
  39. \begin{itemize}
  40. \item We don't know explicate
  41. \item I have proven some time ago that the matrix exist
  42. \end{itemize}
  43. \small{
  44. \begin{equation}
  45. \epsilon(\cos \theta_k, \cos \theta_l,\phi)
  46. \end{equation}
  47. }
  48. \begin{itemize}
  49. \item I have proven some time ago that the matrix exist
  50. \item Now a systemic way to produce it.
  51. \item Let's use PHSP MC.
  52. \item Moments for PHSP MC are:\\
  53. $v^{T}_{gen}=(2/3 ,0,0,0,0,0,0,0)$
  54. \item After reconstruction we get(full $q^2$ range):
  55. $v^{T}_{rec}=( 0.7069,0.0077,-0.00236466,0.0005,0.0007,0.0011,0.0011,-0.0012)$
  56. \end{itemize}
  57.  
  58.  
  59.  
  60. \end{frame}
  61.  
  62. \begin{frame}\frametitle{Reminder 2 - Constructing Matrix unfolding}
  63. \begin{itemize}
  64. \item We got first column of the unfolding matrix $(\dfrac{3}{2} v_{gen})$.
  65. \end{itemize}
  66. \small{
  67. $ \begin{pmatrix}
  68. 1.06 & \cdots & a_{1,8} \\
  69. 0.01157 & \cdots & a_{2,8} \\
  70. -0.003547 & \ddots & \vdots \\
  71. 0.0007841 & \ddots & \vdots \\
  72. 0.001126 & \ddots & \vdots \\
  73. 0.001766 & \ddots & \vdots \\
  74. 0.001664 & \ddots & \vdots \\
  75. -0.001937 & \cdots & a_{8,8}
  76. \end{pmatrix}$
  77.  
  78.  
  79. }
  80. \begin{itemize}
  81. \item How about the others?
  82. \item We can reweight accordingly to $f_x$.
  83. \end{itemize}
  84.  
  85. \end{frame}
  86.  
  87.  
  88.  
  89. \begin{frame}\frametitle{Reminder 3 - Constructing Matrix unfolding}
  90. \begin{itemize}
  91. \item To get $S_3$ each event $i^{th}$ has has weight $f_{S_3}(\cos \theta_{k_i},\cos \theta_{l_i},\phi_i) $
  92. \item One can calculate on MC the reweighed moments in PHPS:
  93. \end{itemize}
  94. \begin{equation}
  95. \int PDF*f_{S_3}=\dfrac{32}{225}
  96. \end{equation}
  97. \begin{itemize}
  98. \item Our base vector now is:$v^{T}_{gen}=(0 ,\frac{32}{225},0,0,0,0,0,0)$
  99. \item So lets see what do we get as reconstructed vector(after multiplying by $\frac{225}{32}$.
  100. \small{$v^{T}_{rec}=( 0.042, 1.105,-0.005,0.003,-0.0023,-0.005,-0.005,-0.006)$ }
  101. \item Please notice that weights are negative, but this is not a problem for the mean.
  102. \item Also we are avoiding the negative PDF problem :)
  103. \end{itemize}
  104.  
  105. \end{frame}
  106.  
  107.  
  108. \begin{frame}\frametitle{Reminder 4 - Constructing Matrix unfolding}
  109. \begin{itemize}
  110. \item Now the matrix looks like:
  111. \end{itemize}
  112. \small{
  113. $ \begin{pmatrix}
  114. 1.06 & 0.042 & \cdots & a_{1,8} \\
  115. 0.01157 & 1.105 & \cdots & a_{2,8} \\
  116. -0.003547 & -0.005 & \ddots & \vdots \\
  117. 0.0007841 &-0.005 & \ddots & \vdots \\
  118. 0.001126 & 0.003 &\ddots & \vdots \\
  119. 0.001766 & -0.0023 &\ddots & \vdots \\
  120. 0.001664 & -0.005 &\ddots & \vdots \\
  121. -0.001937 & -0.006 &\cdots & a_{8,8}
  122. \end{pmatrix}$
  123.  
  124.  
  125. }
  126. \begin{itemize}
  127. \item The others go in the same way.
  128. \item Repenting this exercise from $1^{st}$ year algebra we can get the full matrix
  129. \end{itemize}
  130.  
  131.  
  132. \end{frame}
  133.  
  134.  
  135.  
  136. \begin{frame}\frametitle{Reminder 5}
  137. For now:
  138. \begin{itemize}
  139. \item We have proven that there has to exists unfolding matrix.
  140. \item Shown how to construct transformation matrix: $Gen \to Reco$.
  141. \item Inverting it we can have transformation matrix of $Reco \to Gen$.
  142. \item For details: \href{https://indico.cern.ch/event/316905/session/1/contribution/18/material/slides/0.pdf}{LINK}
  143.  
  144. \end{itemize}
  145.  
  146. What is missing?
  147. \begin{columns}
  148. \column{1in}
  149. \begin{enumerate}
  150. \item ERROR!
  151. \end{enumerate}
  152. \column{4in}
  153. \includegraphics[width=0.8\textwidth]{err.jpg}\\
  154. \end{columns}
  155.  
  156. \end{frame}
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163. \begin{frame}\frametitle{How to?}
  164. \begin{itemize}
  165. \item So lets say that transformation matrix:$Gen \to Reco$ is $\epsilon_{i,j}$.
  166. \item Each element has an error:$\delta \epsilon_{i,j}$.
  167. \item Then we can calculate the matrix: $\epsilon_{i,j}^{-1}$(assuming it exists).
  168. \item The million dollar question is what is the error on inverted matrix?
  169. \end{itemize}
  170.  
  171. \end{frame}
  172.  
  173.  
  174.  
  175. \begin{frame}\frametitle{Answer to 1M dolar quesion}
  176. \only<1>{
  177. \begin{itemize}
  178. \item One can toy it.
  179. \item But toying is good for kids and Frequentist.
  180. \end{itemize}
  181.  
  182. }
  183. \only<2>{
  184.  
  185. \begin{itemize}
  186. \item One can toy it.
  187. \item But toying is good for kids and Frequentist.
  188. \end{itemize}
  189.  
  190. \begin{itemize}
  191. \item Solution comes from $\tau$ physics :) \href{http://arxiv.org/abs/hep-ex/9909031}{hep-ex/9909031}
  192. \end{itemize}
  193. \begin{itemize}
  194. \item One can derive(prove in the paper) the general equation:
  195. \end{itemize}
  196. \begin{equation}
  197. \delta \epsilon^{-1}_{\alpha ~ \beta}= [\epsilon^{-1}]^2_{\alpha i}[\delta \epsilon ]^2_{ij} [\epsilon^{-1}]^2_{j \beta}
  198. \end{equation}
  199. }
  200.  
  201.  
  202. \end{frame}
  203.  
  204.  
  205.  
  206. \begin{frame}\frametitle{Matrix, $1.1-2~GeV$}
  207. \tiny{
  208. $ A_{reco\rightarrow gen}=\begin{pmatrix}
  209. 0.9519 & -0.02665 & -0.01432 & 0.002356 & 0.02539 & 0.009878 & -0.01551 & -0.01874 \\
  210. -0.006272 & 0.8122 & -0.00351 & -0.00719 & 0.003585 & 6.784e-05 & 0.02445 & 0.008515 \\
  211. -0.005315 & -0.003716 & 1.048 & 0.01242 & 0.01209 & -0.01478 & -0.001956 & 0.01429 \\
  212. 0.003237 & -0.007177 & 0.01533 & 0.9184 & -0.007548 & -0.0009818 & -0.01874 & 0.009407 \\
  213. 0.01002 & 0.004084 & 0.01391 & -0.006509 & 1.194 & -0.006516 & 0.001536 & -0.02882 \\
  214. 0.002695 & -0.001042 & -0.01721 & -0.001842 & -0.005643 & 0.9264 & 0.02106 & 0.006755 \\
  215. -0.004736 & 0.02346 & -0.002335 & -0.01446 & 0.001169 & 0.01697 & 1.072 & -0.003191 \\
  216. -0.004157 & 0.007576 & 0.01377 & 0.008058 & -0.02219 & 0.005354 & -0.0008608 & 0.8304
  217.  
  218. \end{pmatrix}$
  219. }
  220. {~}\\{~}\\{~}\\
  221. \tiny{
  222. $ \delta A_{reco\rightarrow gen}=\begin{pmatrix}
  223. 0.005202 & 0.01911 & 0.03258 & 0.02103 & 0.02252 & 0.02145 & 0.03366 & 0.01948 \\
  224. 0.006648 & 0.04654 & 0.03227 & 0.02451 & 0.03602 & 0.02464 & 0.03298 & 0.03397 \\
  225. 0.007557 & 0.03197 & 0.07845 & 0.04272 & 0.04744 & 0.03057 & 0.05698 & 0.03287 \\
  226. 0.007902 & 0.03885 & 0.0678 & 0.04839 & 0.0384 & 0.03464 & 0.04925 & 0.03989 \\
  227. 0.009015 & 0.04122 & 0.06374 & 0.03254 & 0.07349 & 0.03269 & 0.0649 & 0.04202 \\
  228. 0.007939 & 0.0389 & 0.04793 & 0.03433 & 0.03828 & 0.04937 & 0.06985 & 0.04023 \\
  229. 0.007651 & 0.03234 & 0.05611 & 0.03062 & 0.04776 & 0.04388 & 0.08157 & 0.03342 \\
  230. 0.006719 & 0.03345 & 0.03868 & 0.02953 & 0.03633 & 0.03002 & 0.03989 & 0.04827
  231.  
  232.  
  233. \end{pmatrix}$
  234. }
  235.  
  236. \end{frame}
  237. \begin{frame}\frametitle{What did go wrong?}
  238. \begin{itemize}
  239. \item The errors are $2-3\%$, which is very worrying.
  240. \item WG got very worried what is going on with the errors :(
  241. \item Started debugging.
  242. \item After sleeping with the problem found a stupid:
  243. \end{itemize}
  244. \textbf{ for(int i=0;i $<$ entries/10;++i) }
  245. \begin{itemize}
  246. \item Ok, I am an idiot, and used $10\%$ of statistics.
  247. \end{itemize}
  248. \end{frame}
  249.  
  250. \begin{frame}\frametitle{What did go wrong 2 ?}
  251. \begin{itemize}
  252. \item The errors are tricky. When you re-weight you have negative weights.
  253. \item So I change the normal error
  254. \end{itemize}
  255. \begin{equation}
  256. \Hat\sigma^2 = \dfrac{\sum w_i}{(\sum w_i)^2 - \sum w_i^2}
  257. \sum w_i (x_i - \Hat\mu)^2
  258. \end{equation}
  259. \begin{itemize}
  260. \item to:
  261. \end{itemize}
  262. \begin{equation}
  263. \Hat\sigma^2 = \dfrac{\sum |w_i| }{(\sum |w_i|)^2 - \sum w_i^2}
  264. \sum |w_i| (x_i - \Hat\mu)^2
  265. \end{equation}
  266. \begin{itemize}
  267. \item And this I am not $100\%$ sure if I is ok =(
  268. \end{itemize}
  269.  
  270. \end{frame}
  271. \begin{frame}\frametitle{What did go wrong 3 ?}
  272. \begin{itemize}
  273. \item There is a hack of this method:
  274. \item "You can cheat on your gf, you can cheat on tax, but you can't cheat on $\sqrt{n}$ "\footnote{All rights reserved! }.
  275. \end{itemize}
  276. \begin{center}
  277. \includegraphics[width=0.5\textwidth]{Q2_5_6_S5.png}\\
  278. \end{center}
  279. \begin{itemize}
  280. \item We can use this:
  281. \item Divide the MC in 10. Then calculate the variance of each matrix element. And divide/multiply by $\sqrt{10}$ and see if the errors are ok.
  282. \end{itemize}
  283.  
  284.  
  285. \end{frame}
  286.  
  287. \begin{frame}\frametitle{What did go wrong 3 ?}
  288. \tiny{ OLD (can be wrong): \\
  289. $ \delta A_{gen\rightarrow reco}=\begin{pmatrix}
  290. 0.005477 & 0.02348 & 0.03125 & 0.02305 & 0.01871 & 0.02307 & 0.03124 & 0.02339 \\
  291. 0.008142 & 0.06734 & 0.03621 & 0.03126 & 0.0352 & 0.03131 & 0.03624 & 0.04767 \\
  292. 0.007168 & 0.0359 & 0.06856 & 0.0423 & 0.03619 & 0.02995 & 0.04856 & 0.03585 \\
  293. 0.008573 & 0.04966 & 0.06736 & 0.05471 & 0.03332 & 0.03886 & 0.04784 & 0.04973 \\
  294. 0.007599 & 0.04063 & 0.04926 & 0.02847 & 0.04998 & 0.02841 & 0.04923 & 0.04059 \\
  295. 0.008582 & 0.04977 & 0.04768 & 0.03878 & 0.03323 & 0.05499 & 0.0676 & 0.04974 \\
  296. 0.007136 & 0.03571 & 0.04833 & 0.02987 & 0.036 & 0.04225 & 0.06843 & 0.0358 \\
  297. 0.008162 & 0.04782 & 0.04294 & 0.03731 & 0.03527 & 0.03738 & 0.04306 & 0.06736
  298.  
  299. \end{pmatrix}$
  300. }
  301.  
  302. \tiny{ New: \\
  303. $ \delta A_{gen\rightarrow reco}=\begin{pmatrix}
  304. 0.006659 & 0.0299 & 0.02207 & 0.01802 & 0.02657 & 0.02196 & 0.02851 & 0.02507 \\
  305. 0.00708 & 0.02046 & 0.007998 & 0.0133 & 0.008828 & 0.01236 & 0.01505 & 0.0149\\
  306. 0.008469 & 0.00845 & 0.01806 & 0.01442 & 0.009856 & 0.008895 & 0.01389 & 0.01155\\
  307. 0.008938 & 0.01569 & 0.01798 & 0.01801 & 0.009195 & 0.01097 & 0.01108 & 0.02068\\
  308. 0.007867 & 0.0109 & 0.01248 & 0.0088 & 0.01104 & 0.0114 & 0.01256 & 0.01097\\
  309. 0.008078 & 0.01582 & 0.01117 & 0.01093 & 0.01135 & 0.01215 & 0.02122 & 0.01774 \\
  310. 0.008368 & 0.01521 & 0.01391 & 0.008972 & 0.009797 & 0.01702 & 0.0147 & 0.01086\\
  311. 0.005745 & 0.01561 & 0.0114 & 0.01649 & 0.008631 & 0.01373 & 0.01051 & 0.01792
  312. \end{pmatrix}$
  313. }
  314.  
  315.  
  316.  
  317.  
  318. \end{frame}
  319.  
  320.  
  321.  
  322.  
  323.  
  324. \begin{frame}\frametitle{Summary}
  325. \begin{itemize}
  326. \item I really fu.. this thing ...
  327. \item No coding after 3 am form now!
  328. \end{itemize}
  329.  
  330. \includegraphics[width=0.5\textwidth]{code.png}\\
  331.  
  332. \end{frame}
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341. \end{document}