arXiv:hep-ex/0107062v1 23 Jul 2001
Design and Performance of the Level 1 Calorimeter
Trigger for the BaBar Detector
P. D. Dauncey, J. C. Andress, T. J. Adye, N. I. Chevalier, B. J. Claxton, N. Dyce,
B. Foster, S. Galagedera, A. Kurup, A. Mass, J. D. McFall, P. McGrath, S. J. Nash,
D. R. Price, U. Sch¨ afer, I. Scott and D. C. H. Wallom
Abstract— Since May 1999 the BaBar detector has been
taking data at the PEP-II asymmetric electron-positron col-
lider at the Stanford Linear Accelerator Center, California.
This experiment requires a very large data sample and the
PEP-II accelerator uses intense beams to deliver the high
collision rates needed. This poses a severe challenge to the
BaBar trigger system, which must reject the large rate of
background signals resulting from the high beam currents
whilst accepting the collisions of interest with very high ef-
ficiency. One of the systems that performs this task is the
Level 1 Calorimeter Trigger, which identifies energy deposits
left by particles in the BaBar calorimeter. It is a digital, cus-
tom, fixed latency system which makes heavy use of high-
speed FPGA devices to allow flexibility in the choice of data
filtering algorithms. Results from several intermediate pro-
cessing stages are read out, allowing the selection algorithm
to be fully analysed and optimized offline. In addition, the
trigger is monitored in real time by sampling these data and
cross-checking each stage of the trigger calculation against a
software model. The design, implementation, construction
and performance of the Level 1 Calorimeter Trigger during
the first year of BaBar operation are presented.
I. PEP-II and BaBar
produced in the decays of Υ(4S) mesons created in e+e−
collisions at the PEP-II collider at the Stanford Linear
Accelerator Center in California, USA. CP-violating ef-
fects are expected to be subtle, and so these measurements
require very large statistical samples of B mesons. This
means that the PEP-II machine must deliver unprecedent-
edly high luminosity, and indeed it has already set a new
world record luminosity of greater than 2 × 1033cm−2s−1
during the first year of operation, enabling BaBar to
record a data sample of approximately 20 million B me-
The high luminosity of PEP-II has been obtained by us-
ing very high beam currents, of order 1 A. The PEP-II
HE BaBar experiment ,  has been built to study
CP-violation in the decays of B mesons. These are
Manuscript first received November 2, 2000. This work was funded
by the Particle Physics and Astronomy Research Council, UK.
Paul Dauncey and David Price are with the Department of Physics,
Imperial College, University of London, Prince Consort Road, Lon-
don SW7 2BW, UK. For inquiries about this paper, contact Paul
Dauncey; telephone: +44-20-7594-7803, email: P.Dauncey@ic.ac.uk.
John Andress, Nicole Chevalier, Neil Dyce, Brian Foster, Alexander
Mass, Jason McFall, Steven Nash, Uli Sch¨ afer and David Wallom
are with the Department of Physics, University of Bristol, Tyndall
Avenue, Bristol, BS8 1TL, UK.
Timothy Adye, Brian Claxton and Senerath Galagedera are
OX11 0QX, UK.
Ajit Kurup, Paul McGrath and Iain Scott are with the Physics
Department, Royal Holloway and Bedford New College, Univer-
sity of London, Egham, TW20 0EX, UK.
machine design achieves this by filling the machine with
1658 bunches in each beam, with a bunch collision rate
of 238 MHz. A serious consequence of this high current
is that the machine-induced backgrounds have been very
significant. This has provided a major challenge for the
BaBar trigger and data acquisition system, as this un-
wanted background must be rejected without losing the B
meson decays of interest. Since high statistics are vital for
this experiment, the trigger design emphasized the need for
II. The Level 1 Trigger Requirements
The BaBar trigger has two levels, a hardware Level 1
and a software Level 3 trigger. This article describes one
of the two main sections of the Level 1 trigger, the Electro-
Magnetic calorimeter Trigger (EMT). The other main sec-
tion, the Drift Chamber Trigger (DCT), has been described
previously . A third component, the Instrumented Flux
return Trigger (IFT) is used to collect events with muon
particles which are used for calibration purposes. This part
of the trigger is not primarily designed to be efficient for B
These two main subsystems work independently and in
parallel, processing data from the calorimeter and drift
chamber detectors respectively, and seek characteristics of
particles coming from B meson decays to identify signals.
These signals, termed trigger “primitives”, are then passed
to a third system, the Global Level 1 Trigger (GLT). Here
the individual primitives are combined to form a picture
of the whole particle collision, and the GLT then decides
whether or not to accept this collision. This trigger decision
is passed to the fast control system where it is distributed
to the whole detector. Fig. 1 shows the systems with which
the Level 1 trigger interacts.
The technical requirements for the Level 1 trigger sys-
tem as a whole are set by the data acquisition  and other
electronics systems of BaBar. To ensure maximum redun-
dancy, the EMT and DCT subsystems were each designed
to satisfy these requirements independently.
All the front-end electronics systems of the BaBar de-
tector buffer their data for 12 µs, which defines the latency
allowed for the Level 1 trigger decision. The collision rate
of 238 MHz is effectively continuous as far as the time res-
olution of the drift chamber and calorimeter detectors are
concerned, and so the Level 1 trigger has the task of deter-
mining the time of the collision of interest to within 1 µs.
Each system in BaBar then reads out data in a window
Context of the Level 1 trigger within the BaBar
experiment. The EMT, together with the other parts of the
Level 1 trigger, is contained within the central box
labelled “BaBar Level 1 Trigger”.
of at least 1 µs, in order to ensure that the data from the
triggered collision are fully collected.
The data acquisition system is designed to accept a max-
imum Level 1 output rate of 2 kHz. This is much higher
than the rate of physics collisions, which totals around
120 Hz. The Level 1 trigger is designed to be as unbi-
ased as this maximum output rate allows, and to accept
all physics events without preselection. The challenge is to
provide such a trigger whilst still rejecting sufficient back-
ground to keep the total rate below 2 kHz.
A number of other requirements must be satisfied in ad-
dition to high efficiency. The efficiency must be measurable
accurately, the trigger must be stable and robust to vary-
ing background levels, and it must be flexible enough to be
adaptable to unexpected operating conditions. The first
of these is ensured by the redundancy of the EMT and
DCT triggers. The remainder were satisfied by designing
the trigger to be able to operate at up to ten times the
expected level of background. The EMT design described
below has been shown to fulfill all the requirements.
III. The EMT Data Interfaces and Algorithm
The EMT receives its data from the electromagnetic
calorimeter. There are 6580 channels in the electromag-
netic calorimeter, each giving a 16-bit energy value at 3.7
MHz. These data are extracted continuously (without trig-
gering) from the front-end electronics via 280 fibre-optic
links . In order to reduce the EMT input data rate, the
data are summed over typically 24 channels before being
sent to the EMT, since a physical energy deposit is usually
spread over multiple calorimeter channels. This reduces
the input rate to 2.1 GBytes/s, which are transmitted as
serial 59.5 MHz differential ECL signals. To compensate
for differing cable lengths and component time delays, the
data are resynchronised to the 59.5 MHz clock when they
are received by the EMT.
The technique used by the EMT to identify particle en-
ergy deposits relies on the fact that the probability of mul-
tiple particles arriving close together in time in the same
region of the calorimeter is low. This is true even in the
high background conditions of PEP-II. This means energy
deposits may be summed over azimuthal (φ) slices of the
calorimeter, yielding 40 so-called “φ strips”, without sig-
nificantly increasing the probability of pile-up. This con-
siderably simplifies the trigger logic, and the EMT pro-
cessing now becomes a one-dimensional, rather than two-
dimensional, problem.Each φ strip corresponds to 165
crystals; these are added in overlapping pairs to form 40
“φ sums” in order to fully contain energy deposits which
extend into a neighbouring φ region.
An overview of the algorithm applied to the φ sums is
shown in Fig. 2. The data from each sum are used in two
φ Sums Time Gate
Simplified diagram of the stages of the EMT trigger
ways: to find the time at which the energy was deposited,
and to compare the total energy against several thresholds.
The time is determined using a digital 8-tap finite im-
pulse response (FIR) filter which operates on the summed
energy signal from each φ sum at a frequency of 3.7 MHz.
Before digitisation, the calorimeter signal is shaped by
a three stage differentiator-integrator-integrator (CR-RC-
RC) circuit with time constants of 0.8 µs, 0.25 µs, 0.25 µs
respectively. The EMT FIR weights are chosen such that
this shaped signal drives the filter output from positive to
negative at a fixed time interval after the particle arrives.
This is illustrated in Fig. 3. It is this “zero-crossing” which
is detected and used as the basic time estimate. To increase
the accuracy of this determination, the EMT also performs
a linear interpolation between consecutive FIR output val-
ues to approximate the output at 7.4 MHz.
In parallel, the energy values of the φ sums are compared
against three threshold values. These configurable thresh-
olds are typically set to values around 120 MeV, 300 MeV
and 800 MeV. The first is designed to be efficient for mini-
mum ionising particles, which on average deposit 180 MeV
in the calorimeter. Typical GLT triggers would require four
non-neighbouring φ sums above this lowest threshold, or
three φ sums with a minimum φ angle separation between
at least one pair of them of 120◦. The other thresholds
are set as low as possible, consistent with reasonable back-
ground trigger rates. These data are typically used in the
GLT for triggers requiring two φ sums, such as two φ sums
above the 300 MeV threshold with a minimum φ angle sep-
Illustration of an ideal pulse of a) the shaped calorimeter
signal input to the EMT and b) the corresponding FIR
output. The latter is shown for the FIR weights actually
used in the first year of data-taking, which were +1 and −2
for the first and third weights, and zero for the remaining
six. This choice gives a zero-crossing approximately 1.2 µs
after the time of the energy deposit.
aration of 120◦, or two non-neighbouring φ sums above the
800 MeV threshold with no further angle requirement.
Each of the three thresholds from each φ sum has a cor-
responding output bit. The bits from pairs of φ sums are
put through an OR so as to reduce the number of bits for
the whole range of φ from 40 to 20; this is necessary as the
GLT does not have the input bandwidth for a 40-bit wide
array. The degradation on the trigger performance because
of this OR has been checked to be negligible. These bits to-
gether form the EMT primitives. The number and position
of these bits are used in the GLT to determine if a valid
trigger condition existed, such as the ones outlined above.
The time determination from the FIR filter is used to gate
the threshold bits so that they are only set on around the
time of a valid energy deposit. The bits are transmitted to
the GLT as differential PECL at a rate of 7.4 MHz, giving
a total data rate for these data of 450 Mbits/s.
IV. Implementation of the EMT
The algorithm outlined above was implemented so that
data from each φ sum are processed by a single “Algo-
rithm” Xilinx 4020E FPGA clocked at 59.5 MHz. All 40
such components operate in parallel. They are distributed
over ten Trigger Processor Boards (TPB), each contain-
ing four such FPGA’s, all with identical firmware. Each
FPGA, and TPB, runs independently of the others, so the
data cannot be considered at a “global” event level until
they reach the GLT. An overview of the whole EMT system
is shown in Fig. 4.
Trigger Data Path
Simplified diagram of the relationships between the boards
in the EMT and the external systems. The calorimeter and
GLT data connections are on dedicated cables, the TRB to
TPB connections are across a custom backplane and the
ROM to TRB connections are via fibre-optic cable.
The TPB’s are housed in a 9U VME crate with a stan-
dard J1 backplane and three custom backplanes covering J2
and J3. The EMT was built to operate with the same pro-
tocol as every front-end system in BaBar, in order to min-
imise the need for system-specific readout software. This
protocol is implemented via a TX/RX fibre-optic connec-
tion  from a BaBar ReadOut Module (ROM) , which
is common to every system in the detector. A split J2 and
J3 backplane divides the crate into two independent sec-
tions, one occupied by the ROM and a related fast control
and timing module, the other containing the EMT cards.
The whole EMT is timed and controlled via the fibre-
optic connection from the ROM. The fundamental 59.5
MHz clock signal and all configuration and control com-
mands are sent along this fibre and distributed across the
custom backplane to the TPB’s via an optical-to-electrical
converter TRansition Board (TRB) in the centre of the
crate. Because of the high clock speed, all the custom
backplane signals were implemented as differential 100 Ω
ECL point-to-point connections.
taken to route the differential lines on the custom back-
plane as closely as possible and equalise the signal return
delay times between the TRB and each TPB. The com-
mand protocol is decoded on the TPB by a “Fast Control”
Xilinx 4013E FPGA, which also performs all control func-
tions on the board. All output data from the TPB’s are
sent via the backplane to the TRB where they are con-
verted to optical signals. Hence, the fibre-optic connection
back to the ROM is used to transmit the event data and
to read back configuration data, as standard in BaBar.
The major components on the TPB are shown in Fig. 5
and a photograph of a production board is shown in Fig. 6.
Besides the algorithm calculation itself, the TPB performs
In addition, care was
several other functions that are described in the following
Readout Data Path
Trigger Data Path
Spy Data Path
Major components on each TPB. See text for a description
of the function of each component.
The data associated with the triggered event are read
from the EMT whenever there is a Level 1 trigger and are
buffered in the TPB for the 12 µs latency. They are then
stored in one of four event buffers until a readout request
is sent from the ROM. Each event buffer can store up to
±2µs of data around the event time, this length being a
configurable parameter. The latency and event buffers are
configured and controlled by a “Formatter” Xilinx 4013E
FPGA. These data are used offline for detailed checks on
the trigger performance and for tuning the algorithm con-
The TPB’s have large memory arrays which can be
loaded with arbitrary data patterns via the ROM. These
come in two sets; the “front-end” and “back-end” playback
buffers. These can be configured to inject the stored data
to the front of the algorithm processor, instead of the in-
put data from the calorimeter, or to inject the stored data
to the EMT output, instead of the normal output data to
the GLT. Around 140 µs of data can be stored. Any cho-
sen data values can be clocked through the entire EMT
chain. This functionality proved invaluable while testing
the boards after production.
In addition to the standard BaBar control path, a read-
only VME interface was built into the TPB. This allows
several on-board “spy” memories to be read at a low rate
while the trigger is active. These spy memories are filled
with data from several locations in the trigger algorithm
data path, namely the raw input data, the results of a num-
ber of intermediate processing stages and the final output
to the GLT. The memories allow around 140 µs of data to
be stored at a time. This allows detailed, bit-level valida-
tion that the EMT is functioning correctly by comparing
the spy data with a software model. The combination of
Photograph of the top side of a production TPB. The
clustering of the components is clearly visible. The board
layout was optimised to keep the data paths between the
components as short as possible.
the spy and the playback memories significantly reduced
the time taken in the prototype and production testing cy-
V. Performance of the EMT
The EMT was fully installed for the start of BaBar
data-taking in May 1999 and has operated successfully
thereafter. Fig. 7 shows a typical event from the perspec-
tive of the Level 1 trigger. The detector is drawn end-on,
with the calorimeter information being shown in the outer-
most layer. The solid blocks give the offline reconstructed
calorimeter information, the hashed blocks the EMT data.
Four significant energy deposits were identified, which to-
gether caused a trigger. In addition, four tracks were found
in the DCT and these are shown as the lines in Fig. 7; they
are clearly correlated with the calorimeter deposits. The
other DCT information, shown in the inner part of Fig. 7,
indicates the track hits detected (the small circles) over-
layed on the drift chamber cell geometry. This event in
fact satisfied several redundant triggers, which is typical of
the physics processes of interest. Such events allow cross-
checks of the EMT and DCT trigger systems against each
An example of a event which passed the Level 1 trigger.
No major components have needed to be replaced. The
only minor hardware concern has been the pin hous-
ing of the calorimeter-to-EMT cables which was damaged
through removal of misplaced pins during the cable assem-
bly. The faulty housings have been replaced.
The EMT satisfied the technical requirements for latency
and time jitter without any tuning of the FIR filter weights
beyond the values found from a simulation study during the
design phase. Fig. 8 shows the distribution of times deter-
mined in the EMT for individual energy deposits, com-
pared to a very much more accurate offline estimate using
the drift chamber data.This demonstrates the time of
each deposit is usually determined to much better than 1
µs. The overall requirement for the Level 1 trigger of 1 µs
applies to the whole event. This event time is determined
in the GLT from all the primitives, potentially including
those from the DCT, and is effectively a weighted average.
The time resolution of the event is therefore significantly
better than that of each individual energy deposit.
Typical Level 1 trigger rates are below 1 kHz, well within
the 2 kHz limit. Fig. 9 shows the overall rate for DCT
and EMT triggers combined as a function of the PEP-II
beam currents. These rates were achieved despite a fac-
tor of twenty times higher backgrounds than expected lev-
els, showing the importance of designing for high back-
ground rates from the outset. The GLT uses a combination
of EMT-only triggers, DCT-only triggers and EMT-DCT
combined triggers. In addition, an event often has multiple
trigger conditions satisfied simultaneously. It is therefore
not possible to give an unambiguous value for a trigger
rate due to the EMT; the rate of events which only trigger
because of the EMT is around 14% of the total, while re-
Distribution of energy deposit times determined in the EMT
compared with the time determined offline using the drift
chamber, which is accurate to a few ns. Deposits with
energies above 120 MeV are used. The arrows indicate the
allowed 1 µs range.
moving the EMT completely from the Level 1 trigger would
make the rate fall by around 50%.
The EMT efficiency for finding individual energy de-
posits above threshold is above 99%, except in regions with
noisy channels which had to be excluded from the trigger
(see below). Fig. 10 shows this efficiency as a function of
the deposited energy around the lowest threshold used of
120 MeV. This threshold is designed to give a good effi-
ciency for minimum ionising particles, which deposit an
average of 180 MeV. It is seen that the trigger is at full
efficiency by this energy.
During the initial data-taking period, several faulty
channels were found which sporadically became noisy.
Whenever this occurred, it was necessary to modify a con-
figurable mask to exclude these noisy regions from the trig-
ger. Some were due to isolated calorimeter channels which
were then disabled individually within the calorimeter elec-
tronics, allowing the others in the 24 channel sum to con-
tinue to be used. However, some noisy regions were due
to faults downstream of the sum, in which case the input
from all 24 had to be disabled. The average number of
input channels masked out over the first year was 1.5%.
Simulation studies indicate that these dead regions caused
a negligible loss of efficiency for B meson decays.
The high efficiency per energy deposit translates directly
into high efficiencies for physics processes. The EMT ef-
ficiency for Bhabha events, with both outgoing particles
falling within the calorimeter acceptance, has been mea-
HER current (mA)
L1 Rate (Hz)
HER + 1100 mA LER in collision
HER + 1100 mA LER out of collision
Typical Level 1 trigger rates as a function of the beam
current in the high energy ring (HER) of PEP-II. The
lowest line shows the rate for beam in the HER only. The
intermediate line shows the rate with beam in the HER and
1100 mA of beam current in the low energy ring (LER), but
with the beams being steered so as not to collide. The
highest line shows the same situation but with the HER and
LER beams colliding. This latter situation corresponds to
the normal operation of the PEP-II machine.
Efficiency for energy deposits close to the value of the
lowest threshold used.
sured to be at least 97%, with some of the apparent ineffi-
ciency being due to muon pairs contaminating the sample
used to measure the efficiency. The EMT efficiency for
B meson final states is more than 99%, where the high
figure is achieved through multiple redundancy; typically
the GLT requires four of the φ sums to be above the 120
MeV threshold, but hadronic events have around ten such
deposits on average.
The EMT has performed well during the first year of
BaBar data-taking. The hardware has had no significant
problems and the high-speed FPGA design has functioned
correctly throughout this period. The trigger has proven
to be robust against backgrounds that were significantly
higher than expected, has been flexible enough to deal with
changing conditions, and has maintained a very high effi-
ciency for all physics collisions of interest.
The authors would like to thank Su Dong for his help in
the preparation of this paper.
 BaBar Collaboration, D. Boutigny, Y. Karyotakis, S. Lees-
Rosier, P. Petitpas, C. Evangelista, A. Palano, et al., “BaBar
technical design report,” SLAC-R-95-457, March 1995.
 BaBar Collaboration, B. Aubert, A. Boucham, D. Boutigny, I.
De Bonis, J. Favier, J.-M. Gaillard, et al., “The first year of the
BaBar experiment at PEP-II,” submitted to the XXXthInterna-
tional Conference on High Energy Physics, July 27-Aug 2 2000,
 A. Berenyi, H. K. Chen, K. Dao, S. F. Dow, S. K. Gehrig, M.
S. Gill, et al., “Design and implementation of the level 1 charged
particle trigger for the BaBar detector” and references therein,
IEEE Trans. Nucl. Sci., vol. 46, no. 6, pp. 2006-2010, Dec. 1999.
 R. T. Hamilton, R. Claus, P. Grosso, M. E. Huffer, C. O’Grady,
I. Scott, et al., “The BaBar data acquisition system,” presented
at 11th IEEE NPSS Real Time Conference, June 14-18 1999,
Santa Fe, New Mexico.
FTR-8510 electrical-optical transceivers from Finisar Corp.,