5. Front-end Electronics, trigger and DAQ 5.1 Trigger Trigger is the fast real-time event selection and control system for BESIII. It selects physics interested events from enormous background and suppresses background to the level that the DAQ system can sustain. As the BEPCII will operate with a beam structure of almost continuous bunches 8ns apart that will achieve a peak luminosity of 1033 cm-2 s-1 , which will produce much more good events and backgrounds, a new trigger system must be built to match the new beam structure and a higher event rate. 5.1.1 Backgrounds and rates 1) Backgrounds A good understanding of the expected trigger rate for luminosity of 1033 cm-2 s-1 is desirable to determine the architecture for the trigger and front-end electronics. A good way to estimate background rate is simulation of lost beam particles and synchrotron radiation which needs a lot of time and good simulation tools. Here we estimate with our experience with BESII. The main backgrounds in BESIII will be the machine backgrounds due to electromagnetic processes, Bhabha and radiative Bhabha scattering from collisions of the electron and positron beams, as well as Coulomb scattering and Bremsstrahlung in the residual vacuum chamber gas and finally Touscheck scattering in the single bunches. The beam current of BEPCII will be 40 times as high as that of BEPC (I=2.2 A, 1.1×1013 electrons in the beam) with beam lifetime to be only half of that of BEPC ( τ BEPCII =3.5~3.8hr). Therefore the electron lost rate, correspondingly the beam background also, will be 80 times of that of BEPC. Electron and positron lost rate is estimated to be ( dn / dt ) = 8.7 × 108/s. Suppose the lost electrons and positrons are distributed Figure 5.1-1. background rate from one wire in uniformly around the BEPCII first layer of MDC vs beam current ring, the number of lost e+, ehitting the detector is ( dn / dt ) BESII ≈ 1.3×107/s, i. e., a background event rate of 13MHz. This is a conservative estimation, because the lost of electron and positron would be mainly around the quadruple, not uniformly along the beam pipe. Figure 5.1-1 is a measurement of background in MDC-II versus beam current in BEPC. With the experience of BESII trigger, we estimate the beam background event rate that may pass the trigger as Nbeam = 1500Hz. The full size of BESIII will be roughly the same as BESII so the cosmic ray event rate hitting on BESIII will be 170 m -2 s-1 × 3 m × 3 m = 1500 Hz. In BESII, 95% of cosmic ray background is suppressed by TOF with a time window of 40ns. While in BEPCII the bunch spacing is too small to use a time window. By applying vertex detector as in BESII, this rate can be suppressed to 40 Hz. 2) Physics events The design of BEPCII will be optimized at J/ψ energy with highest luminosity L=1 ×1033cm-2s-1. The event rate will be 1500Hz and 420 Hz at the J/ψ and ψ´(2S) resonance. The Bhabha event in the detector coverage ( |cosθ| < 0.95 ) will be NBB = L * σBB = 550 Hz which is another source of background. As Bhabha event will be used for detector calibration and luminosity measurement, it can not be fully ejected. We use a prescaler to reduce bhabha trigger event to an acceptable rate. 3) Total event rate Assuming we adopt the same trigger criteria as in BESII, BESIII would suppress event rate from 1.3 × 107 Hz to maximum event rate about 3000Hz (accidental coincidence influence not included which will be studied). 5.1.2 The principle of BESIII trigger As we know the purpose of a trigger system is to select physics interested events from enormous backgrounds and to suppress backgrounds to a level that the DAQ system can sustain. The BESIII DAQ is quite safely designed for a maximum throughput of 3000 good events per second. The trigger system must therefore reduce the rate of various backgrounds and bhabha events discussed above down to 1500 Hz while keeps high efficiency for J/ψ and ψ´(2S) decays. 1) Requirement of BESIII trigger(pipelining) The aim for a trigger system design is to keep the total dead time as small as a few percentage, which corresponds to an acceptable loss of luminosity as it is in BESII. Formerly this is achieved by designing a trigger system with levels. The lowest level is very fast and reduces much of the backgrounds, but does not introduces dead time. High level is slow but because the rate is low so the dead time introduced is low. But this scheme can not be used in BESIII because we face different constrains. Unlike in BEPC where the bunch spacing is 800ns which leaves trigger system enough time to process various subdetector signals and make decision before next collision, in BEPCII the bunch spacing (not finally decided yet but likely to be) is only 8ns, it is not possible to generate a trigger in such short time. This situation is further complicated by the fact that the arrival time of the Time of Flight (TOF) signal has an intrinsic spread of 30ns due to the different decay products of the J/ψ and ψ ' resonance with different momenta and due to different hitting position at the scintillater which makes it not possible to identify a single bunch. The TOF signals will be ready in 30ns after the collision. While in the drift chamber, the drift time is about 600ns, only after that time the wire signals can be used for trigger. Again in the electromagnetic calorimeter of BGO, because of its slow rising time and trailing time, only after 1.5μs calorimeter signal can be used for trigger. Pipeline must be used in trigger to overcome these constrains. From these constrains we know that it is not possible to determine in hardware from which bunch an event originated. This fact gives us the freedom to set trigger sampling period several times longer than the bunch spacing, easing considerably the design of the pipeline Figure 2. BESIII event flow chart components. The period will be chosen as 50ns which is six times the bunch spacing, so the signals from different sub-detectors will be binned into 50ns wide time slices and be processed in each pipeline step. 2) BESIII trigger Considering all the above mentioned constrains and requirement, the BESIII trigger system will be in two level scheme, level 1 for hardware trigger and level 2 for software event filter as shown in Figure 5.1-2. The signals from different subdetectors are splitted into two, one is digitized and stored in the pipeline in front-end electronics (FEE), the other is used in the level 1 hardware trigger to be processed to make a trigger decision. There is a latency between the level 1(L1) trigger signal and the originating event time. We set the trigger latency 2.4μs (an integer multiple of 800ns is a proper choice to adapt to different BEPCII operation modes). When there is an L1 signal, the DAQ moves the data in the FE pipeline to buffer, and packs them into an event, and send them to farm machine where the level 2 filter filters the backgrounds events further. 5.1.3 implementation 1) System Overview A schematic view of the BESIII trigger system is shown in Fig. 5.1-3. Electronic signals from sub-detectors are received and processed by the appropriate circuits in separate VME crates to yield basic trigger primitives such as the hit count in TOF, the hit count and topology in VC, track count in the drift chamber, as well as the cluster count and topology in the electromagnetic calorimeter. The information from these sub-systems is correlated by global trigger logic (GTL) which generates an L1 strobe every time a valid trigger condition is satisfied. The L1 signals are conditionally passed by the data flow control circuitry to the fan-out modules for distribution to the data acquisition system(not shown). A L0 signal is also produced for FE electronics in case of demand as the FE E have not been finalized. 2) Vertex The scheme of Vertex Chamber has not finally determined but is very likely fiber type. Experience from BESII showed that VC is very effective in suppressing the Figure 3. Schematic diagram of BESIII trigger cosmic ray background, so the count of hit will be used, and possibility of tracking and timing will be also studied. 3) MDC Tracking There will be axial and stereo layers of sense wires in MDC-IV. The tracking component of the MDC-IV trigger will use only axial wires in first phase. The tracker examines the complete set of 1704 wires, 16 axial layers (4 super layers each with 4 layers), for all possible valid patterns caused by tracks having transverse momentum greater than 150 MeV/c. The tracker consists of 2 parts: segment-finding and trackfinding. The former will locate in the FEE board to reduce connection cables. The result is sent using LVDS signals to the track-finding logic. The maximum drift time is about 600ns which must be taken into account in the design of the segment-finding and track-finding logic. Field programmable gate arrays (FPGAs) will be used to perform the pattern lookup at the pipeline clock. 4) Electromagnetic calorimeter The BESIII electromagnetic calorimeter (ECAL) will comprise 19,200 BGO crystals in the detector barrel part, arranged 96 along the beam(θ) by 200 in azimuth(φ). For the triggering, the signals from 16 crystals (4θ × 4φ) are summed as basic trigger element, therefore there are 24 × 50 trigger cells. The summed signal in a trigger cell (cell sum) is discriminated by both a high level comparator (roughly twice minimum ionizing energy) and a low comparator (about half minimum ionizing), resulting in one high bit and one low bit. All of these 1200 high and low trigger bits are read out and made available to further software filter. For the hardware trigger , 60 of the basic trigger bits will be OR-ed together (12 in z and 5 in φ) to arrive at a 20-segment topology. The calorimeter energy from a shower is usually shared among several crystals. As a result, the efficiency for setting a threshold bit in a particular region of the calorimeter depends both on energy and position: a shower shared by crystals spanning a boundary can be below threshold in both regions. Monte Carlo simulation will be studied to reduce the complications associated with boundaries in the calorimeter by creating overlapping “tiles” by forming analog sums of signals from larger groups of crystals. 5) Time of Flight The Time of Flight counter of BESIII consists of 192 scintillators in two layers with 96 in each layer. Photo multiplier signals are discriminated first and then the number of hits is calculated which is used to produce the spare L0 trigger signal. These hits are matched with MDC tracks, possibly also VC tracks, and ECAL clusters. The matched number of tracks are used in the final decision. 6) Trigger Timing and Control The clock frequency of storage ring of BEPCII is 500MHz. The clock of FEE pipeline and trigger pipeline will be derived from this clock. The pipeline clock will be 20MHz and all the processing of the sub-detectors signals in pipelined trigger will be under control of this clock. 7) Global Trigger Logic The primitive signals from sub-detector are fed to the Global Trigger Logic(GTL). They are matched there to define a valid event trigger L1. The L1 signal is synchronized to the trigger pipeline clock to have a fixed latency of 2.4μs with collision.