\chapter{Introduction}% \label{chap:intro} Monte Carlo (MC) methods have been and still are one of the most important tools for numerical calculations in particle physics. Be it for validating the well established Standard Model (SM) or for making predictions about new theories, MC simulations are the crucial interface of theory and experimental data, making them directly comparable. % Furthermore horizontal scaling is almost trivial to implement in MC % algorithms, making them well adapted to modern parallel computing. In this thesis, the use of MC methods will be traced through from simple integration to the simulation of proton-proton scattering. The test subject here is the quark-antiquark annihilation into two photons \(\qqgg\), henceforth called the diphoton process. It forms an important background to the Higgs decay channel \(H\rightarrow \gamma\gamma\), which was instrumental in its discovery~\cite{Aad:2012tfa,Chatrchyan:2012ufa}, and to a dihiggs decay \(HH\rightarrow b\bar{b}\gamma\gamma\), a process of recent interest~\cite{aaboud2018:sf} to study the higgs self coupling and probe the limits of the SM. All the while, the diphoton process is still pure QED (Quantum Electrodynamics) at leading order and thus calculable by hand within the scope of this thesis as is being done in \cref{chap:qqgg}. The obtained result is compared to the total cross section obtained with the \sherpa~\cite{Gleisberg:2008ta} event generator, used as matrix element integrator. In \cref{chap:mc} some simple MC methods are discussed, implemented and their results compared. After studying some basic MC integration methods, the \vegas\ algorithm~\cite{Lepage:19781an} is implemented and evaluated. Subsequently MC sampling methods, which are closely related to the integration methods, are explored and the output of \vegas\ is used to improve the sampling efficiency. Histograms of observables are generated and compared to histograms from \sherpa\ using the \rivet~\cite{Bierlich:2019rhm} analysis framework. \Cref{chap:pdf} deals with proton-proton scattering in the partonic picture using parton density functions, ending with the implementation of a simple event generator for \(\ppgg\) scattering at \lhc\ conditions. Some integration and sampling algorithms and their implementations are adapted to the multidimensional case and histograms of observables are generated with good efficiency. Because a real \(pp\) scattering event also entails processes like parton showers, hadronization and multiple interactions, a realistic simulation must account for those effects. The impact of those effects on observables is studied in \cref{chap:pheno} using the \sherpa\ event generator. \section{Conventions}% \label{sec:convent} Throughout, natural units with \(c=1, \hbar = 1, k_B=1, \varepsilon_0 = 1\) are used unless stated otherwise. The fine structure constant's value \(\alpha = 1/137.036\) is configured in \sherpa\ and used in analytic calculations. \section{Source Code}% \label{sec:source} The (literate) \texttt{Python} code, used to generate most of the results and figures can be found under \url{https://github.com/vale981/bachelor_thesis/} and more specifically in the subdirectory \texttt{prog/python/qqgg}. The file \texttt{monte\_carlo.py} implements all the Monte Carlo algorithm related functionality as a module. The file \texttt{analytical\_xs.org} contains a literate computation notebook that generates all the results of \cref{chap:mc}. The file \texttt{parton\_density\_function\_stuff.org} contains all the computations for \cref{chap:pdf}. The \texttt{Python} code makes heavy use of \href{https://www.scipy.org/}{scipy}~\cite{2020Virtanen:Sc} and its component \href{https://numpy.org/}{numpy}). \section{Software Versions}% \label{sec:versions} In \cref{sec:compsher,chap:mc} the development version of \sherpa\ has been used. \Cref{chap:pdf,chap:pheno} use version \texttt{2.2.10} for reasons of stability. In the whole thesis, the version \texttt{3.1.0} of \rivet\ was used. %%% Local Variables: *** %%% mode: latex *** %%% TeX-master: "../document.tex" *** %%% End: ***