1: \section{Trigger}
2: \label{\secname sec:trg}
3:
4: \subsection{Trigger Requirements}
5:
6: The basic requirement for the trigger system is the selection of
7: events of interest (see Table~\ref{\secname tab:PhysRates}) with a
8: high, stable, and well-understood efficiency while rejecting
9: background events and keeping the total event rate under 120\hz.
10: At design luminosity, beam-induced background rates are typically
11: about 20\khz\ each for one or more tracks in the drift chamber
12: with $\pxy > 120$\mevc\ or at least one EMC cluster with
13: $E>100$\mev. Efficiency, diagnostic, and background studies
14: require prescaled samples of special event types, such as those
15: failing the trigger selection criteria, and random beam crossings.
16:
17: The total trigger efficiency is required to exceed 99\% for all
18: $\BB$ events and at least 95\% for continuum events. Less
19: stringent requirements apply to other event types, \eg\ $\tautau$
20: events should have a 90-95\% trigger efficiency, depending on the
21: specific $\tau^\pm$ decay channels.
22:
23: The trigger system must be robust and flexible in order to function
24: even under extreme background situations. It must also be able to
25: operate in an environment with dead or noisy electronics channels.
26: The trigger should contribute no more than 1\% to dead time.
27:
28: \begin{table}[b]
29: \centering
30:
31: \caption{Cross sections, production and trigger rates
32: for the principal physics processes at 10.58\gev\ for a luminosity
33: of $3\times 10^{33}\cms$. The \epem\ cross section refers to
34: events with either the $e^+$, $e^-$, or both inside the EMC
35: detection volume.} \label{\secname tab:PhysRates} \vspace{.2cm}
36:
37: \vspace{.5\baselineskip}
38:
39: \small
40: \begin{tabular}{lr@{.}lr@{.}lr@{.}l}\hline
41: &\multicolumn{2}{c}{Cross\rule{0pt}{12pt}} &\multicolumn{2}{c}{Production}
42: &\multicolumn{2}{c}{Level~1}\\
43: Event &\multicolumn{2}{c}{section} &\multicolumn{2}{c}{Rate}
44: &\multicolumn{2}{c}{Trigger}\\
45: type &\multicolumn{2}{c}{(nb)}
46: &\multicolumn{2}{c}{(Hz)\rule[-5pt]{0pt}{0pt}}
47: &\multicolumn{2}{c}{Rate (Hz)}\\ \hline
48: %\BB & 1.1 & 3.2 & 3.2 \\
49: %\uubar+\ddbar+\ccbar+\ssbar & 3.4 & 10.2 & 10.1 \\
50: \bbbar \rule{0pt}{12pt} &1&1 &3&2 &3&2\\
51: other \qqbar &3&4 &10&2 &10&1\\
52: \epem &\multicolumn{2}{c}{$\sim$53}
53: &\multicolumn{2}{c}{\hphantom{3}159}
54: &\multicolumn{2}{c}{\hphantom{3}156}\\
55: \mumu &1&2 &3&5 &3&1\\
56: \tautau &\hphantom{33}0&9
57: &\hphantom{3333}2&8\rule[-5pt]{0pt}{0pt} &\hphantom{3333}2&4\\
58: \hline
59: \end{tabular}
60: \normalsize
61: \end{table}
62:
63:
64:
65: \subsection{Trigger Overview}
66:
67: The trigger is implemented as a two-level hierarchy, the Level~1
68: (L1) in hardware followed by the Level~3 (L3) in software. It is
69: designed to accommodate up to ten times the initially projected
70: \cite{ref:R_TDR} \pep2 background rates at design luminosity and
71: to degrade slowly for backgrounds above that level. Redundancy is
72: built into the system to measure and monitor trigger efficiencies.
73:
74: During normal operation, the L1 is configured to have an output
75: rate of typically 1\khz. Triggers are produced within a
76: fixed latency window of 11--12\mus\ after the \epem collision, and
77: delivered to the Fast Control and Timing System (FCTS). Data used
78: to form the trigger decision are preserved with each event for
79: efficiency studies.
80:
81: The L3 receives the output from L1, performs a second stage rate
82: reduction for the main physics sources, and identifies and flags
83: the special categories of events needed for luminosity
84: determination, diagnostic, and calibration purposes. At design
85: luminosity, the L3 filter acceptance for physics is $\sim$90\hz,
86: while $\sim$30\hz\ contain the other special event categories. The
87: L3 algorithms comply with the same software conventions and
88: standards used in all other \babar\ software, thereby simplifying
89: its design, testing, and maintenance.
90:
91:
92:
93: \subsection{Level~1 Trigger System}
94:
95: The L1 trigger decision is based on charged tracks in the DCH
96: above a preset transverse momentum, showers in the EMC, and tracks
97: detected in the IFR. Trigger data are processed by three
98: specialized hardware processors. As described below, the drift
99: chamber trigger (DCT) and electromagnetic calorimeter trigger
100: (EMT) both satisfy all trigger requirements independently with
101: high efficiency, and thereby provide a high degree of redundancy,
102: which enables the measurement of trigger efficiency. The
103: instrumented flux return trigger (IFT) is used for triggering
104: $\mumu$ and cosmic rays, mostly for diagnostic purposes.
105:
106: The overall structure of the L1 trigger is illustrated in
107: Figure~\ref{\secname fig:trg-L1sys}. Each of the three L1 trigger
108: processors generates trigger \emph{primitives}, summary data on
109: the position and energy of particles, that are sent to the global
110: trigger (GLT) every 134\ns. The DCT and EMT primitives sent to
111: the GLT are \emph{$\phi$-maps}. An individual $\phi$-map consists
112: of an \textit{n}-bit word representing a particular pattern of
113: \emph{trigger objects} as distributed in fixed-width $\phi$
114: regions from $0$ to $2\pi$. A trigger object is a quantity
115: indicating the presence of a particle, such as a drift chamber
116: track or a calorimeter energy deposit. The IFT primitive is a
117: three-bit pattern representing the hit topology in the IFR. The
118: meaning of the various trigger primitive inputs to the GLT are
119: summarized in Table~\ref{\secname tab:trg-primitive}.
120:
121: The GLT processes all trigger primitives to form specific triggers
122: and then delivers them to the FCTS. The FCTS can optionally mask
123: or prescale any of these triggers. If a valid trigger remains, a
124: \emph{L1 Accept} is issued to initiate event readout. The trigger
125: definition logic, masks, and prescale values are all configurable
126: on a per run basis.
127:
128:
129: \begin{figure}
130: \centering
131: \includegraphics[width=7.5cm]{trg-schematic}
132:
133: \vspace{-2pc} \caption{Simplified L1 trigger schematic. Indicated
134: on the figure are the number of components (in square brackets),
135: and the transmission rates between components in terms of total
136: signal bits.} \label{\secname fig:trg-L1sys}
137: \end{figure}
138:
139:
140: The L1 hardware is housed in five 9U VME crates. The L1 trigger
141: operates in a continuous sampling mode, generating trigger
142: information at regular, fixed time intervals. The DCH front-end
143: electronics (FEEs) and the EMC \emph{untriggered personality
144: cards} (UPCs) send raw data to the DCT and EMT about 2\mus\ after
145: the \epem\ collision. The DCT and EMT event processing times are
146: 4--5\mus, followed by another $\sim$3\mus\ of processing in the
147: GLT to issue a L1 trigger. The L1 trigger takes approximately
148: 1\mus\ to propagate through the FCTS and the \emph{readout
149: modules} (ROMs) to initiate event readout. These steps are all
150: accomplished within the 12.8\mus\ FEE buffer capacity limit.
151:
152:
153: \begin{table*}
154: \caption{Trigger primitives for the DCT and EMT. Most energy
155: thresholds are adjustable; those listed are typical values.}
156: \label{\secname tab:trg-primitive} \vspace{.2cm}
157: \centering
158: \begin{tabular}{lllcc}
159: \hline\hline
160: \rule[-5pt]{0pt}{17pt}& Description & Origin & No. of bits & Threshold
161: \\ \hline
162: B\rule{0pt}{12pt} & Short track reaching DCH superlayer 5 & BLT & 16
163: & 120\mevc \\
164: A & Long track reaching DCH superlayer 10 & BLT &16 & 180\mevc \\
165: A$^\prime$\rule[-5pt]{0pt}{0pt} & High \pt\ track & PTD & 16 &800\mevc \\ \hline
166: M\rule{0pt}{12pt} & All-$\theta$ MIP energy & TPB & 20 &100\mev \\
167: G & All-$\theta$ intermediate energy & TPB & 20 &250\mev \\
168: E & All-$\theta$ high energy & TPB & 20 & 700\mev\\
169: X & Forward endcap MIP & TPB & 20 & 100\mev \\
170: Y &\rule[-5pt]{0pt}{0pt}Backward barrel high energy & TPB & 10 & 1\gev \\
171: \hline\hline
172: \end{tabular}
173: \end{table*}
174:
175: The DCT, EMT and GLT each maintain a four-event buffer to hold
176: information resulting from the various stages of the L1 trigger.
177: These data are read out by the normal data acquisition system.
178:
179: \subsubsection{Level~1 Drift Chamber Trigger}
180:
181: The input data to the DCT consist of one bit for each of the 7104
182: DCH cells. These bits convey time information derived from the
183: sense wire signal for that cell. The DCT output primitives are
184: candidate tracks encoded in terms of three 16-bit $\phi$-maps as
185: listed in Table~\ref{\secname tab:trg-primitive}.
186:
187: The DCT algorithms are executed in three types of
188: modules~\cite{ref:dct}. First, track segments, their $\phi$ positions
189: and drift time estimates are found using a set of 24 Track Segment
190: Finder (TSF) modules~\cite{ref:tsf}. These data are then passed to
191: the Binary Link Tracker (BLT) module~\cite{ref:blt}, where segments
192: are linked into complete tracks. In parallel, the $\phi$ information
193: for segments found in axial superlayers is transmitted to eight
194: transverse momentum discriminator (PTD) modules~\cite{ref:ptd}, which
195: search for tracks above a set
196: \pt\ threshold.
197:
198: Each of the three DCT modules (TSF, BLT, and PTD) relies heavily on
199: multiple FPGA's~\cite{ref:ORCA} which perform the control and
200: algorithmic functions. All cabling is handled by a small (6U)
201: back-of-crate interface behind each main board.
202:
203:
204: \paragraph{Track Segment Finder}
205:
206: The TSF modules are responsible for finding track segments in 1776
207: overlapping eight-cell \emph{pivot groups}. A pivot group is a
208: contiguous set of cells that span all four layers within a superlayer.
209: The pivot group shape is such that only reasonably straight tracks
210: originating from the interaction point can produce a valid segment.
211: Figure~\ref{\secname fig:pivotcell} shows the arrangement of cells
212: within a pivot group. Cell 4 is called the \emph{pivot cell}; the TSF
213: algorithm is optimized to find track segments that \emph{pivot} about
214: this cell.
215:
216: The DCH signals are sampled every 269\ns. The passage of a single
217: particle through the DCH will produce ionization that drifts to the
218: sense wires in typically no more than four of these clock ticks. Each
219: cell is associated with a two-bit counter that is incremented at every
220: clock tick for which a signal is present. In this way, a short time
221: history of each cell is preserved. For each clock tick, the
222: collection of two-bit counters for each pivot group forms a 16-bit
223: value used to address a look-up-table. This look-up-table contains
224: two-bit weights indicating whether there is no acceptable segment, a
225: low-quality segment, a three-layer segment (allowing for cell
226: inefficiencies), or a four-layer segment. When an acceptable segment
227: is found, that pivot group is examined to determine which of three
228: subsequent clock ticks produce the highest weight or \emph{best}
229: pattern.
230:
231: The look-up-table also contains position and time information which,
232: along with a summary of cell occupancies, forms the basis of data sent
233: to the BLT and PTD. The TSF algorithm uses the time-variation of the
234: look-up-table weights to refine both the event time and its
235: uncertainty, thus enabling it to output results to the BLT every
236: 134\ns.
237:
238: The position resolution as measured from the data after
239: calibration, is typically $\sim$600\mum\ for a four-layer segment
240: and $\sim$900\mum\ for a three-layer segment. For tracks
241: originating from the IP, the efficiency for finding TSF segments
242: is 97\%, and the efficiency for high-quality three-layer or
243: four-layer TSF segments is 94\%.
244:
245:
246: \begin{figure}
247: \centering
248: \includegraphics[width=7.5cm]{pivotgrp}
249: \vspace{-2.5pc}
250: \caption{Track Segment Finder pivot group.}
251: \label{\secname fig:pivotcell}
252: \end{figure}
253:
254:
255: \paragraph{Binary Link Tracker}
256:
257: The BLT receives segment hit information from all 24 TSF's at a
258: rate of 320 bits every 134\ns\ and links them into complete
259: tracks. The segment hits are mapped onto the DCH geometry in
260: terms of 320 \emph{ supercells}, 32 sectors in $\phi$ and ten
261: radial superlayers. Each bit indicates whether a segment is found
262: in that supercell or not. The BLT input data are combined using a
263: logical OR with a programmable mask pattern. The masking allows
264: the system to activate track segments corresponding to dead or
265: highly inefficient cells to prevent efficiency degradation. The
266: linking algorithm uses an extension of a method developed for the
267: CLEO-II trigger~\cite{ref:CLEO-BLT}. It starts from the innermost
268: superlayer, A1, and moves radially outward.
269:
270: Tracks that reach the outer layer of the DCH (superlayer A10) are
271: classified as type~A. Tracks that reach the middle layer
272: (superlayer U5) are classified as type~B. An A track is found if
273: there is a segment in at least eight superlayers and if the
274: segments in two consecutive superlayers fall azimuthally within
275: three to five supercells of each other (depending on the
276: superlayer type). This allows for track curvature and dip angle
277: variations. The data are compressed and output to the GLT in
278: the form of two 16-bit $\phi$-maps, one each for A and B tracks.
279:
280: \paragraph{PT Discriminator}
281:
282: The eight PTD modules receive $\phi$ information of high quality track
283: segments in the axial superlayers (A1, A4, A7 and A10), and determine
284: if the segments are consistent with a track \pt\ greater than a
285: configurable minimum value. An envelope for tracks above the minimum
286: \pt\ is defined using the IP, and a track segment position in one of
287: the \emph{seed} superlayers, A7 or A10. A high \pt\ candidate, denoted
288: as A$^\prime$, is identified when sufficient track segments with
289: accurate $\phi$ information from the other axial superlayers lie
290: within this envelope.
291:
292: Each PTD module searches for seed segments in superlayers A7 and A10,
293: and within a 45-degree azimuthal wedge of the DCH. This search region
294: spans eight supercells, and the processing for each supercell is
295: performed by its own processing engine on the PTD. The principal
296: components in each engine are an algorithmic processor and
297: look-up-tables containing the limits for each individual seed
298: position. The contents of the look-up-tables specify the allowed track
299: segment positions for each of the three other axial superlayers and
300: consequently define the effective
301: \pt\ discrimination threshold. The resulting \pt\ threshold for the PTD
302: A$^\prime$ tracks is shown in Figure~\ref{\secname fig:dct-ptturnon}
303: together with the BLT A, B track efficiency.
304:
305:
306: \begin{figure}
307: \centering
308: \includegraphics[width=7cm]{dct-turnon.eps}
309:
310: \vspace{-2pc}
311: \caption{DCT track efficiency versus transverse momentum for A, B,
312: and A$^\prime$ tracks. The A$^\prime$ threshold is set to 800\mevc.}
313: \label{\secname fig:dct-ptturnon}
314: \end{figure}
315:
316: \subsubsection{Level~1 Calorimeter Trigger}
317:
318: For trigger purposes, the EMC is divided into 280 towers, $7\times40$
319: ($\theta\times\phi$). Each of the barrel's 240 towers is composed of
320: 24 crystals in a $8\times3$ ($\theta\times\phi$) array. The endcap is
321: divided into 40 towers, each forming a wedge in $\phi$ containing
322: 19--22 crystals. For each tower, all crystal energies above a
323: threshold of 20\mev\ are summed and sent to the EMT every 269\ns.
324:
325: The conversion of the tower data into the GLT $\phi$-maps is performed
326: by ten Trigger Processor Boards (TPBs). The TPBs determine energies in
327: the 40 $\phi$ sectors, summing over various ranges of $\theta$,
328: compare these energies against thresholds for each of the trigger
329: primitives (see Table~\ref{\secname tab:trg-primitive}), estimate the
330: time of energy deposition, correct for timing jitter, and then
331: transmit the result to the GLT.
332:
333: Each TPB receives data from 28 towers, corresponding to an array of $7
334: \times 4$ in $\theta\times\phi$, or four \emph{$\phi$-sectors}. Each
335: of the 40 $\phi$-sectors is summed independently. To identify energy
336: deposits that span two adjacent $\phi$-sectors, the energy of each sector
337: is also made available to the summing circuit for a single adjoining
338: sector in such a way that all possible pairs of adjacent $\phi$-sectors
339: are summed. These energy sums are compared against thresholds to form
340: trigger objects. Each sum is also sent to an eight-tap finite impulse
341: response (FIR) digital filter which is used to estimate the energy
342: deposition time. A look-up-table is used to make an energy-dependent
343: estimate of the timing jitter which, along with the FIR output, is used to
344: time the transmission of any trigger objects to the GLT. Pairs of
345: $\phi$-sectors are ORed to form 20-bit $\phi$-maps for the M, G, E, and X
346: primitives, while for the Y primitive, groups of four are ORed to form a
347: 10-bit $\phi$-map. The complete algorithm is implemented in one
348: FPGA~\cite{ref:Xilinx} for each $\phi$-sector, with four
349: identical components per TPB. Further details of the EMT system can be
350: found in~\cite{ref:EMT}.
351:
352: The basic performance of the EMT can be expressed in terms of the
353: efficiency and timing jitter of the trigger primitives. The
354: efficiency of the primitives can be measured by the number of times a
355: trigger bit is set for a specific energy reconstructed offline in
356: events from a random trigger. Figure~\ref{\secname fig:trg-emt1}
357: shows this efficiency for energies near the M threshold. The
358: efficiency changes from 10\% to 90\% in the range of 110 to 145\mev,
359: and reaches 99\% at 180\mev, close to the average energy deposition of
360: a minimum ionizing particle at normal incidence.
361:
362: \begin{figure}
363: \centering
364: \includegraphics[width=7cm]{emt1.eps}
365: \vspace{-2pc}
366: \caption{EMT M efficiency vs. EMC cluster energy for an M threshold
367: setting of 120\mev.}
368: \label{\secname fig:trg-emt1}
369: \end{figure}
370:
371: The EMT time jitter is measured by comparing the time centroid of
372: $\phi$-strip M hits in $\mumu$ events with the DCH track start time,
373: $\t_0$. The difference has an rms width of 90\ns\ with $>$99.9\% of the
374: matching M hits within a $\pm$500\ns\ window.
375:
376: \subsubsection{Level~1 IFR Trigger}
377:
378: The IFT is used for triggering on $\mumu$ and cosmic rays. For the
379: purposes of the trigger, the IFR is divided into ten sectors, namely
380: the six barrel sextants and the four half end doors. The inputs to
381: the IFT are the \emph{Fast OR} signals of all $\phi$ readout strips in
382: eight selected layers in each sector.
383:
384: A majority logic algorithm defines trigger objects for every
385: sector in which at least four of the eight trigger layers have
386: hits within a time window of 134\ns. The IFR trigger
387: synchronization module processes the trigger objects from the ten
388: sectors and generates the three-bit trigger word (U) encoding
389: seven exclusive trigger conditions, as defined in
390: Table~\ref{\secname tab:IFT-pattern}. The trigger $\mathrm{U}
391: \geq 5$, for example, covers all $\mumu$ topologies of interest.
392:
393: \begin{table}
394: \centering
395: \caption{IFR trigger pattern (U) definition, where $\mu$ refers to a
396: signal within a sector.}
397: \label{\secname tab:IFT-pattern}
398: \vspace{.5\baselineskip}
399: %\small
400: \begin{tabular}{cl}
401: \hline
402: \rule[-5pt]{0pt}{17pt} U &Trigger condition \\
403: \hline
404: 1\rule{0pt}{12pt} &$\geq 2 \mu$ topologies other than $\mathrm{U}=5-7$ \\
405: 2 &1 $\mu$ in backward endcap \\
406: 3 &1 $\mu$ in forward endcap \\
407: 4 &1 $\mu$ in barrel \\
408: 5 &2 back-back $\mu$'s in barrel $+ 1$ forward $\mu$ \\
409: 6 &1 $\mu$ in barrel $+ 1$ forward $\mu$ \\
410: 7\rule[-5pt]{0pt}{0pt} & 2 back-back $\mu$'s in barrel \\
411: \hline
412: \end{tabular}
413: \end{table}
414:
415: The efficiency of the IFT has been evaluated using cosmic rays
416: triggered by the DCT and crossing the detector close to the IP. For
417: these events, 98\% were triggered by the IFT as events with at least
418: one track, and 73\% as events with two tracks, inside the geometrical
419: region of the IFR. Most of the IFT inefficiency is concentrated at
420: the boundaries between sectors.
421:
422:
423: \subsubsection{Global Trigger}
424:
425: The GLT receives the eight trigger primitives in the form of
426: $\phi$-maps as listed in Table~\ref{\secname tab:trg-primitive} along
427: with information from the IFT (Table~\ref{\secname tab:IFT-pattern})
428: to form specific triggers that are then passed to the FCTS for the
429: final trigger decision. Due to the different latencies associated
430: with the production of these primitives, the GLT forms a time
431: alignment of these input data using configurable delays.
432:
433: The GLT then forms some additional combined $\phi$-maps from the
434: DCT and EMT data. These maps include matched objects such as BM for B
435: tracks matched to an M cluster in $\phi$, back-to-back objects, B$^*$
436: and M$^*$, which require a pair of $\phi$ bits separated by a
437: configurable angle of typically $\sim120^\circ$, and an EM$^*$ object
438: for back-to-back EM pairs.
439:
440: All 16 $\phi$-maps are then used to address individual GLT
441: look-up-tables which return three-bit counts of trigger objects
442: contained within those maps, \eg\ the number of B tracks or number
443: of M clusters. To count as distinct trigger objects, the map bits
444: are typically required to have a separation of more than one
445: $\phi$ bin. The resulting 16 counts plus the IFT hit pattern are
446: then tested in logical operations. The permissible operations
447: include: always-pass; or a comparison ($\geq$, $=$, or $<$) with a
448: configurable selection parameter. A trigger line is then set as
449: the logical AND of these 17 operations. This process is performed
450: for each of the 24 trigger lines.
451:
452: The GLT derives the L1 trigger time from the centroid of the
453: timing distribution of the highest priority trigger, binned in the
454: 134\ns\ interval and spanning about 1\mus. Other trigger signals
455: compatible with this time are retained and cached. The average
456: time is calculated to the nearest 67\ns\ and the 24-bit GLT output
457: signal is sent to the FCTS every 67\ns. The achieved timing
458: resolution for hadronic events has an rms width of 52\ns; and 99\%
459: of the events are within 77\ns.
460:
461: The GLT hardware consists of a single 9U VME module. Most of the
462: logic, including diagnostic and DAQ memories, are implemented in
463: FPGA's~\cite{ref:ORCA}. The look-up-table section is implemented as
464: an array of 16 memory chips with 8\mbytes\ of configuration data.
465:
466: \subsection{Level~1 Trigger Performance\\ and Operational Experience}
467:
468: The L1 trigger configuration consists of DCT-only, EMT-only, mixed
469: and prescaled triggers, aimed not only for maximum efficiency and
470: background suppression, but also for the convenience of trigger efficiency
471: determination.
472:
473: Although most triggers target a specific physics source, they often also
474: select other processes. For example, two-track triggers are not only
475: efficient for Bhabha, $\mumu$, and $\tautau$ events, but are also
476: useful for selecting jet-like hadronic events and some rare $B$ decays.
477:
478: The efficiencies and rates of selected L1 triggers for various
479: physics processes are listed in Table~\ref{\secname tab:trg-L1eff}.
480: Although triggering on generic \BB\ events is relatively easy, it is
481: essential to ensure high efficiencies for the important rare
482: low-multiplicity $B$ decays. For this reason, efficiencies for
483: $\Bz\to\piz\piz$ and $\Bub\to\taum\overline{\nu}$ are also listed in
484: Table~\ref{\secname tab:trg-L1eff}.
485:
486:
487: \begin{table*}
488: \caption{Level~1 Trigger efficiencies (\%) and rates (Hz) at a luminosity of
489: $2.2\times 10^{33}$\cms\ for selected triggers applied to various
490: physics processes. The symbols refer to the counts for each object.}
491: \label{\secname tab:trg-L1eff}
492: \vspace{.5\baselineskip}
493: \centering
494: \begin{tabular}{lrrrrrrrrr}
495: \hline\hline
496: \rule[-5pt]{0pt}{17pt} Level~1 Trigger & $\epsilon_{\BB}$
497: & $\epsilon_{B\to\piz\piz}$ & $\epsilon_{B\to\tau\overline{\nu}}$
498: & $\epsilon_{\ccbar}$ & $\epsilon_{uds}$
499: & $\epsilon_{ee}$ & $\epsilon_{\mu\mu}$ & $\epsilon_{\tau\tau}$
500: & Rate \\
501: \hline
502: \rule{0pt}{12pt}
503: A$\geq$3 \& B$^*\geq$1 & 97.1 & 66.4 & 81.8 & 88.9 & 81.1
504: & --- & --- & 17.7 & 180 \\
505: A$\geq$1 \& B$^*\geq$1 \& A$^\prime\geq$1 & 95.0 & 63.0 & 83.2 & 89.2 & 85.2
506: & 98.6 & 99.1 & 79.9 & 410 \\
507: Combined DCT (ORed) & 99.1 & 79.7 & 92.2 & 95.3 & 90.6
508: & 98.9 & 99.1 & 80.6 & 560 \\
509: \hline
510: \rule{0pt}{12pt}
511: M$\geq$3 \& M$^*\geq$1 & 99.7 & 98.6 & 93.7 & 98.5 & 94.7
512: & --- & --- & 53.7 & 160 \\
513: EM$^*\geq$1 & 71.4 & 94.9 & 55.5 & 77.1 & 79.5
514: & 97.8 & --- & 65.8 & 150 \\
515: \rule[-5pt]{0pt}{0pt}
516: Combined EMT (ORed) & 99.8 & 99.2 & 95.5 & 98.8 & 95.6
517: & 99.2 & --- & 77.6 & 340 \\
518: \hline
519: \rule{0pt}{12pt}
520: B$\geq$3 \& A$\geq$2 \& M$\geq$2 & 99.4 & 81.2 & 90.3 & 94.8 & 87.8
521: & --- & --- & 19.7 & 170 \\
522: M$^*\geq$1 \& A$\geq$1 \& A$^\prime\geq$1 & 95.1 & 68.8 & 83.7 & 90.1 & 87.0
523: & 97.8 & 95.9 & 78.2 & 250 \\
524: E$\geq$1 \& B$\geq$2 \& A$\geq$1 & 72.1 & 92.4 & 60.2 & 77.7 & 79.2
525: & 99.3 & --- & 72.8 & 140 \\
526: M$^*\geq$1 \& U$\geq$5 ($\mu$-pair) & --- & --- & --- & --- &---
527: & --- & 60.3 & --- & 70 \\
528: \hline
529: \rule[-5pt]{0pt}{17pt}
530: Combined Level~1 triggers &$>$99.9& 99.8 & 99.7 & 99.9 & 98.2
531: &$>$99.9& 99.6 & 94.5 & 970 \\
532: \hline\hline
533: \end{tabular}
534: \end{table*}
535:
536: The efficiencies listed for the hadronic events are absolute and
537: include acceptance losses based on Monte Carlo simulation, and
538: local inefficiency effects. The efficiencies for $\tau$-pair
539: events are for \emph{fiducial} events, \ie\ events with two or
540: more tracks with $\pt>120$\mevc\ and polar angle $\theta$ to reach
541: at least DCH superlayer U5. The Bhabha and $\mu$-pair efficiencies
542: are determined from the data, for events with two high momentum
543: particles, which are back-to-back in the c.m. system, and within
544: the EMC fiducial volume. The data in Table~\ref{\secname
545: tab:trg-L1eff} demonstrate that the DCT and the combined EMT/IFT
546: provide fully efficient, independent triggers for most physics
547: processes, although independent triggers for \mumu\ and \tautau\
548: are not individually fully efficient. The efficiencies predicted
549: by the Monte Carlo simulation are generally in good agreement with
550: data when tested using events passing typical analysis selections
551: and based on orthogonal triggers. Prescaled triggers with a very
552: open acceptance of physics events, such as (B$\geq$2 \& A$\geq$1)
553: or (M$\geq$2) are also used to measure the trigger efficiencies.
554:
555: The trigger rates listed in Table~\ref{\secname tab:trg-L1eff} are for
556: a typical run with HER (LER) currents at 650\mA\ (1350\mA) and a
557: luminosity of $2.2\times 10^{33}$\cms. These rates are stable to
558: within 20\% for the same \pep2\ configuration, but they are impacted
559: by changes in vacuum conditions, beam currents, and orbits. There are
560: occasional background spikes which can double the L1 rate. However,
561: due to the 2\khz\ capability of the data acquisition, these spikes do
562: not induce significant dead time.
563:
564: For a typical L1 rate of 1\khz, Bhabha and annihilation physics
565: events contribute $\sim$130\hz. There are also 100\hz\ of cosmic
566: ray and 20\hz\ of random beam crossing triggers. The remaining
567: triggers are due to lost particles interacting with the beam pipe
568: or other components. The distribution of single track $z_0$
569: values as reconstructed by L3 for all L1 triggers is shown in
570: Figure~\ref{\secname fig:trg-l3trkz0}. The most prominent peaks
571: at $z=\pm 20$\cm\ correspond to a flange of the beam pipe. The
572: peak at $z_0=-55$\cm\ corresponds to a step in the synchrotron
573: mask.
574:
575: \begin{figure}
576: \centering
577: \includegraphics[width=7cm]{l3trkz0.eps}
578: \vspace{-2pc}
579:
580: \caption{Single track $z_0$ for all L1 tracks, reconstructed by L3.}
581: \label{\secname fig:trg-l3trkz0}
582: \end{figure}
583:
584:
585: The L1 trigger hardware operation has been very stable. For the first
586: one and half years of operation, there have been only four hardware
587: failures in the L1 system, mainly auxiliary or communication
588: boards. Occasional adjustments to the EMT tower mask were used to
589: temporarily suppress noisy channels in the EMC electronics.
590:
591: \subsection{Level~3 Trigger System}
592:
593: The L3 trigger software comprises event reconstruction and
594: classification, a set of event selection filters, and monitoring.
595: This software runs on the online computer farm. The filters have
596: access to the complete event data for making their decision, including
597: the output of the L1 trigger processors and FCTS trigger scalers. L3
598: operates by refining and augmenting the selection methods used in L1.
599: For example, better DCH tracking (vertex resolution) and EMC
600: clustering filters allow for greater rejection of beam backgrounds and
601: Bhabha events.
602:
603: The L3 system runs within the Online Event Processing (OEP) framework
604: (see Section~\ref{sec:online}). OEP delivers events to L3, then
605: prescales and logs those which pass the L3 selection criteria.
606:
607: To provide optimum flexibility under different running conditions, L3
608: is designed according to a general logic model that can be configured
609: to support an unlimited variety of event selection mechanisms. This
610: provides for a number of different, independent classification tests,
611: called \emph{ scripts}, that are executed independently, together with a
612: mechanism for combining these tests into the final set of
613: classification decisions.
614:
615: The L3 trigger has three phases. In the first phase, events are
616: classified by defining L3 input lines, which are based on a logical OR
617: of any number of the 32 FCTS output lines. Any number of L3 input
618: lines may be defined.
619:
620: The second phase comprises a number of scripts. Each script
621: executes if its single L3 input line is true and subsequently produces
622: a single pass--fail output flag. Internally, a script may execute one
623: or both of the DCH or EMC algorithms, followed by one or more filters.
624: The algorithms construct quantities of interest, while the filters
625: determine whether or not those quantities satisfy the specific
626: selection criteria.
627:
628: In the final phase, the L3 output lines are formed. Each output line
629: is defined as the logical OR of selected script flags. L3 can treat
630: script flags as vetoes, thereby rejecting, for example, carefully
631: selected Bhabha events which might otherwise satisfy the selection
632: criteria.
633:
634: L3 utilizes the standard event data analysis framework and depends
635: crucially on several of its aspects. Any code in the form of
636: \emph{modules} can be included and configured at run time. A sequence of
637: these software modules compose a script. The same instance of a
638: module may be included in multiple scripts yet it is executed only
639: once, thus avoiding significant additional CPU overhead.
640:
641: \subsubsection{Level~3 Drift Chamber\\ Tracking Algorithm}
642: Many events which pass L1 but must be rejected by L3 are
643: beam-induced charged particle background that are produced in
644: material close to the IP. L1 does not currently have sufficient
645: tracking resolution to identify these background tracks. The
646: DCH-based algorithm, L3Dch, performs fast pattern recognition
647: (track finding) and track fitting, which determines the five helix
648: track parameters for tracks with \pt\ above 250\mevc. To speed up
649: the process of pattern recognition, L3Dch starts with the track
650: segments from the TSF system and improves the resolution by making
651: use of the actual DCH information.
652:
653: For those TSF segments that have a simple solution to the left-right
654: ambiguity, a track $t_0$ is determined. The $t_0$ values for each
655: segment in an event are binned and the mean produced from the values
656: in the most populated bin is used as the estimated event $t_0$. All
657: events which pass L1 typically have enough segments to form a $t_0$\
658: estimate. The measured rms resolution on this estimate is 1.8\ns\ for
659: Bhabha events and 3.8\ns\ for hadronic events.
660:
661: The pattern recognition for L3Dch is done with a look-up-table. For
662: this track table, the DCH is divided into 120 $\phi$-sectors,
663: corresponding to the number of cells in the innermost layers. The
664: track table is populated with the hit patterns of Monte Carlo
665: generated tracks with a \pt\ above 250\mevc\ and originating within
666: 2\cm\ of the IP in the $x$--$y$ plane, and within 10\cm\ in $z$. The
667: pattern recognition algorithm searches the table entries looking for
668: matches to segments found by the TSFs. The matched set of segments
669: for a given track is then passed to the track fitting algorithm. The
670: track table allows for up to two missing DCH TSF segments per track.
671:
672: The track fitting algorithm is provided with both the track segments
673: found in pattern recognition and the individual hits within those
674: segments. From this information the five helix parameters are fitted.
675: The fit is then iterated, adding segments close to the initially
676: fitted track, and dropping hits with large residuals. The final fit
677: does not demand that the track originate from the IP.
678:
679: The two-track miss distances for Bhabha events are plotted in
680: Figure~\ref{\secname fig:L3-2prong-miss}. The resolutions for
681: individual tracks are 0.80\mm\ and 6.1\mm\ for $d_0$ and $z_0$,
682: respectively. Similarly, the $1/\pxy$ difference between the two
683: tracks in $\mu$-pair events yields a $\pxy$ resolution of
684: $\delta\pxy/\pxy\sim 0.019\cdot\pxy$, with $\pt$ in \gevc.
685:
686: \begin{figure}
687: \includegraphics[width=6.5cm]{l3d0z0-bhabha.eps}
688: \vspace{-2pc}
689: \caption{Transverse and longitudinal miss distances between
690: the two tracks in Bhabha events.}
691: \label{\secname fig:L3-2prong-miss}
692: \end{figure}
693:
694: \subsubsection{Level~3 Calorimeter\\ Clustering Algorithm}
695:
696: The all-neutral trigger for L3 is based on information from the EMC.
697: In addition, calorimeter information is a vital complement to the DCH
698: data for the identification of Bhabha events.
699:
700: The L3 EMC-based trigger, L3Emc, identifies energy clusters with a
701: sensitivity sufficient for finding minimum ionizing particles. EMC
702: data are processed in two steps: first, lists of crystals with
703: significant energy deposits are formed; and second, clusters are
704: identified. The EMC typically sends data for $\sim$1400 crystals
705: (of 6580 total). The majority of these are caused by electronics
706: noise and beam-induced background. For each crystal, these data
707: include the peak energy and time of the crystal waveform. To
708: filter out noise, L3Emc rejects individual crystal signals below
709: an energy threshold of 20\mev\ or which lie outside a 1.3\mus\
710: time window around the event time. For the remaining crystals,
711: raw energies and times are converted into physical units and added
712: to the L3Emc crystal list. Clusters are formed using an optimized
713: look-up-table technique requiring only a single pass over the
714: crystal list. Clusters with a total energy above 100\mev\ are
715: retained, and the energy weighted centroid and average time, the
716: number of crystals, and a lateral moment describing the shower
717: shape for particle identification are calculated.
718:
719:
720: \subsubsection{Level~3 Filters}
721:
722: Based on the L3 tracks and clusters, a variety of filters perform
723: event classification and background reduction. The logging decision
724: is primarily made by two orthogonal filters, one based exclusively on
725: DCH data and the other based only on EMC data.
726:
727: The drift chamber filters select events with one \emph{tight} (high
728: \pt) track or two \emph{loose} tracks originating from the IP,
729: respectively. To account for the fact that the IP is not exactly at
730: the origin, track selection is based on its $x$--$y$ closest approach
731: distance to the IP, $d_0^{IP}$, and $z_0^{IP}$, the corresponding $z$
732: coordinate for that point. The IP position is a fixed location close
733: to the average beam position over many months. The high \pt\ track is
734: required to have a transverse momentum of
735: $\pt > 600\mevc$ and to satisfy a vertex condition defined as
736: $|d_0^{IP}|< 1.0$\cm, and $|z_0^{IP}-z_{IP}|< 7.0$\cm. Two tracks are
737: accepted with \pt$>$250\mevc\ and a somewhat looser vertex condition
738: defined as $|d_0^{IP}|< 1.5$\cm, $|z_0^{IP}-z_{IP}|< 10.0$\cm.
739:
740: Two calorimeter cluster filters select events with either high energy
741: deposits or high cluster multiplicity. Each filter also requires a
742: high effective mass calculated from the cluster energy sums and the
743: energy weighted centroid positions of all clusters in the event
744: assuming massless particles. The first filter requires at least two
745: clusters of $E_{CM}>350$\mev\ (c.m. system energy) and event mass
746: greater than 1.5\gev; the second filter requires at least four
747: clusters, and an event mass greater than 1.5\gev.
748:
749: At current luminosities, the output of both the DCH and EMC filters is
750: dominated by Bhabha events, which need to be rejected. This is
751: accomplished by a Bhabha veto filter that selects one-prong (with only a
752: positron in the backward part of the detector) and two-prong events
753: (with both $\ep$ and $\en$ detected). Stringent criteria on EMC
754: energy deposits are imposed, relying on the track momenta and on
755: $E/p$. The two-prong veto requires either colinearity between the
756: tracks in the c.m. system or an acolinearity that is consistent with
757: initial state radiation (ISR).
758:
759: For purposes of calibration and offline luminosity measurements,
760: Bhabha, radiative Bhabha, $\gamma\gamma$ final state, and cosmic ray
761: events are flagged. The output rate of flagged Bhabha events is
762: adjusted to generate an approximately flat distribution of events in
763: polar angle. Radiative Bhabha events are identified by selecting
764: two-prong events with missing energy and requiring an EMC cluster in
765: the direction of the missing momentum. Events with two high energy
766: clusters, back-to-back in the c.m. system select the
767: $\ep\en\ra\gamma\gamma$ process. The cosmic ray selection is
768: DCH-based and requires two back-to-back tracks in the laboratory frame
769: with nearly equal impact parameters and curvature. A significant
770: background from ISR Bhabha events faking this topology is removed
771: using the same kinematic constraints used in the two-prong veto.
772:
773: The online luminosity monitoring and energy scale monitoring are
774: performed in L3. A track-based lepton-pair selection with a well known
775: efficiency monitors the luminosity. Hadronic filters for selection of
776: continuum and \BB-enriched samples monitor the energy scale. The
777: latter two categories are distinguished by an event shape selection
778: using a ratio of Fox-Wolfram moments~\cite{ref:fox-wolfram}. The
779: ratio of the \BB-enriched sample to the luminosity is a sensitive
780: measure of relative position on the \FourS\ peak and thereby monitors
781: the beam energies.
782:
783:
784: \subsection{Level~3 Performance\\ and Operational Experience}
785:
786: The L3 trigger efficiency for Monte Carlo simulated events are
787: tabulated in Table~\ref{\secname tab:trg-L3eff} for events passing
788: Level 1.
789: High efficiencies are independently achieved for the DCH and EMC based
790: filters applied to simulated hadronic events. The comparison between
791: data and Monte Carlo L3 trigger pass fractions for the various filters
792: also show good agreement when requiring tracking, and EMC based
793: hadronic event selections in turn.
794:
795: An example of the event display used for online trigger monitoring is
796: shown in Figure~\ref{\secname fig:trg-L3-evdisp}. L3 reconstructed
797: tracks and EMC clusters are shown together with the L1 and L3 trigger
798: line states for the event. The left column lists the L1 trigger lines
799: and their states: on (1); off (0); or on but ignored due to prescale
800: factor (-1). The right column shows the same information for the L3
801: trigger lines.
802:
803: \begin{figure*}
804: \centering
805: \fbox{
806: \includegraphics[width=0.9\textwidth]{l3evdisp}
807: }
808: \caption{A Level~3 event display. The small circles and small crosses in the
809: DCH volume are DCH hits and TSF segment hit wires respectively. The
810: filled EMC crystals represent energy deposit ($\mbox{full crystal
811: depth}=2\gev$) from Level~3 EMC clusters while the small triangles just
812: inside the EMC indicate the location of the cluster centroid.}
813: \label{\secname fig:trg-L3-evdisp}
814: \end{figure*}
815:
816:
817: \begin{table*}
818: \centering
819: \caption{L3 trigger efficiency (\%) for various physics processes,
820: derived from Monte Carlo simulation.}
821: \label{\secname tab:trg-L3eff}
822: \vspace{.5\baselineskip}
823: \begin{tabular}{lrrrrrr}
824: \hline\hline
825: \rule[-5pt]{0pt}{17pt}
826: L3 Trigger & $\epsilon_{\BB}$
827: & $\epsilon_{B\to\piz\piz}$ & $\epsilon_{B\to\tau\nu}$
828: & $\epsilon_{\ccbar}$ & $\epsilon_{uds}$ & $\epsilon_{\tau\tau}$ \\
829: \hline
830: \rule{0pt}{12pt}
831: 1 track filter & 89.9 & 69.9 & 86.5 & 89.2 & 88.2 & 94.1 \\
832: 2 track filter & 98.9 & 84.1 & 94.5 & 96.1 & 93.2 & 87.6 \\
833: \rule[-5pt]{0pt}{0pt}
834: Combined DCH filters & 99.4 & 89.1 & 96.6 & 97.1 & 95.4 & 95.5 \\
835: \hline
836: \rule{0pt}{12pt}
837: 2 cluster filter & 25.8 & 91.2 & 14.5 & 39.2 & 48.7 & 34.3 \\
838: 4 cluster filter & 93.5 & 95.2 & 62.3 & 87.4 & 85.5 & 37.8 \\
839: \rule[-5pt]{0pt}{0pt}
840: Combined EMC filters & 93.5 & 95.7 & 62.3 & 87.4 & 85.6 & 46.3 \\
841: \hline
842: \rule[-5pt]{0pt}{17pt}
843: Combined DCH+EMC filters&$>$99.9& 99.3 & 98.1 & 99.0 & 97.6 & 97.3 \\
844: \hline
845: \rule[-5pt]{0pt}{17pt}
846: Combined L1+L3 &$>$99.9& 99.1 & 97.8 & 98.9 & 95.8 & 92.0 \\
847: \hline\hline
848: \end{tabular}
849: \end{table*}
850:
851:
852: For a typical run on the $\FourS$ peak with an average
853: luminosity of 2.6$\times 10^{33}$\cms, the L3 event composition is
854: tabulated in Table~\ref{\secname tab:L3-composition}. The desired
855: physics events contribute 13\% of the total output while the
856: calibration and diagnostic samples comprise 40\%.
857:
858: \begin{table}
859: \centering
860: \caption{Composition of the L3 output at a luminosity of 2.6$\times 10^{33}\cms$.}
861: \label{\secname tab:L3-composition}
862: \vspace{.5\baselineskip}
863:
864: \begin{tabular}{lr}
865: \hline\hline
866: Event type\rule[-5pt]{0pt}{17pt} &Rate (Hz)\\
867: \hline
868: Hadrons, $\tau\tau$, and $\mu\mu$\rule{0pt}{12pt} &16\\
869: Other QED, 2-photon events &13\\
870: Unidentified Bhabha backgrounds &18\\
871: Beam-induced backgrounds\rule[-5pt]{0pt}{0pt} &26\\
872: \hline
873: Total physics accept \rule[-5pt]{0pt}{17pt} &\textbf{73}\\
874: \hline\hline
875: Calibration Bhabhas ($\epem$)\rule{0pt}{12pt} &30\\
876: $\gamma\gamma$, Radiative Bhabhas ($\epem\gamma$) &10\\
877: Random triggers and cosmic rays &2\\
878: L1,L3 pass through diagnostics\rule[-5pt]{0pt}{0pt} &7\\
879: \hline
880: Total calibration/diagnostics\rule[-5pt]{0pt}{17pt} &\textbf{49}\\
881: \hline\hline
882: \end{tabular}
883: \end{table}
884:
885: The L3 executable currently takes an average processing time of
886: 8.5\ms\ per event per farm computer. A Level 1 input rate of
887: 2700\hz\ saturates the Level 3 processors, well above the 2\khz\
888: design requirement. At this input rate the L3 process consumes
889: $\sim$72\% of the CPU time, the rest is spent in OEP, including the
890: network event builder and in the operating system kernel.
891:
892:
893: \subsection{Summary and Outlook}
894:
895: Both the L1 and L3 trigger systems have met their original design
896: goals at a luminosity of $3\times 10^{33}$\cms. The triggering
897: efficiencies for \BB\ events generally meet the 99\% design goal for
898: both L1 and L3. The orthogonal triggers based on DCH-only and EMC-only
899: information have successfully delivered stable and measurable overall
900: trigger efficiency. The current system also provides a solid
901: foundation for an upgrade path to luminosities of $10^{34}$\cms\ or
902: more.
903:
904: Short-term L1 trigger improvements will primarily come from
905: further background rejection, afforded by algorithm refinements
906: and upgrades of the DCT. This is essential for reducing the load
907: on the DAQ and L3. The new PTD algorithm will effectively narrow
908: the track $d_0$ acceptance window, while a new BLT algorithm will
909: narrow the track $z_0$ acceptance.
910:
911: For the longer term future, a major DCT upgrade is planned. By adding
912: the stereo layer information, a $z_0$ resolution of 4\cm\ is expected,
913: allowing for an efficient rejection of beam-induced background beyond
914: $z=\pm20\ \cm$.
915:
916: Future improvements for L3 will also emphasize background rejection.
917: Improvements in the L3 IP track filter are expected to further reduce
918: beam-induced background to about one third of current levels. The
919: physics filter algorithms will be tuned and improved, primarily for
920: rejecting Bhabha, QED, and two-photon events. Improvements in the L3
921: tracking algorithms are expected to lower the $\pt$ thresholds below
922: 250\mevc. A moderate CPU upgrade for the L3 online farm will be
923: sufficient to keep up with luminosities of $\sim10^{34}$\cms.
924: