
\section[Bremsstrahlung]{Bremsstrahlung} \label{sec:em.ebrem}

The class $G4eBremsstrahlung$ provides the energy loss of electrons and
positrons due to the radiation of photons in the field of a nucleus
according to the approach described in Section \ref{en_loss}. 
Above a given threshold energy the energy loss is simulated by the explicit 
production of photons.  Below the threshold the emission of soft photons is 
treated as a continuous energy loss.   
In GEANT4 the Landau-Pomeranchuk-Migdal effect has also been implemented.  

\subsection{Cross Section and Energy Loss}

$d\sigma(Z,T,k)/dk$ is the differential cross section for the production of a 
photon of energy $k$ by an electron of kinetic energy $T$ in the field of an 
atom of charge $Z$.  If $k_c$ is the energy cut-off below which the soft 
photons are treated as continuous energy loss, then the mean value of the 
energy lost by the electron is
\begin{equation}
  E_{Loss}^{brem} (Z,T,k_c ) =
\int_{0}^{k_ c}k\frac{d \sigma (Z,T,k)}{dk}dk .
\end{equation}
The total cross section for the emission of a photon of energy larger than 
$k_c$ is
\begin{equation}
 \sigma_{brem} (Z,T,k_c ) = \int_{k_c}^{T}\frac{d \sigma (Z,T,k)}{dk} dk .
\end{equation}
\\

\subsubsection{Parameterization of the Energy Loss and Total Cross Section}

 The cross section and energy loss due to bremsstrahlung have been
parameterized using the EEDL (Evaluated Electrons Data Library) data set 
\cite{eedl} as input.

\noindent
The following parameterization was chosen for the electron bremsstrahlung 
cross section :
\begin{equation}
\label{ebrem.a}
\sigma (Z,T,k_c ) =  Z(Z+\xi_{\sigma} ) (1-c_{sigh} Z^{1/4})
                    \left[ \frac{T}{k_c} \right]^{\alpha} \frac{{f_s}}{N_{Avo}} 
\end{equation}
where $f_s$ is a polynomial in $x = lg(T)$ with $Z$-dependent coefficients for
$x < x_l$ , $f_s= 1 $ for $x \ge x_l$, $\xi_{\sigma}, c_{sigh}, \alpha$ are 
constants, $N_{Avo}$ is the Avogadro number. 
For the case of low energy electrons ($T \le T_{lim} = 10 MeV$) the above 
expression should be multiplied by 

\begin{equation}
      \left(\frac{T_{lim}}{T}\right)^{c_l} \cdot \left(1 + \frac {a_l}{\sqrt{Z} T}\right),
\end{equation}
  with constant $c_l, a_l$ parameters.

 The energy loss parameterization is the following :

\begin{equation}
\label{ebrem.b}
E_{Loss}^{brem} (Z,T,k_c ) =\frac{Z(Z+ \xi_l)(T+m)^2 }
      {(T+2m)}\left[\frac{k_c}{T}\right]^\beta (2-c_{lh} Z^{\frac{1}{4}} )
        \frac{a + b \frac{T}{T_{lim}}}{1 + c \frac{T}{T_{lim}}}
       \frac{f_l}{N_{Avo}}
\end{equation}
where $m$ is the mass of the electron, $\xi_l, \beta, c_{lh}, a,b,c$ are 
constants, $f_l$ is a polynomial in $x = lg(T)$ with $Z$-dependent 
coefficients for $x < x_l$ , $f_l= 1 $ for $x \ge x_l$. 
  For low energies this expression should be divided by
   
\begin{equation}
      \left(\frac{T_{lim}}{T}\right)^{c_l} 
\end{equation}

 and if $T < k_c$ the expression should be multiplied by 

\begin{equation}
      \left(\frac{T}{k_c}\right)^{a_l} 
\end{equation}

 with some constants $c_l, a_l$.
 The numerical values of the parameters and the coefficients of the
 polynomyals $f_s$ and $f_l$ can be found in the class code. 
\\

\noindent
The errors of the parameterizations (\ref{ebrem.a}) and (\ref{ebrem.b})
were estimated to be

\begin{eqnarray*}
\frac{\Delta\sigma} {\sigma} & = & \left \{
\begin{array}{llr}
         6-8 \%    & \mbox{for    } & T \leq 1 MeV \\
        \leq 4-5\% & \mbox{for    } & 1 MeV < T 
\end{array}
\right . \\[1cm]
\frac{\Delta E_{Loss}^{brem}}
     {E_{Loss}^{brem}} & = & \left \{
\begin{array}{llr}
        8 -10\%    & \mbox{for    } & T \leq1 MeV  \\
        5-6\%      & \mbox{for    } & 1 MeV < T .
\end{array}
\right .
\end{eqnarray*}


\noindent
When running GEANT4, the energy loss due to soft photon bremsstrahlung is 
tabulated at initialization time as a function of the medium and of the 
energy, as is the mean free path for discrete bremsstrahlung.

\subsubsection{Corrections for $e^+ e^-$ Differences}

The preceding section has dealt exclusively with electrons.  One might expect
that positrons could be treated the same way.  According to reference 
\cite{ebrem.kim} however, \\
{\it ``The differences between the radiative loss of positrons
and electrons are considerable and cannot be disregarded.

[...] The ratio of the radiative energy loss for positrons
to that for electrons obeys a simple scaling law, [...] is a
function only of the quantity $T/Z^2$''} \\

\noindent
The radiative energy loss for electrons or positrons is given by
\begin{eqnarray*}
-\frac{1}{\rho} \left ( \frac{dE}{dx} \right )_{rad}^{\pm} & = &
\frac{N_{Av} \alpha r_e^2}{A} (T+m) Z^2 \Phi_{rad}^{\pm}(Z,T) \\
\Phi^{\pm}_{rad}(Z,T) & = & \frac{1}{\alpha r_{e}^2 Z^2 (T+m)}
\int^{T}_{0}{k\frac{d\sigma^{\pm}}{dk}dk}
\end{eqnarray*}
and it is the ratio
\begin{eqnarray*}
\eta & = & \frac{\Phi_{rad}^{+}(Z,T)}{\Phi_{rad}^{-}(Z,T)} =
\eta \left (\frac{T}{Z^2}\right )
\end{eqnarray*}
that obeys the scaling law. \\

\noindent 
The authors have calculated this function in the range $10^{-7}
\leq \frac{T}{Z^2} \leq 0.5$, where the kinetic energy $T$ is expressed in 
MeV.  Their {\it data} can be fairly accurately reproduced using a 
parametrization:

\begin{eqnarray*}
\eta & = & \left \{
\begin{array}{llr}
0 & \mbox{if   } & x \leq -8 \\
\frac{1}{2} + \frac{1}{\pi} \arctan \left( a_1 x + a_3 x^3
+ a_5 x^5 \right ) & \mbox{if  } & -8 < x < 9 \\
1 & \mbox{if   } & x \geq 9
\end{array}
\right .
\end{eqnarray*}
where
\begin{eqnarray*}
x & = & \log \left ( C \frac{T}{Z^2} \right ) \mbox{(T in GeV)} \\
C & = & 7.5221 \times 10^{6} \\
a_1 & = & 0.415 \\
a_3 & = & 0.0021 \\
a_5 & = & 0.00054 .
\end{eqnarray*}


\noindent
The $e^+ e^-$ energy loss difference is not purely a low-energy phenomenon 
(at least for high $Z$), as shown in Table~\ref{ebrem.c}.

\begin{table}[hbt]
\begin{centering}
\begin{tabular}{rr|r|r} \hline
\multicolumn{1}{c}{$\frac{T}{Z^2} (GeV)$}
& \multicolumn{1}{c|}{T}
& \multicolumn{1}{c|}{$\eta$}
& \multicolumn{1}{c}{$\left ( \frac{rad. \ loss}{total \ loss}
\right )_{e^-}$} \\[3mm] \hline
$10^{-9}$ & $\sim 7 keV$ & $\sim 0.1$ & $\sim 0\%$ \\
$10^{-8}$ & $67 keV $ & $\sim 0.2$ & $\sim 1\%$ \\
$2 \times 10^{-7}$ & $1.35 MeV$ & $\sim 0.5$ & $\sim 15\%$ \\
$2 \times 10^{-6}$ & $13.5 MeV$ & $\sim 0.8$ & $\sim 60\%$ \\
$2 \times 10^{-5}$ & $135. MeV$ & $\sim 0.95$ & $> 90\%$ \\ \hline
\end{tabular}
\caption{ratio of the $e^+ e^-$ radiative energy loss in lead
(Z=82).}
\label{ebrem.c}
\end{centering}
\end{table}


\noindent 
The scaling property will be used to obtain the positron energy loss and 
discrete bremsstrahlung from the corresponding electron values.  However, 
while scaling holds for the ratio of the total radiative energy losses, it 
is significantly broken for the photon spectrum in the screened case.  That is,
\begin{eqnarray*}
\frac{\Phi^+}{\Phi^-} = \eta \left ( \frac{T}{Z^2} \right )
& \hspace{3cm} &
\frac{\frac{d\sigma^+}{dk}}{\frac{d\sigma^-}{dk}} =
\mbox{does not scale .}
\end{eqnarray*}
For the case of a point Coulomb charge, scaling would be restored for the 
photon spectrum.  In order to correct for non-scaling, it is useful to note
that in the photon spectrum from bremsstrahlung reported in \cite{ebrem.kim}:
\begin{eqnarray*}
\frac{d\sigma^{\pm}}{dk} = S^{\pm} \left( \frac{k}{T} \right )
\hspace{2cm}
\frac{S^{+}(k)}{S^{-}(k)} \leq 1 & \hspace{1cm} & S^{+}(1) = 0
\hspace{2cm} S^{-}(1)  >  0
\end{eqnarray*}
One can further assume that
\begin{eqnarray}
\frac{d\sigma^+}{dk} = f(\epsilon) \frac{d\sigma^-}{dk} ,
& \hspace{2cm} &
\epsilon = \frac{k}{T}
\label{ebrem.d}
\end{eqnarray}
and require
\begin{eqnarray}
\int^{1}_{0}{f(\epsilon)d\epsilon} & = & \eta
\label{ebrem.e}
\end{eqnarray}
in order to approximately satisfy the scaling law for the ratio of the total 
radiative energy loss.  From the photon spectra the boundary conditions
\begin{eqnarray}
\left .
\begin{array}{l}
f(0) = 1 \\
f(1) = 0
\end{array}
\right \} \hspace{2cm} \mbox{for all $Z,T$}
\label{ebrem.f}
\end{eqnarray}
may be inferred.  Choosing a simple function for $f$
\begin{eqnarray}
f(\epsilon) & = & C (1-\epsilon)^{\alpha} \hspace{3cm} C,\alpha > 0 ,
\label{ebrem.g}
\end{eqnarray}
the conditions (\ref{ebrem.e}), (\ref{ebrem.f}) lead to:
\begin{eqnarray*}
C & = & 1 \\
\alpha & = & \frac{1}{\eta} - 1 \hspace{2cm}
\mbox{($\alpha > 0$ because $\eta < 1$)} \\
f(\epsilon) & = & (1-\epsilon)^{\frac{1}{\eta}-1} .
\end{eqnarray*}

\noindent
Now the weight factors $F_{l}$ and $F_{\sigma}$ for the positron continuous 
energy loss and the discrete bremsstrahlung cross section can be defined:

\begin{eqnarray}
F_{l} = \frac{1}{\epsilon_{0}} \int^{\epsilon_{0}}_{0}
{f(\epsilon)d\epsilon} & \hspace{3cm} &
F_{\sigma} = \frac{1}{1-\epsilon_{0}} \int^{1}_{\epsilon_{0}}
{f(\epsilon)d\epsilon}
\label{ebrem.h}
\end{eqnarray}
where $\epsilon_{0} = \frac{k_c}{T}$ and $k_c$ is the photon cut.  In this 
scheme the positron energy loss and discrete bremsstrahlung can be calculated 
as:
\begin{eqnarray*}
\left ( - \frac{dE}{dx} \right )^{+} = F_{l}
\left ( - \frac{dE}{dx} \right )^{-} & \hspace{2cm} &
\sigma^{+}_{brems} = F_{\sigma} \sigma^{-}_{brems}
\end{eqnarray*}

\noindent
In this approximation the photon spectra are identical, therefore the same 
sampling is used for generating $e^-$ or $e^+$ bremsstrahlung.  The following 
relations hold:
\begin{eqnarray*}
F_{\sigma} & = & \eta (1-\epsilon_{0})^{\frac{1}{\eta}-1}
< \eta \\
\epsilon_{0} F_{l} + (1-\epsilon_{0}) F_{\sigma} & = & \eta
\hspace{6cm} \mbox{from the def (\ref{ebrem.h})} \\
\Rightarrow F_{l} & = & \eta \frac{1-(1-\epsilon_{0})^{\frac{1}
{\eta}})}{\epsilon_{0}} > \eta \frac{1-(1-\epsilon_{0})}
{\epsilon_{0}} = \eta  \hspace{1cm}
\Rightarrow   \left \{
\begin{array}{l}
F_{l} > \eta \\
F_{\sigma} < \eta
\end{array} \right .
\end{eqnarray*}
which is consistent with the spectra.  The effect of the difference in $e^-$
and $e^+$ bremsstrahlung can also be seen in electromagnetic shower 
development when the primary energy is not too high. 

\subsubsection{Landau Pomeranchuk Migdal (LPM) effect}

The LPM effect (see for example \cite{ebrem.galitsky, ebrem.anthony} ) is the 
suppression of photon production due to the multiple scattering of the 
electron.  If an electron undergoes multiple scattering while traversing the 
so called ``formation zone'', the bremsstrahlung amplitudes from before and 
after the scattering can interfere, reducing the probability of bremsstrahlung
photon emission (a similar suppression occurs for pair production).  The 
suppression becomes significant for photon energies below a certain value, 
given by
\begin{equation}
\label{ebrem.k}
 \frac{k}{E} < \frac{E}{E_{LPM}} ,
\end{equation}
where
\[
\begin{array}{ll}
k    & \mbox{photon energy} \\
E    & \mbox{electron energy} \\
E_{LPM} & \mbox{characteristic energy for LPM effect (depend on the medium).} 
\end{array}
\]
The value of the LPM characteristic energy can be written as
\begin{equation}
\label{ebrem.l}
  E_{LPM} = \frac{\alpha m^2 X_0}{2 h c} ,
\end{equation}
where
\[
\begin{array}{ll}
\alpha  & \mbox{fine structure constant} \\
m       & \mbox{electron mass} \\
X_0     & \mbox{radiation length in the material} \\
h       & \mbox{Planck constant} \\
c       & \mbox{velocity of light in vacuum.}
\end{array} 
\]
The LPM suppression of the photon spectrum is given by the formula
\begin{equation}
\label{ebrem.m}
  S_{LPM} = \sqrt{\frac{E_{LPM} \cdot k}{E^2}} ,
\end{equation}
while the dielectric suppression (included already in the parameterizations) 
can be written as
\begin{equation}
\label{ebrem.n}
  S_p = \frac{k^2}{k^2 + C_p \cdot E^2} ,
\end{equation}
where the quantity $C_p$ is given by
\begin{equation}
\label{ebrem.o}
   C_p = \frac{r_0 \lambda^2_e n}{\pi} .
\end{equation}
In eq. \ref{ebrem.o} the parameters are
\[
\begin{array}{ll}
r_0     & \mbox{classical electron radius} \\
\lambda_e & \mbox{electron Compton wavelength} \\
n       & \mbox{electron density in the material.}
\end{array}
\]

\noindent 
Both suppression effects reduce the effective formation length of the photon, 
so the suppressions {\em do not simply multiply.}  For the total suppression 
$S$ the following equation holds (see \cite{ebrem.galitsky})
\begin{equation}
\label{ebrem.p}
  \frac{1}{S} = 1 + \frac{1}{S_p} + \frac{S}{S^2_{LPM}}
\end{equation}
which can be solved easily for $S$
\begin{equation}
\label{ebrem.q}
  S = \frac{\sqrt{S^4_{LPM}\cdot (1 + \frac{1}{S_p})^2 + 4 \cdot S^2_{LPM}}
      -S^2_{LPM} \cdot (1 + \frac{1}{S_p})}{2} .
\end{equation}

\noindent 
The LPM effect was implemented by applying to the energy loss a factor 
$\frac{S}{S_p}$, which depends on the energy and material.  This is done at 
initialization time by computing the correction factor
\begin{equation}
\label{ebrem.r}
   f_c = \frac{\int_0^{k_cut} n_\gamma (k) \cdot \frac{S}{S_p} dk}
              {\int_0^{k_cut} n_\gamma (k) dk} ,
\end{equation}
where $n_\gamma(k)$ is the photon spectrum.  A similar correction has not been
applied to the total cross section given by the parameterization \ref{ebrem.a}.
Instead the LPM effect is included in the photon generation algorithm.

\subsection{Simulation of Discrete Bremsstrahlung}

The energy of the final state photons is sampled according to the spectrum 
\cite{ebrem.seltzer} of Seltzer and Berger.  They have calculated the
bremsstrahlung spectra for materials with atomic numbers Z = 6, 13, 29, 47, 
74 and 92 in the electron kinetic energy range 1 keV - 10 GeV.  Their tabulated
results have been used as input in a fit of the parameterized function

\[
S(x) = C k \frac{d \sigma}{d k} ,
\]
which will be used to form the rejection function for the sampling process.
The parameterization can be written as
\begin{equation}
\label{eq:phys341-1}
S(x) = \left \{
\begin{array}{ll}
(1-a_{h} \epsilon )F_{1}(\delta) + b_{h} \epsilon^{2} F_{2} (\delta)
& T \geq 1 MeV \\
1 + a_{l} x + b_{l} x^{2} & T < 1 MeV
\end{array} \right .
\end{equation}
where
\[
\begin{array}{lcl} 
C & & \mbox{normalization constant} \\
k & & \mbox{photon energy} \\ [1mm]
T, E & & \mbox{kinetic and total energy of the primary electron} \\
x & = & \frac{k}{T} \\ [2mm]
\epsilon & = & \frac{k}{E} = x \frac{T}{E} \\
\end{array}
\]
and $a_{h,l}$ and $b_{h,l}$ are the parameters to be fitted.  The 
$F_{i}(\delta)$ screening functions depend on the screening variable
\[
\begin{array}{lcll}
\delta & = & \frac{136 m_{e}}{Z^{1/3} E} \frac{\epsilon}{1-\epsilon} \\
F_{1}(\delta) & = & F_{0} (42.392 - 7.796 \delta +1.961 \delta^{2} - F)
& \delta \leq 1 \\
F_{2}(\delta) & = & F_{0} (41.734 - 6.484 \delta +1.250 \delta^{2} - F)
& \delta \leq 1 \\
F_{1}(\delta) & = & F_{2}(\delta) =
F_{0} (42.24 - 8.368 \ln(\delta + 0.952) -F) & \delta > 1 \\
F_{0} & = & \frac{1}{42.392-F} \\
F & = & 4 \ln Z - 0.55 (\ln Z)^{2} .
\end{array}
\]

\noindent 
The ``high energy'' ($T >$  1 MeV) formula is essentially the 
Coulomb-corrected, screened Bethe-Heitler formula (see e.g.
\cite{ebrem.williams,ebrem.butcher,ebrem.egs4}).  However, 
Eq.~(\ref{eq:phys341-1}) differs from Bethe-Heitler in two ways:
\begin{enumerate}
\item $a_{h}, b_{h}$ depend on $T$ and on the atomic number $Z$, whereas in
the Bethe-Heitler spectrum they are fixed ($a_{h} = 1$, $b_{h} =0.75$);
\item the function $F$ is not the same as that in the Bethe-Heitler
cross-section;  the present function gives a better behavior in the
high frequency limit, i.e. when $k \rightarrow T$  ($x \rightarrow 1$).
\end{enumerate}

\noindent 
The $T$ and $Z$ dependence of the parameters are described by the equations:

\begin{eqnarray*}
a_{h} & = & 1 + \frac{a_{h1}}{u}+\frac{a_{h2}}{u^{2}}+\frac{a_{h3}}{u^{3}} \\
b_{h} & = & 0.75+\frac{b_{h1}}{u}+\frac{b_{h2}}{u^{2}}+\frac{b_{h3}}{u^{3}} \\
a_{l} & = & a_{l0} + a_{l1} u + a_{l2} u^{2} \\
b_{l} & = & b_{l0} + b_{l1} u + b_{l2} u^{2} \\
\mbox{with} \\
u & = & \ln \left ( \frac{T}{m_{e}} \right )
\end{eqnarray*}
The parameters $a_{hi}, b_{hi}, a_{li}, b_{li}$ are polynomials of second order
in the variable:

\[
v = [Z (Z+1)]^{1/3} .
\]
In the limiting case $T \rightarrow
\infty$, $a_{h} \rightarrow 1, b_{h} \rightarrow 0.75$,
Eq.~(\ref{eq:phys341-1}) gives the Bethe-Heitler cross section. \\

\noindent
There are altogether 36 linear parameters in the formulae and their values are
given in the code.  This parameterization reproduces the Seltzer-Berger tables 
to within 2-3 \% on average, with the maximum error being less than 10-12 \%.
The original tables, on the other hand, agree well with the experimental data 
and theoretical (low- and high-energy) results ($<$ 10 \% below 50 MeV and
$<$ 5 \% above 50 MeV). \\

\noindent 
Apart from the normalization the cross section differential in photon
energy can be written as
\[
\frac{d \sigma}{d k} = \frac{1}{\ln \frac{1}{x_{c}}} \frac{1}{x}
g(x) = \frac{1}{\ln \frac{1}{x_{c}}} \frac{1}{x} \frac{S(x)}{S_{max}}
\]
where $x_{c} = k_{c}/T$ and $k_{c}$ is the photon cut-off energy below
which the bremsstrahlung is treated as a continuous energy loss.  Using this 
decomposition of the cross section and two random numbers $r_{1}$, $r_{2}$ 
uniformly distributed in $[0,1]$, the sampling of $x$ is done as follows:
\begin{enumerate}
\item sample $x$ from
\[
\frac{1}{\ln \frac{1}{x_{c}}} \frac{1}{x} \mbox{\hspace{1cm}setting\hspace{1cm}}
x = e^{r_{1} \ln x_{c}}
\]

\item calculate the rejection function $g(x)$ and:
\begin{itemize}
\item if $r_{2} > g(x)$ reject $x$ and go back to 1;
\item if $r_{2} \leq g(x)$ accept $x$.
\end{itemize}
\end{enumerate}

\noindent 
The application of the dielectric suppression \cite{ebrem.migdal} and the LPM 
effect requires that $\epsilon$ also be sampled.  First, the rejection 
function must be multiplied by a suppression factor 
\[
C_M (\epsilon)  =\frac{1 + C_0 / \epsilon_c^2}
               {1 + C_0 / \epsilon^2}
\]
where
\[
C_0 =\frac{nr_0 \lambda^2 }{\pi}, \hspace{1cm} \epsilon_c = \frac{k_{c}}{E}
\]
\begin{itemize}
\item[$n$]           electron density in the medium
\item[$r_0$]         classical electron radius
\item[$\lambda$]    reduced Compton wavelength of the electron.
\end{itemize}
Apart from the Migdal correction factor, this is simply expression 
\ref{ebrem.n} .  This correction decreases the cross-section for low photon 
energies. \\

\noindent 
While sampling $\epsilon$, the suppression factor $f_{LPM}=\frac{S}{S_p}$ is
also used as a rejection function in order to take into account the LPM effect.
Here the supression factor is compared to a random number $r$ uniformly
distributed in the interval $[0,1]$.  If $f_{LPM} \geq r$ the simulation
continues, otherwise the bremsstrahlung process concludes {\em without photon 
production}.  It can be seen that this procedure performs the LPM suppression 
correctly. \\

\noindent
After the successful sampling of $\epsilon$, the polar angles of the radiated 
photon are generated with respect to the parent electron's momentum.  It is 
difficult to find simple formulae for this angle in the literature.  For 
example the double differential cross section reported by 
Tsai~\cite{ebrem.tsai1,ebrem.tsai2} is
\begin{eqnarray*}
\frac{d \sigma}{dkd \Omega}
& = & \frac{2 \alpha^{2}e^{2}}{\pi k m^{4}}
  \left\{ \left[ \frac{2\epsilon-2}{(1+u^2)^2}+
\frac{12u^2(1-\epsilon)}{(1+u^2)^4}\right]
      Z(Z+1)  \right. \\
&   & \mbox{} + \left. \left[ \frac{2-2\epsilon-\epsilon^{2}}{(1+u^2)^2}-
      \frac{4u^2(1-\epsilon)}{(1+u^2)^4}
      \right]
      \left[ X-2Z^{2}f_{c}((\alpha Z)^{2})\right]
      \right\} \\
u & = & \frac{E \theta}{m} \\
X & = & \int_{t_{min}}^{m^{2}(1+u^{2})^{2}}
{\left [ G_{Z}^{el}(t) + G_{Z}^{in}(t) \right ] \frac{t-t_{min}}
{t^{2}} dt} \\
G_{Z}^{el, in}(t) & & \mbox{atomic form factors} \\
t_{min} & = & \left [ \frac{k m^{2} (1+u^{2})}{2 E (E-k)} \right ] ^{2}
 = \left [ \frac{\epsilon m^{2} (1+u^{2})}{2 E (1-\epsilon)} \right ] ^{2} .
\end{eqnarray*}
The sampling of this distribution is complicated.  It is also only an
approximation to within a few percent, due at least to the presence of the 
atomic form factors.  The angular dependence is contained in the variable 
$u = E \theta m^{-1}$.  For a given value of $u$ the dependence of the shape 
of the function on $Z$, $E$ and $\epsilon = k/E$ is very weak.  Thus, the 
distribution can be approximated by a function
\begin{equation}
f(u) = C \left( u e^{-au} + d u e^{-3au} \right)
\end{equation}
where
\[
C = \frac{9a^{2}}{9 + d} \hspace{1cm} a = 0.625 \hspace{1cm}
d = 27
\]
where $E$ is in GeV.  While this approximation is good at high energies,
it becomes less accurate around a few MeV.  However in that region the
ionization losses dominate over the radiative losses. \\

\noindent 
The sampling of the function $f(u)$ can be done with three random numbers
$r_i$, uniformly distributed on the interval [0,1]: 
\begin{enumerate}
\item choose between $u e^{-au}$ and $d u e^{-3au}$:
\[
b = \left \{ \begin{array}{ll}
a & \mbox{if\hspace{0.5cm}}r_{1} < 9/(9+d) \\
3a & \mbox{if\hspace{0.5cm}}r_{1} \geq 9/(9+d)
\end{array} \right .
\]
\item sample $u e^{-bu}$:
\[
u=-\frac{\log ( r_{2} r_{3}) }{b}
\]
\item check that:
\[
u \leq u_{max} = \frac{E \pi}{m}
\]
otherwise go back to 1.
\end{enumerate}
The probability of failing the last test is reported in
table~\ref{tb:phys341-1}. \\

\begin{table}
\begin{centering}
\begin{tabular}{|l|l|}
\multicolumn{2}{c}{$\displaystyle
P = \int^{\infty}_{u_{max}}{f(u) \: du} \hfill $} \\ [0.5cm]
\hline
E (MeV) & P(\%) \\ \hline
0.511 & 3.4 \\
0.6 &  2.2 \\
0.8 & 1.2 \\
1.0 & 0.7 \\
2.0 & $<$ 0.1 \\ \hline
\end{tabular}
\caption{Angular sampling efficiency}
\label{tb:phys341-1}
\end{centering}
\end{table}


\noindent 
The function $f(u)$ can also be used to describe the angular distribution of 
the photon in $\mu$ bremsstrahlung and to describe the angular distribution in
photon pair production. \\

\noindent
The azimuthal angle $\phi$ is generated isotropically.  Along with $\theta$,
this information is used to calculate the momentum vectors of the radiated
photon and parent recoiled electron, and to transform them to the 
global coordinate system. 
The momentum transfer to the atomic nucleus is neglected. 

\subsection{Status of this document}
09.10.98 created by L. Urb\'an. \\
21.03.02 modif in angular distribution (M.Maire) \\
27.05.02 re-written by D.H. Wright \\
01.12.03 minor update by V. Ivanchenko     \\
20.05.04 updated by L.Urban \\
09.12.05 minor update by V. Ivanchenko     \\
15.03.07 modify definition of Elpm (mma)     \\
  
\begin{latexonly}

\begin{thebibliography}{99}
\bibitem{eedl}
  S.T.Perkins, D.E.Cullen, S.M.Seltzer, UCRL-50400 Vol.31
\bibitem{ebrem.geant3}
  GEANT3 manual ,CERN Program Library Long Writeup W5013 (October 1994).
\bibitem{ebrem.galitsky}
  V.M.Galitsky and I.I.Gurevich. Nuovo Cimento 32 (1964) 1820.
\bibitem{ebrem.anthony}
  P.L. Anthony et al. SLAC-PUB-7413/LBNL-40054 (February 1997)
\bibitem{ebrem.seltzer}
  S.M.Seltzer and M.J.Berger. Nucl.Inst.Meth. 80 (1985) 12.
\bibitem{ebrem.egs4} W.R. Nelson et al.:The EGS4 Code System.
   {\em SLAC-Report-265 , December 1985 }
\bibitem{ebrem.messel}
  H.Messel and D.F.Crawford. Pergamon Press,Oxford,1970.
\bibitem{ebrem.migdal}
   A.B. Migdal. Phys.Rev. 103. (1956) 1811.
\bibitem{ebrem.kim} 
   L. Kim et al. Phys. Rev. A33 (1986) 3002.
\bibitem{ebrem.williams}
   R.W. Williams, Fundamental Formulas of Physics, vol.2., Dover Pubs. (1960).
\bibitem{ebrem.butcher}
   J. C. Butcher and H. Messel. Nucl.Phys. 20. (1960) 15.
\bibitem{ebrem.tsai1}
   Y-S. Tsai, Rev. Mod. Phys. 46. (1974) 815.
\bibitem{ebrem.tsai2}
   Y-S. Tsai, Rev. Mod. Phys. 49. (1977) 421.

\end{thebibliography}

\end{latexonly}

\begin{htmlonly}

\subsection{Bibliography}

\begin{enumerate}
\item S.T.Perkins, D.E.Cullen, S.M.Seltzer, UCRL-50400 Vol.31
\item GEANT3 manual ,CERN Program Library Long Writeup W5013 (October 1994).
\item V.M.Galitsky and I.I.Gurevich. Nuovo Cimento 32 (1964) 1820.
\item P.L. Anthony et al. SLAC-PUB-7413/LBNL-40054 (February 1997)
\item S.M.Seltzer and M.J.Berger. Nucl.Inst.Meth. 80 (1985) 12.
\item W.R. Nelson et al.:The EGS4 Code System.
   {\em SLAC-Report-265 , December 1985 }
\item H.Messel and D.F.Crawford. Pergamon Press,Oxford,1970.
\item A.B. Migdal. Phys.Rev. 103. (1956) 1811.
\item L. Kim et al. Phys. Rev. A33 (1986) 3002.
\item R.W. Williams, Fundamental Formulas of Physics, vol.2., Dover Pubs. (1960).
\item J. C. Butcher and H. Messel. Nucl.Phys. 20. (1960) 15.
\item Y-S. Tsai, Rev. Mod. Phys. 46. (1974) 815.
\item Y-S. Tsai, Rev. Mod. Phys. 49. (1977) 421.
\end{enumerate}

\end{htmlonly}
