1 | |
---|
2 | \chapter[Monte Carlo Methods] |
---|
3 | {Monte Carlo Methods} \label{secmessel} |
---|
4 | |
---|
5 | The Geant4 toolkit uses a combination of the composition and |
---|
6 | rejection Monte Carlo methods. Only the basic formalism of these methods is |
---|
7 | outlined here. For a complete account of the Monte Carlo methods, the |
---|
8 | interested user is referred to the publications of Butcher and Messel, |
---|
9 | Messel and Crawford, or Ford and Nelson \cite{m.butch,m.messel,m.egs4}. |
---|
10 | |
---|
11 | \noindent |
---|
12 | Suppose we wish to sample $x$ in the interval $[x_1,\ x_2]$ from the |
---|
13 | distribution $f(x)$ and the {\it normalised} probability density function can |
---|
14 | be written as : |
---|
15 | \begin{equation} |
---|
16 | f(x) = \sum_{i=1}^{n} N_{i} f_{i} (x) g_{i} (x) |
---|
17 | \end{equation} |
---|
18 | where $N_i>0$, $f_i(x)$ are {\it normalised} density functions on $[x_1,\ x_2]$ |
---|
19 | , and $0 \leq g_i (x) \leq 1$. |
---|
20 | |
---|
21 | \noindent |
---|
22 | According to this method, $x$ can sampled in the following way: |
---|
23 | \begin{enumerate} |
---|
24 | \item |
---|
25 | select a random integer $i \in \{1,2,\cdots n\}$ |
---|
26 | with probability proportional to $N_i $ |
---|
27 | \item |
---|
28 | select a value $x_0$ from the distribution $f_i (x)$ |
---|
29 | \item |
---|
30 | calculate $g_i (x_0)$ and accept $x = x_0$ with probability $g_i (x_0)$; |
---|
31 | \item if $x_0$ is rejected restart from step 1. |
---|
32 | \end{enumerate} |
---|
33 | It can be shown that this scheme is correct and the mean |
---|
34 | number of tries to accept a value is $ \sum_{i} N_i $. |
---|
35 | |
---|
36 | \noindent |
---|
37 | In practice, a good method of sampling from the distribution $f(x)$ has the |
---|
38 | following properties: |
---|
39 | \begin{itemize} |
---|
40 | \item all the subdistributions $ f_i (x)$ can be sampled easily; |
---|
41 | \item the rejection functions $ g_i(x)$ can be evaluated easily/quickly; |
---|
42 | \item the mean number of tries is not too large. |
---|
43 | \end{itemize} |
---|
44 | Thus the different possible decompositions of the distribution |
---|
45 | $f(x)$ are not equivalent from the practical point of view (e.g. they |
---|
46 | can be very different in computational speed) and it can be useful |
---|
47 | to optimise the decomposition. |
---|
48 | |
---|
49 | \noindent |
---|
50 | A remark of practical importance : if our distribution is not |
---|
51 | normalised |
---|
52 | $$\int_{x_1}^{x_2} f(x)dx = C > 0$$ |
---|
53 | the method can be used in the same |
---|
54 | manner; the mean number of tries in this |
---|
55 | case is $\sum_ {i} N_i/C$. |
---|
56 | |
---|
57 | \section{Status of this document} |
---|
58 | 18.01.02 created by M.Maire. \\ |
---|
59 | |
---|
60 | \begin{latexonly} |
---|
61 | |
---|
62 | \begin{thebibliography}{99} |
---|
63 | \bibitem{m.butch} J.C. Butcher and H. Messel. |
---|
64 | {\em Nucl. Phys. 20} 15 (1960) |
---|
65 | \bibitem{m.messel} H. Messel and D. Crawford. |
---|
66 | {\em Electron-Photon shower distribution, Pergamon Press} (1970) |
---|
67 | \bibitem{m.egs4} R. Ford and W. Nelson. |
---|
68 | {\em SLAC-265, UC-32} (1985) |
---|
69 | \bibitem{m.pdg} |
---|
70 | Particle Data Group. Rev. of Particle Properties. |
---|
71 | {\em Eur. Phys. J. C15. (2000) 1.} http://pdg.lbl.gov |
---|
72 | \end{thebibliography} |
---|
73 | |
---|
74 | \end{latexonly} |
---|
75 | |
---|
76 | \begin{htmlonly} |
---|
77 | |
---|
78 | \section{Bibliography} |
---|
79 | |
---|
80 | \begin{enumerate} |
---|
81 | \item J.C. Butcher and H. Messel {\em Nucl. Phys. 20} 15 (1960). |
---|
82 | \item H. Messel and D. Crawford {\em Electron-Photon shower distribution, Pergamon Press} (1970). |
---|
83 | \item R. Ford and W. Nelson {\em SLAC-265, UC-32} (1985). |
---|
84 | \item Particle Data Group. Rev. of Particle Properties {\em Eur. Phys. J. C15. (2000) 1.} http://pdg.lbl.gov . |
---|
85 | \end{enumerate} |
---|
86 | |
---|
87 | \end{htmlonly} |
---|