Use of a hybrid semiconductor pixel detector as a precision beam monitor at CERN accelerator facilities

We describe the performance of the Timepix silicon detector operation at the SPS and H8 extracted beam line at CERN. Some detector calibration results and tuning will be discussed and a new cluster analysis algorithm, to reconstruct the particle hits, is described as well. We investigated the optimal acquisition setup for the Timepix device in order to use its full capabilities. A setup of 4 planes of the Timepix hybrid silicon pixel detector is tested as a hodoscope in the H8 180 GeV/c extracted pion beam, and also with a special 3 ns channeled proton bunch sequence inside the SPS accelerator. Spatial and angular distributions are measured.


Channeling
Channeling (figure 1) is a retention of the charged high-energetic particle (with low transverse energy, an order of ∼10 eV) between crystalline planes oriented within a small angle (critical angle, an order of ∼10 µrad) with respect to the particle direction. A curved crystal gives a possibility to steer the particle beam in the direction of the bending. Together with the channeling effect in the bent crystal there is another process, which conserves the total transverse energy and it is called volume reflection. It is a single reflection of the particle from the crystalline plane in opposite direction to the channeling. When the particle enters the crystal with the angle bigger then the critical angle for the channeling, the effect of the volume reflection takes place. The concurrent process to the last is a volume capture, which is the trapping of particles into the channeling regime, when the particle is close to an atomic plane loses some transverse energy.
The dechanneling is the opposite to the volume capture effect. It takes place when the particle passing the crystal in the channeling regime increasing its transverse energy in collisions with electrons (with nucleus for negatively charged particle) closer to the atomic plane, where the electron (nucleus) density is higher. Therefore, when the transverse energy exceeds some acceptance level, the particle leaves the channeling regime. Figure 1. Schematic drawings of the charge particle interaction with a bent crystal. Channeling -red solid line, dechanneling -blue dashed line, volume reflection -black dotted line, volume capturegreen dot-dashed line, while θ def is the particle deflection angle due to the channeling or volume reflection processes.

Detector overview 3.1 Hardware
Timepix (figure 2) is a quantum imaging pixel detector of area ∼ 2 cm 2 , consisting of a monolithic silicon pixelated matrix of 256×256 sensitive elements, each 55×55 µm 2 and 300 µm thick, which is soldered together by 65536 metal bumps to a matching CMOS read-out chip with identical dimensions. Each pixel is a rectifying Si diode, with its volume depleted from free charge carriers by the application of a reverse bias voltage, typically 20 V-100 V, so that charge generated by an incident radiation quantum can be collected and measured. Detailed information about the charge generation and collection in a pixel is also given in [5]. Each pixel is connected to a signal processing chain of charge-sensitive preamplifier, discriminator and digital counter (14-bit, 11810 counts). Only if the signal exceeds the discriminator threshold value, a 'hit' is recorded by the -2 -

JINST 14 P03018
pixel, and then the signal is processed as indicated below. The innovative feature of the pixels in the Timepix chip is the use of the threshold in combination with a MHz clock that is distributed to all pixels. The pixel can record a timetag for the moment that a signal passes the threshold in one direction: up, or the other: down. This allows to count the number of clock-pulses while discharging the signal charge via the amplifier feedback, and offers a measure of the signal amplitude, as it was proposed in 1948 by Wilkinson [6].
The readout chip further contains the Digital-to-Analog DAC power regulators, programmable parameter tuning and I/O drivers. The on-pixel threshold adjustment has 4 bits, so that a natural dispersion of the threshold values between the pixels can be precisely equalized to achieve a minimum operating threshold for all pixels of ∼600 electrons [7]. This results in practically noise-free data.
The full matrix can be reset, and by opening the global shutter it is switched to exposure for a programmable period, ranging from µs to hours. After the shutter has closed again, the data from all pixels are sequentially transferred off-chip, and these represent one image 'frame'.
The Timepix pixel matrix can work in one of three modes: • Medipix mode -Counter counts the incoming particles, which have generated an abovethreshold signal.
• Time of Arrival (ToA) mode -The counter receives clock pulses (e.g. at 5 MHz) and measures the time interval, starting from the opening of the shutter until the arrival of the first signal from an incident quantum above threshold. Then the clocking is stopped for this pixel, so that only the time for the first impinging particle can be recorded.
• Time over Threshold (ToT) mode -In a similar way, the counter receives clock pulses, but these are enabled only as long as there is a signal above threshold, which is similar to the Wilkinson type ADC. This measurement provides the amplitude of the particle energy released in the pixel, and signals from successive quanta during the exposure are summed.

Chipboard
Timepix chip + Si sensor FITPix readout interface For communication and data transferring between Timepix and user's PC there is a FITPix [8] (fast interface for Timepix pixel detector) interface based on the FPGA circuit to achieve the high data frame-rate. It supports the serial readout through a USB 2.0 connection with a frame rate up to 90 frames/s.

Software
The Pixelman [9] software package developed in Prague University is designed to readout the chip. The package has a very flexible modular architecture, that can be extended by software plugins (i.e. additional software that extends functionality). In our project we used two ways to communicate and control detector: (1) Pixelman Graphical User Interface (GUI) (allows to visualize the acquired frames and to write data into the text files); (2) Python scripting plugin (gives a possibility to integrate Pixelman libraries inside other data acquisition (DAQ) systems).

Equalization
Due to natural contradictions, which appear during manufacturing, some parameters of identical Timepix pixels can be different. Usually, the common value of the threshold is varying from pixel to pixel. To take into account this effect Pixelman has a function Equalization to adjust the level of the threshold for each individual pixel using a Noise Floor Equalization method [10]. After this procedure a common threshold can be applied to all pixels for the electronic noise suppression. As consequence typically no pixels is fired if there is no particle impinging on the silicon sensor. Figure 3 illustrates the Pixelman window with an example of the threshold equalisation results. For a 100 V bias applied, the centroid is at 354.5, while the standard deviation is 1.02.

DAQ settings
Before any detector operation, a set of the Timepix parameters has to be applied: discriminator threshold value (THL) received from the equalization function, value of the bias voltage (the capacitance of each sensor pixel depends on the applied bias voltage which affects depth of depleted zone), Ikrum (The parameter controls a discharging current in the preamplifier, i.e. the slope of a falling edge of the pulse), number of frames, time of each frame, acquisition mode (Medipix, ToA, ToT), trigger type, frequency of the measurement Clock (≤96 MHz). The internal clock can be set to define the time granularity of the measurements; the maximum count of 11810 for each register attached to each pixel limits the performances of the readout. For example, for 48 MHz clock -4 -(∼20.83 ns) in ToA mode the maximum frame duration cannot exceed 11810 × 20.83 ns = 246 µs. Similarly for a clock of 0.48 MHz, the time measurements up to 24 ms can be performed.

Experimental setup
Timepix detector has been tested inside the SPS proton accelerator beam pipe and at H8 the SPS extracted proton/pion beam line in the North Area.

H8 extracted beam line
For the bent crystal characterization before the installation in the SPS or LHC accelerators the UA9 collaboration performs measurements at the H8 SPS extracted beam line, using a dedicated tracker to successive reconstruct the track of each particle. The telescope consists of two arms (of 10 m each) of detection planes in order to reconstruct the tracks of the incoming and outgoing particles to the crystal which is located in between. The detailed description of the CMS-like tracker [11] and the standard UA9 setup at the H8 beam line is described elsewhere [12].
In 2016 and 2017 the Timepix detector was located 50 m downstream the crystal position. The usual particle beam of pions 180 GeV/c with an intensity of 10 5 particles/sec has an asymmetrical shape (figure 4) in horizontal and vertical directions with the following parameters: where RMS means a root mean square of the distribution, and σ is a standard deviation. The extraction period of the SPS to the North Area is around 40 sec with the spill duration of ∼4.8 sec.

SPS
The UA9 experiment is installed in the Long Straight Section 5 of the SPS accelerator [13]. The Timepix detector was placed in the Roman Pot 1 (internal side of the accelerator ring) and Roman Pot 3 on both sides. During the dedicated machine development (MD) period at SPS, the accelerator was operated in a coasting mode with a 270 GeV/c proton beam, made of one single bunch 3 ns long, that at the start of the fill contained about 10 11 protons. The detailed description of the operational procedure during the MD can be found in [14]. Inserting and orienting the crystal inside the beam halo a channeled beam is produced with an angle of 50-200 µrad with respect to the main beam. This secondary beam can be then quantitatively measured with the Timepix installed in the Roman Pot 1 and 3. Depending on the crystal position with respect to the beam core (σ X ≃ 0.6 mm), in stationary condition the number of particles from the halo reaching the edge of the crystal is varying from few to hundreds protons at every turn (23 µs).
The acquisition of each pixel matrix of the detectors is performed through an optical link in USB 2.0 protocol using a unique PC connected to each FITPixes. Figure 5 shows the scheme of the data transferring. Using a python script the data frame by frame (fired pixel coordinates and number of counts) is transferred each minute to a new data file to the CERN-DFS storage. With a BASH script running on the user PC a quasi-online analysis can be performed producing about each minute a suitable information for the MD: analyzed data is converted into the beam images and profiles, and saved on the user PC. Thus we were able to have the image of the detector frame almost immediately (the delays came only from the USB/Ethernet/Optical connection speed limits), which is the most important information needed during the MD.

Timepix operation
To provide the highest efficiency of the particle detection (sensibility to the incoming particle), it is important to apply the optimal value of the bias voltage. Under influence of the bias voltage the charge carries travel toward different electrodes. The detector used in the UA9 experiment is set to collect holes, i.e. the pixels have positive polarity.
In 2016 a test with 3.68 MBq Sr-Y beta-source has been done to evaluate the optimal value of the bias voltage. Figure 6a shows the scheme of the experimental setup. The radioactive source was -6 -2019 JINST 14 P03018    -7 -placed in front of the Timepix detector. Varying the distance between the source and the detector we measured the dependency between number of the total hits and different applied bias voltage.
Assuming that the flux of the particles from the source is constant during the measurements we reach the full efficiency with a bias of 40 V with silicon thickness of 300 µm (figure 6b)).
During 2017 and 2018 the Timepix detectors were operating during the SPS MDs and the H8 test-beams. At H8 beam line, the Timepix detector has been inserted in the main beam to measure the beam profile and the flux of the particles (figure 8a). While at SPS, the main goal of the detector is to characterize the deflected by the bent crystal beam ( figure 7). Therefore, the Timepix sensor has been placed in such a way to intercept the channeled protons and to measure their flux at a given position along the circulating beam (figure 8b).  Due to the high flux of the particles at SPS we have to define the maximum acquisition time window for each frame. We collected data putting the Timepix into the channeled beam and plotting the total number of pixels (figure 10b, Y axis), which ToA is inside specified time range (figure 10b, X axis). For example ( figure 10b yellow rectangle), there are about 3800 pixels with a ToA less than 10 ms. For the case without clusters overlapping the dependency should be a straight line. Otherwise we should obtain a saturation behavior. From figure 10b we can see that starting from about 0.3 ms the behavior becomes to be not linear. Thus, for the further analysis we decided to put the cut for the ToA of 0.246 ms with 48 MHz clock.

Results and cluster analysis improvements
For analysis of the 2016 data we used the standard Cluster Analysis [15] (CA) to identify the particle type. With this CA the cluster is recognized as the region of the fired neighbour pixels, which brings rapidly to a saturation of the particle counting caused by clusters overlapping. To solve this problem we decided to write a New (Improved) Cluster Analysis to use the information about the time of arrival in each pixel. The time distribution of the signal arrival time in a cluster exhibits a Gaussian with 60 ns of the standard deviation (figure 11a), compatible with the drift time of the holes inside the silicon sensor with 0.3 mm thickness for 40 V of bias voltage [16]. Figure 11b shows how the time difference inside each cluster behaves with cluster size. Therefore, the algorithm for the new cluster analysis in ToA mode consists of the following steps: 1. Applying a cut of 200 ns (i.e. ±3σ for 48 MHz clock) in a time difference between pixels, we split a given frame into several subframes, where all pixels will be within this time window.
2. For each subframe, we apply the standard cluster analysis, where a single cluster is defined as a region of the fired neighbour pixels.
With a new cluster analysis algorithm in 2017 we avoided the saturation of the particle counting in the ToA mode and increase the maximum number of incoming particles per frame by factor 3 -10 -  compare to the standard cluster analysis algorithm. Figure 12 shows the comparison between the results of the standard and improved cluster analysis done for the H8 beam line.  Figure 13 shows the distribution of the cluster size, which corresponds to the crossing particle. Assuming that the sensors are normal to the beam axis direction, one particle in most of the cases should hit only one pixel. However, due to the charge sharing between pixels, different particle -11 -angular distribution (see section 4) at the detector position and the orientation of the sensors with respect to the beam axis direction a significant number of clusters has more than 1 pixel size.

JINST 14 P03018
To obtain the calibration parameters for each sensor on the beam line it is necessary to find the most probable number of fired pixels per cluster ( figure 13). The received values are ∼1.8 pixels per particle for H8 beam line and ∼1.7 pixels per particle for SPS.  From figure 14 we can easily receive the most probable number of particles (separable clusters) per frame which is: (a) the number of particles in the primary beam at H8 beam line and (b) the number of deflected particles by the bent crystal at SPS. The measured distribution is not symmetric due to the long tail. A good fit ( χ 2 /N DF ≃ 1) is obtained with the Vavilov distribution function [17] for figure 14a and Landau distribution function for figure 14b.
The most probable values (MPV) are: 12 particles per frame (246 µs) for H8, which means 0.5 particles per 10 µs, and 39 particles per frame (246 µs) for the SPS beam deflected by the crystal, which means 3.6 particles per machine period (∼23 µs). These values are in an agreement with our expectation: 0.1-1 particle per 10 µs for H8 and few particles per period for SPS.
To measure the flux of the particles with higher statistics the devices can be used in the Medipix mode. Calculating the total number of hits in the frame divided by the calibration value (number of the fired pixels per particle) the flux of the particles for H8 ( figure 15a) is about 0.

Timepix telescope
The measurements of the crystal parameters, such as deflection efficiency, inelastic nuclear interaction probability, are very important for the future bent crystal applications and need the track reconstruction. Thus, in April 2018 we decided to construct a short range (1.2 m long) tracker system based on 2 Timepix and 2 Quadpix (Timepix with the 4 times bigger sensitive area with 512×512 pixels) sensors to be compared with the main CMS-like tracker system. The idea to use the Timepix detector as a sensor for the particle telescope is not new [18,19], but in the current paper we would like to describe performances of our system. Figure 16 shows the experimental layout which has been installed at the H8 beam line in April 2018. The system was placed on the motorized translation stage which gave a possibility to align the telescope with respect to the particle beam.

Triggering and synchronization
A plastic scintillator placed on the beam line was used as a trigger. The scintillator gave a signal per each crossing particle. The maximum DAQ rate of the system, which consists of 4 detectors, driven by the Python script, is about 2 Hz (2 acquisition frames per second for each detector) or 500 ms of the time delay between two consecutive frames, that can be improved for the future. In order to be sure that all detectors are starting from the same trigger signal and that they are all ready to collect the data a delay of 1 s between two trigger signals was applied. Once all Timepixes are configured, we send a command simultaneously to all detector to be ready for the acquisition and wait for the arriving of the trigger signal. In such a way we provide the time synchronization between detectors.
To estimate the order of the synchronization we calculate the time difference between clusters from different sensors for the same frame, taking one of them as reference (e.g. the Timepix at the Plane 1 (see figure 16)). Figure 17 shows the typically distribution of the time delay between detectors in -14 -

JINST 14 P03018
ToA mode with 48 MHz clock. Taking into account the mean value of each histogram, one can see that the time shift between Plane 1 and Plane 0 is ∼7.7 ns (figure 17a), between Plane 1 and Plane 2 is ∼30.2 ns (figure 17b), between Plane 1 and Plane 3 is ∼20.7 ns (figure 17c). Thus, we can define that the synchronization between all 4 detectors is within 2 internal clocks for 48 MHz (∼20.83 ns).

Alignment
A software alignment procedure based on particle tracks is used to calculate misalignments between sensors. In such a way the position of the hits on each plane can be corrected. The (x,y) origin of the system was placed in the center of the beam spot. Fitting the track with the straight line we can calculate the residual (difference between a hit position and interpolated position on the plane from the fit) of each sensor, taking into account the standard deviation in each pixel as σ p =p/ √ 12, where p means a pitch of the pixels (0.055 mm). Iterative position corrections are made in order to center the distribution of the residuals around zero ( figure 18). To eliminate the rotational misalignment of the sensors around the axis of the beam direction (Z axis) we use the correlation between the residual position in X axis and interpolated impact position in Y axis for each plane. Table 1 represents the iterative residual standard deviation (σ r ) and the twist angle (φ twist ) of each plane.

Tracks reconstruction
After the procedure of the spatial alignment of the system described above we performed the reconstruction of the particles tracks based on the algorithm which is close to one described in [11].
We may assume that in the future the crystal under investigation will be placed between Plane 1 and Plane 2, 300 mm from each plane. It means that the upstream section of the tracker (Arm 1), which consists of the Plane 0 and Plane 1, measures the incoming particles tracks, at the same time the outgoing tracks are measured using the downstream section (Arm 2), which is made of Plane 2 and Plane 3. To measure the error of the system in this configuration we have to take into account the not negligible scattering in the sensor and its resolution.
The estimated detectors resolution was calculated as σ d = σ 2 r + σ 2 f , where σ r is determined from the residual distribution, σ f includes the errors due to the scattering as described in [20]. The results can be found in table 1. According to [18] each plane contributes 300 µm thick silicon sensor, a Timepix chip (700 µm thick) and a PCB with 100 µm of copper and 1.3 mm of FR4, the angular error per plane due to the scattering is ∼10.5 µrad for a 180 GeV/c pion beam. The spatial resolution of the detectors is very close to the digital resolution of σ p = 15.88 µm.
The main parameters of the track reconstruction ( figure 19) are θ in (incoming angle), θ out (outgoing angle) and d 0 (impact parameter at the crystal position). Figure 20 shows the angular resolution of the telescope for both horizontal and vertical projections, measured as the angular deviation between incoming and outgoing tracks, reconstructed by the upstream (ARM1) and downstream (ARM2) arms of the system. Only single track events were taken into account. The measured angular resolution (Sigma) is around 73 µrad in X and Y axes and the angular misalignment (Mean) between two arms of the telescope is around 30 µrad -16 - Figure 19. Track reconstruction scheme. θ in and θ out are incoming and outgoing angles respectively at the possible crystal position (black rectangle). and 4 µrad in horizontal and vertical planes respectively. The increasing of the telescope length can linearly decrease the value of the angular resolution.
To estimate the track reconstruction efficiency we can use the amount of the reconstructed tracks, number of recorded frames and DAQ rate (can be improved). Taking into account the flux of the particles (∼ 10 5 p/s), the calculated value of the efficiency is around 10 % of the total incoming particles.

Conclusion
The Timepix detector is a device, which completely fulfilled UA9 requirements for the quantified beam monitoring on the beam line and in a secondary vacuum inside a beam pipe (three years of operation with about 0.4 kGy/y radiation dose) of the accelerator machine like the SPS at CERN. For the first time, it was measured at SPS the flux of the deflected halo particles by the bent silicon crystal. Operation in a ToA mode gives a possibility to follow the beam evolution turn per turn for the main beam instabilities in time.
A sequence of several Timepix detectors has a performance, which is good and comparable with a more sophisticated silicon microstrip telescope of UA9 at H8 beam line. The average spatial resolution is less than 20 µm per sensor. The telescope provides very good 70 µrad angular resolution for reconstructed particle tracks with a flight base of 1.   can give a possibility to improve the angular resolution of the system up to the physical limitation of 10.5 µrad, which is related to the multiple scattering inside each sensor. The system is portable and can be installed on the different beam lines for crystal measurements and characterization.