\Origin{L.Urb\'{a}n}
\Revision{L.Urb\'{a}n}
\Documentation{F.Carminati, K.Lassila-Perini}
\Submitted{10.04.86} \Revised{16.12.93}
\Version{Geant 3.16}\Routid{PHYS332}
\Makehead{Simulation of  energy loss  straggling}
\section{Subroutines}

\Shubr{GFLUCT}{(DEMEAN,DE*)}
\begin{DLtt}{MMMMMMMM}
\item[DEMEAN] ({\tt REAL}) average energy loss according
to the energy loss tables;
\item[DE] ({\tt REAL}) actual energy loss.
\end{DLtt}

\Rind{GFLUCT} selects the method to sample the
fluctuations around the mean energy loss \Rind{DEMEAN}
and returns the energy loss \Rind{DE} in the current step.

If $\delta$-rays are not produced ({\tt DRAY=0}),
it calls \Rind{GLANDG} when the current particle and
material parameters are in the validity range of
Landau theory, \Rind{GVAVIV} when in the range of
Vavilov theory, or performs a Gaussian sampling.
For fluctuations in small steps \Rind{GLANDZ} is called.

If $\delta$-rays are produced ({\tt DRAY=1}),
it calls \Rind{GLANDZ} which, the cut for the
$\delta$-ray production being set, does sampling
from restricted formula.

\Rind{GFLUCT} is called from the tracking routines
\Rind{GTELEC}, \Rind{GTHADR}
and \Rind{GTMUON} when the {\tt LOSS} flag is set
to {\tt 1}, {\tt 2} or {\tt 3}.

\Shubr{GLANDG}{(YRAN*)}
\begin{DLtt}{MMMMMMMM}
\item[YRAN] ({\tt REAL}) random variable distributed according to the Landau
distribution;
\end{DLtt}

\Rind{GLANDG} samples from the Landau distribution.
It is called from \Rind{GFLUCT}.

\Sfunc{GVAVIV}{VALUE = GVAVIV(RKAPPA,BETA2,RAN)}
\begin{DLtt}{MMMMMMMM}
\item[RKAPPA] ({\tt REAL}) $\kappa$ parameter of the Vavilov
distribution (see below);
\item[BETA2] ({\tt REAL}) $\beta^2$ of the particle;
\item[RAN] ({\tt REAL}) random number uniformly distributed in ]0,1[.
\end{DLtt}

\Rind{GVAVIV} samples samples the variable
$\lambda = \lambda_v/\kappa - \ln \kappa$, sometimes called the
Landau $\lambda$, where $\lambda_v$ is distributed according
to the Vavilov distribution. For more details see below.
It is called from \Rind{GFLUCT}.

\Shubr{GLANDZ}{(Z,STEP,P,E,DEDX,DE*,POTI,POTIL)}
\begin{DLtt}{MMMMMMMM}
\item[Z] ({\tt REAL}) atomic number of the medium;
\item[STEP] ({\tt REAL}) step size in cm;
\item[P] ({\tt REAL}) momentum of the particle in GeV c$^{-1}$;
\item[E] ({\tt REAL}) total energy of the particle in GeV;
\item[DEDX] ({\tt REAL}) average energy loss in the step according to
the energy loss tables;
\item[DE] ({\tt REAL}) actual energy loss in the step;
\item[POTI] ({\tt REAL}) average ionisation potential for the medium;
\item[POTIL] ({\tt REAL}) logarithm of the average ionisation potential.
\end{DLtt}

\Rind{GLANDZ} gives the energy loss {\tt DE} for the
current particle with energy {\tt E} and momentum {\tt P}
in a material of atomic number {\tt Z} where the average
energy loss is {\tt DEDX} and the current step length {\tt STEP}.
It is called from \Rind{GFLUCT} for restricted Landau
fluctuations when $\delta$-rays are produced or to sample
the fluctuations in thin layers (with or without $\delta$-ray
production).

\section{Method}
Due to the statistical nature of ionisation energy loss, large
fluctuations can occur in the amount of energy deposited by a
particle traversing an absorber element.
As recently reviewed \cite{bib-PATR}, continuous processes such as multiple
scattering and energy loss play a relevant role in the longitudinal and
lateral development of electromagnetic and hadronic showers, and
in the case of
sampling calorimeters the measured resolution can be significantly
affected by such fluctuations in their active layers.
The description of ionisation
fluctuations is characterised by the significance parameter $\kappa$,
which is proportional
to the ratio of mean energy loss to the maximum allowed energy transfer
in a single collision with an atomic electron
\[
\kappa =\frac{\xi}{E_{max} }
\]
$ E_{max} $
is the maximum transferable energy in a single collision with
an atomic electron.
\[
E_{max} =\frac{2 m_e \beta^2\gamma^2 }
{1 +  2\gamma m_e/m_x + \left ( m_e/m_x\right)^2},
\]
where $\gamma = E/m_x$, $E$ is energy and
$m_x$ the mass of the incident particle,
$\beta^2 = 1 - 1/\gamma^2$ and $m_e$ is the electron mass.
$\xi$ comes from the Rutherford scattering cross  section
and is defined as:
\begin{eqnarray*} \xi  = \frac{ 2\pi z^2 e^4 N_{Av} Z \rho \delta x}
        { m_e \beta^2 c^2 A} =  153.4 \frac{z^2} {\beta^2} \frac{Z}{A}
  \rho \delta x \mbox{\hspace{0.5cm}keV},
\end{eqnarray*}
where

\begin{tabular}{ll}
$z$          & charge of the incident particle \\
$N_{Av}$     & Avogadro's number \\
$Z$          & atomic number of the material \\
$A$          & atomic weight of the material \\
$\rho$       & density \\
$ \delta x$  & thickness of the material \\
\end{tabular}

$\kappa$ measures the contribution of the collisions
with energy transfer close to $E_{max}$.
For a given absorber, $\kappa$ tends towards large
values if
$\delta x$ is large and/or if $\beta$ is small.
Likewise, $\kappa$ tends towards zero if $\delta x $
is small and/or if $\beta$
approaches 1.

The value of $\kappa$ distinguishes two regimes which occur in the description
of ionisation fluctuations :

\begin{enumerate}
\item A large number of collisions involving the loss of all or most
of the incident particle energy during the traversal of an
absorber.

As the total energy transfer is composed of a multitude of small energy
losses, we can apply the central limit theorem and describe the
fluctuations by a Gaussian distribution.
This case is applicable to non-relativistic particles and is described by
the inequality  $\kappa > 10  $
(i.e. when the mean energy loss in the absorber is greater than
the maximum energy transfer in a single collision).

\item
Particles traversing thin counters and incident electrons under any conditions.

The relevant inequalities and distributions are
 $ 0.01 < \kappa < 10 $, Vavilov distribution, and
$\kappa < 0.01 $, Landau distribution.
\end{enumerate}

An additional regime is defined by
the contribution of the collisions with low energy transfer
which can be estimated with the relation $\xi/I_0$, where $I_0$
is the mean ionisation potential of the atom.
Landau theory assumes that the number of these collisions
is high, and consequently, it has a restriction $\xi/I_0 \gg 1$.
In {\tt GEANT}, the limit of Landau theory has been set at $\xi/I_0 = 50$.
Below this limit special models taking into account the
atomic structure of the material are used.
This is important in thin layers and gaseous materials.
Figure \ref{fg:phys332-1} shows the behaviour of $\xi/I_0$
as a function of the layer thickness for an electron of
100 keV and 1 GeV of kinetic energy in Argon, Silicon and Uranium.

\begin{figure}[hbt]
   \centering
   \epsfig{file=eps/phys332-1.eps,width=14cm}
   \caption{The variable $\xi/I_0$ can be used to measure the
            validity range of the Landau theory. It depends
            on the type and energy of the particle, $Z$, $A$
            and the ionisation potential of the material and
            the layer thickness.
            }
    \label{fg:phys332-1}
\end{figure}

In the following sections, the different theories and models
for the energy loss fluctuation are described. First, the
Landau theory and its limitations are discussed, and then,
the Vavilov and Gaussian straggling functions and the
methods in the thin layers and gaseous materials are presented.

\subsection{ Landau theory}
\label{sec:phys332-1}
For a particle of mass $m_x$ traversing a thickness of material
$\delta x $,
the Landau probability distribution  may be written in terms of the
universal Landau \cite{bib-LAND}, \cite{bib-KOL3} function $\phi(\lambda)$ as:
\begin{eqnarray*}
f( \epsilon , \delta x ) & = &\frac{1}{\xi} \phi ( \lambda )
\end{eqnarray*}
where
\begin{eqnarray*}
\phi(\lambda )& = & \frac{1} {2 \pi i}\int^{c+i\infty}_{c-i\infty}
\exp \left ( u \ln u + \lambda u \right ) du \hspace{2cm} c \geq 0 \\
\lambda       & = & \frac{\epsilon  -\bar{\epsilon} }{\xi}
  - \gamma' - \beta^2 - \ln \frac{\xi} {E_{\rm max}}          \\
\gamma' & = & 0.422784\dots = 1 - \gamma \\
\gamma             & = & 0.577215\dots \mbox{(Euler's constant)}   \\
\bar{\epsilon}  & = & \mbox{average energy loss}                    \\
\epsilon      & = & \mbox{actual energy loss}
\end{eqnarray*}

\subsubsection{Restrictions}
The Landau formalism makes two restrictive assumptions :
\begin{enumerate}
\item The typical energy loss is small compared to the maximum energy
loss in a single collision.
This restriction is removed in the Vavilov theory (see section
\ref{vavref}).
\item
The typical energy loss in the absorber should be large compared
to the binding energy of the most tightly bound electron.
For gaseous detectors, typical energy losses are a few
keV which is comparable to the binding energies of the inner electrons.
In such cases a more sophisticated approach which accounts for atomic
energy levels (see for instance Talman \cite{bib-TALM}) is necessary
to accurately simulate data distributions. In {\tt GEANT}, a parameterised
model by L. Urb\'{a}n is used (see section \ref{urban}).
\end{enumerate}

In addition, the average value of the Landau distribution
is infinite. Summing the Landau fluctuation
obtained to the average energy from the $dE/dx$ tables, we
obtain a value which is larger than the one coming from the table.
The probability to sample a large value is small, so it takes a
large number of steps (extractions) for the average fluctuation to
be significantly larger than zero. This introduces a dependence of the
energy loss on the step size which can affect calculations.

A solution to this has been to introduce a limit on the value of the
variable sampled by the Landau distribution \cite{bib-JONE},
in order to keep the
average fluctuation to 0. The value obtained from the \Rind{GLANDO}
routine is:
\[
\delta dE/dx = \epsilon - \bar{\epsilon} = \xi ( \lambda - \gamma'
+\beta^2 +\ln \frac{\xi}{E_{max}})
\]
In order for this to have average 0, we must impose that:
\[
\bar{\lambda} = -\gamma' - \beta^2 -\ln \frac{\xi}{E_{max}}
\]

This is realised introducing a $\lambda_{max}(\bar{\lambda})$ such that
if only values of $\lambda \leq \lambda_{max}$ are accepted, the average
value of the distribution is $\bar{\lambda}$.

A parametric fit to the universal Landau distribution has been performed,
with following result:

\[
\lambda_{max} = 0.60715 + 1.1934\bar{\lambda}+(0.67794+0.052382\bar{\lambda})
\exp(0.94753+0.74442\bar{\lambda})
\]

only values smaller than $\lambda_{max}$ are accepted, otherwise the
distribution is resampled.

\subsection{Vavilov theory}
\label{vavref}
Vavilov \cite{bib-VAVI} derived a more accurate straggling
distribution by introducing the kinematic limit on the maximum
transferable energy in a single collision, rather than using
$ E_{max} = \infty $. Using the notations of \cite{bib-SCH1} we can write:
\begin{eqnarray*}
f \left ( \epsilon, \delta s \right ) & = & \frac{1}{\xi} \phi_{v}
\left ( \lambda_{v}, \kappa, \beta^{2} \right )
\end{eqnarray*}

where

\begin{eqnarray*}
\phi_{v} \left ( \lambda_{v}, \kappa, \beta^{2} \right ) & = &
\frac{1}{2 \pi i} \int^{c+i\infty}_{c-i\infty}\phi \left( s \right )
e^{\lambda s} ds \hspace{2cm} c \geq 0 \\
\phi \left ( s \right ) & = &
\exp \left [ \kappa ( 1 + \beta^{2}\gamma ) \right ]
~ \exp \left [ \psi \left ( s \right ) \right ], \\
\psi \left ( s \right )  & = & s \ln \kappa + ( s + \beta^{2} \kappa )
\left [ \ln (s/\kappa) + E_{1} (s/\kappa) \right ] - \kappa e^{-s/\kappa},
\end{eqnarray*}
and
\begin{eqnarray*}
E_{1}(z) & = & \int^{\infty}_{z} t^{-1} e^{-t} dt
\mbox{\hspace{1cm} (the exponential integral)} \\
\lambda_v & = & \kappa \left [ \frac{\epsilon - \bar{\epsilon}}{\xi}
- \gamma' - \beta^2 \right]
\end{eqnarray*}
The Vavilov parameters are simply related to the Landau parameter
by $\lambda_L = \lambda_v/\kappa - \ln\kappa $. It can be shown that
as $\kappa \rightarrow 0$, the distribution of the variable $\lambda_L$
approaches that of Landau. For $\kappa \leq 0.01$ the two distributions
are already practically identical. Contrary
to what many textbooks report, the Vavilov distribution {\em
does not} approximate the Landau distribution for small $\kappa$,
but rather the distribution of
$\lambda_L$ defined above tends to the distribution of the
true $\lambda$ from the Landau density function.
Thus the routine \Rind{GVAVIV} samples the
variable $\lambda_L$ rather than $\lambda_v$.
For $\kappa \geq 10$ the Vavilov distribution tends to a
Gaussian distribution (see next section).

\subsection{Gaussian Theory}

Various conflicting forms have been proposed for Gaussian straggling
functions, but most of these appear to have little theoretical or
experimental basis.
However, as noted by Schorr \cite{bib-SCH1} it has been demonstrated
by Seltzer and Berger \cite{bib-SELT}
that for $\kappa \geq 10 $
the Vavilov distribution can be replaced by a Gaussian of the form :
\begin{eqnarray*}
f( \epsilon , \delta s)  \approx \frac{1}
{\xi \sqrt{\frac{2 \pi}{\kappa} \left( 1 - \beta^2/2 \right)}}
   \exp \left [ \frac{( \epsilon - \bar{\epsilon} )^2}{2} \frac{\kappa}
   {\xi^2 (1- \beta^2/2)}\right ]
\end{eqnarray*}
thus implying
\begin{eqnarray*}
\mbox{mean} & = & \bar{\epsilon} \\
\sigma^2   & = & \frac{\xi^2}{\kappa} (1-\beta^2/2) = \xi E_{max} (1-\beta^2/2)
\end{eqnarray*}

\subsection{Urb\'an model}
\label{urban}
The method for computing restricted energy losses
with $\delta$-ray production above given threshold energy in
{\tt GEANT} is
a Monte Carlo method that can be used
for thin layers.
It is fast and it can be used for any thickness of a medium.
Approaching the limit of the validity of Landau's theory, the loss
distribution approaches smoothly the Landau form as shown in
figure \ref{fg:phys332-2}.
\begin{figure}[hbt]
   \centering
   \epsfig{file=eps/phys332-2.eps,width=14cm}
   \caption{Energy loss distribution for a 3 GeV electron in
            Argon as given by standard {\tt GEANT}.
            The width of the layers is given in centimeters.}
    \label{fg:phys332-2}
\end{figure}

It is assumed that the atoms have only two energy levels
with binding energy $E_1$ and $E_2$.
The particle--atom interaction will then be an excitation
with energy loss $E_1$ or $E_2$, or an ionisation
with an energy loss distributed according to a function
$g(E) \sim 1/E^2$:
\begin{equation}
g(E) = \frac{ (E_{max} + I)I}{E_{max}} \frac{1}{E^2}
\end{equation}
The macroscopic cross-section for excitations ($i=1,2$) is
\begin{equation}
\label{eq:sigex}
\Sigma_i = C \frac{f_i}{E_i} \frac{ \ln (2 m \beta^2 \gamma^2/E_i) - \beta^2}
             {\ln (2 m \beta^2 \gamma^2/ I) - \beta^2}(1-r)
\end{equation}
and the macroscopic cross-section for ionisation is
\begin{equation}
\label{eq:sigion}
\Sigma_3 = C \frac{E_{max}}{I(E_{max}+I) \ln(\frac{E_{max}+I}{I})}
           ~ r
\end{equation}
    $E_{max}$ is the {\tt GEANT} cut for $\delta$-production,
    or the maximum energy transfer minus mean
    ionisation energy, if it is smaller than this
    cut-off value.
The following notation is used:

\begin{tabular}{ll}
$r, C$          & parameters of the model \\
$E_i$           & atomic energy levels \\
$I$             & mean ionisation energy \\
${f_i}$         & oscillator strengths \\
\end{tabular}

The model has the parameters $f_i$, $E_i$, $C$ and $r ~(0\leq r\leq 1)$.
The oscillator strengths $f_i$ and the atomic level energies $E_i$ should
satisfy the constraints
\begin{eqnarray}
f_1 + f_2 & = & 1  \label{eq:fisum}\\
f_1 \ln E_1 + f_2 \ln E_2 & = & \ln I \label{eq:flnsum}
\end{eqnarray}
The parameter $C$ can be defined with the help of the
mean energy loss $dE/dx$ in the following way:
The numbers of collisions ($n_i$, i = 1,2 for the excitation and 3 for
the ionisation) follow the Poissonian distribution with a mean
number $ \langle n_i \rangle $. In a step $\Delta x$ the mean number
of collisions is
\begin{equation}
\langle n_i \rangle = \Sigma_i \Delta x
\end{equation}
The mean energy loss $dE/dx$ in a step is the sum of the excitation
and ionisation contributions
\begin{equation}
\frac{dE}{dx} \Delta x = \left[ \Sigma_1 E_1 + \Sigma_2 E_2 +
                          \Sigma_3 \int_{I}^{E_{max}+I} E~g(E)~dE \right]
                         \Delta x
\end{equation}
From this, using the  equations (\ref{eq:sigex}), (\ref{eq:sigion}),
(\ref{eq:fisum}) and (\ref{eq:flnsum}),
one can define the parameter $C$
\begin{equation}
C = \frac{dE}{dx}
\end{equation}

The following values have been chosen in {\tt GEANT} for the other
parameters:

$ \begin{array}{lcl}
f_2 = \left\{ \begin{array}{ll}
             0   & \mbox{if $Z \leq 2$} \\
             2/Z & \mbox{if $Z > 2$} \\
             \end{array} \right.    & \Rightarrow & f_1 = 1 - f_2 \\
E_2 = 10 Z^2 \mbox{ eV}  & \Rightarrow & E_1 = \left(\frac{I}{E_{2}^{f_2}}
                                              \right)^{\frac{1}{f_1}} \\
r  = 0.4 & & \\
\end{array} $

\noindent With these values the atomic level $E_2$ corresponds approximately
the K-shell energy of the atoms and $Zf_2$ the number of K-shell
electrons. $r$ is the only variable which can be tuned freely. It
determines the relative contribution of ionisation and
excitation to the energy loss.

The energy loss is computed with the assumption that the step length
(or the relative energy loss) is small, and --- in consequence ---
the cross-section can be considered constant along the path length.
The energy loss due to the excitation is
\begin{equation}
\Delta E_e = n_1 E_1 + n_2 E_2
\end{equation}
where $n_1$ and $n_2$ are sampled from Poissonian distribution
as discussed above.
The loss due to the ionisation can be generated from the distribution
$g(E)$ by the inverse transformation method:
\begin{eqnarray}
u = F(E) &  = & \int_{I}^E g(x) dx \nonumber \\
E = F^{-1}(u) & = & \frac{I}{1 - u \frac {E_{max}}{E_{max}+I}} \\
\end{eqnarray}
where $u$ is a uniform random number between $F(I)=0$ and $F(E_{max}+I)=1$.
The contribution from the ionisations will be
\begin{equation}
\Delta E_i  = \sum_{j=1}^{n_3} \frac{I}
              {1 - u_j \frac {E_{max}}{E_{max} + I}}
\end{equation}
where $n_3$ is the number of ionisation (sampled from Poissonian
distribution). The energy loss in a step will then be
$\Delta E = \Delta E_e  + \Delta E_i$.

\subsubsection{Fast simulation for $n_3 \geq 16$}
If the number of ionisation $n_3$ is bigger than 16, a faster sampling
method can be used. The possible energy loss interval is divided
in two parts: one in which the number of collisions is large and
the sampling can be done from a Gaussian distribution and the other
in which the energy loss is sampled for each collision.
Let us call the former interval $[I, \alpha I]$ the interval A,
and the latter $[\alpha I,E_{max}]$ the interval B.
$\alpha$ lies between 1 and $E_{max}/I$.
A collision with a loss in the interval A happens with the probability
\begin{equation}
\label{eq:phys332-5}
P(\alpha) = \int_I^{\alpha I} g(\!E\!) \, dE =
            \frac {( E_{max} + I) (\alpha - 1)}{E_{max} \alpha}
\end{equation}
The mean energy loss and the standard deviation for this type
of collision are
\begin{equation}
\langle \Delta E(\alpha) \rangle = \frac{1}{P(\alpha)}
        \int_I^{\alpha I} E \, g(\!E\!) \, dE =
        \frac{I \alpha \ln \alpha}{\alpha - 1}
\end{equation}
and
\begin{equation}
\sigma^2(\alpha) = \frac{1}{P(\alpha)}
        \int_I^{\alpha I} E^2 \, g(\!E\!) \, dE =
        I^2 \alpha \left( 1 - \frac{\alpha \ln \! ^2 \alpha}{(\alpha - 1)^2} \right)
\end{equation}
If the collision number is high , we assume that the number of the
type A collisions can be calculated from a Gaussian distribution
with the following mean value and standard deviation:
\begin{eqnarray}
\label{eq:phys332-1}
\langle n_A \rangle & = & n_3 P(\alpha) \\
\label{eq:phys332-2}
\sigma_A^2     & = & n_3 P(\alpha) ( 1 - P(\alpha))
\end{eqnarray}
It is further assumed that the energy loss in these collisions
has a Gaussian distribution with
\begin{eqnarray}
\label{eq:phys332-3}
\langle \Delta E_A \rangle & = & n_A  \langle \Delta E(\alpha) \rangle \\
\label{eq:phys332-4}
\sigma_{E,A}^2             & = & n_A \sigma^2(\alpha)
\end{eqnarray}
The energy loss of these collision can then be sampled
from the Gaussian distribution.

The collisions where the energy loss is in the interval B
are sampled directly from
\begin{equation}
\Delta E_B = \sum_{i=1}^{n_3 - n_A} \frac{\alpha I}
            {1 - u_i \frac{E_{max} + I - \alpha I}{E_{max} + I}}
\end{equation}
The total energy loss is the sum of these two types of
collisions:
\begin{equation}
\Delta E =  \Delta E_A + \Delta E_B
\end{equation}

The approximation of equations ((\ref{eq:phys332-1}),  (\ref{eq:phys332-2}),
 (\ref{eq:phys332-3}) and  (\ref{eq:phys332-4}) can be used under
the following conditions:
\begin{eqnarray}
\label{eq:phys332-6}
\langle n_A \rangle - c \, \sigma_A            & \geq & 0 \\
\label{eq:phys332-7}
\langle n_A \rangle + c \, \sigma_A            & \leq & n_3 \\
\label{eq:phys332-8}
\langle \Delta E_A \rangle - c \, \sigma_{E,A} & \geq & 0
\end{eqnarray}
where $c \geq 4$. From the equations (\ref{eq:phys332-5}),
(\ref{eq:phys332-1}) and (\ref{eq:phys332-3}) and from
the conditions (\ref{eq:phys332-6}) and (\ref{eq:phys332-7})
the following limits can be derived:
\begin{equation}
\alpha_{min} = \frac{ (n_3 + c^2)(E_{max}+I)}
                    {n_3 (E_{max} + I) + c^2 I} \; \leq \alpha \; \leq
\alpha_{max} = \frac{ (n_3 + c^2)(E_{max}+I)}
                    {c^2 (E_{max} + I) + n_3 I}
\end{equation}
This conditions gives a lower limit to number of the ionisations $n_3$
for which the fast sampling can be done:
\begin{equation}
n_3 \; \geq \; c^2
\end{equation}
As in the conditions (\ref{eq:phys332-6}), (\ref{eq:phys332-7})
and (\ref{eq:phys332-8}) the value of $c$ is as minimum 4, one gets
$n_3 \; \geq 16$. In order to speed the simulation, the
maximum value is used for $\alpha$.

The number of collisions with energy loss in the interval B
(the number of interactions which has to be simulated
directly) increases slowly with the total number
of collisions $n_3$. The maximum number of these collisions
can be estimated as
\begin{equation}
n_{B,max} = n_3 - n_{A,min} \approx n_3 (\langle n_A \rangle
            - \sigma_A)
\end{equation}
From the previous expressions for $\langle n_A \rangle$ and
$\sigma_A$ one can derive the condition
\begin{equation}
n_B \; \leq \; n_{B,max} = \frac{2 n_3 c^2}{n_3+c^2}
\end{equation}
The following values are obtained with $c=4$:

\begin{tabular}{llcrr}
$n_3$  & $n_{B,max}$ & & $n_3$  & $n_{B,max}$\\ \hline
16   & 16      & & 200  & 29.63\\
20   & 17.78   & & 500  & 31.01 \\
50   & 24.24   & & 1000 & 31.50 \\
100  & 27.59   & & $\infty$ & 32.00
\end{tabular}
\subsubsection{Special sampling for lower part of the spectrum}
If the step length is very small ($\leq 5$ mm in gases, $\leq$ 2-3 $\mu$m
in solids) the model gives 0 energy loss for some events.
To avoid this, the probability of 0 energy loss is computed
\begin{equation}
P( \Delta E=0) = e^{-( \langle n_1 \rangle + \langle n_2 \rangle
                     + \langle n_3 \rangle )}
\end{equation}
If the probability is bigger than 0.01 a special sampling is done,
taking into account the fact that in these cases the projectile
interacts only with the outer electrons of the atom.
An energy level $E_0 = 10$ eV is chosen to correspond to the
outer electrons. The mean number of collisions can be calculated
from
\begin{equation}
\langle n \rangle = \frac{1}{E_0} \frac{ dE}{dx} \Delta x
\end{equation}
The number of collisions $n$ is sampled from Poissonian
distribution. In the case of the thin layers, all the
collisions are considered as ionisations and the energy loss
is computed as
\begin{equation}
\Delta E = \sum_{i=1}^n \frac{E_0}
          { 1 - \frac {E_{max}}{E_{max} + E_0} u_i}
\end{equation}

\section{Implementation}

The method to be used for energy loss straggling
is chosen in {\tt GFLUCT}.
If $\delta$-rays are produced ({\tt DRAY = 1})
above the cut value {\tt DCUTE}
and the detailed PAI simulation for straggling
in thin layers (see PHYS334)
is not chosen ({\tt STRA = 0}, default),
{\tt GLANDZ} is called always as it samples
from the restricted distribution (the energy
loss of the $\delta$-rays which are explicitly
produced should not be taken into the energy
loss distribution).

If $\delta$-rays are not produced, the
values of $\kappa$ and $\xi /I$ are computed,
and Urb\'an, Landau, Vavilov or Gaussian model
is chosen accordingly.
If Urb\'an model is used, {\tt GLANDZ} will be
called with infinite ({\tt BIG}) value for
the $\delta$-ray production.

When Landau model is chosen, it is possible to use a routine from
the CERN Program Library to sample
random numbers from the Landau distribution :
\Rind{GENLAN} written by James and Hancock \cite{bib-JAME} and copied
into {\tt GEANT} source file as \Rind{GLANDG}. This routine has been modified
in order to reproduce the tail for large values of X. The original routine
did not give values of X larger than 200.
\begin{verbatim}
      CALL GENLAN(X)
\end{verbatim}
It should be noted that over the years considerable confusion has
arisen over the precise form and features of the Landau distribution.
As an example, a {\it simpler form} of $\phi(\lambda)$ had been
proposed by Moyal~\cite{bib-MOYA} and
used on occasions which has little in common with
the function defined in section \ref{sec:phys332-1} \cite{bib-KOL2}.

For the Vavilov distribution we have used the function \Rind{GVAVIV}
by Rotondi and Montagna \cite{bib-ROTO}.


% !TEX root = ../zeth-protocol-specification.tex

\section{Security requirements for the primitives}\label{zeth-protocol:sec-req}

We list below the security requirements to instantiate the primitives of the \zeth~protocol.

\begin{itemize}
    \item $\crhhsig{}$ and $\crhots{}$ \MUST~be collision resistant functions (see~\cref{preliminaries:def:collision-resistance}).
    \item $\prfaddr{}{}, \prfnf{}{}, \prfrho{}{}$ and $\prfpk{}{}$ \MUST~be PRF when keyed by $\ask$ and $\phi$, and be collision resistant (see~\cref{preliminaries:def:collision-resistance}, and~\cref{preliminaries:definitions:prfs}).
    \item $\otsigscheme$ \MUST~be $\ufcma$ (see~\cref{preliminaries:def:ufcma} and~\cref{appendix:trnm:preliminaries:ethereum-trnm}).
    \item $\comm$ \MUST~be computationally hiding and binding (see~\cref{preliminaries:definitions:commitment-sc}).
    \item $\mkhash$ \MUST~be collision resistant with $h_0 = {0}_{\FFx{\rCURVE}}$ (see~\cref{preliminaries:definitions:hashcomp}).~\footnote{This security requirement is equivalent to the one in~\cite[Section 5.4.1.3]{zcashprotocol} where finding a preimage of $0^\shaTwoDigestLen$ must be hard.}
    \item $\encscheme$ \MUST~be $\indccaii$ and $\ikcca$ (see, respectively,~\cite[Definition 8]{abdalla1999dhaes} and \cref{preliminaries:def:ikcca}).
    % \item $\pack{}{}$, $\packResBits{}$ and $\unpack{}{}$ \MUST~be bijective, i.e.~the encoding (resp.~decoding) of a variable via $\pack{}{}$ and $\packResBits{}$ (resp. $\unpack{}{}$) \MUST~be bijective.
    % \item $\encode{}{}$ and $\decode{}{}$ \MUST~be bijective.
    \item $\unpack{\pack{X}{}}{} = X$ and $\unpack{\packResBits{X}}{} = X$ \MUST{} hold.
    \item $\decode{\encode{X}{}}{} = X$ \MUST{} hold.
\end{itemize}

\subsection{Additional notes}\label{zeth-protocol:sec-req:add-notes}

\subsubsection{Defining \hsig}\label{zeth-protocol:sec-req:add-notes:def-hsig}

The signature hash \hsig~is a variable used to bind the signature keys to the primary inputs.
We use the same definition of \hsig~as \zcash~to prevent the Faerie Gold attack and thus
\[
   \hsig = \crhhsig{\nfs{}, \vk}\,.
\]
 As a private transaction is uniquely determined by its nullifiers $\nfs{} = \smalltuple{\nf{0}, \ldots, \nf{\jsin - 1}}$, and because of the collision resistance of \crhhsig{}, a transaction is uniquely determined by \hsig~(with overwhelming probability). We did not use the \randomSeed~defined in \zcash~however, since this is only necessary to achieve uniqueness of \hsig~for transactions \emph{in transit} (i.e.~not mined yet)~\cite{zcash-randomseed-hsig}.
The uniqueness of \hsig~is a requirement to prevent the Fairy Gold attack.

\paragraph{Security Requirement.}
\begin{itemize}
    \item The variable \hsig~\MUST~be derived from the nullifiers $\indexedset{\nf{i}}{i \in [\jsin]}$ and the signing key \vk~using a collision resistant function. Doing so, makes sure that $\hsig$ is unique for each \zethTx~with overwhelming probability.
\end{itemize}

\subsubsection{Defining $\rrho$}\label{zeth-protocol:sec-req:add-notes:def-rho}

We define $\rrho$ like in \zcash~in order to prevent the Faerie Gold attack. A malicious sender could reuse the same $\rrho$ for a given recipient, hence correctly generating a $\zethnote$ which could become unspendable by the recipient. Making $\rrho$ the output of a collision resistant \prf~with random variable $\pphi$ as key and with \zethTx's \hsig~as input ensures, with overwhelming probability, the uniqueness of $\rrho$ and prevents this attack. Thus,
\[
    \rrho_{j} = \prfrho{\pphi}{j, \hsig}\,.
\]

\subsubsection{Message authentication tags $\htag{i}$}\label{zeth-protocol:sec-req:add-notes:def-htag}

The message authentication tags are used to bind the signature hash to the input notes spending keys, to show ownership of the spent notes. Each tag derived from a note owner's spending key and the signature hash \MUST~be unique for each note with overwhelming probability. We define
\[
    \htag{i} = \prfpk{\ask_{i}}{i, \hsig}\,.
\]


%\documentclass[UTF8]{ctexart} % use larger type; default would be 10pt
\documentclass[a4paper]{article}
\usepackage{../mqc}

\title{\textbf{Modern Quantum Chemistry, Szabo \& Ostlund}\\HW}
\author{wsr
\vspace{5pt}\\
}
\date{\today} % Activate to display a given date or no date (if empty),
         % otherwise the current date is printed

\begin{document}
% \boldmath

\maketitle

\tableofcontents

\newpage

\setcounter{section}{3}
\section{Configuration Interaction}
\subsection{Multiconfigurational Wave Functions and the Structure of Full CI Matrix}

\subsubsection{Intermediate Normalization and an Expression for the Correlation Energy}
\ex{4.1}
If $ a\notin \{c,d,e\} $ and $ r\notin\{t,u,v\} $,
\begin{equation}\label{key}
\Braket{\Psi_a^r | \mathscr{H} | \Psi_{cde}^{tuv}} = 0
\end{equation}
Let's suppose $ a = e $, thus
\begin{equation}\label{key}
\Braket{\Psi_a^r | \mathscr{H} | \Psi_{cde}^{tuv}} = \Braket{\Psi_a^r | \mathscr{H} | \Psi_{acd}^{vtu}}
\end{equation}
if $ r\neq v $, this term will still be zero, thus
\begin{equation}\label{key}
\sum_{c<d<e,t<u<v} c_{cde}^{tuv} \Braket{\Psi_a^r | \mathscr{H} | \Psi_{cde}^{tuv}} = \sum_{c<d,t<u} c_{acd}^{rtu} \Braket{\Psi_a^r | \mathscr{H} | \Psi_{acd}^{rtu}}
\end{equation}

\ex{4.2}
\begin{equation}\label{key}
\mqty|-E_{\corr} & K_{12}\\ K_{12} & 2\Delta-E_{\corr}| = 0
\end{equation}
\begin{equation}\label{key}
-E_{\corr}(2\Delta-E_{\corr}) - K_{12}^2 = 0
\end{equation}
\begin{equation}\label{key}
E_{\corr} = \dfrac{2\Delta \pm \sqrt{4\Delta^2 + 4K_{12}^2}}{2} = \Delta \pm \sqrt{\Delta^2 + K_{12}^2}
\end{equation}
choosing the lowest eigenvalue,
\begin{equation}\label{key}
E_{\corr} = \Delta - \sqrt{\Delta^2 + K_{12}^2}
\end{equation}

\ex{4.3}
At $ R = 1.4 $,
\begin{align}
\Delta &= \varepsilon_2 - \varepsilon_1 + \dfrac{1}{2}(J_{11} + J_{22}) - 2J_{12} + K_{12} \notag\\
&= 0.6703 + 0.5782 + \dfrac{1}{2}(0.6746 + 0.6975) - 2\times 0.6636 + 0.1813 \notag\\
&= 0.78865
\end{align}
\begin{align}
E_{\corr} = \Delta - \sqrt{\Delta^2 + K_{12}^2} = 0.78865 - \sqrt{0.78865^2 + 0.1813^2} = -0.020571
\end{align}
\begin{equation}\label{key}
c = \dfrac{E_{\corr}}{K_{12}} = \dfrac{-0.020571}{0.1813} = -0.1135
\end{equation}
As $ R\ra\infty $, $ \varepsilon_2 - \varepsilon_1 \ra 0 $, all 2e integrals $ \ra \dfrac{1}{2}(\phi_1\phi_1|\phi_1\phi_1) $, thus
\begin{align}
\lim\limits_{R\ra\infty}\Delta = 0 + \lim\limits_{R\ra\infty} \qty[\dfrac{1}{2}(J_{11} + J_{22}) - 2J_{12} + K_{12}] = 0
\end{align}
\begin{equation}\label{key}
\lim\limits_{R\ra\infty} E_{\corr} =  -\lim\limits_{R\ra\infty} K_{12}
\end{equation}
\begin{equation}\label{key}
\lim\limits_{R\ra\infty} c = \lim\limits_{R\ra\infty} \dfrac{E_{\corr}}{K_{12}} = -1
\end{equation}
As $ R\ra\infty $, the full CI wave function will be
\begin{equation}\label{key}
\ket{\Phi_0} = \ket{\Psi_0} - \ket{\Psi_{1\bar{1}}^{2\bar{2}}} = \ket{\psi_1\bar\psi_1} - \ket{\psi_2\bar\psi_2}
\end{equation}
Since
\begin{align}
\psi_1 &= \dfrac{1}{\sqrt{2(1 + S_{12})}}(\phi_1 + \phi_2) \\
\psi_2 &= \dfrac{1}{\sqrt{2(1 - S_{12})}}(\phi_1 - \phi_2)
\end{align}
we get
\begin{align}
\ket{\psi_1\bar\psi_1} &= \dfrac{1}{2(1 + S_{12})} \qty(\ket{\phi_1\bar\phi_1} + \ket{\phi_1\bar\phi_2} + \ket{\phi_2\bar\phi_1} + \ket{\phi_2\bar\phi_2}) \\
\ket{\psi_2\bar\psi_2} &= \dfrac{1}{2(1 - S_{12})} \qty(\ket{\phi_1\bar\phi_1} - \ket{\phi_1\bar\phi_2} - \ket{\phi_2\bar\phi_1} + \ket{\phi_2\bar\phi_2})
\end{align}
As $ R\ra\infty $, $ S_{12}\ra 0 $, thus
\begin{align}
\ket{\Phi_0} = \ket{\psi_1\bar\psi_1} - \ket{\psi_2\bar\psi_2} = \ket{\phi_1\bar\phi_2} + \ket{\phi_2\bar\phi_1}
\end{align}
Renormalize it, we get
\begin{equation}\label{key}
\ket{\Phi_0} = \dfrac{1}{\sqrt{2}}\qty(\ket{\phi_1\bar\phi_2} + \ket{\phi_2\bar\phi_1})
\end{equation}

\subsection{Doubly Exited CI}

\subsection{Some Illustrative Calculations}

\subsection{Natural Orbitals and the 1-Particle Reduced DM}
\ex{4.4}
\begin{equation}\label{key}
\gamma_{ij} = \int\dd\vb{x}_1\dd\vb{x}'_1 \chi_i^*(\vb{x}_1) \gamma(\vb{x}_1,\vb{x}'_1) \chi_j(\vb{x}'_1)
\end{equation}
\begin{align}
\gamma_{ji}^* &= \int\dd\vb{x}_1\dd\vb{x}'_1 \chi_j(\vb{x}_1) \gamma^*(\vb{x}_1,\vb{x}'_1) \chi_i^*(\vb{x}'_1) \notag\\
&= \int\dd\vb{x}'_1\dd\vb{x}_1 \chi_j(\vb{x}'_1) \gamma^*(\vb{x}'_1,\vb{x}_1) \chi_i^*(\vb{x}_1) \notag\\
&= \int\dd\vb{x}'_1\dd\vb{x}_1 \chi_j(\vb{x}'_1) \gamma(\vb{x}_1,\vb{x}'_1) \chi_i^*(\vb{x}_1) \notag\\
&= \gamma_{ij}
\end{align}
$ \therefore \bm\gamma$ is Hermitian.

\ex{4.5}
\begin{align}
\Braket{\Phi | \Phi}
&= \dfrac{1}{N} \int\dd\vb{x}_1  \gamma(\vb{x}_1,\vb{x}_1) \notag\\
&= \dfrac{1}{N} \int\dd\vb{x}_1  \sum_{ij} \chi_i(\vb{x}_1) \gamma_{ij} \chi_j^*(\vb{x}_1) \notag\\
&= \dfrac{1}{N} \sum_{ij} \qty[\int\dd\vb{x}_1 \chi_j^*(\vb{x}_1) \chi_i(\vb{x}_1)] \gamma_{ij}  \notag\\
&= \dfrac{1}{N} \sum_{ij} \delta_{ji} \gamma_{ij} \notag\\
&= \dfrac{1}{N} \tr \bm\gamma
\end{align}
thus
\begin{equation}\label{key}
\tr \bm\gamma = N
\end{equation}

\ex{4.6}
\subex{a.}
\begin{align}
\Braket{\Phi | \mathscr{O}_1 | \Phi} &= \sum_i \Braket{\Phi | h(\vb{x}_1) | \Phi} \notag\\
&= N \int\dd\vb{x}_1 \int\dd\vb{x}_2\cdots\dd\vb{x}_N \Phi^*(\vb{x}_1,\cdots,\vb{x}_N) h(\vb{x}_1) \Phi(\vb{x}_1,\cdots,\vb{x}_N) \notag\\
&= N \dfrac{1}{N}\int\dd\vb{x}_1 [h(\vb{x}_1) \gamma(\vb{x}_1,\vb{x}'_1)]_{\vb{x}'_1=\vb{x}_1} \notag\\
&= \int\dd\vb{x}_1 [h(\vb{x}_1) \gamma(\vb{x}_1,\vb{x}'_1)]_{\vb{x}'_1=\vb{x}_1}
\end{align}
\subex{b.}
\begin{align}
\Braket{\Phi | \mathscr{O}_1 | \Phi}
&= \int\dd\vb{x}_1 [h(\vb{x}_1) \gamma(\vb{x}_1,\vb{x}'_1)]_{\vb{x}'_1=\vb{x}_1} \notag\\
&= \int\dd\vb{x}_1 [h(\vb{x}_1) \sum_{ij} \chi_i(\vb{x}_1) \gamma_{ij} \chi_j^*(\vb{x}'_1)]_{\vb{x}'_1=\vb{x}_1} \notag\\
&= \sum_{ij} \qty[\int\dd\vb{x}_1 \chi_j^*(\vb{x}_1) h(\vb{x}_1)\chi_i(\vb{x}_1)] \gamma_{ij}  \notag\\
&= \sum_{ij} h_{ji} \gamma_{ij} \notag\\
&= \sum_j (\vb{h}\bm\gamma)_{jj} \notag\\
&= \tr (\vb{h}\bm\gamma)
\end{align}

\ex{4.7}
\subex{a.}
\begin{align}
\Braket{\Phi | \mathscr{O}_1 | \Phi}
&= \sum_{ij} \Braket{i | h | j} \Braket{\Phi | a_i^+ a_j | \Phi}
\end{align}
while
\begin{align}
\Braket{\Phi | \mathscr{O}_1 | \Phi}
&= \sum_{ij} h_{ij} \gamma_{ji}
\end{align}
$ \therefore $
\begin{equation}\label{key}
\gamma_{ji} = \Braket{\Phi | a_i^+ a_j | \Phi}
\end{equation}
i.e.
\begin{equation}\label{key}
\gamma_{ij} = \Braket{\Phi | a_j^+ a_i | \Phi}
\end{equation}
\subex{b.}
\begin{equation}\label{key}
\gamma_{ij}^{\text{HF}} = \Braket{\Psi_0 | a_j^+ a_i | \Psi_0} %= \delta_{ij} - \Braket{\Psi_0 | a_i a_j^+ | \Psi_0}
\end{equation}
If $ i $ is unoccupied, thus $ \gamma_{ij}^{\text{HF}} = 0 $ as we cannot annihilate electrons from it. If $ j $ is unoccupied, \\
$ \gamma_{ij}^{\text{HF}} = \delta_{ij} - \Braket{\Psi_0 | a_i a_j^+ | \Psi_0} = \delta_{ij} - \delta_{ij} = 0 $.\\
Otherwise, when $ i,j $ are occupied, it's clear that $ \gamma_{ij}^{\text{HF}} = \delta_{ij} $.\\
Thus,
\begin{equation}\label{key}
\gamma_{ij}^{\text{HF}} = \left\{
\mqty{\delta_{ij} & i,j\text{ are occupied} \vspace{5pt}\\
	  0 & \text{otherwise} }\right.
\end{equation}

\ex{4.8}
\subex{a.}
Since
%$ \ket{^1\Psi_1^r}, \ket{^1\Psi_{11}^{rs}} $ can be expressed as linear combinations of $ \ket{\psi_i\bar\psi_j} $
\begin{equation}\label{key}
\ket{^1\Phi_0} = c_0\ket{\psi_1\bar\psi_1} + \sum_{r=2}^K c_1^r \dfrac{1}{\sqrt{2}}\qty(\ket{\psi_1\bar\psi_r} + \ket{\psi_r\bar\psi_1}) + \dfrac{1}{2}\sum_{r=2}^K\sum_{s=2}^K c_{11}^{rs}\dfrac{1}{\sqrt{2}} \qty(\ket{\psi_r\bar\psi_s} + \ket{\psi_s\bar\psi_r})
\end{equation}
we can write
\begin{equation}\label{key}
\ket{^1\Phi_0} = \sum_i^K \sum_j^K C_{ij}\ket{\psi_i\bar\psi_j}
\end{equation}
When one or two of $ i,j $ equals $ 1 $, it is clear that $ C_{ij} = C_{ji} $. Otherwise, $ c_{11}^{rs} = c_{11}^{sr} $. \\
Thus, $ \vb{C} $ is symmetric.
\subex{b.}
\begin{align}
\gamma(\vb{x}_1,\vb{x}'_1) &= 2\int\dd\vb{x}_2 \sum_{ij} C_{ij} \dfrac{1}{\sqrt{2}} \qty(\psi_i(\vb{x}_1)\bar\psi_j(\vb{x}_2) - \psi_i(\vb{x}_2)\bar\psi_j(\vb{x}_1))
\sum_{kl} C^*_{kl} \dfrac{1}{\sqrt{2}} \qty(\psi_k^*(\vb{x}'_1)\bar\psi_l^*(\vb{x}_2) - \psi_k^*(\vb{x}_2)\bar\psi_l^*(\vb{x}'_1)) \notag\\
&= \sum_{ij}\sum_{kl} C_{ij} C^*_{kl} \int\dd\vb{x}_2 \qty(\psi_i(\vb{x}_1)\bar\psi_j(\vb{x}_2) - \psi_i(\vb{x}_2)\bar\psi_j(\vb{x}_1))
\qty(\psi_k^*(\vb{x}'_1)\bar\psi_l^*(\vb{x}_2) - \psi_k^*(\vb{x}_2)\bar\psi_l^*(\vb{x}'_1)) \notag\\
&= \sum_{ij}\sum_{kl} C_{ij} C^*_{kl}
\qty[\psi_i(\vb{x}_1)\psi_k^*(\vb{x}'_1)\delta_{jl}
 + \bar\psi_j(\vb{x}_1)\bar\psi_l^*(\vb{x}'_1)\delta_{ik}
] \notag\\
&= \sum_{ij}\sum_k C_{ij} C^*_{kj} \psi_i(\vb{x}_1)\psi_k^*(\vb{x}'_1)
+ \sum_{ij}\sum_l C_{ij} C^*_{il} \bar\psi_j(\vb{x}_1)\bar\psi_l^*(\vb{x}'_1)
 \notag\\
&= \sum_{ik} (\vb{C}\vb{C}^\dagger)_{ik} \psi_i(\vb{x}_1)\psi_k^*(\vb{x}'_1)
+ \sum_{jl} (\vb{C}^\dagger\vb{C})_{lj} \bar\psi_j(\vb{x}_1)\bar\psi_l^*(\vb{x}'_1)
\notag\\
&= \sum_{ij} (\vb{C}\vb{C}^\dagger)_{ij} \psi_i(\vb{x}_1)\psi_j^*(\vb{x}'_1)
+ \sum_{ij} (\vb{C}\vb{C}^\dagger)_{ji} \bar\psi_i(\vb{x}_1)\bar\psi_j^*(\vb{x}'_1)
\notag\\
&= \sum_{ij} (\vb{C}\vb{C}^\dagger)_{ij} \qty[\psi_i(1)\psi_j^*(1')
+ \bar\psi_i(1)\bar\psi_j^*(1')]
\end{align}
\subex{c.}
%Since $ \vb{U} $ is unitary and $ \vb{C} $ is symmetric,
\begin{equation}\label{key}
\vb{d} = \vb{U}^\dagger\vb{C}\vb{U}
\end{equation}
\begin{equation}\label{key}
\vb{d}^\dagger = (\vb{U}^\dagger\vb{C}\vb{U} )^\dagger = \vb{U}^\dagger\vb{C}^\dagger\vb{U}
\end{equation}
Since $ \vb{U} $ is unitary
\begin{equation}\label{key}
\vb{d}^2 = \vb{d}\vb{d}^\dagger = \vb{U}^\dagger\vb{C}\vb{U} \vb{U}^\dagger\vb{C}^\dagger\vb{U} = \vb{U}^\dagger\vb{C}\vb{C}^\dagger\vb{U}
\end{equation}
\subex{d.}
Since
\begin{equation}\label{key}
\psi_k = \sum_i U^\dagger_{ik} \zeta_i
\end{equation}
\begin{align}
\gamma(\vb{x}_1,\vb{x}'_1) &= \sum_{ij} (\vb{C}\vb{C}^\dagger)_{ij} \qty[\psi_i(1)\psi_j^*(1')
+ \bar\psi_i(1)\bar\psi_j^*(1')] \notag\\
&=  \sum_{ij} (\vb{C}\vb{C}^\dagger)_{ij} \qty[\sum_k U^\dagger_{ki}\zeta_k(1)\sum_l U^{\dagger*}_{lj}\zeta_l^*(1')
+ \sum_k U^\dagger_{ki}\bar\zeta_k(1)\sum_l U^{\dagger*}_{lj}\bar\zeta_l^*(1')] \notag\\
&=  \sum_k\sum_l \sum_{ij} U^\dagger_{ki} (\vb{C}\vb{C}^\dagger)_{ij} U_{jl} \qty[\zeta_k(1) \zeta_l^*(1')
+ \bar\zeta_k(1)\bar\zeta_l^*(1')] \notag\\
&=  \sum_k\sum_l (\vb{U}^\dagger \vb{C}\vb{C}^\dagger \vb{U})_{kl} \qty[\zeta_k(1) \zeta_l^*(1')
+ \bar\zeta_k(1)\bar\zeta_l^*(1')] \notag\\
&=  \sum_k\sum_l d^2_k \delta_{kl} \qty[\zeta_k(1) \zeta_l^*(1')
+ \bar\zeta_k(1)\bar\zeta_l^*(1')] \notag\\
&= \sum_k d^2_k \qty[\zeta_k(1) \zeta_k^*(1')
+ \bar\zeta_k(1) \bar\zeta_k^*(1')]
\end{align}
\subex{e.}
\begin{align}
\ket{^1\Phi_0} &= \sum_i^K \sum_j^K C_{ij} \ket{\psi_i\bar\psi_j} \notag\\
&= \sum_i^K \sum_j^K C_{ij} \Ket{ \qty(\sum_k U^\dagger_{ki} \zeta_k)\qty(\sum_l U^\dagger_{lj} \bar\zeta_l)} \notag\\
&= \sum_i^K \sum_j^K \sum_k\sum_l U^\dagger_{ki} C_{ij} U_{jl} \ket{ \zeta_k  \bar\zeta_l} \notag\\
&= \sum_k\sum_l d_{k}\delta_{kl} \ket{ \zeta_k  \bar\zeta_l} \notag\\
&= \sum_k d_{k} \ket{ \zeta_k  \bar\zeta_k}
\end{align}

\subsection{The MCSCF and the GVB Methods}
\ex{4.9}
\subex{a.}
\begin{align}
\Braket{u|u} &= \dfrac{1}{a^2 + b^2} \Braket{a\psi_A + b\psi_B | a\psi_A + b\psi_B} \notag\\
&= \dfrac{1}{a^2 + b^2} (a^2 + b^2) \notag\\
&= 1
\end{align}
\begin{align}
\Braket{v|v} &= \dfrac{1}{a^2 + b^2} \Braket{a\psi_A - b\psi_B | a\psi_A - b\psi_B} \notag\\
&= \dfrac{1}{a^2 + b^2} (a^2 + b^2) \notag\\
&= 1
\end{align}
\begin{align}
\Braket{u|v} &= \dfrac{1}{a^2 + b^2} \Braket{a\psi_A + b\psi_B | a\psi_A - b\psi_B} \notag\\
&= \dfrac{a^2 - b^2}{a^2 + b^2}
\end{align}
\subex{b.}
\begin{align}
\ket{\Psi_{\gvb}} &= [2(1 + S^2)]^{-1/2} [u(1)v(2) + u(2)v(1)] 2^{-1/2} [\alpha(1)\beta(2) - \alpha(2)\beta(1)] \notag\\
&= \qty[2 + 2\qty(\dfrac{a^2-b^2}{a^2+b^2})^2]^{-1/2} (a^2 + b^2)^{-1} \notag\\
&{}\quad \cross [(a\psi_A(1) + b\psi_B(1))(a\psi_A(2) - b\psi_B(2)) + (a\psi_A(2) + b\psi_B(2))(a\psi_A(1) - b\psi_B(1))] \notag\\
&{}\quad \cross 2^{-1/2} [\alpha(1)\beta(2) - \alpha(2)\beta(1)] \notag\\
&= \qty[2(a^2 + b^2)^2 + 2\qty(a^2-b^2)^2]^{-1/2} [2a^2\psi_A(1)\psi_A(2) - 2b^2\psi_B(1)\psi_B(2)] \cross 2^{-1/2} [\alpha(1)\beta(2) - \alpha(2)\beta(1)] \notag\\
&= \qty[4(a^4 + b^4)]^{-1/2} [2a^2\psi_A(1)\psi_A(2) - 2b^2\psi_B(1)\psi_B(2)] \cross 2^{-1/2} [\alpha(1)\beta(2) - \alpha(2)\beta(1)] \notag\\
&= \qty(a^4 + b^4)^{-1/2} [a^2\psi_A(1)\psi_A(2) - b^2\psi_B(1)\psi_B(2)] \cross 2^{-1/2} [\alpha(1)\beta(2) - \alpha(2)\beta(1)]
\end{align}
i.e.
\begin{align}
\ket{\Psi_{\gvb}} &= \qty(a^4 + b^4)^{-1/2}a^2 \cross 2^{-1/2} \psi_A(1)\psi_A(2)[\alpha(1)\beta(2) - \alpha(2)\beta(1)] \notag\\
&{}\quad - \qty(a^4 + b^4)^{-1/2}b^2 \cross 2^{-1/2} \psi_B(1)\psi_B(2)[\alpha(1)\beta(2) - \alpha(2)\beta(1)]  \notag\\
&= \qty(a^4 + b^4)^{-1/2}a^2 \ket{\psi_A\bar\psi_A} - \qty(a^4 + b^4)^{-1/2}b^2 \ket{\psi_B\bar\psi_B}
\end{align}
thus $ \ket{\Psi_{\gvb}} $ is identical to $ \ket{\Psi^{\text{MCSCF}}} $.

\subsection{Truncated CI and the Size-consistency Problem}
\ex{4.10}
\begin{align}
\Braket{\Psi_0 | \sH | 1_1\bar{1}_1 2_1 \bar{2}_1} &= \Braket{1_2\bar{1}_2 || 2_1 \bar{2}_1} \notag\\
&= \Braket{1_2\bar{1}_2 | 2_1 \bar{2}_1} - \Braket{1_2\bar{1}_2 | \bar{2}_1 2_1 } \notag\\
&= [1_2 2_1 | \bar{1}_2\bar{2}_1] - [1_2 \bar{2}_1 | \bar{1}_2 2_1] \notag\\
&= (1_2 2_1 | 1_2 2_1) \notag\\
&= 0
\end{align}
\begin{align}
\Braket{2_1\bar{2}_1 1_2\bar{1}_2 | \sH | 1_1\bar{1}_1 2_1 \bar{2}_1} &= \Braket{2_1\bar{2}_1 1_2\bar{1}_2 | \sH | 2_1 \bar{2}_1 1_1\bar{1}_1} \notag\\
&= \Braket{1_2\bar{1}_2 || 1_1\bar{1}_1} \notag\\
&= \Braket{1_2\bar{1}_2 | 1_1\bar{1}_1} - \Braket{1_2\bar{1}_2 | \bar{1}_1 1_1} \notag\\
&= [1_2 1_1 | \bar{1}_2\bar{1}_1] - [1_2 \bar{1}_1 | \bar{1}_2 1_1] \notag\\
&= (1_2 1_1 | 1_2 1_1) \notag\\
&= 0
\end{align}
\begin{align}
\Braket{1_1\bar{1}_1 2_2\bar{2}_2 | \sH | 1_1\bar{1}_1 2_1 \bar{2}_1}
%&= \Braket{2_1\bar{2}_1 1_2\bar{1}_2 | \sH | 2_1 \bar{2}_1 1_1\bar{1}_1} \notag\\
&= \Braket{2_2\bar{2}_2 || 2_1 \bar{2}_1} \notag\\
&= \Braket{2_2\bar{2}_2 | 2_1 \bar{2}_1} - \Braket{2_2\bar{2}_2 | \bar{2}_1 2_1} \notag\\
&= [2_2 2_1 | \bar{2}_2\bar{2}_1] - [2_2 \bar{2}_1 | \bar{2}_2 2_1] \notag\\
&= (2_2 2_1 | 2_2 2_1) \notag\\
&= 0
\end{align}

\ex{4.11}
\begin{align}
\dfrac{^N E_{\corr}(\text{DCI})}{N} = \dfrac{\Delta - (\Delta^2 + N K_{12}^2)^{1/2}}{N}
\end{align}
From Ex 4.3, we get $ \Delta = 0.78865 $, $ K_{12} = 0.1813 $, thus
\begin{table}[H]
	\centering
	\begin{tabular}{cc}
		\hline
		\specialrule{0em}{1pt}{2pt}
		$ N $ & $ ^N E_{\corr}(\text{DCI})/N $ 	\\ \hline
		1   & -0.02057\\
		10  & -0.01864\\
		100 & -0.01188\\ \hline
	\end{tabular}
\end{table}

\ex{4.12}
\subex{a.}
In addition to the matrix elements obtained in Eq. 4.56 in the textbook, we need to calculate the rest, i.e. those involving $ \ket{2_1\bar{2}_1 2_2\bar{2}_2} $.
\begin{align}
\Braket{\Psi_0 | \sH | 2_1\bar{2}_1 2_2\bar{2}_2} &= 0
\end{align}
\begin{align}
\Braket{2_1 \bar{2}_1 1_2\bar{1}_2 | \sH | 2_1\bar{2}_1 2_2\bar{2}_2} &= \Braket{1_2\bar{1}_2 || 2_2\bar{2}_2} \notag\\
&= \Braket{1_2\bar{1}_2 | 2_2\bar{2}_2} - \Braket{1_2\bar{1}_2 | \bar{2}_2 2_2} \notag\\
&= [1_2 2_2|\bar{1}_2 \bar{2}_2] - [1_2 \bar{2}_2 |\bar{1}_2 2_2] \notag\\
&= (12|12) \notag\\
&= K_{12} \\
\Braket{1_1 \bar{1}_1 2_2\bar{2}_2 | \sH | 2_1\bar{2}_1 2_2\bar{2}_2} &= \Braket{1_1 \bar{1}_1 || 2_1\bar{2}_1} \notag\\
&= \Braket{1_1 \bar{1}_1 | 2_1\bar{2}_1} - \Braket{1_1 \bar{1}_1 |\bar{2}_1 2_1} \notag\\
&= [1_1 2_1|\bar{1}_1 \bar{2}_1] - [1_1 \bar{2}_1 |\bar{1}_1 2_1] \notag\\
&= (12|12) \notag\\
&= K_{12}
\end{align}
\begin{align}
\Braket{2_1\bar{2}_1 2_2\bar{2}_2 | \sH - E_0 | 2_1\bar{2}_1 2_2\bar{2}_2} &= 4h_{22} + 2J_{22} - 4h_{11} - 2J_{11} \notag\\
&= 4\Delta
\end{align}
thus the full CI equation is
\begin{equation}\label{key}
\mqty(0 & K_{12} & K_{12} & 0\\
      K_{12} & 2\Delta & 0 & K_{12}\\
      K_{12} & 0 & 2\Delta & K_{12}\\
      0 & K_{12} & K_{12} & 4\Delta)
\mqty(1\\ c_1 \\ c_2 \\ c_3) = {^2 E}_{\corr} \mqty(1\\ c_1 \\ c_2 \\ c_3)
\end{equation}
\iffalse
\subex{b.}
\begin{align}
K_{12} (c_1 + c_2) &= {^2 E}_{\corr} \\
K_{12} + 2\Delta c_1 + K_{12}c_3 &= {^2 E}_{\corr}c_1 \label{b2}\\
K_{12} + 2\Delta c_2 + K_{12}c_3 &= {^2 E}_{\corr}c_2 \label{b3}\\
K_{12}(c_1 + c_2) + 4\Delta c_3 &= {^2 E}_{\corr}c_3
\end{align}
From $ \eqref{b2}\eqref{b3} $, we get
\begin{equation}\label{key}
(2\Delta - {^2 E}_{\corr})(c_1 - c_2) = 0
\end{equation}
thus
\begin{equation}\label{key}
c_1 = c_2
\end{equation}
$ \therefore $
\begin{equation}\label{key}
{^2 E}_{\corr} = 2 K_{12} c_1
\end{equation}
\fi
\subex{e.}
Directly solve the full CI equation (see \code{4-11,12.nb}), we get the lowest eigenvalue
\begin{equation}\label{key}
{^2 E}_{\corr} = 2[\Delta - \sqrt{\Delta^2 + K_{12}^2}]
\end{equation}

\ex{4.13}
\begin{align}
{^1 E}_{\corr}(\text{exact}) &= \Delta - \sqrt{\Delta^2 + K_{12}^2} \notag\\
&= \Delta - \Delta\sqrt{1 + \dfrac{K_{12}^2}{\Delta^2}} \notag\\
&\approx \Delta - \Delta\qty(1 + \dfrac{1}{2}\dfrac{K_{12}^2}{\Delta^2}) \notag\\
&\approx -\dfrac{1}{2}\dfrac{K_{12}^2}{\Delta}
\end{align}
\begin{align}
{^N E}_{\corr}(\text{DCI}) &= \Delta - \sqrt{\Delta^2 + N K_{12}^2} \notag\\
&= \Delta - \Delta\sqrt{1 + \dfrac{N K_{12}^2}{\Delta^2}} \notag\\
&\approx \Delta - \Delta\qty(1 + \dfrac{1}{2}\dfrac{N K_{12}^2}{\Delta^2}) \notag\\
&\approx -\dfrac{1}{2}\dfrac{N K_{12}^2}{\Delta}
\end{align}

\ex{4.14}
\subex{a.}
\begin{align}
{^N E}_{\corr}(\text{DCI}) &= \Delta - \sqrt{\Delta^2 + N K_{12}^2} \notag\\
&= \Delta - \Delta\sqrt{1 + \dfrac{N K_{12}^2}{\Delta^2}} \notag\\
&= \Delta - \Delta\qty(1 + \dfrac{1}{2}\dfrac{N K_{12}^2}{\Delta^2} - \dfrac{1}{8}\dfrac{N^2 K_{12}^4}{\Delta^4} + \cdots) \notag\\
&= -\dfrac{1}{2}\dfrac{N K_{12}^2}{\Delta} + \dfrac{1}{8}\dfrac{N^2 K_{12}^4}{\Delta^3} + \cdots
\end{align}
\subex{b.}
\begin{align}
c_0^2 = \dfrac{1}{1 + N c_1^2}
\end{align}
thus
\begin{equation}\label{key}
1 - c_0^2 = \dfrac{N c_1^2}{1 + N c_1^2}
\end{equation}
\subex{c.}
\begin{align}
c_1 &= \dfrac{K_{12}}{{^N E}_{\corr}(\text{DCI}) - 2\Delta} \notag\\
&= \dfrac{K_{12}}{-\dfrac{1}{2}\dfrac{N K_{12}^2}{\Delta} + \dfrac{1}{8}\dfrac{N^2 K_{12}^4}{\Delta^3} - 2\Delta + \cdots} \notag\\
&= \dfrac{1}{-\dfrac{1}{2}\dfrac{N K_{12}}{\Delta} + \dfrac{1}{8}\dfrac{N^2 K_{12}^3}{\Delta^3} - 2\dfrac{\Delta}{K_{12}} + \cdots} \notag\\
&= -\dfrac{1}{2}\dfrac{K_{12}}{\Delta} + \cdots
\end{align}
\subex{d.}
\begin{align}
\Delta E_{\text{Davidson}} &= (1 - c_0^2) \; {^N E}_{\corr}(\text{DCI}) \\
&= \dfrac{N (-K_{12}/2\Delta)^2}{1 + N (-K_{12}/2\Delta)^2} \qty(-\dfrac{1}{2}\dfrac{N K_{12}^2}{\Delta} + \dfrac{1}{8}\dfrac{N^2 K_{12}^4}{\Delta^3} + \cdots) \notag\\
&= N \dfrac{K_{12}^2}{4\Delta^2} \qty(-\dfrac{1}{2}\dfrac{N K_{12}^2}{\Delta} + \dfrac{1}{8}\dfrac{N^2 K_{12}^4}{\Delta^3} + \cdots) \notag\\
&= -\dfrac{N^2 K_{12}^4}{8\Delta^3} +\cdots
\end{align}
\subex{e.}
\begin{align}
\Delta E_{\text{Davidson}} &= (1 - c_0^2) \; {^N E}_{\corr}(\text{DCI}) \notag\\
&= \dfrac{N c_1^2}{1 + N c_1^2} NK_{12}c_1 \notag\\
&= \dfrac{N^2 K_{12} c_1^3}{1 + N c_1^2}
\end{align}
while
\begin{equation}\label{key}
c_1 = {^N E}_{\corr}(\text{DCI}) / NK_{12}
\end{equation}
thus
\begin{align}
\Delta E_{\text{Davidson}} &= \dfrac{N^2 K_{12} c_1^3}{1 + N c_1^2} \notag\\
&= \dfrac{[{^N E}_{\corr}(\text{DCI})]^3 / NK_{12}^2}{1 + [{^N E}_{\corr}(\text{DCI})]^2 / NK_{12}^2} \notag\\
&= \dfrac{[{^N E}_{\corr}(\text{DCI})]^3}{NK_{12}^2 + [{^N E}_{\corr}(\text{DCI})]^2 }
\end{align}
Since
\begin{align}
{^N E}_{\corr}(\text{DCI}) &= \Delta - \sqrt{\Delta^2 + N K_{12}^2} \\
{^N E}_{\corr}(\text{exact}) &= N\qty[\Delta - \sqrt{\Delta^2 + K_{12}^2}]
\end{align}
\newpage
The values of $ {^N E}_{\corr}(\text{DCI}) $, $ {^N E}_{\corr}(\text{exact}) $, $ \Delta E_{\text{Davidson}} $ for $ N=1,\cdots, 20, 100 $ are as follows.
\begin{table}[H]
	%\centering
	\begin{tabular}{cccc}
	\hline
	\specialrule{0em}{1pt}{2pt}
	$ N $ & $ {^N E}_{\corr}(\text{DCI}) $ & $ {^N E}_{\corr}(\text{exact}) $ & $ \Delta E_{\text{Davidson}} $  \\ \hline
    1 & -0.020571	& -0.020571 &  -0.0002615 \\
    2 & -0.040632	& -0.041142 &  -0.0009954 \\
    3 & -0.060219	& -0.061713 &  -0.0021360	 \\
    4 & -0.079364	& -0.082284 &  -0.0036282	 \\
    5 & -0.098095	& -0.102855	 & -0.0054259	 \\
    6 & -0.116439	& -0.123426	 & -0.0074900	 \\
    7 & -0.134419	& -0.143997	 & -0.0097872	 \\
    8 & -0.152055	& -0.164567	 & -0.0122891	 \\
    9 & -0.169367	& -0.185138	 & -0.0149711	 \\
    10 & -0.186371	& -0.205709	 & -0.0178120	 \\
    11 & -0.203084	& -0.22628	 & -0.0207933	 \\
    12 & -0.219519	& -0.246851	 & -0.0238991	 \\
    13 & -0.235691	& -0.267422	 & -0.0271151	 \\
    14 & -0.251612	& -0.287993	 & -0.0304291	 \\
    15 & -0.267292	& -0.308564	 & -0.0338301	 \\
    16 & -0.282743	& -0.329135	 & -0.0373084	 \\
    17 & -0.297975	& -0.349706	 & -0.0408554	 \\
    18 & -0.312996	& -0.370277	 & -0.0444636	 \\
    19 & -0.327814	& -0.390848	 & -0.0481262	 \\
    20 & -0.342439	& -0.411419	 & -0.0518370	 \\
    100 & -1.188450 & -2.057090  & -0.3571950 \\
    \hline
	\end{tabular}
\end{table}
The values and errors of DCI energies and DCI energies with Davidson correction are as follows.
\begin{table}[H]
	%\centering
	\begin{tabular}{ccccc}
		\hline
		\specialrule{0em}{1pt}{2pt}
		 $ N $ & $ {^N E}_{\corr}(\text{DCI}) / {^N E}_{\corr}(\text{exact}) $      & Error/\% & $ [{^N E}_{\corr}(\text{DCI}) + \Delta E_{\text{Davidson}}] / {^N E}_{\corr}(\text{exact}) $ & Error/\% \\ \hline
	    1 & 1.0000	 & 0.00	& 1.0127	& -1.27  \\
		2 & 0.9876     & 1.24	& 1.0118	& -1.18  \\
		3 & 0.9758	 & 2.42	& 1.0104	& -1.04  \\
		4 & 0.9645	 & 3.55	& 1.0086	& -0.86 \\
		5 & 0.9537	 & 4.63	& 1.0065	& -0.65 \\
		6 & 0.9434	 & 5.66	& 1.0041	& -0.41 \\
		7 & 0.9335	 & 6.65	& 1.0015	& -0.15 \\
		8 & 0.9240	 & 7.60	& 0.9986	& 0.14  \\
		9 & 0.9148	 & 8.52	& 0.9957	& 0.43  \\
		10 & 0.9060	 & 9.40	& 0.9926	& 0.74  \\
		11 & 0.8975	 & 10.25	& 0.9894	& 1.06   \\
		12 & 0.8893	 & 11.07	& 0.9861	& 1.39   \\
		13 & 0.8813	 & 11.87	& 0.9827	& 1.73   \\
		14 & 0.8737	 & 12.63	& 0.9793	& 2.07   \\
		15 & 0.8662	 & 13.38	& 0.9759	& 2.41   \\
		16 & 0.8591	 & 14.10	& 0.9724	& 2.76   \\
		17 & 0.8521	 & 14.79	& 0.9689	& 3.11   \\
		18 & 0.8453	 & 15.47	& 0.9654	& 3.46   \\
		19 & 0.8387	 & 16.13	& 0.9619	& 3.81   \\
		20 & 0.8323	 & 16.77	& 0.9583	& 4.17   \\
		100 & 0.5777 & 42.23    & 0.7514    & 24.86  \\
		\hline
	\end{tabular}
\end{table}

\newpage
\subex{f.}
From data of Saxe et al., we get
\begin{equation}\label{key}
E_{\corr}(\text{DCI}) = -0.139340 \qquad c_0 = 0.97938
\end{equation}
thus
\begin{align}
\Delta E_{\text{Davidson}} &= (1 - c_0^2)E_{\corr}(\text{DCI}) \notag\\
&= (1 - 0.97938^2)\times(-76.129178) \notag\\
&= -0.005687
\end{align}
thus
\begin{table}[H]
	\begin{tabular}{ccc}
		\hline
		& correlation energy & error wrt full CI \\ \hline
		DCI + Davidson & -0.145027 & 0.003181\\
		DQCI           & -0.145859 & 0.002349\\
		Full CI        & -0.148208 & 0\\ \hline
	\end{tabular}
\end{table}

\ex{4.15}
%For $ N $ independent $ \ce{H_2} $ molecules, the normalized
\begin{align}
\Braket{\Psi_0 | \Phi_0} &= \prod_{i=1}^N \qty[(1+c^2)^{-1/2}\Braket{1_i\bar{1}_i|1_i\bar{1}_i} + c(1+c^2)^{-1/2}\Braket{1_i\bar{1}_i|2_i\bar{2}_i}] \notag\\
&= (1+c^2)^{-N/2}
\end{align}
Since
\begin{equation}\label{key}
c = \dfrac{{^1 E}_{\corr}}{K_{12}} = \dfrac{-0.020571}{0.1813} = -0.1135
\end{equation}
we get
\begin{table}[H]
	\begin{tabular}{cc}
		\hline
		$ N $ & $ \Braket{\Psi_0 | \Phi_0} $ \\ \hline
		1 & 0.9936 \\
		10 & 0.9380 \\
		100 & 0.5273 \\ \hline
	\end{tabular}
\end{table}

\end{document}


\section{\protect\uppercase{Conclusions}}

% We are looking forward to receiving your contributions for this conference.
In the current study, the convergence behavior of peridynamic simulations is investigated using the open-source PD code Peridigm. Multiple base discretization schemes are compared. Different convergence behavior is observed for base hex and tet meshes. While $m\approx3$ delivers the best results for hex meshes, $m\approx1$ can be chosen for tet discretizations in case long-range forces have no effect and PD is merely used to improve the simulation of failure compared to CM models.

The use of stochastic material distributions in PD simulations in Peridigm is possible and gives meaningful results. It has proven to be a way to check if the results obtained in PD simulations concerning failure are dominated by numerics and discretization effects or are really the dominating physical effect.

If PD is simply used to model fracture in specimen and conditions not dominated by long-range force effects, the use of tetrahedron base meshes is recommended. The horizon can then be chosen only slightly larger than the element size. Symmetry planes in the model should be avoided. In case a hexahedron mesh is used as an input, a stochastic material distribution is a possibility to increase the model entropy and to get a more consistent prediction of the dominating failure pattern.

The critical stretch damage model must be adjusted to the discretization. The bond-based relationships to the critical strain energy release rate prove unsuited for state-based models. Thus, an energy-based failure criterion will be implemented during the next development steps.


% Not sure where this fits within the overall thing anymore...

\section{melcomp\_3}

Following discussions with Laurence Maloney at the Visual Neuroscience Summer School about this work, and about his own work on colour constancy \citep{maloney_computational_1984,maloney_color_1986}, Laurence suggested a simple game: \emph{``Given cone catches from an unknown surface under an unknown illuminant, guess the illuminant. If you are able to guess the illuminant with a moderate accuracy, you've cracked colour constancy.''}

Whilst this had been an implicit thread throughout much of the work to this point, it was a neat idea to be spelled out so clearly. A reservation however, was that based on my experience with the rotational corrective transform (Figure \ref{fig:viewpoint}), it had been shown that a correction (to an illuminant-independent space) seemed possible even without explicit knowledge of the illuminant. Of course one could get an estimate of the illuminant from such a computation, but it was a potential output, not a requisite input. All the same, it was believed that solving Laurence's game with a melanopic signal would be relatively trivial.

In melcomp\_3 this was attempted, using the framework of linear modelling which Laurence is so well known for. It was used in a relatively rudimentary way, compared to the complex manner in which Laurence uses it in his thesis \citep{maloney_computational_1984}. Whereas there it is used to compute a solution to colour constancy, here it is only used it to define the light sources, and then query which signals can predict the light sources so defined.

The script starts in much the same way as in melcomp\_1 and 2, by loading data upon which to perform the computations. This time, an extended subset of the \citet{vrhel_measurement_1994} dataset is used, considering anything which could be considered natural rather than the small selection previously needed, on the basis that to consider correlation having an increased number of datapoints would be beneficial. At this stage the \gls{SP} fundamentals were used, mainly in order to obey the rules of the traditional \gls{MB} diagram \citep{macleod_chromaticity_1979}. Again the Granada data \citep{hernandez-andres_color_2001} was ussed. From these inputs, $[L,M,S,R,I]$ values were computed, along with the corresponding \gls{MB} chromaticity values and pseudo-MB values ($i_{\text{MB}}$ and $r_{\text{MB}}$) for each surface under each illuminant.

The principal component representation of each illuminant was also calculated. A variable weighting was specified, which gave most importance to wavelengths between the peak sensitivity of the S-cones and the peak sensitivity of the L-cones, before tailing off at each end (shown in Figure \ref{fig:VW}). This weighting is an important and difficult choice, and no entirely sensible solution is forthcoming\footnote{Do we care more about certain wavelengths than others? Yes. Which ones and by how much by? Unknown, and evolutionarily circular.}. \citet{maloney_evaluation_1986} discusses this further. %read and say more

\begin{figure}[htbp]
 \includegraphics[max width=\textwidth]{figs/comp/melcomp_3/vw.png}
 \caption{The variable weightings applied during the \gls{PCA} analysis. Generated by tracing the upward ramp of the S-cone sensitivity being used, plateauing at unity until the decrease of the L-cone sensitivity, and then following the decrease of the L-cone sensitivity.}
 \label{fig:VW}
\end{figure}

The principal components identified are shown in Figure \ref{fig:PCA}. The first three components account for 99.952\%, 0.037\% and 0.005\% of variance respectively.

\begin{figure}[htbp]
 \includegraphics[max width=\textwidth]{figs/comp/melcomp_3/8.png} %legend required
 \caption{The first 3 principal components for the Granada daylight dataset, conditional on the variable weighting shown in Figure \ref{fig:VW}.}
 \label{fig:PCA}
\end{figure}

% Might be neat to show the chromatic effect of each of these PCs?

The correlation was then computed for a large number of candidate signals and the scores for different components of the \glspl{SPD}. This is shown in \ref{fig:19}. Simply put, this is a way to ask: which signal was best at predicting each element of the daylight spectra upon a scene? It can be seen that $L$, $M$, $S$, $R$ and $I$ (along with all other simple additive combinations - `$L+M$', `$SP\_lum$' and `$r+i$') all have very high correlation with the first principal component score. This fundamentally reflects the high amount of variance accounted for my the \gls{PC1} for this daylight dataset - a simple sensor at almost any point in the spectrum will be able to approximate very well the score for this principal component. An example of data and a fit for this is shown in Figure \ref{fig:L-PC1}.

The ability of any of these signals to predict second or higher principal component scores is considerably poorer, and to identify which, if any, are successful the plot on the left of Figure \ref{fig:19} needs to be normalised (by column). The normalised result is shown on the right of the same figure. From this it can be seen that `$S/I$' has the highest correlation, which is particularly interesting considering the discussions at the end of the melcomp\_2, which highlighted the potential of a relationship between s-cone signals and melanopic signals.

\begin{figure}[htbp]
 \includegraphics[max width=\textwidth]{figs/comp/melcomp_3/19.png}
 \caption{Correlation coefficients between a range of signals and the first three principal component scores. On the left of a raw representation, and on the right each column is normalised between 0 and 1.}
 \label{fig:19}
\end{figure}

Looking more closely at the data underlying these correlations it can be seen that whereas the relationships for \gls{PC1} is simple (Figure \ref{fig:L-PC1}), the relationship between `$S/I$' and the \gls{PC2} is rather less simple (Figure \ref{fig:S/I-PC2}). Further examination showed that this relationship was dependent upon the PC1 value, and that by including an $L$ component (considered a biologically accessible correlate to \gls{PC1} score), a much more robust relationship could be produced. This is demonstrated in Figure \ref{fig:withPC1}. The additional value need not be $L$, and could be any other primary signal. Using each primary signal in turn instead of $L$ yields correlation coefficients of 0.916, 0.922, 0.929, 0.921 and 0.924 respectively (all high, $S$ highest).

\begin{figure}[htbp]
 \includegraphics[max width=\textwidth]{figs/comp/melcomp_3/20.png}
 \caption{The relationship between $L$ and \gls{PC1}, showing strong correlation.}
 \label{fig:L-PC1}
\end{figure}

\begin{figure}[htbp]
 \includegraphics[max width=\textwidth]{figs/comp/melcomp_3/21.png}
 \caption{The relationship between $S/I$ and \gls{PC2}, showing weak correlation, but a clear pattern.}
 \label{fig:S/I-PC2}
\end{figure}

\begin{figure}[htbp]
 \includegraphics[max width=\textwidth]{figs/comp/melcomp_3/24.png}
 \caption{The $S/I$ signal as in Figure \ref{fig:S/I-PC2} but with a component of $L$.}
 \label{fig:withPC1}
\end{figure}

At this point an unfortunate discrepancy between the desired function of the code and the actual function of the code was noted: whilst the desire had been to study colour signals for all surfaces under all illuminants, an averaging stage had unexpectedly averaged the signals such that computations were being performed using the average colour signal under each illuminant.

The impact of this distinction was that the game posed by Laurence Maloney was no longer directly being queried. Instead, the question had morphed into ``Given cone catches from \emph{a single stable surface} under an unknown illuminant, guess the illuminant.'' It is still interesting to note that '$S/I$' performs very well at recovering this information however.

% Maybe I'll come back to this and maybe I won't.


\section{Introduction}

Finite element simulations of heterogeneous materials constructed using classical finite elements frequently have difficulty capturing the internal stress-strain behavior which can be a primary driving force in the overall material response. Of particular interest are the responses of highly heterogeneous materials such as polymer bonded crystalline materials which are comprised of a hard crystalline component bound in a polymeric matrix. These materials can be found in applications as varied as asphalt or plastic explosives.

Several approaches have been developed to address these concerns but few approach it with the generality of Eringen and Suhubi(~\cite{bib:eringen64} and \cite{bib:eringen64_2}) in their, theory of ``micromorphic,'' continuum mechanics. This approach holds the promise of passing information between simulations of the microscale on macroscale response through a straightforward coupling as well as the ability to develop constitutive models which can capture this response directly utilizing the micromorphic theory alone. The framework however requires specialized finite elements which are capable of handing the multi-field nature.

Such a finite element is proposed to be developed here which will prove foundational for the research into the development and calibration of higher order continuum models. While these models are beyond the scope of the efforts detailed here, the framework to utilize them is a significant part of the overall effort. A roubust, highly verified, and documented element would provide a very useful tool in the research effort.


%*******************************************************
% Abstract
%*******************************************************
\pdfbookmark[1]{Abstract}{Abstract}
% \addcontentsline{toc}{chapter}{\tocEntry{Abstract}}

\begingroup

\let\clearpage\relax
\let\cleardoublepage\relax
\let\cleardoublepage\relax

\chapter*{Abstract}
Heart failure (HF) affects nearly a million people in the UK alone and increases the risk of cardiovascular diseases, stroke and death. At the whole-organ level, HF often manifests as impaired left ventricular (LV) contractile function. At the cellular level, LV contractile dysfunction is associated with altered sarcomere kinetics and disrupted calcium ($\Ca$) homeostasis. However, the link between cellular events and emerging pathological whole heart phenotypes is incompletely understood.

\vspace{0.2cm}
In this thesis, we aim to quantify the translation of cellular mechanisms to the LV contractile function and to elucidate the role of $\Ca$ and sarcomere dynamics in rat HF, with emphasis on the disease with preserved ejection fraction phenotype (HFpEF). We employed (Chapter~\ref{cha:chapter3}) a biophysically detailed 3D biventricular rat heart contraction mechanics model, which incorporated preload, afterload, fibre orientation, passive material properties, anatomy, $\Ca$ transient and sarcomere dynamics. The model cell-level function was described using a set of parameters (key regulators of the ionic processes and sarcomere contraction). The model organ-level behaviour was described using a set of features characterising tissue and haemodynamics properties, and the LV volume and pressure transients and the corresponding pressure-volume (PV) loop.

\vspace{0.2cm}
We first (Chapter~\ref{cha:chapter4}) fitted the model to real biventricular geometries, volumetric and functional data from a sham-operated (SHAM) and an aortic-banded (AB) 6-weeks-post-surgery rats, respectively representative of the healthy control and diseased rat cohorts from an experimental study on AB rats (diastolic HF animal model). We then characterised the LV features' sensitivity to model parameters. Model fitting was performed using the history matching (HM) technique, while uncertainty quantification was performed using Sobol' global sensitivity analysis (GSA). These normally require a large number of model evaluations to be performed. As the full forward model was too computationally expensive ($\sim 4-10$ hours per single forward calculation), we made HM and GSA performance computationally feasible by replacing the input-to-output multi-scale map with fast-evaluating ($\sim 1$ second per single forward calculation) probabilistic surrogates based on Gaussian process emulation (GPE). From now on, we will refer to the personalised (fitted) healthy SHAM rat model as ``the model''. The model constituted the starting point of the following three case studies.

\newpage
In the first case study (Chapter~\ref{cha:chapter5}), we used the model to show that it is possible to map pharmacological modulations from the sarcomere through to whole heart function and back again. As a case study, we validated the omecamtiv mecarbil (OM) mechanisms of action across scales in the healthy rat heart. Preclinical force-calcium (F-pCa) and LV haemodynamics data were used to constrain (using GPE $+$ HM) the parameter space to represent \textit{in silico} OM effects at the cellular level. The obtained spaces were then respectively mapped to features characterising the LV contractile function and to features of the F-pCa curve to show that the model predictions are in qualitative agreement with the experimentally observed OM effects at both the cell and whole-organ levels.

\vspace{0.2cm}
In the second case study (Chapter~\ref{cha:chapter6}), we first performed a validation against pharmacological channel blocking experimental literature data using a number of compounds by showing that the model can predict the observed effects on the LV contractile function. Next (Chapter~\ref{cha:chapter7}), we used the model to generate a pathological model, representing the $20$-week-old obese ZSF1 rat (HFpEF animal model). This was done by perturbing specific model parameters according to experimental evidence from the available literature on ZSF1 rats. We then recovered the ZSF1 rat model back to the healthy state (using GPE $+$ GSA $+$ HM) by perturbing different sub-groups of parameters to represent different strategies of recovery to identify potential pharmacological, cellular targets for the treatment of HFpEF in rats.

\vspace{0.2cm}
In the third case study (Chapter~\ref{cha:chapter8}), we used the model to demonstrate that changes in the F-pCa relationship do not uniquely map to observed changes in the LV function and vice versa. This result sheds new light on the assessment of myofilament $\Ca$ sensitivity using F-pCa shifts and the corresponding predictions on the LV contractile function based on F-pCa shifts.

\vspace{0.2cm}
We have built a virtual platform that can be used to efficiently test different pharmacological interventions and provide an indication of/identify potential pharmaceutical, cellular targets for ``virtually'' treating HFpEF in rats. This was done by using computational models of cardiac mechanics and their probabilistic surrogates to quantify how normal/pathological cellular function is translated into normal/altered whole heart function. We have demonstrated the feasibility of applying Bayesian probabilistic techniques to small mammalian (rat) healthy and diseased $3$D models of cardiac mechanics. This thesis constitutes an important step towards applications to more complex systems ($3$D contractile human heart) for personalised medicine.

\vspace{0.2cm}
The $3$D rat heart contraction mechanics model code and GPE, GSA, HM techniques' implementations are available open access~\cite{zenodo:2021,Historia:2021,GPErks:2021}. The scripts for generating the figures of all the main results of this thesis are available upon request.

\endgroup

\vfill