\section{Conversion from range to kinetic energy}

\subsection{Charged particles}
The algorithm which converts the stopping range of a charged particle to the
corresponding kinetic energy is essentially the same for all charged 
particle types: given the stopping range of a particle, a vector holding the 
corresponding kinetic energy for every material is constructed.  Only the 
energy loss formulae are different, depending on whether the particle is an
electron, a positron, or a heavy charged particle (muon, pion, proton, etc.).  
 \noindent
For protons and anti-protons the above procedure is followed, but for other
charged hadrons, the cut values in kinetic energy are computed using the 
proton and anti-proton energy loss and range tables. 

\subsubsection{General scheme}
   \begin{enumerate}
      \item An energy loss table is created and filled for all the elements
            in the element table.
      \item For every material in the material table the following steps 
	    are performed:
            \begin{enumerate}
              \item a range vector is constructed using the energy loss table
		    and specific formulae for the low energy part of the
                    calculations,
              \item the conversion from stopping range to kinetic energy is
                    performed and the corresponding element of the
		    {\tt KineticEnergyCuts} vector is set,
              \item the range vector is deleted.
            \end{enumerate}
      \item The energy loss table is deleted at the end of the process.
   \end{enumerate}

\subsubsection{Energy loss formula for heavy charged particles}
The energy loss of the particle is calculated from a simplified Bethe-Bloch
formula if the kinetic energy of the particle is above the value
     \[
     T_{lim}=2 \,MeV \times \left( \frac {\mbox{particle mass}}
                                         {\mbox{proton mass}}  \right ).
     \]
The word ``simplified'' means that the low energy shell correction term and
the high energy Sternheimer density correction term have been omitted.
Below the energy value $T_{lim}$ a simple parameterized energy loss formula
is used to compute the loss, which reproduces the energy loss values
of the stopping power tables fairly well.  The main reason for using a
parameterized formula for low energy is that the Bethe-Bloch formula breaks 
down at low energy. The formula has the following form :
     \[
    \frac{dE}{dx} = \left \{ \begin{array}{ll}
                   a*\sqrt{\frac{T}{M}}+b*\frac{T}{M} & \mbox{for $T \in [0, \, T_0]$}
                   \\ \\
                   c*\sqrt{\frac{T}{M}} & \mbox{for $T \in [T_0, \, T_{lim}]$} 
                      \end{array}
            \right.
     \]
   \begin{tabbing}
      whereb:bbb\= \kill
      where :  \> M = particle mass \\
               \> T = kinetic energy \\
               \> $ T_0=0.1 \, MeV \times Z^{1/3} \times \mbox{ M/(proton mass)} $\\
               \> Z = atomic number.
    \end{tabbing}
The paramaters $a, b$ and $c$ have been chosen in such a way that $dE/dx$ is a
continuous function of $T$ at $T=T_{lim}$ and $T=T_0$, and $dE/dx$ reaches its 
maximum at the correct $T$ value.

\subsubsection{Energy loss of electrons and positrons}
The Berger-Seltzer energy loss formula has been used for $T > 10$ keV to
compute the energy loss due to ionization. This formula plays the role of 
the Bethe-Bloch equation for electrons (see e.g. the GEANT3 manual). Below
10 keV the simple $c$/($T$/mass of electron) parameterization has been used,
where $c$ can be determined from the requirement of continuity at $T = 10$ keV.
For electrons the radiation loss is important even at relatively low (few MeV) 
energies, so a second term has been added to the energy loss formula which 
accounts for radiation losses (losses due to bremsstrahlung). This second 
term is an empirical, parameterized formula.
For positrons a different formula is used to calculate the ionization loss, 
while the term accounting for the radiation losses is the same as that
for electrons.

\subsubsection{Range calculation}
The stopping range is defined as 
   \[ R(T)= \int_0^T \frac{1}{(dE/dx)} \, dE \] .
The integration has been done analytically for the low energy part and 
numerically above an energy limit.
  
\subsection{Photons}
Starting from a particle cut given in absorption lengths, the method
constructs a vector holding the cut values in kinetic energy for every
material. The main steps of the algorithm are the following :
\subsubsection{General scheme}
   \begin{enumerate}
      \item A cross section table is created and filled for all the elements
            in the element table.
      \item For every material in the material table the following steps are
            performed:
            \begin{enumerate}
              \item an absorption length vector is constructed using the 
                    cross section table 
              \item the conversion from absorption length to kinetic energy is
                    performed and the corresponding element of the 
                    {\tt KineticEnergyCuts} vector is set
                    (It contains the particle cut value in kinetic energy 
                    for the actual material.),
              \item the absorption length vector is deleted.
            \end{enumerate}
      \item The cross section table is deleted at the end of the process.
   \end{enumerate}
\subsubsection{Cross section formula for elements}
An approximate empirical formula is used to compute the {\em absorption
cross section} of a photon in an element.  Here, the {\em absorption cross 
section} means the sum of the cross sections of the gamma conversion, Compton 
scattering and photoelectric effect.  These processes are the ``destructive'' 
processes for photons: they destroy the photon or decrease its energy.
(The coherent or Rayleigh scattering changes the direction of the gamma
only; its cross section is not included in the {\em absorption cross section}.)

\subsubsection{Absorption length vector}
The {\tt AbsorptionLength} vector is calculated for every material as :
 \begin{center}
   {\tt AbsorptionLength} = 5/(macroscopic absorption cross section) .
 \end{center}
The factor 5 comes from the requirement that the probability of having
no 'destructive' interaction should be small, hence 
\begin{eqnarray*} 
  \exp(-\mbox{{\tt AbsorptionLength * MacroscopicCrossSection}}) &=&\exp(-5) \\
  &=& 6.7 \times 10^{-3}
  \end{eqnarray*}

\subsubsection{Meaningful cuts in absorption length}
The photon cross section for a material has a minimum at a certain kinetic
energy $T_{min}$. The {\tt AbsorptionLength} has a maximum at $T=T_{min}$, 
the value of the maximal {\tt AbsorptionLength} is the biggest "meaningful" 
cut in absorption length. If the cut given by the user is bigger than this 
maximum, a warning is printed and the cut in kinetic energy is set to the 
maximum gamma energy (i.e. all the photons will be killed in the material).  

\subsection{Status of this document}
  \ 9.10.98 created by L. Urb\'an. \\
   27.07.01 minor revision M.Maire \\
   17.08.04 moved to common to all charged particles (mma) \\
   04.12.04 minor re-wording by D.H. Wright \\

