\section{Test pixel performance}
\label{sec:testp}

\subsection{Test pixel performance and calibration}
\label{sec:testp:calibration}

As described in section~\ref{sec:design:test},
the sensors included test pixels outside the
$168\times 168$ ``bulk'' pixel array. 
Several internal nodes
of these pixels are accessible externally,
allowing analogue measurements of their levels.
%Results are given here only for the pre-shaper test pixels
%on TPAC~1.1 as the pre-sampler pixels were not found to work
%well; see section~\ref{sec:pixel:peds}.

A low noise pre-amplifier was connected to the output
node from the charge preamplifier, the ``Test Output
Signal'' shown in figure~\ref{fig:design:testpresample}
for the pre-shaper on TPAC~1.1,
and the signals were measured on a digital oscilloscope
with a 5\,GHz sampling rate.
%Allowing for a gain of 0.8 in the external output buffers,
%the RMS
%of the signal gives a direct measure of the noise
%on the signal input line to the comparator.
%For the TPAC~1.0, pre-sampler 
%the raw RMS value was found to be 3.5\,mV, implying
%the noise at the comparator input was 4.4\,mV.
%For the TPAC~1.1 pre-shaper,
%the equivalent values were X.X\,mV and Y.Y\,mV.
%
%To get an absolute calibration of the gain and hence
%of these noise values,
This system was used to measure the peak signal seen
when the test pixels were exposed to the $^{55}$Fe source.
A powerful
source, O(GBq), allowed a sufficient rate of source hits
that a calibration signal could be seen in the
individual test pixels. Two different oscilloscope trigger
threshold levels, 30 and 120\,mV,
allowed the plateau and full energy peaks, respectively, to be measured
separately. 
An exponential rise was convoluted with the pixel circuit
response (the pre-amplifier and CR-RC shaper) and the resulting
functional form fitted to the oscilloscope data to extract the
peak magnitude, the exponential rise time and the start time of the
signal for each trigger.

The spectra of the magnitude of the fitted peak signals observed 
in 12\,$\mu$m epitaxial layer sensors
are shown in figures~\ref{fig:testp:testiron}.
and \ref{fig:testp:testiron05}.
Comparing the plateau peaks to the simulation,
the data spectra correspond roughly to an equivalent charge fraction
as shown in figure~\ref{fig:simulation:diffspectrum},
and \ref{fig:simulation:diffspectrum05}.
For the 12\,$\mu$m epitaxial thickness case,
it is seen that the plateau peak position
and the relative rates for deep P-well and no deep P-well are
in reasonable agreement, although the peak width is clearly
much broader in the data. Given the simple level of
simulation used, this is not unreasonable.
For the 5\,$\mu$m epitaxial thickness case, there is no clear
peak; the absence of the peak predicted by the simulation is 
not understood.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=7cm]{testp/highT0.png}
\includegraphics[width=7cm]{testp/highT1.png}
\includegraphics[width=7cm]{testp/highT2.png}
\includegraphics[width=7cm]{testp/highT3.png}
\caption{\sl 
Test pixel peak signal spectra when exposed to $^{55}$Fe photons
for deep P-well (red) and non-deep P-well (blue) sensors.
Left: peaks of $^{55}$Fe signal around plateau energy, normalised to
equivalent exposures.
Right: peaks of $^{55}$Fe signal around full energy;
the prominent peaks around 225\,mV are from K$_\alpha$ photons 
of energy 5.9\,keV, while the 
smaller peaks around 250\,mV are due to K$_\beta$ photons of energy 6.5\,keV.
%The oscilloscope
%threshold was close to the lower edge of the plot and causes some
%distortion between 40 and 50\,mV.
These spectra are from sensors with a 12\,$\mu$m thick epitaxial layer.
}
\label{fig:testp:testironhi}
\end{center}
\end{figure}
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=7cm]{testp/lowT0.png}
\includegraphics[width=7cm]{testp/lowT1.png}
\includegraphics[width=7cm]{testp/lowT2.png}
\includegraphics[width=7cm]{testp/lowT3.png}
\caption{\sl 
Test pixel peak signal spectra when exposed to $^{55}$Fe photons
for deep P-well (red) and non-deep P-well (blue) sensors.
Left: peaks of $^{55}$Fe signal around plateau energy, normalised to
equivalent exposures.
Right: peaks of $^{55}$Fe signal around full energy;
the prominent peaks around 225\,mV are from K$_\alpha$ photons 
of energy 5.9\,keV, while the 
smaller peaks around 250\,mV are due to K$_\beta$ photons of energy 6.5\,keV.
%The oscilloscope
%threshold was close to the lower edge of the plot and causes some
%distortion between 40 and 50\,mV.
These spectra are from sensors with a 12\,$\mu$m thick epitaxial layer.
}
\label{fig:testp:testironlo}
\end{center}
\end{figure}

%The results for noise and peak positions for
%pixels from the types of sensors measured are shown in
%table~\ref{tab:testp:iron}.

The noise measured by the oscilloscope is 3\,mV. Both this noise
and the
full energy peak positions are consistent both with and without
deep P-well , showing the deep P-well implant
does not affect the circuit performance. 
%The $5\,\mu$m epitaxial
%layer thickness sensors have a slightly smaller gain than for the
%$12\,\mu$m thickness, which is not understood. 
%Correcting the 
%full peak value by 10\% for the faster charge collection (see
%section~\ref{sec:simulation}), then, as this 
For the deep p-well,  $12\,\mu$m epitaxial
thickness, the full peak corresponds to
$1620\,e^-$ charge, so the noise is equivalent to $22\,e^-$.
% for all sensors.
Allowing for a gain of 0.8 in the external low-noise preamplifier,
the pre-shaper gain is measured to be $160\,\mu$V$/e^-$.
% for$12\,\mu$m thickness. 
These values are
completely consistent with the expectations given in
section~\ref{sec:design:preshape}.
In addition, the ratio
of the plateau to full peaks is 34\%
% for $12\,\mu$m epitaxial
%thickness.% and 25\% for $5\,\mu$m thickness. The former 
which is in
reasonable agreement with the simple diffusion simulation,
see figure~\ref{fig:simulation:diffspectrum}. %, while the latter
%is somewhat lower than expected, 
%see figure~\ref{fig:simulation:diffspectrum05}. 
Given the
approximations used in this model, the agreement is regarded
as sufficient to be confident that the source of these
peaks is understood.

As a final check of the origin of these peaks, 
figure~\ref{fig:testp:irontime}
shows the correlation of the fitted exponential
rise time constants of the signals as a function of the
fitted peak signal magnitude. 
The full peak values have rise times of around 10\,ns
while the deposits resulting in the plateau peak have a rise time
of around 70\,ns.
The strong correlation shows the highest peak values, which correspond to
the diode interactions, have the shortest time constant, as expected,
while the plateau signal, from lower in the epitaxial layer, has a slow
collection time;
see Section~\ref{sec:simulation}.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=7cm]{testp/highTime0.png}
\includegraphics[width=7cm]{testp/highTime1.png}
\includegraphics[width=7cm]{testp/highTime2.png}
\includegraphics[width=7cm]{testp/highTime3.png}
\caption{\sl 
Deep P-well test pixel signals when exposed to $^{55}$Fe photons,
showing the number of events (indicated by the colour scale)
seen as a function of the signal
peak value and exponential time constant, both extracted from
a fit. Left: the plateau region. Right: the full peak region.
These data are from a sensor with a 12\,$\mu$m deep epitaxial layer.
}
\label{fig:testp:irontimehi}
\end{center}
\end{figure}

%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=7cm]{testp/lowTime0.png}
\includegraphics[width=7cm]{testp/lowTime1.png}
\includegraphics[width=7cm]{testp/lowTime2.png}
\includegraphics[width=7cm]{testp/lowTime3.png}
\caption{\sl 
Deep P-well test pixel signals when exposed to $^{55}$Fe photons,
showing the number of events (indicated by the colour scale)
seen as a function of the signal
peak value and exponential time constant, both extracted from
a fit. Left: the plateau region. Right: the full peak region.
These data are from a sensor with a 12\,$\mu$m deep epitaxial layer.
}
\label{fig:testp:irontimelo}
\end{center}
\end{figure}

%\begin{table}[ht!]
%\begin{center}
%\caption{\sl 
%Results of measurements on test pixels using $^{55}$Fe.
%No plateau peak is seen on sensors without deep P-well implants.
%}
%\label{tab:testp:iron}
%\bigskip
%\begin{tabular}{lccccc}
%\hline
%Pixel type & Epitaxial &  Deep  & Noise &  Plateau  & Full energy \cr
%  & thickness ($\mu$m) & P-well &  (mV) & peak (mV) &  peak (mV)  \cr\hline
%%TPAC 1.0 pre-sample & 12 & Yes &  ?  &  ?  &  ?  \cr
%%TPAC 1.0 pre-sample & 12 &  No &  ?  &  -  &  ?  \cr
%TPAC 1.1 pre-shape  & 12 & Yes & 2.8 & 76  & 226 \cr
%TPAC 1.1 pre-shape  & 12 &  No & 3.2 &  -  & 227 \cr
%%TPAC 1.0 pre-sample &  5 & Yes &  ?  &  ?  &  ?  \cr
%%TPAC 1.0 pre-sample &  5 &  No &  ?  &  -  &  ?  \cr
%TPAC 1.1 pre-shape  &  5 & Yes & 2.7 &   -  & 215 \cr
%TPAC 1.1 pre-shape  &  5 &  No & 2.8 &   -  & 207 \cr\hline
%\end{tabular}
%\end{center}
%\end{table}

%The signal full energy peak is 210\,mV which corresponds to 260\,mV 
%when including the gain of 0.8
%from the test pixel external buffers not in the standard pixel
%signal path. Hence, this determines
%the test pixel charge preamplifier gain to be 160\,$\mu$V/e$^-$. 
%This also allows the 4.4\,mV noise
%discussed above to converted to an ENC of 27\,$e^-$. This is
%the noise on one leg of the comparator input.
%The total
%noise when operating the pixel is larger by a factor of $\sqrt{2}$
%(see section~\ref{sec:design:presample}) so this would imply a
%total noise level of 38\,$e^-$.
%This is higher
%than the predicted 22\,$e^-$ for the pre-sampler design (see
%section~\ref{sec:design:presample}); the difference is not
%understood.
%
%The signal plateau peak is at 70\,mV, corresponding to 90\,mV after
%correcting for the gain. This calibrates the constant fraction of
%the signal at the plateau to be 35\%, in reasonable agreement with
%the simulation given the approximations used in the diffusion model.
%
%VALUES FOR PRE-SHAPER.
%
%\subsection{Laser scan results}
