bachelor_thesis/latex/tex/appendix.tex

115 lines
4.1 KiB
TeX
Raw Normal View History

2020-03-27 19:34:22 +01:00
\chapter{Appendix}%
\label{chap:appendix}
\section{Sherpa Runcards}%
\label{sec:runcards}
\subsection{Quark Antiquark Anihilation}%
\label{sec:qqggruncard}
\yamlfile{../prog/runcards/qqgg/Sherpa.yaml}
2020-04-10 14:51:26 +02:00
\subsection{Proton Proton Scattering}%
2020-05-09 20:37:28 +02:00
\label{sec:ppruncard}
\yamlfile{../prog/runcards/pp/Sherpa.yaml}
\subsection{Holistic Proton Proton Scattering}%
\label{sec:ppruncardfull}
\VerbatimInput{../prog/runcards/pp_phaeno_299_port/runcards/with_pT_and_fragmentation_and_mi/Run.dat}
2020-04-16 18:37:37 +02:00
\section{Rivet Analysis Code}%
\label{sec:rivetcode}
\subsection{Simple Diphoton Analysis}%
\label{sec:simpdiphotriv}
\cppfile{../prog/analysis/qqgg_simple/MC_DIPHOTON_SIMPLE.cc}
2020-05-09 20:37:28 +02:00
\subsection{Proton Proton Scattering Analysis}%
\label{sec:ppanalysis}
2020-05-17 19:34:14 +02:00
\cppfile{../prog/runcards/pp/qqgg_proton/MC_DIPHOTON_PROTON.cc}
2020-05-28 10:41:13 +02:00
\subsection{Holistic Proton Scattering Analysis}%
\label{sec:ppanalysisfull}
\cppfile{../prog/runcards/pp_phaeno_299_port/qqgg_proton/MC_DIPHOTON_PROTON.cc}
\section{Mathematical Notes}%
\label{sec:matap}
\subsection{Equivalence of Importance Sampling and Change of
Variables}%
\label{sec:equap}
Assume the same prerequisites as in \cref{sec:mcint}. Here the proof
is made for two dimensions, higher dimension follow analogous (but
with a burden of notation). In truth, a multidimensional integral can
always be reduced to a series of one dimensional integrals, but doing
the calculation for the two dimensional case is illustrative.
Define a variable transformation as in \cref{eq:rfuncsap}, where the
inverses are taken with reference to the variables before the
semicolon and \(a,b\in [0, 1]\). The inverse can be taken, as
2020-06-07 12:38:42 +02:00
\(\rho > 0\) is assumed and so all integrals are monotonic.
2020-06-05 12:27:56 +02:00
%
\begin{equation}
\label{eq:rfuncsap}
\begin{split}
R_x(x) &= \int_y\int_0^x\rho(x, y) \dd{x}\dd{y} \\
R_y(y; x) &= \frac{\int_0^y\rho(x, y) \dd{x}\dd{y}}{\int_y
f(x,y)\dd{y}} \\
\vb{x} &= \mqty(x \\ y) = \mqty(R_x^{-1}(a) \\ R_y^{-1}(b, x(a)))
\end{split}
\end{equation}
2020-06-05 12:27:56 +02:00
%
The Jacobian determinant is thus given by \cref{eq:jacap}.
\begin{equation}
\label{eq:jacap}
(\partial_a R_x^{-1}(a))\cdot (\partial_b R_y^{-1}(b; x(a))) =
\frac{1}{\int_y\rho(x(a), y)\dd{y}}\cdot \frac{\int_y\rho(x(a),
y)\dd{y}}{\rho(x(a), y(a, b))} = \frac{1}{\rho(x(a), y(a, b))}
\end{equation}
2020-06-05 12:27:56 +02:00
%
The integral \cref{eq:baseintegral} becomes \cref{eq:newintap} which
is the same as if \(f\) (interpreted as a probability density) was
transformed to the variables \(a, b\).
2020-06-05 12:27:56 +02:00
%
\begin{equation}
\label{eq:newintap}
\int_\Omega
\qty[\frac{f(\vb{x})}{\rho(\vb{x})}] \rho(\vb{x}) \dd{\vb{x}} =
\int_0^1\int_0^1 \frac{f(x(a), y(a,b))}{\rho(x(a), y(a, b))} \dd{a}\dd{b}
\end{equation}
2020-06-05 12:27:56 +02:00
%
That means taking sampling points \(\{\vb{x_i}\}\sim \rho\) and
weighting samples with \(1/\rho(\vb{x})\) is equivalent to taking
uniformly distributed samples of \(f\) in \(a,b\) space with the
appropriate transformation.
This works, because the transformation law \cref{eq:rfuncsap}
uniformly distributed samples into samples distributed like \(\rho\).
2020-06-07 12:38:42 +02:00
Given a variable transformation, one can reconstruct a corresponding
probability density, by chaining the Jacobian with the inverse of that
transformation.
2020-06-08 22:37:43 +02:00
\subsection{Compatibility of Histograms}
\label{sec:comphist}
The compatibility of histograms is tested as described
in~\cite{porter2008:te}. The test value
is \[T=\sum_{i=1}^k\frac{(u_i-v_i)^2}{u_i+v_i}\] where \(u_i, v_i\)
2020-06-10 10:42:56 +02:00
are the number of samples in the \(i\)-th bin of the histograms
2020-06-08 22:37:43 +02:00
\(u,v\) and \(k\) is the number of bins. This value is \(\chi^2\)
distributed with \(k\) degrees, when the number of samples in the
histogram is reasonably high. The mean of this distribution is \(k\)
and its standard deviation is \(\sqrt{2k}\). The value
\[P = 1 - \int_0^{T}f(x;k)\dd{x}\] states with which probability the
\(T\) value would be greater than the obtained one, where \(f\) is the
probability density of the \(\chi^2\) distribution. Thus
\(P\in [0,1]\) is a measure of confidence for the compatibility of the
2020-06-10 10:42:56 +02:00
histograms. These formulas hold, if the total number of events in both
histograms is the same.
2020-06-08 22:37:43 +02:00
2020-05-28 10:41:13 +02:00
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "../document"
%%% End: