\section{Single pixel performance}
\label{sec:pixel}

%\subsection{Circuit simulation}
%Expected noise, gain.
%
%\begin{figure}[ht!]
%\begin{center}
%\caption{\sl Simulation of noise.}
%\label{fig:pixel:simnoise}
%\end{center}
%\end{figure}


\subsection{Charge spread simulation}
\label{sec:pixel:simulation}

The signal from a minimum ionising particle (MIP)
arises as the particle passes through the epitaxial
layer of the sensor. 
%A relativistic charged particle
%will create an average of 80 electron-hole pairs per
%micron in silicon, although there are fluctuations
%around this value, as described by the Landau 
%function.
Physically, the
electron-hole pairs are created throughout the silicon
sensor, but only within (or near) the epitaxial layer
are the liberated electrons
able to diffuse to the collecting diodes and
hence be seen as signal. 
Some electrons from the 
substrate close to the epitaxial layer can also
diffuse into the epitaxial layer and so be collected.
Conversely, electrons in the deep P-well implant will
tend to be lost. 
Overall, in a 12\,$\mu$m
thick epitaxial layer, then for a MIP
at normal incidence to the sensor, 
around 1200\,$e^-$ will be available
to contribute to the signal.
Once liberated, the charge will
diffuse and so may be absorbed by the collection
diodes of the neighbouring pixel. In addition, other N-well
structures can collect the charge and hence charge will be
lost in terms of being signal. This last effect is the
reason for which the deep P-well implant was developed.

To estimate these effects quantitatively, a simulation of
the sensor pixel was performed using the 
Sentaurus~\cite{ref:pixel:sentaurus} package. The pixel
GDS design file was used as input to the simulation, 
ensuring the details of
the pixel were correctly simulated. Charge equivalent to
that expected for a MIP was deposited at various locations
within the pixel and then simulated to investigate where
it was absorbed or lost. A $3\times 3$ array of pixels
was simulated, to allow for neighbour pixel charge collection,
from the sensor surface down to 32\,$\mu$m
below ($150 \times 150 \times 32$\,$\mu$m$^3$ in total).
The simulation was time-consuming so a limited subset of 
positions were simulated. Because of the approximate
eight-fold symmetry of the sensor, all positions
simulated were within a triangle with the pixel centre,
corner, and side centre as its three corners. Within this
triangle, the positions simulated were spaced 5\,$\mu$m
apart, resulting in 21 points in total. Using the 
pixel symmetry,
these could be translated and rotated to give a 5\,$\mu$m
regular array across the whole of the central pixel.
Figure~\ref{fig:pixel:points} shows the layout of the
21 points simulated.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=6cm]{pixel/points.png}
\caption{\sl 
Layout and numbering of the 21 points (black) used for simulation.
The red circles indicate the four diode positions.
}
\label{fig:pixel:points}
\end{center}
\end{figure}

The simulation
results are shown in figure~\ref{fig:pixel:simcharge}
for sensors with and without the deep P-well implant.
Here the fraction of the signal charge predicted in all nine pixels
is shown. It is seen that the signal in all cases is predicted to 
be significantly larger with the deep P-well implant. In particular,
in the central pixel, the fraction of charge seen as signal varies
between 20\% and 50\% with the deep P-well implant, whereas without
this, the signal can be less than 1\% and only reaches a maximum
of 30\% when near the diode.
Similar large differences are seen for the neighbouring
pixels also.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=7cm]{pixel/21point_GDSnoDPW_TCAD.png}
\includegraphics[width=7cm]{pixel/21point_GDSDPW_TCAD.png}
\caption{\sl 
Simulation of the fraction of the charge seen as signal
for (left) no deep P-well
and (right) deep P-well. The colour code for each of
the nine pixels (``cells'') is shown on the plots,
where Cell 5 is the central pixel.
%TO DO: CLEAN UP AND MAKE Y AXES THE SAME
}
\label{fig:pixel:simcharge}
\end{center}
\end{figure}


\subsection{Test pixel performance}
\label{sec:pixel:test}

The sensor included three test pixels outside of the
$168\times 168$ ``bulk'' pixel array. 
Several internal nodes
of two of these pixels were accessible externally,
allowing analogue measurements of their levels.

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})
and the signals were measured on an oscilloscope. 
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.
The raw RMS value was found to be 3.5\,mV, implying
the noise at the comparator input was 4.4\,mV.

To get an absolute calibration of the gain and hence
of this noise value,
the sensor was exposed to an intense $^{55}$Fe source.
This isotope produces gamma radiation with a photon
energy of 5.89\,keV. Photons of this energy can deposit
all the energy within a small O(1\,$\mu$m$^3$) volume
within the silicon.
As shown above, in most cases, it would be expected
that a significant fraction of the charge would diffuse 
out of the test pixels or be absorbed. However, a
small number of the $\gamma$ particles will interact
directly inside the collection diodes.
In this case,
effectively all the charge liberated, around 1610\,$e^-$,
will be collected by the diode, giving a well-defined
signal size. The signal observed is shown in
figure~\ref{fig:pixel:testiron}.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=6cm]{pixel/fe55-07122007_2.png}
\caption{\sl 
Test pixel: $^{55}$Fe signal.
}
\label{fig:pixel:testiron}
\end{center}
\end{figure}

The signal peak is at 207\,mV and this includes 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
yet understood.



%
%Analogue noise.
%
%\begin{figure}[ht!]
%\begin{center}
%\includegraphics[width=6cm]{pixel/testnoise.jpg}
%\caption{\sl Test pixel noise.}
%\label{fig:pixel:testnoise}
%\end{center}
%\end{figure}


%A laser operating at a wavelength of 1064\,nm was
%used to inject a controllable signal level into the
%text pixels. Due to the high fraction of coverage
%in each of the six metal layers, it was not possible
%to illuminate the sensor from the top surface so the
%laser was directed at the substrate. The laser focus
%was adjusted to compensate for the substrate thickness
%and refractive index, giving a spot size in the epitaxial
%layer of approximately 2\,$\mu$.
%
%Gain (from laser), 
%
%
%\begin{figure}[ht!]
%\begin{center}
%\caption{\sl Test pixel laser signal.}
%\label{fig:pixel:testlaser}
%\end{center}
%\end{figure}


% UNFOCUSSED LASER; DO NOT INCLUDE!
%To study the signal charge diffusion in the epitaxial layer,
%the laser was scanned over the surface of the test pixels
%in 5\,$\mu$m steps and the averaged analogue signal for
%1000 (CHECK) pulses was recorded using the oscilloscope.
%This gives a map of the charge seen in the two test pixel
%which can be read out as a function of the injected charge
%position. This can be directly compared with the simulated
%charge diffusion described above, although a correction for
%the laser spot size of XXX\,$\mu$m is applied to the
%simulation. The measurements were
%performed for sensors both with and without deep P-well.
%
%\begin{figure}[ht!]
%\begin{center}
%\includegraphics[width=4cm]{pixel/ieee.jpg}
%\includegraphics[width=4cm]{pixel/ieee2.jpg}
%\caption{\sl Test pixel charge spread.}
%\label{fig:pixel:testcharge}
%\end{center}
%\end{figure}




\subsection{Bulk pedestals and noise}
\label{sec:pixel:bulk}

The performance in the bulk pixels is less straightforward
to measure as there is no analogue readout available. However,
the rate of hits in each pixel as a function of the applied
threshold effectively allows the integral of the analogue
spectrum to be measured and hence the spectrum itself can
be estimated. The results in this section are based on 
performing such ``threshold scans'' and measuring the response.

One further complication is that pickup was observed between pixels
when O(100) were enabled and firing at the same time (see
Section~\ref{sec:sensor}). This is not a major problem when
operating the sensor for its design purpose as only O(10)
pixels per sensor
are expected to fire in each event. However, for the basic
performance measurements presented below, this pickup would
prevent the response of individual pixels from being measured.
Hence to remove this sensor-wide effect, only small number of
pixels are unmasked at any time for the following results.

Specifically, only one pixel of the 42 which shared SRAM memory was
unmasked in each run. In addition, runs were performed
with only 19 bunch crossings per bunch train. Both of
these together ensured that the memory could never overflow
and so distort the threshold scan, even when very close to
threshold.

The pixel comparator only fires when the input crosses through
the threshold from below. Hence,
a threshold scan performed with no external stimulus will
result in hits only when near the pixel pedestal.
The results of such a scan for typical pixels of each type
are shown in figure~\ref{fig:pixel:typicaltscan}. 
Here, the scan is specified in the (arbitrary) units of the DAC 
threshold setting, called ``threshold units'' (TU) in this paper.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=6cm]{pixel/Run452489.png}
\includegraphics[width=6cm]{pixel/Run476749X084Y006.png}
\caption{\sl 
Typical pixel threshold scans for (left) a pre-shape pixel 
and (right) a pre-sample pixel.
}
\label{fig:pixel:typicaltscan}
\end{center}
\end{figure}

It is seen that the pre-sample pixel gives a distribution
which is not well-behaved and is rather asymmetric.
In addition, it was found that other properties of the
pre-sample pixels (such as the rate of noise hits 
being strongly dependent on the time since the reset)
made them significantly harder to use and interpret.
In the rest of this paper, results are shown only for
pre-shape pixels. Only pre-shape pixels were
implemented in the next version of the sensor.

For the pre-shape threshold scan, the
resulting distribution is well described by a Gaussian and
so can be characterised by the mean and RMS.
The mean gives the pedestal for the pixel and the RMS gives
the noise~\cite{ref:pixel:noise}.
The distribution of the pixel mean and RMS values for
the two pre-shaper quadrants of a typical sensor are
shown in figure~\ref{fig:pixel:pedsquad}.
It is seen that there is a significant spread of pedestals
within a quadrant. The pedestal spread RMS is around 20\,TU
and is the same for quadrants 0 and 1.
This is
much bigger than the noise on the pixels, which has an average
value of around 5\,TU for quadrant 0 and 6\,TU for quadrant 1.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=6cm]{pixel/Sensor11Means.jpg}
\includegraphics[width=6cm]{pixel/Sensor11Sigmas.jpg}
\caption{\sl 
Distributions of (left) pedestals and (right) noise
for quadrants 0 (solid histogram) and 1 (dashed histogram), in threshold
units, for a typical sensor.
}
\label{fig:pixel:pedsquad}
\end{center}
\end{figure}

The values of the pedestal and noise for each pre-shape pixel 
as a function of the position within the sensor are shown in 
figure~\ref{fig:pixel:twodpedestals}, where the difference
in noise for the two quadrants is visible.
The values of the pedestals and noise show no correlation 
with position within the sensor and their spreads appear 
genuinely random pixel-to-pixel.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=6cm]{pixel/Sensor11Means2D.jpg}
\includegraphics[width=6cm]{pixel/Sensor11Sigmas2D.jpg}
\caption{\sl 
Two-dimensional map of (left) pedestals and (right) noise for 
the two pre-shape quadrants of a typical sensor.
The lower half of each plot corresponds to quadrant 0
and the upper half to quadrant 1.
}
\label{fig:pixel:twodpedestals}
\end{center}
\end{figure}

The spread of pedestals can be reduced using the per-pixel
trim setting. This allows a value in the range 0-15 to be
loaded to each pixel to adjust the pedestal position upwards.
The effect of this on the pedestal of a typical pixel is shown
in figure~\ref{fig:pixel:typicaltrimscan}.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=6cm]{pixel/trimscan.jpg}
\caption{\sl 
Change of pedestal for a typical channel
as a function of the trim setting.
}
\label{fig:pixel:typicaltrimscan}
\end{center}
\end{figure}

The spreads of pedestals before and after trimming a
typical sensor are shown in figure~\ref{fig:pixel:trimadjust}.
It is seen that the RMS of the pedestals is reduced by
a factor of around five. The resulting spread is a little
smaller than the
size of the per-pixel noise and so gives a small but
non-negligible
contribution to the apparent noise rate when setting a common
threshold for all pixels. The ability to improve on
this effect is limited by the
number of trim bits available. With four bits, then a
granularity of the trim of 16 values is possible. However,
the total range of the uncorrected pedestals is around 100\,TU, 
so that even with careful matching of the trim range, the trim
LSB would be around 6\,TU. Two additional trim bits have been
implemented in the next version of the sensor.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=6cm]{pixel/Sensor11Means.jpg}
\includegraphics[width=6cm]{pixel/Sensor11Trimmed.jpg}
\caption{\sl 
Pedestals in quadrants 0 (solid line) and
1 (dashed line) for (left) a trim setting of 0 for all
pixels and (right) a optimised per-pixel trim setting, 
for a typical sensor. The left plot is the one shown in
figure~\ref{fig:pixel:pedsquad}.
}
\label{fig:pixel:trimadjust}
\end{center}
\end{figure}

In principle, 
the pixel noise can be influenced by several factors. The sensor
substrate
can be grounded or operated with no explicit bias connection to 
the substrate.
This could in principle change any environmental noise pickup.
The distribution of noise for a subset of pixels both
with and without the substrate being grounded are shown in
figure~\ref{fig:pixel:substratenoise}. It is seen that leaving
the substrate unconnected has no significant effect on the
noise. In addition, the sensor may be sensitive to light
and it is normally operated with a cover to keep it in the
dark. However,
the six metal layers used effectively completely cover
the top surface of the sensor so little light
reaches the epitaxial layer.
Figure~\ref{fig:pixel:substratenoise}
also shows the noise distribution of the same pixels with
and without a strong lamp being shone on the top surface of
the sensor. Again, there is no significant difference.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=6cm]{pixel/Sensor11J24OffSigmas.png}
\includegraphics[width=6cm]{pixel/Sensor11LightSigmas.png}
\caption{\sl 
(Left) Noise distribution with (solid histogram) and without (dashed
histogram) grounding the substrate.
(Right) Noise distribution with (solid histogram) and without (dashed
histogram) a strong light source shining on the sensor.
}
\label{fig:pixel:substratenoise}
\end{center}
\end{figure}

%Effect of resets at start of bunch train.


\subsection{Bulk pixel calibration}
The calibration of the threshold setting in TU to a physical
scale was again performed using an $^{55}$Fe source using
the same principle as described in Section~\ref{sec:pixel:test}.
A very powerful
source, O(GBq), allowed a sufficient rate of source hits
that a calibration signal could be seen in individual pixels.
Again a threshold scan was performed and the rate plotted as
a function of the threshold setting. A numerical derivative
was then taken of this rate plot to get the basic spectrum
and so to find the calibration peak. 
The results for a typical pixel are shown in
figure~\ref{fig:pixel:iron}.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=6cm]{pixel/fe55resultsInt.png}
\includegraphics[width=6cm]{pixel/fe55resultsDer.png}
\caption{\sl 
(Left) Rate of hits as a function of the threshold setting.
(Right) Numerical derivative of the rate plot. The $^{55}$Fe
calibration signal peak is visible at around 200\,TU.
}
\label{fig:pixel:iron}
\end{center}
\end{figure}

The average peak position relative to the pedestal was found to
be approximately 200\,TU. This corresponds to 5.89\,keV of
deposited energy and to 1610\,$e^-$ of signal charge. This
can be used to interpret the noise measurements above.
Hence, the average noise value
of 6TU corresponds to an equivalent in terms of deposited energy of
180\,eV, or in terms of signal charge of 50\,$e^-$. The expected value
of the noise for the pre-shape pixels was 23\,$e^-$ and so the measured
noise is again significantly above the predicted value.


\subsection{Bulk laser signal response}
%A similar system to that described above was used to
The sensor was
illuminated using a laser of wavelength 1064\,nm.
The laser enclosure contained a computer-controlled
moveable XY stage, on which the sensor PCB could be
mounted. This allowed the sensor to be moved in
two dimensions below the laser, allowing a large
number of measurements which are described in
this section.
For these measurements,
the signal was injected into the bulk
pixel area and the response measured using a threshold
scan. A typical response is shown in 
figure~\ref{fig:pixel:laserscan}, where the laser
signal is clearly seen. The actual size of the laser
signal was found by fitting the falling edge of the
response curve to an integrated Gaussian (erf) function.
In terms of the integrated Gaussian parameters,
this gives a pseudo-analogue signal response estimate
from the mean and an estimate of the signal spread
from the width. The absolute intensity of the laser
was uncalibrated so the signal size for the
following measurements is arbitrary.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=4cm]{pixel/Run470873.png}
\includegraphics[width=4cm]{pixel/Run470853.png}
\caption{\sl 
Typical threshold scan (left) without and (right) with the
laser.
The laser plot shows the fit to the erf function and the
signal was determined from the fit to 
be 160\,TU in this example.
}
\label{fig:pixel:laserscan}
\end{center}
\end{figure}

The laser must be focussed onto the epitaxial layer.
This was done by focussing the microscope optically on
the substrate surface and then recording the observed
laser signal size at various focus depths relative to
this. Figure~\ref{fig:pixel:focus} shows the results
of such a scan, where there is seen to be a strong 
dependence on the focus depth. The maximum signal was
found to be 60\,$\mu$m into the substrate relative
to the optical focus. In addition, it can be seen that
there is a range of only around 20\,$\mu$m where the
signal size is effectively unchanged. This sets a
limit on the degree of tilt acceptable when performing
such laser measurements. A focus on one side of the
sensor will only be within this tolerance at the
other side if the sensor is flat to around 2\,mrad.
For this reason, the focus was checked when large movements
were made and, when possible, only small movements were
then performed around this point.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=6cm]{pixel/focus.jpg}
\caption{\sl 
Laser signal size as a function of the focus depth
relative to the optical focus position. A positive
value means the focus position was moved into
the sensor.
}
\label{fig:pixel:focus}
\end{center}
\end{figure}

The laser system was used to find the working point of
the sensor in terms of the external bias voltages and
currents. These are set using DACs on the sensor PCB;
see Section~\ref{sec:design:daq}. Of the 31 DACs used,
7 are used to set the threshold and monostables, 4 are
common to pre-shape and pre-sample pixels, 8 are only
used by pre-shape pixels and the remaining 12 are only
used by pre-sample pixels. Hence, for pre-shape pixels,
there are 12 DAC settings which determine the working
point. For each DAC in turn, the value was scanned through
a reasonable range and the noise and laser signal size
determined for each value.
Figure~\ref{fig:pixel:optimisation} shows the results
of these DAC scans in terms of the laser signal divided by
the noise value. In almost all cases, a broad maximum
was found and the values were set to be within this
maximum region. These standard values were used for
all the measurements, including those 
discussed previously in this section.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=4cm]{pixel/bias1.jpg}
\includegraphics[width=4cm]{pixel/bias2.jpg}
\includegraphics[width=4cm]{pixel/bias3.jpg}
\caption{\sl 
Laser signal/noise as a function of each of the 12 DAC settings
relevant to the pre-shape working point.
The DAC values used for standard operation are shown by
the arrows in each case.
%TO DO: CLEAN UP
}
\label{fig:pixel:optimisation}
\end{center}
\end{figure}

The laser system was also used to determine the relative
gain of the pixels. By firing the laser into the centre
of each pixel in turn, then the signal size for each
was determined. Figure~\ref{fig:pixel:lasersignal}
shows the distribution of the observed laser signals for
a subset of pixels in the two pre-shape quadrants.
A clear difference in gain for quadrants 0 and 1 was
observed, with quadrant 1 being around 40\% higher than
quadrant 0. As shown above in figure~\ref{fig:pixel:pedsquad},
quadrant 1 also has a higher noise than quadrant 0,
by around 20\%, so quadrant 1 has the better signal/noise
ratio. This is shown explicitly in figure~\ref{fig:pixel:lasersignal}.
For this reason, only the quadrant 1 variant of the pre-shape pixels
was implemented in the next version of the sensor.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=6cm]{pixel/sensor17Signal.jpg}
\includegraphics[width=6cm]{pixel/sensor17SoverN.jpg}
\caption{\sl 
Laser (left) signal and (right) signal/noise for 
quadrants 0 (solid line) and 1 (dashed line).
}
\label{fig:pixel:lasersignal}
\end{center}
\end{figure}


%Gain (from laser), 
%
%\begin{figure}[ht!]
%\begin{center}
%\caption{\sl Two-D map of laser gain for typical sensor.}
%\label{fig:pixel:twodgain}
%\end{center}
%\end{figure}

The laser system was also used to measure the charge diffusion
so as to compare with the simulation described in
Section~\ref{sec:pixel:simulation}. The laser was focussed to
give a illuminated spot sixe of less than 2\,$\mu$m and the
stage could be moved with a 1\,$\mu$m precision, so that 
the charge could be generated accurately to match the positions
of the 21 points used in the simulation.
Because the laser was uncalibrated, the absolute fraction of
the laser signal observed could not be determined, but a single
scale factor was used to give reasonable agreement to the
simulation expectation for the central pixel.
Figure~\ref{fig:pixel:bulklaser} shows the results of these
measurements using sensors with and without deep P-well
implants. It is seen that the general trend of the data
is well reproduced by the simulation (shown in
figure~\ref{fig:pixel:simcharge}) with the deep P-well
sensor signal varying between 20\% and 50\%.
However, the sensor without deep P-well implants
gives somewhat higher signals than the simulation predicts,
being always above 1\%, although the general shape is
similar.
Overall, it is clear that
the sensor without deep P-well implants would give a
much smaller signal.
%
\begin{figure}[ht!]
\begin{center}
\includegraphics[width=7cm]{pixel/21point_data_ndpw.png}
\includegraphics[width=7cm]{pixel/21point_data.png}
\caption{\sl 
Charge seen at each of the 21 point positions for each pixel
(left) without deep P-well and (right) with deep P-well.
}
\label{fig:pixel:bulklaser}
\end{center}
\end{figure}
