Performance of the ALICE PHOS trigger and improvements for RUN 2

This paper will discuss the performance of the PHOS level-0 trigger and planned improvements for RUN 2. Due to hardware constraints the Trigger Region Unit boards are limited to an operating frequency of 20 MHz. This has led to some ambiguity and biases of the trigger inputs. The trigger input generation scheme was therefore optimized to improve the performance. The PHOS level-0 trigger system has been working with an acceptable efficiency and purity. Proposed actions to further improve the performance and possibly eliminate the impact of the biased trigger inputs will also be presented.


Introduction
ALICE is built to exploit the unique physics potential of nucleus-nucleus collisions at the Large Hadron Collider (LHC) [1]. The ALICE experiment consists of several sub-detectors, which are designed to observe events and signatures that indicate the existence of Quark-Gluon Plasma (QGP). In order to make optimal use of all the sub-detectors, select events of interest and reduce the overall data flow in the ALICE experiment, a trigger system with three levels of triggers, level-0, level-1, and level-2, is designed. The trigger system is implemented in hardware with the Central Trigger Processor (CTP) [2] at its heart, which makes the final decision based on triggers from all the sub-detectors.
PHOS [3] is one of the sub-detectors, whose objective is to search for thermal photons to determine thermal and dynamical properties of the initial phase of the collisions and to study jet quenching through the measurements of high pT π0 and γ-jet correlation. PHOS contributes triggers to CTP at two levels, level-0 and level-1. At level-0, PHOS provides the trigger on high-energy clusters for both p-p and Pb-Pb collisions by setting different energy thresholds. The PHOS level-0 trigger system was commissioned in 2011 and worked with an acceptable efficiency of 0.9 and purity of 0.36 (4.3-GeV threshold) in the last three years. The level-1 trigger input is being developed and tested in the lab. It will provide a more robust cluster energy estimation which allows deriving three level-1 trigger signals simultaneously for different energy thresholds. This paper will discuss the performance of the PHOS trigger in physics runs, and look at possible actions during the long shutdown of the LHC (LS1) aiming to further improve its performance.
-1 - The PHOS detector is located at a distance of 460 cm from the interaction point and consists of 3 modules. Each module has 56×64 lead tungstate (PbWO4) crystals. Photons interact with the crystal medium and deposit their full energy, producing scintillating light. An Avalanche Photo-Diodes (APD), glued to the end of each crystal, converts light emitted from the crystal into an electric signal, which is then amplified by a Charge Sensitive Preamplifier (CSP) for further processing in the Front End Cards (FEC). Every PHOS module accommodates 112 Front End Cards (FEC), each connected to 32 CSP channels. All the FECs are divided into 4 readout partitions, each controlled by one Readout Control Unit (RCU). There are two branches included in each readout partition. Each branch consists of 14 FECs and one Trigger Region Unit (TRU), which are connected via Gunning Transceiver Logic (GTL) bus.
There are two paths for the signal from each CSP channel, one is to record the photon energy, and the other one is to make a trigger decision. In the former path, the signal from each CSP channel goes into a shaper with two gains, where it is amplified and digitized. The digitized signal is then buffered into the memory on the FECs and further into the ALICE data acquisition (DAQ) system under the control of the RCU.
In the trigger decision path, every 4 CSP channels are grouped together and summed up by a module called 2×2 analog-sum. The TRU receives 2x2 analog-sum signals from all the FECs on -2 -the same branch through flat cables. Finally, all the TRUs in the three modules send signals to one Trigger OR Unit (TOR). There are 8 analog-sums on each FEC. The signals from the 112 analogsums in the same branch will be sent to their corresponding TRU, in order to make the trigger decision. As shown in figure 1, the level-0 trigger algorithm includes the following six steps: 1. Sampling: the 12bit ADC samples the Analog-sum signals at 20 MHz and converts them into digital ones, which are then sent to the FPGA serially.
2. Deserialization: the serial data is converted into parallel data by the Deserializer in the onboard FPGA at 20 MHz.
3. Baseline subtraction: the peak-to-peak analog input of the ADC is ±1 V, and the digital output ranges from 0 to 4095. In the PHOS trigger system, all the inputs of the ADC are positive, thus the baseline value obtained during baseline runs should be subtracted.
4. 4×4 sum: a sliding window is used to reconstruct the energies of the particles. As figure 1 shows, digital signals inside the window, representing the energies of any 2×2 analog-sum channels (4×4 CSP channels), are added up. The reconstructed signals, which are used to make Level-0 decisions, are called 4×4 sums. There are 91 4×4sum in each TRU region 5. Local level-0 trigger from TRU: the local level-0 trigger is issued and sent to the TOR if one or more 4x4 sums in the TRU region are larger than the pre-set threshold. The issued trigger indicates that there is at least one photon of interest hitting the TRU region in the current event.
6. Final level-0 trigger from TOR: local level-0 triggers from all the TRUs will be logically ORed by TOR, and then a final level-0 trigger will be sent to the CTP.

Technical limitation and solution
Ideally, level-0 trigger inputs should be issued according to the peak values of the analog-sum signals, last for 25 ns (bunch spacing), and arrive at the CTP at a fixed time within the trigger input time window of 400-800 ns. However, due to hardware constraints, the TRU operating frequency is limited to 20 MHz. As a result the local level-0 trigger input pulses are wider than the bunch spacing, and furthermore, a phase shift of 25 ns can be induced between different TRUs due to the variation in the stabilization time of PLL clock outputs. This may lead to some ambiguity as the arriving time of the final level-0 trigger input to the CTP may vary depending on which TRU generated the initial signal. As shown in figure 2, because the TRU is working at 20 MHz, the minimum length of the trigger is 50ns. Due to the 25ns clock shift, both the starting point and the time slot span of triggers generated by different TRUs for the same signals are different.
To reduce the impact of the TRU phase shift two trigger input generation schemes, short trigger scheme and long trigger scheme, were proposed. The short scheme keeps the trigger only for the first clock cycle when the corresponding analog-sum signal is larger than the threshold. In contrast, the long scheme keeps the trigger as long as the corresponding analog-sum signal is above the threshold. In order to compare their performance, these two schemes were used by PHOS in several calibration runs. With the short scheme, only about half of the PHOS triggers were accepted by -3 -  the CTP. However, with the long scheme, approximately 95% of the triggers were accepted. This is because the PHOS triggers have a common time slot that can be aligned with trigger inputs from other sub-detectors. The long scheme is suitable for bunches with large spacing. However, for bunches with smaller spacing, some photons would be missed. In addition, the pulse of the long trigger, which spans over several clock cycles, may introduce some fake triggers.

Performance analysis 3.1 Rejection factor
In the runs where both the PHOS and minimum bias triggers are activated, the number of events triggered by the minimum bias trigger and by PHOS trigger can be counted, and then their ratio is calculated. This ratio is called the trigger rejection factor. Because the minimum bias trigger is always working in stable condition, the rejection factor, which builds the direct correlation between minimum bias trigger and PHOS trigger, could be used to monitor the working status of PHOS trigger.
PHOS took a quite large sample of physics data with p-p collisions at 8TeV in April, 2012 with the low trigger threshold about 1.4GeV. These data were dedicated to PHOS calibration. For normal physics runs, data taking rate with the PHOS trigger should have been limited to 20 Hz which could be provided by a higher rejection factor that is by a higher trigger threshold. In June 2012, a trigger threshold scan has been performed, during which the trigger threshold was varied to -4 - check the rejection factor and the data taking rate. In the physics runs, two thresholds are needed, one makes PHOS take data with high rate and other one makes PHOS take data with low rate. According to the subplot (b) of figure 3, 2GeV and 4.3GeV were selected, which provided the PHOS trigger data taking rate of 130Hz and 20Hz, respectively, while the minimum bias trigger rate was 50 kHz.
In the 42 physics runs with PHOS threshold set to 2GeV and in the 74 physics runs with PHOS threshold of 4.3GeV with the p-p collision at 8TeV, 1.7M events 1.9M events were taken by PHOS, respectively. The rejection factors of these runs are shown in figure 4, the average values for PHOS with threshold of 2GeV and 4.3GeV are 346 and 3845, respectively. In order to have one big uniform data sample triggered by PHOS, the trigger threshold was set to 4.3GeV for all data taken with pp collisions at 8TeV. Obviously, the higher the threshold is set to be, the higher the rejection factor PHOS has, and vice versa. As illustrated in figure 4, the rejection factor keeps reasonably stable during runs (including calibration runs) with the same threshold, which indicates that PHOS is working as expected. In addition, by comparing the data in figure 4 and figure 5, it is observed that the changing trend of rejection factor is approximately in accordance with that of the beam luminosity. This is because the number of the events with low energy is more sensitive to the changes of the beam luminosity than the number of the events with high energy, since the energy spectrum of all the events has extremely large negative slopes.
As it is shown in figure 6, the PHOS trigger rate also remains reasonably stable during runs (including calibration runs) of the same threshold. As the photon production rate is proportional to the beam interaction rate, the PHOS trigger rate is in direct proportion to the beam luminosity.

Trigger purity
In physics runs, there are a lot of fake triggers which are mainly contributed by two parts, the long triggers caused by the phase shift of 25ns between TRUs and the noise in the electronics. The trigger purity is defined as the ratio of real PHOS triggers to all the PHOS triggers, where real PHOS triggers are the triggers fired by events with photons whose energy is over threshold. In the runs with the 4.3-GeV threshold, the number of events triggered by PHOS is much smaller than that in the runs with the 2-GeV threshold, but the noise can be regarded as constant, therefore, as it is shown in figure 7, in the runs with threshold of 2GeV, about 36% of the triggers are real ones, -5 -2013 JINST 8 C12028   but in the runs with 4.3GeV threshold, this ratio decreases to around 17%. Due to the extremely large negative slopes of the energy spectrum, with the increasing of beam luminosity, the number of events whose energy is slightly smaller than the threshold, which may generate fake triggers by being added with noises, booms much faster than the number of events whose energy is larger than threshold, which will fire real triggers, and vice versa. Therefore, the trigger purity is inversely proportional to the beam luminosity.

Trigger efficiency
PHOS trigger efficiency is defined as the ratio of the number of events triggered by PHOS to the number of all the events with photons over threshold. In order to study the trigger efficiency, 5000 single-photon events (one 5GeV photon per event) was simulated to hit on the PHOS detector with ALICE offline framework [5]. With the threshold set to be 4GeV, 95% of these events were triggered in the simulation. As discussed previously, the 4×4 sum of CSP channels could only be performed inside each TRU region. If some photons hit the boundary between TRU regions, their energy could not be fully reconstructed. Therefore, their corresponding events might not be triggered by PHOS, which is referred to as a boundary effect. After introducing boundary effect into the simulation, the ratio of triggered events decreased to 89%.
Based on the data recorded in 72 physics runs during run period LHC12d, the energy spectra of all events and the events triggers by PHOS were calculated. Consequently, PHOS trigger efficiency is obtained by dividing the energy spectrum of all events with that of PHOS triggered events. From the subplot (b) of figure 8, with the threshold of 4.3GeV for these runs, the efficiency reaches its plateau of about 0.7 after 4.5GeV. Some drop off efficiency at high energies is observed which -7 -

PHOS upgrade for RUN 2
According to previous discussions, PHOS trigger system has two major deficiencies. The first one is that the TRU is working at 20 MHz but not the ideal 40 MHz, which causes the 25ns clock shifts between TRUs. The other one is there are some noisy channels, which impacts the reconstruction of photon energy, thus the trigger efficiency. In addition, these noisy channels could also introduce fake triggers. One suggested approach that can be implemented in the TOR to eliminate the phase shift between the TRUs and reduce the length of the trigger input, is to measure the average distance, at the beginning of a run, from the generated level-0 trigger input to the confirmed signal from the CTP, and then re-synchronize the TRU trigger inputs accordingly. However, this solution has two problems. Firstly, due to limited resources on the TRU and TOR board, only simple algorithms could be implemented. Secondly, the PHOS TRU is not suitable for bunches with small spacing.
Hence, during the upgrade of LS1, PHOS TRUs will be replaced by EMCal [6] TRUs, which could work at 40 MHz. The TOR will be replaced by Summary Trigger Unit (STU), which has a direct link to ALICE DAQ (DDL). With enough resources on EMCal TRU and STU, more advanced algorithm for level-0 and level-1 trigger generation could be implemented. In addition, the GTL based readout will be replaced by P2P readout. The amount of noisy channels could be reduced by using P2P bus. The topology of the new PHOS trigger system is shown in figure 9. There are 4 SRUs in each PHOS module. Every two branches (28 FECs and 2 TRUs) will be connected to one Scalable Readout Unit (SRU) via P2P bus. With the upgrade in LS1, PHOS is expected to reach an interaction rate of approximately 50 KHz.

Conclusion
This paper presents the performance of PHOS trigger system and the planned upgrade for RUN2. In the p-p collision at 8TeV during year 2012, the PHOS trigger has an efficiency of about 0.7. The primary factor that impacts the efficiency is noisy CSP channels in trigger electronics. By removing the data recorded with noisy channels, the trigger efficiency is increased to 0.9, which is in accordance with the one obtained in simulation. In RUN1, the bunch spacing was 50 ns and the collision is at 7∼8TeV, therefore, the limitation of TRU working frequency did impact the trigger efficiency highly. In RUN2, the bunch spacing will be 25ns and the collision energy will be increased to 13∼14TeV, which means that the trigger should work at higher rate. Hence, the TRU need to be upgraded.
Trigger purity varies with threshold. Generally, 36% and 17% of the PHOS triggers are real ones with threshold set to be 4.3GeV and 2GeV, respectively. The fake ones are mainly generated by the long pulse of PHOS trigger and the noises in electronics.
Due to limitation on hardware resources, it is quite difficult to upgrade the current PHOS TRU. Therefore, the EMCal TRU and STU will be used to replace PHOS TRU and TOR. In addition, the GTL bus based readout will be replaced with P2P readout, which is expected to reduce the number of noisy channels. With these upgrades, PHOS is expected to reach an interaction rate of approximately 50 KHz.