scieee AI-readable full text Open interactive document viewer

A test system for the DELPHI local trigger supervisor

Schulze, Bruno; Branco, Adriano; Buytaert, J.; Cairanti, S.; Formenti, F.; Valenti, G.

Abstract

Conference paper describing the test system developed for the DELPHI Local Trigger Supervisor (LTS) at CERN. The paper details the hardware and software components used to validate the trigger system performance. Published in the proceedings of the Conference on Computing in High-energy Physics (CHEP 1994), San Francisco, CA, USA, pages 510-512.

Full text

Lawrence Berkeley National Laboratory Recent Work Title Proceedings of the Conference on Computing in High Energy Physics 1994 Permalink https://escholarship.org/uc/item/9dg8c6m7 Author Loken, S. Publication Date 1994-09-01 eScholarship.org Powered by the California Digital Library University of California LBL-35822 CONF-940492 UC-405 COMPUTING IN HIGH ENERGY PHYSICS ~ 0 0 a aoa 0 0 a 0 a 00 00 0 0 0 000 0 0 0 I I Prepared for the U.S. Department of Energy under Contract No. DE-AC03-76SF00098 0 0 ::0 ITI (") .., .... em ,o:;o OCDm c111z ...... (") PI ZITI t+O CDt+(") 0 CJ:I ~ ...... c...;,_ __ CQ . ..... CT , PI ~ . (") 0 "C ~ r- CJ:I r- 1 w t1l (X) [\) [\) L_: __ ~ DISCLAIMER This document was prepared as an account of work sponsored by the United States Government. While this document is believed to contain correct information, neither the United States Government nor any agency thereof, nor the Regents of the University of California, nor any of their employees, makes any warranty, express or implied, or assumes any legal responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial product, process, or service by its trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof, or the Regents of the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any age-ncy thereof or the Regents of the University of California. PROCEEDINGS OF THE CONFERENCE ON COMPUTING IN HIGH ENERGY PHYSICS '94 SAN FRANCISCO, CA 21 - 27 April 1994 Proceedings Editor: S.C. Loken Organized and Hosted by Lawrence Berkel_ey Laboratory University of California Berkeley, ·California 94720 This work was supported by the Director, Office of Energy Research, Office of Scientific Computing, of the U.S. Department of Energy under Contract No. DE-AC03-76SF00098 Forward CHEP '94 continues the tradition of conferences that bring together physicists and computer scientists to discuss all aspects of computing for High Energy Physics. The 1994 meeting was organized by the Lawrence Berkeley Laboratory and was held in the Hyatt Regency Hotel in San Francisco, California. Funding was provided by the United States Department of Energy, Office of Scientific Computing. In planning CHEP '94, the organizers followed a new format: three days of parallel sessions, a one-day break, then three days of plenary sessions. The eight parallel sessions were divided into four tracks, covering a broad range of subjects. Following the one-day break, there were three days of plenary sessions, which included invited lectures as well as talks providing summaries of each of the parallel session areas. A poster session also gave an opportunity for informal discussion. This was the first conference in the CHEP series where packet video conferencing was used to transmit all plenary talks. The sessions were carried live on the international Multicast Backbone, MBone. During the meeting, approximately 400 people used the MBone broadcast to hear and see the talks at CHEP. In addition, participants could view abstracts from the conference on the World Wide Web via MOSAIC and access conference information via electronic mail and MOSAIC. These proceedings contain all of the papers that were submitted to the conference. As is frequently the case, not all presenters completed a written version of their talk. To ensure early publication, however, we have collected all available papers into this volume. The plenary papers are followed by the parallel session papers and the poster papers. The organizers would like to express their appreciation to the many people who contributed to the success of the meeting. Mollie Field, Del Thomas, and Dot Akins managed all of the conference arrangements. Cynthia Coolahan pulled together the plans and schedule for the parallel sessions. Julie McCullough did the technical editing of these proceedings. In addition, the organizers would like to thank the speakers and the session convenors for their help in putting together a productive meeting. 111 Stewart C. Loken Chairman Scientific Advisory Committee Drew Baden-Maryland, USA Rudy Bock-CERN Joel Butler-Fennilab, USA Michael Ogg-Carleton, Ottawa, Canada Risto Orava-Helsinki, Finland John Cavallini-DOE, Washington, USA He-Shen Chen-IHEP, Beijing, China Larry Connell-SSCLab, USA Vadim Petukhov-IHEP, Serpukhov, Russia Alberto Santoro-CBPF, Rio de Janeiro, Brazil Terry Schalk-UC Santa Cruz, USA Rick Stevens-ANL, USA Trevor Daniels-RAL, UK Manuel Delfino-Barcelona, Spain Atul Gurtu-Tata Institute, India Philippe Heusse-LAL, Orsay, France Paul Kunz-SLAC, USA Leonid Tkatchev-JINR, Dubna, Russia Enzo Valente-INFN, Rome, Italy Jean-Pierre Vialle-LAPP, Annecy, France Yoshiyuki Watase-KEK, Tsukuba, Japan Chip Watson-CEBAF, USA Juergen May-DESY, Gennany David Williams-CERN Richard Mount-Caltech, USA Tom Nash-Fennilab, USA Local Organizers, Lawrence Berkeley Laboratory Stewart Loken, Chainnan Gerald Abrams Matthew Bloomer AI Clark Cynthia Coolahan Chris Day Parallel Session Convenors Chip Watson, CEBAF Les Robertson, CERN Les Cottrell, SLAC Yohei Morita, KEK: Vicky White, Fennilab Larry Connell, SSCLab Simone Giani, CERN Bill Lidinski, Fennilab Craig Eades Harvard Holmes Charles McParland Doug Olsen David Quarrie Tom Trippe Session 1: Triggering, Data Acquisition, Online and Control Systems Session 2: Hardware Architectures Session 3: Networks and Interconnections Session 4: Data Handling and Storage Systems Session 5: Software Methodologies, Languages and Tools Session 6: User Interfaces and Visualization Session 7: Computation Session 8: Infonnation Systems and Multimedia IV CONTENTS Plenary Talks From Subsistance Fanning to Agro-Business M. Delfino ............................................................................................................ 3 Analyzing Terabytes of Data at Fermilab S. Wolbers ............................................................................................................ 7 Data Mining with PIAF R. Brun, 0. Couet, A. Nathaniel, and F. Rademakers ...................................... 13 Hardware and Software Issues for Future Experiments K. Peach ............................................................................................................. 23 Methodologies, Languages, and Tools K. Amako ............................................................................................................ 31 Experience Building Object-Oriented Systems A. Breakstone ..................................................................................................... 41 Session 1: Triggering, Data Acquisition, Online And Control Systems A Bit-Serial First-Level Calorimeter Trigger for LHC Detectors C. Bohm, et al. .................................................................................................... 49 Results of On-Line Tests of the ENABLE Prototype, a 2nd Level Trigger Processor for the TRT of A TLASILHC K.-H. Noffz, et al . ............................................................................................... 53 Programmable Level-l Trigger with 3D-Flow Processor Array D. Crosetto ............................................................................ ~ ............................ 57 The ZEUS Calorimeter First Level Trigger C. F oudas, et al. ................................................................................................. 63 Neural Electron/Pion Discriminator with a Projective Fiber Calorimeter J.M. Seixas, L.P. Caloba, and R. Rajagopal ......................................... ............. 67 A First-Level Calorimeter Trigger for LHC Experiments-Design Studies, and Beam Tests of a First Prototype Trigger System A.T. Watson, et al. .............................................................................................. 70 The Level-l Calorimeter Trigger for the CMS Detector S. Dasu, et al . ..................................................................................................... 74 v Evaluation of a Parallel Processing System and Parallel Algorithm for Triggering in New Generation Colliders E. Davis, et al. .................................................................................................... 79 A Second-Level Trigger Concept Based on Communicating Digital Signal Processors P. Wegner, U. Gensch, and H. Leich ................................................................. 84 The D0 Level1.5 Calorimeter Trigger J.T. Linnemann, et al. (The D(J Calorimeter Levell.5 Project) ....................... 88 Improvements in the CPLEAR Trigger and Data Acquisition System R. Adler, et al. (The CPLEAR Collaboration) .................................................. 91 The CDF Ultranet Data Acquisition System J. Patrick, et al . .................................................................................................. 97 The CHORUS Data Acquisition System G. Carnevale, B. Friend, J. Panman, and F. Riccardi ................................... 101 The RD 13 Data Acquisition System M. Aguer, et al. ................................................................................................. 104 Modelling of Data Acquisition Systems S. Buono, et al . ................................................................................................. 109 UNIDAQ M. Nomachi, et al. ............................................................................................ 114 Fermilab's DART DA System R. Pordes, et al . ................................................................................................ 117 The CEBAF On-line Data Acquisition System G. Reyes, et al . . , ............................................................................................... 122 An Object-Oriented Experiment Control Environment for the Three- Spectrometer Setup at MAMI H. Kramer, et al . .............................................................................................. 127 BIG BROTHER-A Fully Automated Control System for the DELPHI Experiment B. Franek, et al. ................................................................................................ 130 Diagnosing the ZEUS Experiment with the ZEX Expert System U. Behrens, M. Flasinski, L. Hagge, and K. Ohrenberg ................................ 134 SCI Data Acquisition Systems: Doing More with Less A. Bogaerts, et al . ............................................................................................. 138 _ vi OODBMS for a DAQ System G. Ambrosini, et al . .......................................................................................... 143 Session 2: Hardware Architectures Using a Field Programmable Gate Array as a Dedicated Coprocessor for the Texas Instruments' TMS320C40 DSP A.J. Borgers, et al. ............................................................................................ 149 DO Farm Production System K. Denisenko, et al. .......................................................................................... 152 Production Farms at Fermilab M. Fischler, F. Rinaldo, and S. Wolbers .......................................................... 155 A High Performance Computing Environment for Physics Analysis K. Kunne ........................................................................................................... 158 Experience with a UNIX Based Batch Computing Facility for H1 R. Gerhards, U. Kruner-Marquis, and Z. Szkutnik .......................................... 162 How to Survive the Interim, or Making (Users of) Mainframes and Farms Mutually Coexist W. Wojcik, Y. Fouilhe, and J. O'Neall ............................................................ 166 Parallel 110 Measurements on a SparcCenter and a MEIKO CS2 B. Panzer-Steindel ............................................................................................ 169 Session 3: Networks and Interconnections A Packet-Switched Network for Data Readout from the LHC Inner Detector J.M. (l)stby and 0. S¢rasn ................................................................................ 173 The ZEUS Message-Passing System J. Milewski, C. Youngman, and A. Kotanski .................................................... 177 Using High Performance Interconnects in a Distributed Computing and Mass Storage Environment M. Ernst ............................................................................................................ 182 "SHIFf-BETEL": A (Very) Distributed Mainframe B. Segal, et al. .................................................................................................. 188 Networking with China R.L.A. Cottrell, C. Granieri, R. Xu, and Y. Karita ........................................... 192 The RADIO-MSU Network. H. Frese, S. Berezhnev, and D. A. A vdeyev .................................................... 196 vii DECnet Routing Transition from PhaseiV to PhaseV/OSI in Japan F. Yuasa, et al. .................................................. : .............................................. 199 The Effects of X Window HEP Graphics Applications on ESnet F arhad A. Abar ................................................................................................ 202 Session 4: Data Handling and Storage Systems Distributed Mass Storage and Management Systems at DESY M. Gasthuber ................................................................................................... 211 Centrally Managed Tapes at DESY 0. Hell .............................................................................................................. 215 ID-1 Mass Storage System for Mainframe by Using FDDI Network Y.Morita, et al. ................................................................................................. 219 Data Organization, Management, and Serving in DO Collider Experiment K. Genser ......................................................................................................... 222 A Data Base for Tracking File Processing History P.S. Gee, M.A. Bloomer, D.L. Olson ................................................................ 226 The PASS Project: A Progress Report D. R. Quarrie, et al. ......................................................................................... 229 The PASS Project Architectural Model C. T. Day, et al . ................................................................................................ 233 A Multi-level Object Store and Its Application to HEP Data Analysis E. N. May, et al . ............................................................................................... 236 Parallel Query Processing for Event Store Data D. Malon, et al . ................................................................................................ 239 Using a Distributed OODBMS as a Source of Events for CDF Physics Analysis D.R. Quarrie and C. T. Day ............................................................................. 241 Data Handling at CERN for LEP and Future Experiments R. Mount ........................................................................................................... 245 Session 5: Software Methodologies HyperDev: Hypertext Tool to Support Object-Oriented Software Development C. Maidantchik, M. Celia, and M. Isaac .......................................................... 253 Object Oriented Software Development in the Atlas Collaboration A. Schaffer ........................................................................................................ 256 viii Omo-A Tk/tcl Based Object Modelling Tool to Support Eiffel S.M. Fisher and D.J. Candlin .......................................................................... 261 The Distributed Development Environment for SDSS Software E. Berman, et al . ............................................................................................... 264 The Formal Development Method VDM++ W. Lourens, A. C. Balke, J. Haveman, and J. Carter ....................................... 268 F ARF ALLA: C++ Data Management That Even FORTRAN People Can Love B. Nolty and c: Walter ..................................................................................... 271 Design and Implementation of a Tracking Class Library N. Katayama and M. Smyth ............................................................................. 274 The Design and Implementation of an Object Oriented Software System for the E771 Fixed Target Experiment at FNAL S. Misawa ...................... ; .................................................................................. 279 An Object-Oriented Technique for Detector Models Used by a Simulation Program M. Dach, N. Hoimyr, J. Saarela, and J. Vuoskoski ......................................... 283 Object-Oriented Analysis and Design of a GEANT Based Detector Simulator K. Amako, et al . ................................................................................................ 286 Quo V adis Code Optimisation in High Energy Physics S. Jarp .............................................................................................................. 291 Object Structural Modeling in the DELPHI Online Event Display S. Du and J. I...augier ........................................................................................ 296 Towards a 64-Bit Version of Scientific Libraries P. Dipotet and M. Marquina ......................................................... : ................. 299 Maintaining a Software Library at CLEO-Moving from CMZ to CVS N. Katayama ..................................................................................................... 302 Use of Object-Oriented Techniques in a Beam-Line Control System D.R. Myers, W. von Raden, H. Butler, and J. Yang ......................................... 307 REMOS: A Portable Object Oriented Environment for Multiprocessor Real Time Applications G. Carnevale, J. Panman, and F. Riccardi ...................................................... 311 Use of Object Oriented Software Methodology for Design of Expert/Control Systems for HEP: The ZEUS Expert System Experience M. Flasinski, L. Hagge, and K. Ohrenberg .................................................... 315 lX DBS - An rlogin Multiplexor and Output Logger for DA Systems G. Oleynik, L. Appleton, L. Udumula, and M. Votava ..................................... 318 Session 6: User Interfaces and Visualization OnX G. Barrand ...................................................................................................... 325 LookOnX: A New Technological Approach for the H1 Off-line Event Display A. Perus and C. Amault ................................................................................... 327 A Tool for Geometrical and Graphical Objects M. Kawaguti and S. Tanaka ............................................................................. 331 Scanning Huge Numbers Of Events G. Zito .............................................................................................................. 334 HEP Visualization and Video Technology P. Lebrun and D. Swoboda .............................................................................. 337 A Second Life of the CERN POISSON Program Package V.I. Klyukhin and B./. Klochkov ...................................................................... 340 The LSND Interactive Analysis Shell /. Stancu ........................................................................................................... 343 Status of "Nirvana": High Quality GUI Based Software for HEP M. Edel, et al. ................................................................................................... 348 The Computing Environment for Physics Analysis for ZEUS Experiment at HERA 0. Manczak ..................................................................................................... 351 Session 7: Computation The LSNDMC Monte Carlo K. Mcllhany, et al. ........................................... : ................................................ 357 Robust Estimation Methods Applied to Vertex Reconstruction and Track Association in a Colliding Beam Experiment W.A. Mitaroff. ................................................................................................... 360 The Investigations of the Influence of the SDC MBT Magnet Field Nonuniformity on Muon Momentum Resolution J.A. Budagov, S.B. Vorozhtsov, A.M. Khasanov, and N.O. Poroshin .............. 365 Distributed Event Simulation with PVM S. Ichii, T. Sasaki, and Y. Takaiwa ................................................................... 370 X Feasibility Studies for a High Energy Physics MC Program on Massive Parallel Platforms L.M. Bertolotto, et al. ......................................................... : ............................. 374 Gaussian and Feed-Forward Neural Network Classifiers for Shower Recognition, Generalisation and Parallel Implementation W. Laurens, A. W. Ladder, H.M.A. Andree, and A. Taal .................................. 379 GEANT Steps Into the Future R. Brun, et al. ................................................................................................... 382 Session 8: Information Systems and Multimedia Design and Operation of The High Energy Physics Information Server J.J. Dingbaum and D.E. Martin ...................................................................... 387 Videoconferencing Using Workstations in the ATLAS Collaboration. C. Onions, R. Blokzijl, and K. Bos ................................................................... 391 The Use of the World-Wide Web in HEP R. Cailliau, M. Donszelmann, S. Fernandez- Vega, and A. Luotonen .............. 394 CooMan-a Global Collaborative Project Management System J. M. de Souza, and S. Palma ........................................................................... 402 Posters Dynamic Perceptron: Some Theorems About the Possibility of Parallel Pattern Recognition with an Application to High Energy Physics A. L. Perrone, P. Castiglione, G. Basti; and R. Messi ..................................... 407 DO Trigger Monitoring N. Denisenko, et al. .......................................................................................... 415 Data Acquisition and Control System of the Cosmic Ray Experiment KASCADE H.J .. Gils, et al. (The KASCADE Collaboration) ............................................ 418 The RPC Trigger System for the L3 Forward Backward Muon Detector A. Aloisio, et al. ............................................................................................... 422 Design and Implementation of a VME Based Event Building Protocol for the New ALEPH Data Acquisition System J.A. Perlas ........................................................................................................ 425 Custom Solution for a Data Readout Architecture: a System Level Simulation A. Aloisio, et al. ................................................................................................ 430 Beam Steering: A Test Bench for Generic Algorithms in Accelerator Controls B. Autin, M. Arruat, F. di Maio, and M. Martini ............................................. 433 xi VMEbus Based Computer and Real-time UNIX as Infrastructure of DAQ Y. Yasu, et al. .................................................................................................... 437 A Keyboard Control Method For Loop Measurement Z. W. Gao .......................................................................................................... 440 An Integrated Approach to Control, Monitoring, Test, and Calibration of Silicon Micro-Strip Detector Modules and Systems T. (2)degaard, E. Nygard, and 0. Sorasen ........................................................ 444 Data Compression and Readout of Multiplexed Drift Chamber Data in the CLAS Detector at CEBAF D. C. Doughty, Jr., D.P. Heddle, and D. Allgood ............................................. 448 Data Flow Manager for DART D. B_erg, et al . ................................................................................................... 453 Global Decisions with a Neural Second-Level Trigger System J.M. Seixas L.P. Caloba, A.L. Braga, and E.M.S. Moura ............................. 456 Modelling of Local/Global Architectures for the Second Level Trigger at the LHC Experiment. Z. Hajduk, W. Iwanski, K. Korey/, and J. Strong ............................................. 459 Fast Second Level Trigger Using A Neural Network Architecture for the H1 Experiment at HERA P. Ribarics, et al. .............................................................................................. 462 The Brookhaven National Laboratory Experiment 871 Data Acquisition System R. Martin, A.D. Hancock, D.F. Connor, and P.D. Rubin ................................ 465 b-Tagging Using Shape Variables in the Hadronic Decays of the zO G. C(osmo, et a/ . ................................................................................................ 468 Local Processing for a Farm-Based Second Level Trigger at LHC J. Strong ........................................................................................................... 471 Paradigms and Building Tools for Real- Time Expert Systems U. Behrens, M. Flasiriski, L. Hagge, and K. Ohrenberg ................................ 474 Switched Interconnection of Parallel Processes (SWIPP) Used for Detector Data Readout and Partial Event-Building for LHC M. /.4mo and 0. S¢rasen .................................................................................. 478 Data Logging and Online Reconstruction in H 1 P. Fuhrmann, et al. ......................................................................................... 482 FNAL E665-A Case Study in Portable Computing H. Schellman .................................................................................................... 487 xii A Novel Use of FORTRAN M. Metcalf and R. Windmolders ...................................................................... 490 Software Tools for Gas-Filled Chamber Design P. Pogidin ................................ .' ........................................................................ 494 A Fuzzy Radon Transform for Track Recognition J. Blom, C. Th. A.M. de Laat, P.G. Kuijer, and W. Laurens ............................ 497 New Super-Computing Facility in RIKEN S. Ohta .............................................................................................................. 500 The Application of Artificial Neural Network Techniques to the Data Analysis of SA TuRNE Experiment LNS258: the Measurement of the Branching Ratio for the Decay of the Eta Meson into Two Photons P. Fuchs (The Eta Collaboration) .................................................................... 504 A Bi Directional Euclid Geant Interface V. Bonichi, A. Floquet, C. Girard, and M. Maire ............................................ 508 A Test System for the Local Trigger Supervisor of the DELPHI Experiment at LEP B. Schulze, et al . ............................................................................................... 510 Consumer Server: A UNIX Based Event Distributor in New CDF Data Acquisition System F. Abe, et al . ..................................................................................................... 513 List of Participants .................................................................................................. 519 xiii Plenary Talks FROM SUBSISTANCE FARMING TO AGRO-BUSINESS * Manuel Delfino Supercomputer Computations Research Institute Florida State University Tallahassee, FL 32306-4052 USA (on leave from Universitat Autonoma de Barcelona, SPAIN) Abstract A review of the parallel session on Hardware Architectures is pre- sented. Legacy systems from the "subsistance farming" era, where small groups from experiments built or assembled their own loosely- coupled parallel systems, must still be maintained, but the major trend is towards a re-birth of the Computer Center, using "agro- business" technology, the large scale use of loosely-coupled paral- lel systems using a high performance network to communicate with storage subsystems. INTRODUCTION A broad range of systems were pre- sented, ranging from an upgrade of the reconstruction farm at the OPAL ex- periment at LEP to an essentially new computer center assembled at DESY for the HERA experiments. The dominant theme at the previous CHEP ·confer- ence was workstation farms appended to mainframes, such as CSF at CERN and BASTA at IN2P3. Users logged into the mainframe would submit jobs to these ap- pended farms, which would provide the CPU to operate on data imported from disks or tapes belonging to the main- frame. At that time, Fermilab already had independent farms, eliminating the *This work was partly supported by the US Department of Energy under contracts DE- FG05-92ER40742 and DE-FG05-85ER250000 and by CICYT, Spain 3 need for mainframes by using replicated storage based on Exabyte tapes. As we will see, at this conference the work- station farms are no longer appendages to mainframes, the mainframes in fact have essentially dissappeared and stor- age is viewed as attached to the network, equally accessible to all workstations. LEGACY SYSTEMS The term legacy system is used in industry to describe equipment which is obsolete or no longer fits into accepted hardware or software architecture models, but must nevertheless be kept running. Most of the LEP reconstruction farms can be considered legacy systems. Increasing maintenance costs dictate that at least parts of these survivors from the "sub- sistance farming" era must be upgraded periodically. The OPAL paper describes nicely how this group decided to make a rather large investment of human re- sources to rewrite their control software using standards such as POSIX, TCP /IP and X-windows. This should result in hardware independent software, saving much work in the many future years that this subsystem will be operational. A component that unfortunately does not exist yet, but which clearly would have been very useful to them, is a standard- ized distributed queueing system. Other remarkable aspects of this work are the emphasis on documentation and the use of experienced programmers, both rare in HEP. THE SHRINKING MAINFRAME Although an appropriate mainframe would most likely still be the best solution to computing hardware for HEP, exist- ing mainframes are being shutdown or re- placed by smaller versions (down-sizing). The main reason is that the existing main- frames are not appropriate, having too little CPU and large costs. Their dissa- pearance has not been more rapid due to two very disparate facts. First, they usu- ally host expensive tape devices, such as robots with proprietary interfaces, which in turn hold all the physics data. Sec- ond, although many people now use per- sonal workstations, there are still many who have character terminals and depend on mainframes for utilities such as mail, news, text editing and program develop- ment. This leads to a "co-habitation" between systems, nicely explained in the paper from IN2P3. They also empha- size standards such as POSIX and suffer the lack of a standardized queueing sys- tem. Their reflections, and those in pa- pers of other parallel sessions, on the in- vestments needed in providingworkgroup 4 servers and intelligent desktop devices to all users, as well as the need for user ed- ucation in these new systems, should be carefully considered. UNIX SYSTEMS Building on the foundation of work done on the CERN Cray and workstation clusters at various sites, UNIX systems have now become prevalent in HEP offiine batch processing. Their use for interac- tive analysis is also growing, at a slower pace mostly limited by the financial con- straints of replacing existing workstations and terminals on people's desks. The use of traditional UNIX in other applica- tions, such as data acquisition or software design and development, is still open to question. Papers from several groups at DESY and Fermilab describe what I have humorously termed "agro-business", or more appropriately Centrally Operated Distributed Systems. The amount of CPU power that has been amassed in these very plain, rather inexpensive, rack- mounted systems is very impressive, and applications with large CPU to I/0 ra- tios, such as simulations, are very well served. The fact that some of these sys- tems, particularly the SGI Challenge, are capable of Symmetric Multi-Processing has not been thoroughly exploited so far, except to ease the balancing of load in the absence of a sophisticated queueing sys- tem. Perhaps this will change in the fu- ture as various SMP systems with larger number of processors become available. What is important is that these machines are very powerful and affordable. The bottleneck mentioned everywhere is in I/0 to these CPUs. Disk subsystems with sizes in the hundreds of GB provide a cache for the dozens of TB of data held on tape. These tapes are 8 mm Exabytes at Ferrnilab and proprietary Ampex high capacity cartridges at DESY. Sustained integrated data transfer rates approach- ing 100 MB/s are measured, indicating these distributed systems can in fact ex- ceed the 1/0 capabilities of traditional mainframes. The weak point is that, al- though everyone would like to view the mass storage as "network attached", the components available today do not imple- ment this model in a mature and robust way. Network attached storage is simu- lated by attaching tape and disk devices to workstations designated as 1/0 servers, which in turn provide access to other CPUs via high-speed networks such as switched FDDI, HIPPI and FibreChan- nel. Whether the future will be a ma- turing of this scheme, or the exploitation of SMP systems with hundreds of CPUs on a bus that would replace the high- speed network, is still open to question. The latter option would provide an in- teresting outcome, where the replacement of mainframes by workstation farms ends in the collapse of the workstation farm into a single system, a sort of new super- mainframe, with the consequence of a re- birth of the traditional computer center. Another subject that is being explored is that of parallel 1/0, as illustrated in the paper from CERN on a distributed database application, running on a Meiko CS2 with 32 processors, each accessing a separate disk containing a portion of the database. SOME OPEN QUESTIONS These presentations bring out a se- ries of issues that will have to be dealt with soon. First and foremost is the 5 need to train and retrain the users (i.e. physicists) on the effective use of these new architectures and operating systems. The human interfaces are not particularly easy to use, and many are finding out that building a robust, friendly and intuitive interface is very difficult, and perhaps im- possible in the world of amateur physicist programmers. Many user-friendly com- ponents are still missing, such as loca- tion independent data set addressing by users, based on a proper Hierarchichal Mass Storage system. Perhaps the an- swer is that desktop systems will evolve in the direction of using Personal Com- puters with off-the-shelf easy to use soft- ware packages, with only a few experts running large productions on the farms or pseudo-mainframes .. The enormous data rates, both present and future, bring up the question of whether HEP computing will have to become more centralized, with even more massive computing installations at the ac- celerator laboratories and an end to the export of data to horne institutions. If this is the case, then the emphasis should shift from having an appropriate local computing facility to having a powerful wide area network, supporting remote X- window sessions and client-server process- ing between desktop devices at home and computer centers at the labs. Once again, various types of tape me- dia are being used at various installations. Even if export of data from the accelera- tor labs is eliminated, the reverse flow of simulated data produced at home insti- tutions will necesitate exchangeable tape media, so decisions by any given institu- . tion must be taken carefully. The paper presented by Ogg and col- laborators explores an interesting option for the future, which hinges on three points, two technological ones, one of which is discussed in the paper, and a so- ciological one which is only implied. The general idea is to build a geographically dispersed meta-computer, scheduling jobs to the· most appropriate facility rather than moving data around. This would eliminate the reverse flow mentioned in the previous paragraph. Instead, jobs from any user that need that particu- lar simulation dataset would be routed to run at the production facility. The first ingredient in this model is a substan- tial increase in wide-area network capac- ity to support the flow of control struc- tures, intermediate results and outputs between the components of this meta- computer. The second ingredient would be software technology, along the lines of POSIX but much more sophisticated, which would truly implement hardware independent programs, including access to data, graphics output, etc. while main- taining a secure environment. Lastly, and perhaps most difficult of all, is the opening of computing facilities in various countries to all users of an international collaboration, for example. Although there are many difficulties in this scheme, some solutions can be seen around the corner and it is very worthwhile to ex- plore it. CLOSING REMARKS Even though complex forms of collab- oration, such as a worldwide HEP meta- computer, are difficult and probably far in the future, we can expect simpler col- laborations amongst the various laborato- ries and universities in REP to yield ma- ture support for these architectures over the next few years. The most important 6 problem to be solved is to isolate software seen by users, both system and applica- tion, from the hardware it is running on, while maintaining high efficiency. The rationalization of the various fla- vors of Distributed Queueing Systems, re- placing independent development paths by solid support of a mature version would be very nice indeed. The devel- opment of the so-called Common UNIX Environment, which would provide users with a hardware independent system view of UNIX workstations, would allow users to concentrate on their physics work rather than on understanding the miriad small differences between UNIX imple- mentations. Training of users in the use of standards such as PO SIX, TCP /IP and modern programming techniques, are long term investments which will eventu- ally yield applications which are more re- liable and easier to maintain. ANALYZING TERABYTES OF DATA AT FERMILAB * Stephen Wolbers Fermi National Accelerator Laboratory P.O. Box 500 Batavia IL 60510 USA Abstract Computing demands of High Energy Physics are increasing steadily due to the demands of larger datasets and increasingly sophisticated detector systems and analysis techniques. Fermilab has been meet- ing these demands by the use of many different computing tech- niques. Most of these techniques attempt to utilize the most cost- effective computing resources while providing effective solutions to the problems that are created by multi- Terabyte data samples and large collaborations. New strategies are being developed to allow improved access to the data. INTRODUCTION During the past 5-10 years at Fermi- lab the typical experiment has written in- creasing amounts of raw data to tape in each data run. In addition, the events have become more complicated due to in- creased energy and intensity of the in- coming beams and the improvements that have been made to the detector systems. The increasing availability of computing power has also allowed experiments to be- come more sophisticated in their analysis programs. The final data sets used for physics analyses have also increased dra- matically due to the larger data samples and due to improved triggers and recon- struction algorithms that allow larger and better final event samples to be kept for analysis. *This work is supported by the U.S. Depart- ment of Energy under Contract No. DE-AC02- 76CH03000. 7 All of these trends have forced Fer- milab to focus on providing improved and cost-effective computing to handle the massive amounts of data that are be- ing generated. Different computing solu- tions have been used for event reconstruc- tion, splitting and filteridg, and physics analysis. Though some notable successes have been achieved there are still irn~ provements to be made to continue to keep up with the demands of the experi- ments. INCREASING COMPUTING NEEDS Experiments at Ferrnilab have been writing and analyzing large and increas- ing amounts of data. This is certainly not unique to Fermilab and reflects many trends in scientific computing. During the 1990-91 accelerator run the "typical" experiment wrote approximately 2 TB of data to tape, with one experiment writing over 40 TB. During the 1992-93 run CDF wrote 2 TB of data and DO wrote 8 TB of data. It is expected that CDF will write 6-8 TB and DO 18-24 TB of data during the 1994 run. Larger datasets are antici- pated from future data runs. There is no reason to expect the trend of writing in- creasing amounts of data to tape will not continue. CPU Needs The CPU required to handle the event reconstruction (and other processing and analysis steps) are constantly increasing. The largest single requirement is event reconstruction. There are many reasons for the increase including; the increas- ing number of events, the increased com- plexity of each event, and the increased sophistication of the reconstruction algo- rithms. More effort is being used to maxi- mize the physics potential of the data sets and less to saving CPU time due to the in- creasing availability of more CPU power. Capabilities exist to reconstruct events more than once in many cases. The avail- ability of more CPU power has certainly had an influence on the amount of CPU time used for event reconstruction. The trend toward increased CPU usage for all parts of offiine processing will continue. Final Dataset Sizes Each experiment has to reconstruct their dataset and split it into samples which can be quickly analyzed to produce physics results. The final samples are growing extremely rapidly. Experimental collaborations are becoming larger, mak- ing access to the ever-growing datasets a 8 more and more crucial problem for fast and effective data analysis. The bottle- neck of slow serial access to large datasets has the effect of limiting physics analy- sis, especially as th~ datasets continue to grow. UNIX FARMS The UNIX Farms at Fermilab are used for the reconstruction of raw data [1]. The CPU-to-I/O ratio is suffi- ciently high that loosely-coupled comput- ing solves this CPU-intensive task. The farms can be characterized by describing the hardware, software, and the running experience of the last few years. More de- tails can be found in another contribution to this conference. [2] Hardware The UNIX Farms consist of extremely cost-effective UNIX workstations con- nected via ethernet and divided into worker and I/0 nodes. The majority of nodes are worker nodes and consist of rack-mounted UNIX workstations (mi- nus the keyboards and screens) contain- ing the minimum memory needed to avoid swapping, and a small amount of local disk for the operating system. The I/0 nodes are UNIX servers or workstations and are connected to local SCSI disk and 8mm tapedrives. The UNIX farms cur- rently consist of 10,000 MIPS of comput- ing with over 300 workstations and about 100 tapedrives. Software The parallel processing code cps (co- operative processes software) allows the events to be sent to processes running on worker nodes and is an effective way to provide parallel computing. One of the most important tools used on the farms is the tape-mounting software ocs (operator communications software) which is used to handle the large tape-mounting activ- ity on the farms (and elsewhere at Fer- milab). In addition, a batch system that allows queuing of jobs has been developed and is in use. Finally, many utilities are in place to allow debugging, optimization, and viewing of jobs on the farms. Experiences The UNIX farms are extremely suc- cessful in providing large amounts of cost- effective computing to the experimental users. Both CDF and DO are able to re- construct data as quickly as they collect it. The farms have sufficient processing power for present needs and no upgrades are necessary in the near future. SPLITTING/FILTERING After reconstruction the data is di- vided into many physics subsets. The subsets each consist of a sample of events relevant for a set of physics analysis top- ics and/ or is a sample of events useful for background measurements and stud- ies. Though not required, it is oftentimes the case that each event is compressed into a much smaller format containing only quantities essential for physics anal- ysis. Techniques Each experiment chooses to handle this step of analysis in the way that matches best the physics of the experi- ment and to match the computing sys- tems that are available for the process. Ideally the task would be specified inde- 9 pendently of the hardware available but physical limitations (tape, disk, CPU) all dictate that many different systems are in use. Examples- CDF and DO CDF and DO use somewhat differ- ent systems for performing the splitting and compressing of physics datasets af- ter reconstruction. CDF splits datasets on the I/0 portion of their UNIX farms. The SGI system consists of a Challenge XL with 4 processors, 80 GBytes of disk and 12 8mm tapedrives. The IBM system consists of an RS6000/590 and RS6000/580 with 140 GBytes of disk and 14 tapedrives. The events as they are re- constructed on the worker nodes of the farms are split into 25 physics streams (with some events being written to more than one stream). The output events can be stored in one of two formats - DST (full information) or PAD (physics anal- ysis dataset). It is expected that the DST dataset will occupy approximately 6 TBytes and the PAD datasets about 875 GBytes from the 1994-95 run. DO reconstructs the data on their farms and produces two sets of output events. The first is the full-size (STA) dataset and the other is a compressed format dataset (DST). These datasets are further split on other computing sys- tems. The STA sets are split into physics streams which fill approximately 17 TBytes. The DST sets are split into many more physics streams that sum to about 4 TB. Due to this large size a new reduced format (MDS) was invented to reduce further the size of data so that the whole sample could be compressed to about 250 GBytes. The STA sets are split on two dedicated SGI Crimsons fit- ted with disk and tapedrives. The re- maining splitting and filtering is done on DOFS, a large VMS cluster that is also used to serve data for analysis. ANALYSIS The physics analysis of the final datasets is accomplished on a wide variety of computing systems and in a number of different ways. Better access to datasets can and will improve the physics analysis of the data. There are many ways to char- acterize the many styles of physics analy- sis that are used. One way is to examine the three main sets of experiments (fixed- target, CDF and DO) to see what is being done. Fixed- Target The fixed-target experiments at Fer- milab have access to a wide variety of computing systems both at Fermilab and at their collaborating institutions. In gen- eral it is possible to handle small datasets and final analysis steps (PAW) on local workstation clusters, most of which tend to be UNIX-based. The point at which the data becomes too large to handle lo- cally varies but normally a sample which is smaller than 10 8mm tapes (or about 20 GB for single-density tapes) can be han- dled on a local system. Fermilab has established two central UNIX systems which are meant to al- low the fixed-target user community to access larger datasets for physics analy- sis. The two systems are CLUBS and FNALU. CLUBS consists of a set of SGI and IBM workstations connected with Ul- tranet for fast data access, the Load Lev- eler batch scheduling system, UNITREE hierarchical storage management, and ac- 10 cess to external 8mm, 3480, and 9-track tapedrives and an STK silo: This system, with a CPU capacity of over 500 MIPS, allows users to analyze data that is staged from tape to disk via a staging system. Data is stored in the STK silo for rapid, reliable and multiple access. A dataset, once read in to the STK silo from 8mm tape, can be repeatedly read much more rapidly and reliably than from 8mm itself. A hierarchical system has proven effective in the past on the Amdahl mainframe in reducing manual tapemounts and provid- ing reliable access for many physicists to a common dataset. FN AL U is a central UNIX system consisting of IBM and SGI computers di- vided into interactive and batCh compo- nents. The AFS file system is being used on this system to provide home directory, product and some data access. The inter- active systems are also used as front-ends to the CLUBS system. Batch jobs are prepared and submitted from FNALU to CLUBS. Local batch capacity on FNALU is available for users and applications that are not well-matched to the CLUBS sys- tem. CDF CDF uses two large central facilities for access to their datasets. The first is a large VMS Cluster (FN ALD) con- sisting of about 500 MIPS of processing and 400 GB of disk space and a connec- tion to an STK silo. In addition there are a large number of 8mm tapedrives di- rectly connected to the Cluster to allow access to datasets. The STK silo contains CDF PAD datasets (and a small amount of DST datasets) which can be staged to disk and analyzed on the VMS cluster. The second system used is a UNIX sys- tern consisting of an SGI 4D /480 ( cdf- sga), about 100 GB of staging disk, 16 8mm tape drives, and a connection to the same STK silo. The connection to the silo allows CDF UNIX analysis access to the datasets via a staging mechanism. In addition to the central systems CDF has large local VMS and UNIX clus- ters which are heavily used for data analy- sis. The analyzer and the analysis project determine where each analysis will actu- ally be done. Access to the data on the local machines is available from local disk or tape or from data copied over the net- work. DO DO has established a large file server (DOFS) to provide access to large datasets. DOFS is a VMS Cluster con- sisting of about 500 GB of disk and 30 tapedrives along with 2 cxabyte tape robots. The disk is currently spread across 34 workstations. The cluster is connected via FDDI to the DO analy- sis clusters consisting of VMS (predom- inantly) and UNIX workstations. Users have the ability to access data using DOFS to serve data over the network or by read- ing local copies of the data. Analysis strategy The techniques that have been de- veloped for analysis are not sufficient to meet the current and growing needs. The limitations of the current systems tend to limit or make difficult many analysis projects. The larger data samples that exist and that are going to be created.in the future make it more important that strategies for data and computing access be investigated. The use of robots and hi- 11 erarchical storage is essential in order that the huge manual tape-mounting load be reduced. One of the most difficult prob- lems is the lack of scalability of most solu- tions now in use. Each increase in system size tends to create bottlenecks which are difficult if not impossible to overcome. FUTURE DIRECTIONS Analysis needs and computing in gen- eral benefit from having data as close as possible to computing power. Expe- rience has shown that coupling comput- ing and data as tightly as possible leads to large improvements in the ability to handle the data effectively. An attempt to implement such a strategy in order to analyze ever-growing amounts of physics data is the CAP (Computing for Analysis Project) system at Fermilab. In addition to putting data close to computing the project is scalable, leading to the ability to naturally handle increased data needs. CAP CAP is a project with a goal of pro- viding HEP experiments with quick and reliable access to large amounts of data. The design goals are to store up to 100 TB of data in a tape robot (or robots), manage the files via a storage manage- ment scheme, read the data quickly onto a large ( > 300 G B) disk pool and pro- vide sufficient parallel 1/0 and comput- ing to read through large datasets quickly. Various schemes of data management and storage are being prototyped in order to understand which techniques will be most effective in handling the needs of experi- ments in processing large amounts of data quickly. The CAP hardware currently consists of an IBM SP /1 multiprocessor system as the parallel compute and I/ 0 sys- tem, the VESTA parallel file system from IBM Yorktown, UNITREE to manage the data, and a cartridge tape robot. One of the major challenges of the sys- tem is to provide data organization and access that provides the speed and func- tionality necessary both for system per- formance and for analysis needs. Possi- ble solutions include object-oriented data structures and other techniques for stor- ing pieces of events to allow more efficient and logical access. A successful implementation of this strategy promises a much improved sys- tem for handling the ever-increasing size of datasets. The CAP project should allow datasets of order 100's of GB to be handled with short turnaround times. This will create opportunities for data analysis which either do not exist today or are rendered rather difficult due to the long time and difficult data handling problems involved. The ability to han- dle the large datasets quickly will lead to better physics. CONCLUSIONS High-Energy Physics data sizes are growing ever-larger and this size increase is focussing effort on data-handling and data-processing of these growing sets. Fermilab has been blessed (or burdened) with a very large data-handling problem. A mix of ad- hoc solutions to the various aspects of the problem has been invented and is reasonably effective given current demands. This mix includes UNIX Farms for event reconstruction, a combination of UNIX and VMS Clusters for event stripping and filtering and a different and more diverse combination of UNIX and 12 VMS Clusters, robotics, staging software and applications for physics analysis. One of the ideas for improvement is to integrate fast data access with fast CPU resources. The CAP project at Fermilab is a system that can provide increased ca- pabilities in an integrated system for han- dling the increasing demands of experi- ments. This approach can help us in mak- ing data analysis simpler and more effec- tive for the ever-growing data samples of HEP. ACKNOWLEDGEMENTS Many groups of the Computing Di- vision at Fermilab have contributed to this work, including the Farms, Unix Sys- tems Support and VMS System Support Groups, the CLUBS group, the CDF and DO groups and many others who con- tribute to the successful integration and maintenance of all the many comput- ing systems. Data Center Services has done a magnificent job handling the huge amount of data that comes into the Feyn- man Center. REFERENCES 1. F. Rinaldo and S. Wolbers, "Loosely Coupled Parallel Processing at Fer- milab, " Computers in Physics, 7, 184, Mar/ Apr, 1993. 2. M. Fischler, F. Rinaldo, S. Wol- bers, "Production ·Farms at Fermi- lab", Contribution to CHEP94. DATA MINING WITH PIAF R.Brun, O.Couet, A.Nathaniel, F.Rademakers CERN Geneva, Switzerland Abstract Using the Parallel Interactive Analysis Facility, PIAF, users can query in real-time multi-gigabyte databases. Interactive response times are obtained by executing queries in parallel on a cluster of high speed workstations. For compute intensive queries an almost linear speedup is achieved using five workstations in parallel. In this paper we describe our Ntuple database model, the PAW system used to query, analyze and visualize the data as well as the hardware and software aspects of the PIAF system. Introduction As the amount of data from High En- ergy Physics detectors continues to in- crease, so does the demand for high per- formance tools for analyzing these data. Histograming packages like HBOOK [1] have been for many years standard tools for the statistical data analysis of physics parameters extracted from raw data, data summary tapes (DST), and finally mini and micro DSTs (see figure 1). In the 1980's the concepts of the Ntuple and PAW [2], the Physics Analysis Worksta- tion, were introduced to the High Energy Physics community. An Ntuple is a con- venient way of storing variables extracted from the detector data on an event- by- event basis. PAW is a powerful tool for the analysis of physics data stored in an Ntuple. Initially, PAW provided only a very 13 simple Ntuple structure, the Row- Wise- Ntuple (RWN), intended as a replace- ment for micro DSTs. The main disad- vantage of RWN s is that the complete file must be read even if only a subset of the variables . is referenced in a query. PAW version 2 introduced the concept of Column-Wise-Ntuples (CWN), where the amount of disk I/ 0 is proportional to the number of variables used in the query. Since an Ntuple usually contains many more variables than are actually used CWN s allow interactive analysis of much larger data samples and can even- tually replace mini DSTs (figure 2). Nevertheless, the data samples of High Energy Physics experiments in- crease at a much higher rate than pro- cessor speeds do. PIAF is an extension to PAW which can keep up with the ever increasing amount of data by employing parallel processing. Although PIAF was designed and developed for the High En- ergy Physics community it can equally well be applied in other fields where large databases must be analyzed in a limited amount of time. In general, PIAF is well suited for decision support or statistical database queries (data mining). BATCH and HBOOK Figure 1. The Batch and HBOOK era Short History The PAW project was launched at CERN in 1986. The first public release of the system was made at the beginning of 1988. Many extension and improvements in the area of graphics and data visual- ization were added in the following years. Column- Wise-Ntuples were designed and implemented during 1991 and 1992. The PIAF project was launched at the end of 1992 and the client-server com- munication between PAW and PIAF was incorporated into the July 1993 version. Initially, queries were executed by a sin- gle PIAF server per client. (Already then the PIAF system proved to be very pop- ular amongst the first experimental users because it provided far more CPU power 14 and disk space than the average personal workstation.) The parallel version which splits the workload between the machines in the PIAF cluster arrived in September 1993. This transition was transparent for the PIAF users as the necessary changes affected the server side only. In Novem- ber 1993 PIAF was opened as a public service of the CERN computer center. The Row and Column Wise Ntuples ! ................ - .................... . ~-4 .. ·-·-·-·-·-·-·-·-·-···-··-·-··-··-··-··-··-·-·- Figure 2. The Ntuples and PAW The Column- Wise-Ntuple Data Model In the Ntuple model the data is per- ceived as a table with a fixed number of columns (attributes) and a variable num- ber of rows (events). One of the main tasks of PAW is to project any of the at- tributes into histograms according to var- ious selection criteria. Storage Scheme Statistical data analysis requires di- rect access to complete columns, and the revised Ntuple storage mechanism has been optimized for this. The elements of each column are stored sequentially into individual memory buffers (full ver- tical fragmentation). During Ntuple fill- ing full memory buffers are flushed to a key-indexed direct-access file and reused for the accumulation of new data (see fig- ure 3). Each key is unique and can be calculated from the row and column num- bers. Hence CWNs also provide direct access to each row. Row Wise Ntuples Figure 3. Column Wise and Row Wise Ntuples Ntuple files are written in a machine- independent format which allows trans- fers by binary ftp or sharing via NFS be- tween machines of different architectures. The column access time is independent of the total number of columns and de- pends only on the number of events rather than the file size. Only an absolute min- imum amount of data needs to be read from file during queries. For example, ac- cessing one column of a 100 columns Ntu- ple will require to read only 1% of the complete database. This storage scheme also makes it possible to add new columns 15 a-posteriori as well as new rows without having to rewrite the complete database. Logically columns are grouped into blocks. When defining an Ntuple blocks of columns can be added incremen- tally. This feature allows different pro- gram modules to define their own blocks whereas otherwise an Ntuple would have to be defined in one central place. Physi- cally, however, all columns are stored in- dependently in their own buffers. Data Types The Ntuple database supports the fol- lowing basic data types: 4 and 8 byte floating point numbers, 4 byte integers, 4 byte bit masks, 4 byte Bo?leans, and character strings of up to 32 characters. Arrays of each of these data types are also supported. Data Compression For floating point and integer data types a value range can be specified which allows the system to pack a data item into the minimum number of bits. For exam- ple, if an integer column can only have values between 0 and 7, 3 bits are enough to store it. Booleans are always packed into 1 bit. Arrays can be of variable length which depends on another column, the so-called index variable. For example, if an ar- ray column A(m) depends on the index variable N only the first N array elements are stored. Thanks to a unique indexing mechanism direct access to any row re- mains possible without storing additional information. PAW - The Physics Analysis Workstation PAW (3] is an interactive data anal- ysis and presentation tool designed with the processing and graphics capabilities of modern workstations and high-end PCs in mind. It performs best on medium and high-end workstations with a high resolu- tion graphics display. However, substan- tial effort has been made to ensure that PAW can also be used from graphics ter- minals and in non-interactive batch mode on mainframes or compute servers. PAW comes in two brands. The ba- sic version with a command line interface works on any platform. PAW++ provides a point-and-click interface for all worksta- tions supporting the OSF /Motif window- ing system. Both user interface chores are handled by KUIP (Kit for a User Inter- face Package) [4]. KUIP parses the com" mands, verifies the arguments and calls the relevant PAW action routines. KUIP also provides command aliases, a macro programming language and on-line help information. In Motif mode KUIP man- ages an object browser and a terminal em- ulator. PAW can be used on many different graphics output devices due to the device- independent HIGZ [5] graphics package. HIGZ has drivers for most major graphics systems such as Xll, GKS, PRIGS, GL, Post-Script, Macintosh, PC, etc. The Ntuple Query Proce.~sor To facilitate the analysis and under- standing of the data stored in Ntuples PAW has a wide range of commands that allow the user to query, plot and print variables (i.e. columns) or functions of variables. The four main commands are: PLOT, PROJECT, SCAN, and LOOP. 16 The PLOT command fills a histogram showing the statistical distributions of the variables and displays it. The projections can have up to 4 dimensions using per- spective viewing and colors. As the other three commands do as well, the PLOT command allows for a selection criterion. The selection can contain comparisons between arithmetic expressions of vari- ables combined with the logical operators AND, OR, and NOT. Complete flexibil- ity is achieved by allowing user written Fortran or C functions in the selection ex- pressiOn. The PROJECT command fills a pre- defined one- or two-dimensional his- togram. It can be repeated several times to accumulate statistics from different Ntuples in the same histogram. In or- der to display the histogram a separate command has to be issued. The SCAN command prints for every selected row a given subset of variables. The LOOP command invokes for each row a user function which can be written either in Fortran or C. The function has access to all Ntuple variables of the cur- rent row for filling them into histograms etc. PAW incorporates the Fortran inter- preter COMIS (6] which is available for all platforms but which allows to call only those external routines which have been linked into the PAW executable. Where supported by the operating system, dy- namic linking of user routines compiled by the native Fortran or C compiler has been added recently to the PAW fea- tures~ Only the Ntuple columns used in the selection expression are read from disk and stored in a dedicated cache for re- use. In the case of user functions this is non-trivial since it requires to analyze them for all variables actually used in the query. Ntuple Chaining Single Ntuple files can have a size of up to a few hundred Megabyte. The CHAIN command allows to define a set of files containing the same Ntuple struc- ture which is then treated as a single logi- cal Ntuple. Thus the maximum database size is limited only by the amount of disk space available. The PIAF Facility The Parallel Interactive Analysis Fa- cility's main design goal was to create a system for analyzing multi-gigabyte databases in real time, that could be scaled with increasing amounts of data and that would have an affordable price tag. In order to reach this ambitious goal we run the Ntuple database engine and PAW's query processor in parallel on a dedicated cluster of high-end worksta- tions interconnected by a high-bandwidth l~w-latency network. Another design goal was to make the system as transparent as possible for the PAW users. Also the sys- tem should not be limited to the work- station brand used in the PIAF cluster at CERN. In the next sections we describe the hardware configuration currently in ser- vice at CERN and the organization of the PAW-PIAF client-server software. The paper concludes with the discussion of us- age and performance figures. The PIAF Hardware The PIAF cluster currently installed at CERN (figure 4) consists of five HP 755 workstations each with 128 Mbyte RAM, 17 2.6 Gbyte internal disk and two RAID disks (one 6.5 Gbyte and one 10 Gbyte unit). The machines are interconnected by an FDDI network and a conventional Ethernet. In the near future (Q2-94) the cluster will be expanded by adding three machines and upgrading each node to 256 Mbyte RAM. In Q3-94 the CPU's will be replaced by 50% faster models. Figure 4. The PIAF hardware (April 1994) 1.6 Gbyte of the internal disk is con- figured as swap space, while the remain- ing 1 Gbyte is used for the operating system and the users' working directo- ries. Ntuple files are stored on the RAID disks. Since the Ntuples are staged from tape or transferred from file servers onto PIAF, they are considered as "volatile" data and therefore not backed-up. Some form of security is provided by the RAID systems (HP-C2425 and HP-C2430) run- ning in RAID mode 3, which combines high throughput (up to 6.5 Mbyte/s) with data protection. By cross-mounting the RAID systems, using NFS over FDDI, each machine in the cluster has access to a disk pool of 82 Gbytes. Hardware Robustness The stability of the cluster has been of no concern up to now. Between Novem- ber 1993 and April 1994 there was no unscheduled down-time. One disk of a RAID unit failed and was replaced with- out loosing any data. The PIAF Software The core of the PIAF server software is the PAW query processor and the Ntu- ple database engine. These core com- ponents are packaged together with in- . terprocess communication routines in the piafserv program. Depending on its start-up arguments piafserv acts either as master server or as slave server. Each user connecting to PIAF will get one mas- ter server and N slave servers, where N is the number of available nodes (see fig- ure 5). The client is the user's local PAW ses- sion which communicates with the PIAF master server through a TCP socket. The messages exchanged are usually small enough to allow the use of PIAF also through a WAN or SLIP connection. The master server coordinates the database queries: it forwards the query commands to the slave servers, receives and merges the results, in the form of histograms or lists of row numbers, and feeds the final results back to the client. Each slave knows by its group-view which part of the total database it has to process. The group-view consists of two numbers: the slave server's unique ID (from 1 toN) and N (the number of active slave servers). If a slave does not respond within a certain time limit it is considered dead and the master server sends out a new group-view to the remaining slaves. 18 Since all slave servers traverse an equal share of the total database the sys- tem is automatically load-balanced. In order to maintain this balance there are no interactive sessions allowed on the CERN PIAF cluster. Figure 5. The PIAF processes Client-Server Communication The PIAF master server is started by the inetd super-daemon when a client connects to a specific port on one of the nodes in the PIAF cluster. The inetd daemon starts the small front-end server piafront, which handles the user au- thentication. To distribute the master servers evenly over all nodes piafront also checks on which node in the clus- ter the master server should be run. If the authentication was incorrect or the node is not the right one piafront sends back an authentication failure or reroute message. Otherwise it overlays itself with the master server. The master server started depends on a version tag sent by the client. This allows for incompatible changes in the server software without af- fecting users still running old client soft- ware. Once the master server is launched successfully it, in turn, starts the slave servers in a. similar way. Then the client sends some initial state information to the master server which forwards it, includ- ing an initial group-view, to the slaves. During a session the user can interactively change the number of slaves participating m a query. To meet stringent performance, func- tionality and portability. requirements the client-server communication is done via TCP sockets. Message passing li- braries, such as PVM, were considered but rejected due to the extra overhead and configuration chores they introduce. Also, using sockets directly enabled finer- grain control over communication behav- ior (e.g. signal driven asynchronous I/0 and buffering). Transparent Usage One design goal was to keep the sys- tem as transparent as possible for the PAW users. The set of riew commands to access PIAF is limited to a bare mini- mum. The opening and closing of a PIAF connection is done using the commands CONNECT and DISCONNECT. When connecting to PIAF the user is asked for his PIAF login and password. Once con- nected to PIAF the user can stage Ntuple database files using the PUT and STAGE commands. To access data :files on PIAF the user simply precedes the file name with the keyword'/ /piaf'. For example: PAW > HISTO/FILE 1 //piaf/staff.hbook tells PAW to connect the :file 'sta:ff.hbook' 19 on PIAF to the logical unit 1. Compare this with the command to connect the lo- cal :file 'staff.hbook' to logical unit 2: PAW> HISTO/FILE 2 staff.hbook From this moment on Ntuples in both :files can be queried in the same way. The only difference is that when an Ntuple from logical unit 1 is queried the request is transferred to the master server and via the master server to the slave servers. For example the command: PAW > NT/PLOT //LUN1/10.age cost>10000 will be executed in parallel on PIAF, whereas the command: PAW> NT/PLOT //LUN2/10.age cost>4000 will be executed by the local PAW session. Since PIAF is a general public ser- vice a lot of effort was spent on robust- ness. Especially, PIAF is able to grace- fully handle keyboard interrupts by users who want to abort a.n on-going query. Usage and Performance Monitoring In order to be able to track the usage and performance of the system an exten- sive monitoring scheme was implemented using the BSD syslog facility. The infor- mation thus gathered tells us, for exam- ple, how many users used the system, how much data was processed, what kind of queries were executed, the real and CPU· times used per query, the Ntuple cache hit rate, etc. After storing this data into Ntuples, PIAF is used for the analysis. Figure 6 shows PAW and PIAF usage on the IBM mainframe and Unix work- stations at CERN since January 1993. PAW itself is routinely used by more than 1000 users per week. The top part of the graph shows the amount of data analyzed per week. The 50 users currently daily on PIAF process on average 500 Giga- bytes per week, to be compared with only 150 Gigabytes by the 1000 PAW users an- alyzing local data sets. The number of users and the amount of data processed per week increases very rapidly. We ex- pect PIAF to become very soon the main data cruncher on the CERN site. The bottom part of the graph shows a simi- lar trend for the CPU usage: 4000 CERN Units hours per week on PIAF. ... - ., • PAW/PIAF weekly statistics ~=~~~~~ 1-,~--------------~-· ~=,~·---------------· BD;r----------------------. ae;r---------------------- um;r-----------·-------- ao;r-------------~~- - Figure 6. PAW and PIAF usage at CERN. (One CERN Unit is approximately 5 MIPS.) Statistics with the Data Model We are currently collecting statistics which will allow us to understand better the type of queries as well as the percent- age of the database really used per query. Figure 7 shows the result of a few days' snapshot involving 137 000 queries. The top part of the figure shows the number 20 of columns in the user Ntuple databases (average 57 columns). The bottom graph shows the percentage of the number of columns really involved in one query ( av- erage 20%). Muplea columna & columna uaed per query Nu- a1 column• 1'8' NIUple 100CO 0 lO eo lU ao 90 100 Pwcmlllge al column•-.,.. quwy Figure 7. Data Base profile and Columns use Caching In a normal PAW /PIAF session, the user issues often queries involving the same columns or combinations of columns again and again. The database engine in common to PAW and PIAF contains a caching mechanism which keeps the most frequently used columns in memory. The size of the cache is a function of the avail- able amount of memory and of the local swapping space. We are continuously try- ing to improve this crucial part of the sys- tem. Using 5 slaves in parallel, the system can read and process a column of 40 mil- lion entries in about 120 seconds. This time is independent of the total number of columns in the database). Processing a column already in the cache takes about 50 seconds. Speedup CPU U11111/ ROlli U11111lor .. artlllld long quorl~ Figure 8. Speedup obtained with 5 processors Performance Figures For one single user, the PIAF per- formance scales nearly linearly with the number of processors participating in the query. This is due to the small amount of time spent in the master-slave commu- nication compared to the time it takes to traverse the database. The larger the Ntuple the better the speedup since the amount of communication is indepen- dent of the number of records processed. In some cases even a more-than-linear speedup can be observed. This happens when the database is too large to fit into the cache of a single machine. Running in parallel on N nodes, however, the speedup is more than a. factor N if each node is able to cache its part of the database. In real life, obviously, several queries from different users may compete for re- sources. Figure 8 shows the speedup (CPU time on all nodes divided by real time) for different types of queries. In the case of short queries, the probability to 21 have two competing queries is small and the speedup is typically 4 (using 5 pro- cessors). When the time to pro.cess one query increases, the probability to have several competing queries also increases. Despite the small size of the current sys- tem, the PIAF users enjoy a response time far better than they could expect on their own workstation. In addition, the PIAF system provides a data storage capacity unthinkable for single-user work- stations. Problem Areas First time access to a file does not re- sult in much speedup because the slaves have to read from a single disk device where the database is stored. In order to avoid this bottleneck we are investigating the design of a parallel file system. Files will be striped, during staging, inN equal parts each stored on a separate device. Ideally, the splitting should be done such that each slave will find its share of the file on a local disk. Otherwise the next bot- tleneck will become the network through- put. To alleviate the network bottleneck we plan to interconnect the cluster via a HiPPI network which should yield a throughput of about 25 Mbytejs. Conclusions In this paper we presented the opti- mized Ntuple database with column-wise access to statistical data. Further, we de- scribed the interactive analysis and pre- sentation tool PAW and its Ntuple query language. Finally, the hardware and soft- ware aspects of the Parallel Interactive Analysis Facility, PIAF, were explained. The first phase of the PIAF project was quite successful. Since November 1993 the system is open to the public and services many users with a remarkable ro- bustness and stability. We are planning to extend considerably the power of the system in the coming months. Nevertheless, many areas still need to be researched and clarified, for example, a parallel file system, a scheme for auto- matic data migration, and the scalability with respect to an increasing number of users and nodes. Having real users on the PIAF system has given us new insights in the queries profile. REFERENCES 1. HBOOK Users Guide (version 4.21), CERN Program Library Y250 (1994). 2. R. Brunet al., PAW: A General Pur- pose Portable Software Tool for Data Analysis and Presentation, Comp. Phys. Comm. 57, 432-437 (1989). 3. PAW Users Guide, CERN Program Library Q121 (1993). 4. KUIP Users Guide, CERN Program Library 1202 (1994). 5. HIGZ Users Guide, CERN Program Library Q120 (1993). 6. COMIS - Compilation and Interpre- tation System, CERN Program Li- brary L210 (1994). 22 HARDWARE AND SOFTWARE ISSUES FOR FUTURE EXPERIMENTS Ken Peach, Department of Physics and Astronomy, University of Edinburgh, Edinburgh EH9 3JZ, UK Abstract Issues influencing the design and implementation of the computing environment are discussed in the context experiments now being designed for the fixed target programmes at FNAL and CERN. INTRODUCTION There has traditionally been a sharp division between o.ffiine and online com- puting. Rapid changes in computing technology - leading to downsizing of the mainframe and to buffering of data which diminishes real-time aspects of control room computing - are blurring the dis- tinction. Higher event rates and larger data volumes also involve a radical depar- ture from bus-based data acquisition sys- tems developed in the 1970's and 1980's, to a new architecture using independent, parallel links; this needs new methods to assemble the information related to a sin- gle event. Developments in storage 'tech- nology hardware, software and network- ing, influence the development of inte- grated experimental computing systems. Finally, the route to very large CPU and memory may involve MPP. This paper is organized into five main sections. Firstly, there is a brief re- view Yesterday, Today and Tomorrow of the development of experiment comput- ing from data acquisition to data analysis. 23 Then, there is a discussion Before and Af- ter the Event of the implications of tech- nology changes at the interface between the real-time and standard computing en- vironments. In Control and Data the de- sign principles of modern counting-room computing systems are briefly discussed, followed by a more detailed discussion Logging, Farming and Transportation of some key issues. Finally, a few comments on longer term developments are men- tioned in MIPS and Memory. YESTERDAY, TODAY & TOMORROW There are seven distinct phases through which event data pass, from the detector to the final publication. These are:- 1. Event Assembly 2. Software Filtering 3. Online Manipulation & Monitoring 4. Archive Storage (Tape) 5. O:ffi.ine Reconstruction and Processing 6. Data Summary Tapes 7. Analysis Montecarlo data is usually injected to the chain at the 4th step, and thereafter can Table 1. Characteristics of the data flow for the three t 1 / c experiments at CERN and FNAL NA31 NA48 KTeV Data taking 1984-9 1995- 1995- Spilllenryth 2.7 2.7 20 (seconds Duty Cycle 20 20 35 (%) Design Goals Events rate 0.75 10 15 (kHz) Data Volume 1.5 100 150 (Mbytes /sec) Time average 0.3 20 50 (Mbytes /sec) dominate the computing requirements. In the 1970's (yesterday), there were just three separate elements in this scheme. Event assembly was performed by the online mini (PDPll or NORD, for example) accessing the detector directly through CAMAC or less usually another bus, there was no software filter because there was insufficient computing power, the online computer being fully occupied monitoring the data and writing to tape (1600bpi!). These tapes were then trans- ported to the mainframe (usually IBM), which did the rest of the computing - re- construction, data reduction and analy- sis. The height of sophistication in graph- ical devices was the Tektronix 4010. In the 1980's (effectively today), the event assembly had moved out into the bus (FASTBus or VME), and bus-based processor farms built round single board computers implemented the software fil- ter. The online system was a much larger, general purpose mid-range com- puter (VAX, NORD500 etc), which con- trolled the experiment, obtained the as- sembled data from buffer memories em- bedded in the bus, monitored the data 24 and wrote them to tape. The tapes (625obpi and latterly 3480) were then transported to the mainframes (even big- ger IBM's) for reconstruction. Much anal- ysis was still performed on these central systems, although it gradually migrated to group or departmental/institute ma- chines (VAX'es,. HP ... ). Sometime during the decade, colour terminals were discov- ered, which released the r_epressed artistic talents of physicists for display, rivalled only by the more flamboyant birds of par- adise. The end of the decade saw the introduction of workstation clusters for many of these tasks. The 1990's (tomorrow) takes the trend further. Workstation clusters now appear everywhere- for online work, for recon- struction and for analysis. Buses such as CAMAC, FASTBUS and VME are being replaced by point-to-point links (HIPPI, FCS, SCI...). Large disk farms are replac- ing tapes for the storage of DST's, and the archive media are becoming more exotic - Exabytes, DD-n, DTP ... Finally, the as- sembly of the event is moving from soft- ware to hardware. It is interesting to compare how the computing system for experiments has evolved by considering some specific ex- amples. Since I know the issues involved well, I shall use the NA31 [1] and NA48 [2] experiments at CERN, and KTeV [3] at FNAL; what these experiments have in common is that they are studying the same physics ( c 1 /c) .. These studies thus illustrate how the requirements have de- veloped over the years and, most inter- estingly from my point of view, how the similar solutions are. Table 1 shows the principal characteristics of the data flow for each of these experiments. The NA31 data acquisition system is typical of data acquisition systems de- signed in the early 1980's - see Fig. 1. FASTBUS was used as the main data Figure 1. The NA31 data acquisition system SWitch ~----.:!11 coupler l68a/1 vom 11/750 MC68000 Control Intarf'aCGI path, with the events being built in the bus using a Kinetics Systems FASTBUS Block Mover [4]. The assembled data were transmitted to one .of two IBM 168e emulators [5], where a fast filter pro- gramme reduced the data by a factor of nearly two. Accepted events were written to a large ( 4MByte!) buffer memory, and read between SPS spills into a VAX 11/750. Towards the end of the data taking, the VAX was supplemented by a microVAX-11. Data were written originally to 1600 bpi tapes, then to 6250 bpi tapes and finally to IBM 3480 cartridges on an Aspen sys- tem. (Now, all of the data have been copied to Exabyte.) However, as we shall see, this architecture does not scale well to higher event rates and data volumes. BEFORE AND AFTER THE EVENT The most dramatic architectural change during the development of data acquisition systems has been in the as- sembly of the data from a particular event in the detector into a single data struc- 25 ture, suitable for archive recording and offline analysis. Initially, such event as- sembly was under the direct control of the data acquisition computer, reading CAMAC after an interrupt signalling the occurrence of an event. Much intellec- tual effort was devoted to making this interrupt processing efficient - either by the computer manufacturer in the de- sign of the context switching mechanism, or by the online programmer in trying to short-circuit the safeguards and bot- tlenecks introduced by the hardware or software. More recent designs have used Event Builders in the data acquisition bus itself to perform this task - run- ning a minimal operating system allows a rapid response to interrupts, and re- lieves the data acquisition machine of this chore. However, there are limitations to this approach. For example, under pro- gramme control it usually takes time - of order fLSeconds - respond to an inter- rupt. Gaining bus mastership also takes a similar time, as does the scanning and addressing of each source of data. If we allow 5fLseconds for each of these the zero- data overhead for 10 independent data sources is 60flseconds, leading to 60% oc- cupancy of the bus at lOkH z before any real data have been transferred 1 . It is interesting to note that the excellent gen- eral data acquisition system developed at CEBAF [6] has achieved 30kHz rates for small event sizes from a small number of sources, in agreement with the above rough estimates. The problem with bus-based, data- pull architectures is that they are not scalable - the bus (and its protocol) are 1 Strategies can be adopted to reduce these overheads, but in general only at the cost of in- creased complexity. the limiting factor, and as the event rate goes beyond some limit, the throughput must go down. For these reasons, some designers have abandoned the bus-based architecture for a much simpler transport system- multiple, independent, point-to- point links, along which the data delivers itself to a large. buffer memory. The ad- vantages of this scheme are several. 1. More capacity can be .provided by in- creasing the number of links. 2. Point-to-point links can have very low protocol overheads. 3. Point-to-point links are in general lower cost than bus-based systems. In addition, the link can be made uni- directional, since the bulk of the data flows in only one direction. A bus-based architecture allows data flow in both di- rect!ons equally, although this function- ality is rarely used in practice. It is bet- ter therefore to separate the main data path from the control path (see below). Of course, there are new problems - for example, controlling the data rate. How- ever, this turns out to have a surpris- ingly simple solution- use a single return line (WAIT or XOFF) to control the flow. Since the general structure of such sys- tems is that data is transferred from a buffer into a FIFO, it is possible, knowing the capacity of the link, to predict well in advance when the system will flood, and hence send the flow control signal sufficiently early to avoid difficulty. The signal is asynchronous, and can be made completely immune to noise etc. An at- tractive feature is that temporary conges- tion on one link has no effect on the other links, and the system approaches satura- tion gracefully. Both the NA48 and KTeV (DART) [7] data acquisition systems use very similar structures - see Table 2. 26 Table 2. Comparison of the NA48 and KTeV event assembly NA48 KTeV Total Data Rate 100 150 (Mbytes I sec) No. of Links >10 >5 SMeedllink 13 40 ( bytes I sec) Protocol custom RS486 Medium fibre copper Differences emerge after the event, in part because of the very different duty cycles and spill structures at the SPS and TEVATRON. In the NA48 system (see Fig. 2), the links terminate in the DataMerger, which has a 2Mbyte buffer for each link. The data are stored event by event in each link, and con- catenated by a fast token-controlled in- terface to HIPPI and transferred directly into a workstation - currently a Digi- tal AXP 3000 series TurboChannel ma- chine. A HIPPI-to- Turbochannel interface has been designed and commercialized [8], and delivers at least 83Mbyteslsec sustained transfers. This architecture is possible because the maximum size of the data for a whole burst is 256Mbytes, well matched to reasonably cost-effective workstations. For KTeV (see [7]), the to- tal data volume for a single spill could be 3Gbytes. The solution here is not to assemble the event at this point, but to reduce the data by accessing the data di- rectly while it is stored in VME memories. Both experiments have designed scal- ability into the system. For NA48 this is achieved by using a HIPPI switch to select a workstation for a complete spill of data, and providing sufficient destinations to be able to process the data before the pool of workstations is exhausted. KTeV Figure 2. Sketch of the NA48 data acquisition system choose to scale their data by deposit- ing the events into different VME memory modules (selected by the event number in the event packet), and by using SGI Chal- lenge multi-processor machines to achieve the required CPU power. CONTROL & DATA A very important consideration is the medium for controlling the experiment. In traditional, bus-based data acquisition systems, equipment setup and diagnos- tics, trigger definition etc were configured through the same bus system used for the transport of the bulk data. While this has a certain appeal - economic re- use of the bus - it is nevertheless inele- gant. The volumes of data flowing in the two directions are very different, and of a very different character. The control functions are in general not interleaved with the data, and the extra complexity of bi-directional, complex protocol buses (FASTBus springs to mind) mean in the end extra cost. The more modern approach is then 27 to separate completely data and control. The data transport has been discussed above; since each detector subsystem will in practice come with its own computer for the engineers to setup and test, it makes sense to use this route also for con- trol, using whatever local area network is available. Most control functions (for ex- ample, setting up or starting a run) are not time critical at the milli-second level, and hence the performance overhead of a properly designed and managed local area (experiment) network is light. The resulting architecture (see Fig. 3) for data and control is thus like the road layout of any major city (Paris being perhaps the most elegant example). In the centre is the control console ( L 'Arc de Triomphe), and radiating from it are the arterial roads which carry the com- mand and response signals to each of the subsystems (the Fortes). The data is transported in a multi-lane highway (the Boulevard Peripherique) around the edge. Figure 3. Control and Data Architecture In future, as both trigger rates and data volumes increase, even more radi- cal departures from the traditional bus- based, data-pull architecture will have to be considered. However, the trend will probably continue to be to point-to- point links transporting the data asyn- chronously to event assembly in hard- ware, albeit relatively simple hardware. The secret is to design the data flow scheme so that the event assembly is sim- ple- perhaps just by memory address, for example. Once the event is assembled, it must be processed, monitored and archived, which leads to a discussion of ... FARMING, LOGGING & TRANSPORTATION which, as .Delfino has pointed out [9] has evolved from subsistence farming to Agribusiness. There are three related topics- the CPU required to satisfy there- quirements of the separate stages of mon- itoring, reconstruction and analysis, the storage of the data and the network fabric which connects these elements together. Now, it cannot be stressed too often these three subjects- CPU, storage and network- ing - should be considered as a single sys- tem and should be incorporated into a global data model. Here, the benchmark is, in some re- spects, provided by the DESY system [10]. At DESY data recording has tradition- ally be centrally organized. However, the central organizer has been equally tra- ditionally been a large IBM mainframe. More recently, as Ernst has discussed at this conference [10], the advantages of this approach have been retained, but the new structure is built not around a central mainframe, but around a high- performance network switch. Comple- menting this network is a site-wide data structure, which is an implementation of the IEEE Hierarchical Storage· Model. The claim was made that this is a cost effective solution to data storage Issues; 28 this is undoubtedly true. However, the initial cost is high, and it is therefore most appropriate for large data centres. Here, the particular features of DESY are impor- tant, supporting as it does only a small number of large experiments. The initial capital investment is rather a small part of the total cost. What is less clear is whether this can be also implemented for . sites -such as CERN and FNAL - where a large number of small or medium sized experiments periodically take data. Many of the features of a modern com- puting centre are also to be found in the computing systems located in control rooms and institutes - clusters of work- stations, PG's, x-terminals, storage de- vices etc connected by a central backbone network or ring. The difference is only in the relative scale of computing sys- tems, and the even greater difference in the scale of the respective budgets. The key question relates to the archive medium. As Mount remarked [11], the days of a standard, interchangeable medium (such as the good old 1600bpi round tape) are probably gone for ever. Given that even small experiments take data over many years, the consequences of a wrong decision taken at the begin- ning can be serious. (Few people have the faith in Exabytes displayed by FNAL.) One possible solution is to abandon writing data directly from the experimen- tal computers and instead treat the prob- lem as one of data migration - in effect the DESY model. This has a number of advantages. Firstly, it removes com- pletely the traditional problems of online systems related to the handling of me- dia- wrong tape mounted, right tape but wrongly labelled, unloaded a tape before it has completed writing etc- all too fa._ miliar to online programmers 2 • In the process, something rather mag- ical happens - the traditional distinction between online and offline more or less disappears. Control and data have been separated, and data recording abolished, replaced by the HSM. All programmes ac- cess the data in the same way, and there is rather little code which is specifically online or exclusively offline. A further advantage of this approach to data logging is that it allows in prin- ciple efficient use of computing resources. As noted above, workstation farms now feature in many places - in the control room, in the data centre and in the group & institutes. Once the data is accessible transparently, the machines in these vari- ous clusters can be allocated dynamically to tasks as demand dictates. Critical to the above structure is the disk farm. One of the weaknesses of the processor farm is currently the ac- cess to large disk storage. Attaching to a single machine gives a single point of failure, and multiple cross-mounting of disks can be inefficient. In this context, then, it is interesting to look at some ideas being developed by IBM for a low cost, medium performance alternative to SCSI, called SSA (Serial Storage Architec- ture) [12]. This is being proposed as an ANSI standard. Basically, SSA is a bi- directional serial link with generous ad- dressing capabilities using a light proto- col. It maps on to SCSI-II and provides currently 20Mbytesjsec in each direction. The protocol has automatic retry at the hardware level, and has a single-chip im- plementation. IBM's aim is $15 per port. 2 Some physicists seem particularly adept at creating tape unit conditions unimagined and unimaginable to the conscientious programmer. 29 SSA can be configured as a linear chain, ring, crossbar etc for a mix of CPU's and storage devices, and utilises through- routing (similar to SCI). The protocol is worth serious study by farm managers, and also perhaps more generally; IBM are to be encouraged. This underlines the importance of the data network - something made explicit in the DESY model by the central position accorded to the GigaRouter. Of course, networking may not solve all problems of getting the data to the CPU - as Tan- nenbaum remarked [13] "never underes- timate the bandwidth of a pickup truck". Wolbers [14] showed us a Terabyte in a cabinet drawer the size of a suitcase; transported by air anywhere in the world (about 20h) gives a mean bandwidth of about 13.5Mbytesjsec,.... or 155Mbit ATM at full speed! Why might the data need to be brought to remote CPU's? MIPS & MEMORY There is a healthy debate about whether there is a need for Massively Parallel Processing (MPP) in experimen- tal particle physics - QCD ha,ve already demonstrated the need in theoretical par- ticle physics. The argument against is essentially that the raw CPU power will always be more cost effectively provided by a network of workstations than in an integrated box, since the box manufac- turer always wants to give added value to the processing power through hard- ware and software features which may ei- ther not be needed or difficult to exploit. The rather small impact of vector pro- cessors on experimental particle physics code is often quoted as an example. On the other hand, the management of thou- . sands of machines loosely coupled by a general network is complex, and there may be natural scaling limits to such sys- tems. These can of course be extended by using clusters of multi-processor ma- chines, which generates what might be called moderately parallel processing. There is, however, a class of prob- lems for which the workstation farm ap- proach may not be cost effective, and that is where large CPU needs are asso- ciated with large memory requirements. The reason is that memory costs be- come dominant beyond some limit - to- day when the memory required is greater than about 128Mbytes. Distributing the memory around a large number of work-. stations transfers the problem to the net- work, which may not be able to sup- port the large bandwidth required. Here, MPP may be cost effective. For a discus- sion of these matters, see the parallel ses- sion talks by Bertolotto [15] and Panzer- Steindel [16]. SUMMARY This brief review has examined some issues to be addressed in the design of the computing environment from the con- trol room to the conference report. De- velopments in computing technology al- low radical new approaches, integrating all aspects of experimental computing. Advances in networking allow new solu- tions to standard problems of experimen- tal data acquisition and control, which are at the same time more powerful and less complicated. While the scale of the problems is not quite the same as for the LHC experiments, the challenge is likely to provide sufficient intellectual stimulus for many over the next few years. 30 REFERENCES 1. GD Barr et al: Phys. Lett. B317 (1993) 233-242; H Burkhardt et al: Nucl. Inst. & Meth. A268 (1988) 116 2. GD Barr et al: "Proposal for a precision measurement of £ 1 /£ in CP-violating J{ 0 -+ 27r decays", CERN /SPSC/90-22, July 1990 3. K Arisaka: et al: Experiment E732, FNAL 4. J Pregernig: IEEE Trans. Nucl. Sci. NS- 33 (1) (1986) 797 5. PF Kunz et al: Nucl. Inst. & Meth. 9 (1976) 435; M Rost et al: Nucl. Inst. & Meth. 242 (1985) 153 6. G Heyes et al: these proceedings 7. R ·Pordes et al: these proceedings 8. W Bozzoli et al: "Conference Record of the Eighth Conference on Real-time Computer Applications in Nuclear, Par- . tide and Plasma Physics", Vancouver, June (1993) 105-107. The HIPPI to Tur- boChannel Interface HTIP-800D is man- ufactured by Hytec Electronics, 64, Amy St, Leicester LE 3 2FB, UK · 9. M Delfino: these proceedings 10. M Ernst: these proceedings 11. R Mount: these proceedings 12. Copies of the SSA specification docu- ments can be obtained from Global En- gineering Documents, 15 Inverness Way East, Englewood, C080112-5704, or from IBM-UK at PO Box 6, Havant, Hampshire P09 1sA, UK. 13. AS Tannenbaum: Computer Networks, Prentice-Hall International, ISBN 0-13- 166836-6 (1988) 14. S Wolbers: these proceedings 15. L Bertolotto et al: these proceedings 16. B Panzer-Steindel et al: these proceed- ings METHODOLOGIES, LANGUAGES AND TOOLS Session Summary Katsuya Amako Physics Department KEK, National Laboratory for High Energy Physics 1-1 Oho, Tsukuba, Ibaraki 305, Japan. Abstract This is a summary of the "Methodologies, Languages and Tools" session in the CHEP'94 conference. All the contributions to method- ologies and languages .are relevant to the object-oriented approach. Other topics presented are related to various software tools in the down-sized computing environment. INTRODUCTION The basic approach of the present summary is to digest the talks given in the session one by one. It serves as an in- troduction to each contribution. A reader who wants to know the details can read the corresponding paper. There are 21 contributions in the ses- sions. In this summary, the author cate- gorized these as follows: • Methodologies and their tools; - Methodologies in on-line software designs; - Methodologies in off-line software designs; - Tools for methodologies; • Languages; - Languages in on-line software implementations; - Languages in off-line software implementations; • Generic tools. The first category includes contribu- 31 tions relevant to usage of software engi- neering methodologies for designs of on- line and off-line software systems. It also contains software tools to support methodologies. The second category has . contributions related to program lan- guages for implementations of on-line and off-line software systems. The third cat- egory contains topics of generic tools in the down-sized computing environment. METHODOLOGIES AND THEIR TOOLS Whether the introduction of a soft- ware engineering methodology bring im- provement of the productivity and the quality of HEP software systems has been debated repeatedly in a series of these conferences [1, 2, 3]. Although there have been no convincing proof of their definite success so far, demands to such a method- ology is high, especially in large scale ex- periments in the future. In the session, there were two contri- butions [4: 5] on applications of object- oriented (00) methodologies to on-line systems of on-going experiments. These showed that 00 methodologies are al- ready not just for a trial but a practi- cal and indispensable tool for some of on- line software designers. Also, there was one contribution for formal methodology [6]. For off-line systems, there were three . contributions [7, 8, 9) of serious studies for feasibility of 00 methodologies. Be- cause off-line applications are more close to most physicists than on-line ones, these presentations brought about hot discus- sions. Some of these are: 1) do all physi- cists need to understand 00 methodolo- gies? 2) an ideal software system should allow most physicists to integrate their own codes to it without the knowledge of 00 methodology nor 00 language; 3) most physicists should not touch to the code, instead, a Macintosh-like user en- vironment should be provided for their ·physics analyses, etc. There were no clear conclusions from these discussions. Structured Analysis / Structured De- sign (SA/SD) once drew the attention of HEP experiment groups. Several groups used it for designs of their software sys- tems, but its usage declined gradually. It is pointed out that one reason for this decline is that there were few com- puter aided software engineering (CASE) tools to support the methodology [3). This problem seems to be not exist in 00 methodologies, because many CASE tools are available in the present market. In the session, there were three reports [10, 11, 12] on the projects to develop tools which support 00 methodologies. Because of defects seen in CASE tools in the present market, these projects try to construct a free tool for the REP commu- nity. Whether 00 methodologies and their 32 CASE tools bring a new approach of soft- ware development in REP is not clear yet. We need to keep our eyes on how these evolve in future. The following are digests of all con- tributions belong to methodologies and their tools . Methodologies m On-line Software One of the most extensive application of a methodology to a working system is given by M. Flasinski [4] of DESY. ZEX is a distributed real-time diagnos- tic/ control system for the ZEUS experi- ment, which was implemented to help on- line operators to keep the experiment in optimum running condition. The Booch object modeling technique was employed to design the system. The decomposition of the ZEX system by the Booch method yielded a multidi- mensional frame structure which allows to treat each detector component accord- ing to various aspect of its functionality. He concluded that the OOA/OOD ap- proach is very useful for designing and im- plementing expert systems, because their experience showed that the methodology leads to a well-partitioned maintainable system. Another example of the application of a methodology to a working system is pre- sented by S. Du [5) of Orsay. Require- ments to the DELPHI on-line event dis- play system, such as its interactive nature and necessity of a regular evolution de- pending on the physicists' wishes, natu- rally lead them to employ an OOA/OOD methodology to the design and imple- mentation.- The system was designed by the Objecteering tool, which is based on "class-relation method". The tool pro- vides an integrated development environ- ment which includes graphical model edi- tor, C++ code generator, model compiler and documentation generator. Benefits of the methodology found are: 1) modular development of sub- detectors packages; 2) allowance of a flex- ible development strategy, and; ·3) easy to manage application evolution. He also concluded that the CASE tool is essential for the project. W. Lourens [6] of Universiteit Utrecht presented the application of a formal development methodology to on- line trigger systems for LHC experiments. This is the only contribution in the con- ference on formal methodologies. For- mal methodologies are software engineer- ing techniques that apply mathematical theories to construct a model of a soft- ware system. Because methodologies re- quire mathematical skills, there is a great barrier for many software developers to comprehend and to apply them to a prac- tical software system. The goal of the project presented in the talk is to demonstrate the usefulness of the formal method (VDM++) by ap- plying it to LHC second level trigger sys- tems, where reliability is critical issue. In the presentation, it was demonstrated how an abstract specification can be re- fined to a more concrete one by using the example of the application to data stor- age part of the level 2 trigger system. Methodologies in Off-line Software A. Schaffer [7] of Orsay presented a progress report and the future plan of a project on the study of 00 methodplogy to the software of the ATLAS experiment. The project tries to build a system- 33 atic and structured approach to construct a software system for LHC experiments. The goals of the project are: 1) to estab- lish a well structured software develop- ment environment for LHC; 2) to adapt the use of an 00 methodology to HEP environment, and; 3) to be able to rec- ommend, or not, the 00 approach to their colleagues. The items studied so far are: 1) training program to learn 00 pro- gramming (C++ and Eiffel) and method- ology; 2) prototypes for testing tools and languages, and for reproductions of a part of the ATLAS reconstruction software, and; 3) evaluation of different methodolo- gies and CASE tools, etc. M. Maquina [8] of CERN reported a use of the 00 methodology in the design and implementation of an interface pro- gram which enables to exchange detec- tor models between GEANT and a CAD system. To transfer a detector geometry, the ISO standard called STEP (STandard for Exchange of Product model data) was used. STEP offers a system-independent description of product/commodity infor- mation for presenting and exchanging in computer aided systems. The basic idea to exchange detector models is to express the internal geomet- rical representation of GEANT in STEP. The STEP representation of GEANT was then converted to a C++ class library. This GEANT class library serves as a base for the interface program to ex- change detector models. They used the Object Modeling Technique (OMT) to design this program. The program is tested with GEANT 3.16 and it is also compatible with the version 3.21. Another contribution which uses OMT was presented by K. Amako [9] of KEK. OMT was applied to reengineer the GEANT program from the object- oriented view. The goal of the project is to study the feasibility of OOAjOOD for the development of a large scale software for future HEP experiments. The project was originally started as a research and development of the sse software system. The reengineering allows to reuse soft- ware assets _(both ideas and algorithms) the HEP community accumulated so far. For the reengineering, the analysis and design steps advocated in OMT are followed rather consistently. The project started with the object analysis. The problem statement was generated from the GEANT manual. The problem state- ment contains requirements that are gen- eral to a detector simulator. However, unique techniques in GEANT like mul- tiple positioning of a volume, the volume division, etc. are included in it. Base on this problem statement, the object model and the dynamic model were constructed. It was emphasized that data structures play an important role in the 00 ap- proach. Tools for Methodologies S. Fisher [10] of RAL presented a project to construct an 00 CASE tool called omo. The motivations of devel- oping this CASE tool are: 1) existing tools are oriented in the concepts they support towards C++; 2) it is advanta- geous to have control of an 00 CASE tools so to be able to try new method- ological ideas within minimum delay, and; 3) to make a tool available to the HEP community with free. Main features of omo are; 1) it· is at the same time a de- sign tool and a reverse engineering tool; 2) it allows a user to work at different 34 domains like at the code level, at the dia- gram level, etc., and; 3) it has simple user interface, context sensitive help and safe. Free software components are used for its construction. The extensive usage of the free software reduced drastically the ac- tual codings. He concluded that it is not difficult to build ones own_ CASE tools if the right components are used. Another project to construct a CASE tool is given by B. Rousseau [11] of CERN. He pointed out the following problems in the currently available CASE tools: 1) the mapping between method- ology and language is far to simple; 2) there is no run time support for the man- agement of the association, and; 3) they are not configurable. To overcome these problem the project called OPLA (Object Programming LAboratory) was started. The feature of the project are: 1) to- ward a seamless 00 development envi- ronment that let a programmer focus on abstractions; 2) well designed mapping between various 00 methodologies and languages; 3) open architecture, and; 4) automatic code generation. Once these are realized, the consistency within the design-to-coding loop is guaranteed, and programmers can focus on abstractions rather than on implementation details. A prototype of the configurable code generation system is available. It maps the OMT to C++ language. C. Maidantchik [12] of CERN re- ported a hypertext tool called HyperDev. This tool integrates various information from the different phases of a software development into a hypertext. For ex- ample, in a software development under OMT, a HyperDev user writes problem statements by filling templates the tool provides. Then the user generates ob- ject models, dynamical models and func- tional models by hand or by using 0 M- Tool. Then the user integrates the re- sults into HyperDev. In the implemen- tation phase, the user creates codes and these are again integrated into HyperDev. During the maintenance phase, these doc- uments are updated. Thus the tool can be used to manage the software through its life cycle. HyperDev is constructed using the N CSA Mosaic tool. This tool is very in- teresting and useful for those who are de- veloping a software system with a soft- ware methodology. LANGUAGES Like methodologies, topics of pro- gramming languages usually trigger se- rious debates in our community. This is symbolically shown in the title of an- other session: "Language Wars - What Will It Be?". In the present session, how- ever, there was no such wars nor debates. The major reason is that all speakers only talked about C++. However, no debate does not mean our community has found a definite answer to the choice of pro- gram language. We all well know that FORTRAN, whatever it evolves in future, is the mother tongue for most physicists. We foresee serious disputes especially in future HEP experiment groups. Here one thing we have to remember is that, al- though a methodology does not necessary specify a particular language, an 00 lan- guage is a natural choice once the 00 ap- proach is introduced into a software de- sign. There were three talks [13, 14, 15] on the usage of C++ in on-line software sys- tems. All speakers emphasized the merit 35 of C++. For off-line application, there were again three talks [16, 17,_ 18] on C++. They told that there are numer- ous merits to use this language in the data analysis stage of HEP experiments. The participants of the present session wit- nessed the appearance of a young gener- ation, to whom the FORTRAN language is a disgusting one [17]. The following are digests of all contri- butions belong to languages. Languages in On-line Software D. R. Myers [13] of CERN de- scribed the advantage and problems en- countered in using OOP in the control and data-acquisition system for the up- graded CERN neutrino beam-line. The system consists of a HP workstation run- ning the slow-control package (Factory- Link) and two front-end PCs running LynxOS for beam control and flux moni- tor. The code in the PCs has been writ- ten in an 00 fashion using GNU C++. The system has classes which can be cat- egorized into the following three groups: 1) Specialized classes which correspond to actual beam-line components; 2) Classes which model CAMAC branches, creates, etc., and; 3) Classes which also deal with the computer interface but which model the functionality at an abstract level. The advantage of using the C++ in the system is that it allows to map phys- ical components in the system (magnets, CAMAC modules, etc.) to objects in the software. F. Riccardi [14] of CERN reported a project to construct an object-oriented environment aimed to build distributed real time DAQ systems. This environ- mentis called REM OS. In modern control and DAQ systems, various inter-process communications of variety of bandwidths are included. Because of this, a wise bus bandwidth administration is needed to achieve high performance. The project introduced a distributed operating system. paradigm, enforced in the system by object-oriented approach; encapsulating low level details of inter- process communication. The heart of the DAQ system is the REMOS server which provides a semaphore/ queue like synchronization facility and allocation of distributed memory resources, user pro- cess communication by RPC, etc., com- pletely unaware of its actual location. To design/implement this system, the 00 approach with C++ was employed. Observed advantages of the 00 approach are: 1) easy to build a hierarchy of com- munication classes; 2) adding more con- trol to them, and; 3) higher reliability of the system. They also measured the sys- tem performance. G. Oleynik [15] of Fermilab pre- sented on dbs, which stands for DART Bootstrapping Services. DART is the data acquisition system for experiments at Fermilab in future. dbs is the first com- ponent of run-control for this system. It is a rlogin session multiplexer, which al- lows a user, running a single program, to start up any number of remote login ses- sions, feed shell commands to them, and collect the output from the sessions into a single (or multiple) logfiles. The DART project uses C++. Sig- nificant productivity gains were attained by using a low cost commercial class li- brary, tools.h++ from Rogue Wave, using their hash dictionary class to map session name. 36 Languages in Off-line Software N. Katayama [16] of Cornell Univer- sity gave a talk on the track reconstruc- tion program in C++ for the CLEO II ver- tex detector. This is the first practical application of OOP to the event recon- struction code. In the talk, he explained in detail the classes he and his collab~ra tor designed in the program. He also re- marked the spiral approach he employed for the design of the program. Various features of C++, such as classes and derived classes, constructor and destructor, operator overloading, etc. produce clean and compact codes. He concludes: 1) C++ can be used in a rapid prototyping; 2) Coding is simpler and one faces a fewer bugs; 3) C++ is probably usable for solving real problems in HEP; 4) Designing, implementing and testing classes is an iterative process, and:. 5) Once a prototyping is done, one should walk through the current implementa- tion thoroughly. Unlike FORTRAN pro- grams, one can hope to do this and will end up with the code that can be main- tained by other people. S. Misawa [17] of University of Cali- fornia reported the design and implemen- tation of the object-oriented software sys- tem for the fixed target experiment at Fermilab E771. Goals of the project are: 1) to utilize 00 to create an easy to use system, and; 2) to use 00 to simplify the task of developing an entire analysis sys- tem to the point of allowing a single per- son to implement and understand the sys- tem. The system consists of two major sub- systems: "event delivery" and "event analysis". He designed various classes as components for these two systems. The features of these system compo- nents are: 1) "LEGO" or building block like functionality; 2) simple object be- havior; 3) no common blocks or global variables, and; 4) no initialization rou- tines. Unfortunately, the system archi- tecture was restricted by requirement to be compatible with FORTRAN system. He considers that a significant code sim- plification/reduction is probably achieved if the FORTRAN system compatibility is sacrificed. B. Nolty [18] of Caltech reported the project of how to make C++ attractive to FORTRAN users. FARFALLA is a C++ data-management/input- output package he and his collaborator developed. They designed FARFALLA so that FORTRAN people need not be bothered by the lan- guage barrier. Steps they took for the design are; 1) retaining a procedural programming style; 2) protecting users from C++ tech- nicalities (cast, new); 3) spending more time on documentation than coding, and; 4) assuming the reader has no knowledge of Cor C++. The results obtained by this project are: 1) some people ignored it; 2) some dabbled and lost interest, and; 3) a hand- ful of people adopted it and are using it. People who belong to the third category are those who have only written FOR- TRAN before. They were quite impressed by the speed and ease with which FOR- TRAN programmers begun to do analysis in C++ with their package. The reporter emphasized that, to make FORTRAN people attractive to C++, it is important not to make argu- ments about efficiency, nor to try to in- fluence policy, but to make tools in C++ easy to understand. 37 GENRIC TOOLS The shift of the HEP computing en- vironment from the main frame to work- stations demands physicists to use new tools for the daily activities of their re- searches. The tools reported in the ses- sions are for management of programs, codes and data [20, 21]. Tools for code optimization are also presented [19]. The most of the tools discussed are from the UNIX world. These are commonly used in the UNIX community, though they are relatively new to HEP. There is a barrier for many physicists to switch to these new tools, because old tools are still enough to work with. Also the environment of mixed flavors of workstations leads to a hard life for those who want to trans- port programs and data among various machines [22]. Other topics discussed are tools in the distributed computing envi- ronment [23, 24]. The following are digests of all contri- butions belong to generic tools. Code Optimization Tools S. Yarp [19] of CERN gave a status report on the project to study code op- timization of various HEP off-line soft- ware programs (simulation, reconstruc- tion, analysis, etc.) which run in CERN's CORE environment. Major reasons he is interested in code optimization are: 1) faster processor will come, but many be they are not quickly enough; 2) such pro- cessors may be more sensitive to program structure, and; 3) even multi-processor systems and MPPs may be caught by Amdhal's law, etc. The way he studies code optimization is to inspect codes and monitor code exe- cutions by using "prof", "pixie" on vari- ous machines. Typical behaviors he ob- served in REP programs like GEANT, Aleph reconstruction program are; 1) CPU-time distribution: very fiat - no hot spot; 2) ZEBRA forces frequent calcula- tion of indexes, and; 3) Inlining is no uni- versal panacea. Program/Data Management Tools E. Berman [20] of Fermilab reported about the distributed development envi- ronment for SDSS software. This is the only contribution from non-HEP fields. The SDSS is an international collabora- tion to survey the sky and make a 3- dimensional map of the Universe. The project runs from 1995 through 2000. They need to have a common devel- opment environment, because the col- laboration is wide spread geographically and many people at different institutions write the SDSS data processing and anal- ysis codes. To establish this environ- ment, they use tools which are common in the Unix world: 1) RCVS for source code management; 2) UPS for configura- tion management; 3) UPR for distribu- tion management, 4) GCC for C- com- piler; 5) WWW for document manage- ment; 6) Tel for data processing software, and; 7) Tk for G UI. They have had positive experience with the all tools and each is in daily used by collaboration. The reporter remarked that the reason the experiment could eas- ily adopted new tools and methodologies is that they don't need to worry about a lot of history and existing infrastructure as the REP community has. In his second contribution to the ses- sion, N. Katayama [21] of Cornell Uni- versity reported his experience of moving 38 from CMZ to CVS for maintaining CLEO software libraries. This shift is motivated by the fact that CMZ doesn't interface well with tools in the UNIX world (make, emacs, etc.). He concluded that: 1) CVS, gmake, cpp and autoconf together make a nice code development and/or library mainte- nance environment for a large collabora- tion; 2) the new system is simpler and more reliable; 3) it is in transit now and to expect to complete moving by the fall; 4) car2cvs provides a means to convert from the old to the new system; 5) for those who like to continue using CMZ, car2cvs will also allow them to submit li- brary changes in CAR format files, and; 6) on a few (non-UNIX) platforms where CVS, gmake or autoconf are not sup- ported, cross compilation can be used. M. Marquina [22] of CERN, in his second talk, explained the complex world of migrating codes and data, which is con- sist of: 1) mixed environment of 32-bit and 64-bit machines; 2) big-endian and little -endian, and: 3) various floating point formats (IBM, VAX, IEEE). He concluded that: 1) FORTRAN source may be made 64-bit compatible on machines providing 64-bit true emula- tion (CONVEX, SUN), and on machines providing "correct" floating point 64-bit emulation (IBM now, DEC+HP coming); 2) recommended to move all binary data support to 32-bit IEEE (big-endian + little-endian), and; 3) request compiler implementors to provide adequate data transmission in interlanguage calls. Tools for Distributed Environments P. Avery [23] of University of Florida presented a project called UFMulti. The goal of the project is to speed up a sin- gle HEP application by distributing it across many CPUs with as little user code as possible. Features of the project are: 1) CPU and I/0 are parallelized; 2) similar to Fermilab CPS, but different data passing/ communications paradigms; 3) explicit data transfer done with direct socket calls; 4) other interprocess com- munications done with RCP, and; 5) as- sume standard UNIX workstations and network protocols. UFMulti provides a high level toolkit to realize the above features. The most important structural element in UFMulit is NetQueue which provides a buffered data path between reading and writing tasks. He showed the results of tests of NetQueue performance. He also showed the results of tests using real analysis code from the CLEO experiment. The result showed that it can get large speedup fac- tors, depending on amount of CPU vs. I/0 per event. T. Finnern [24] of DESY told about his experience of installing huge number of X- terminals in DESY: now the number is about 500 and it will be soon 600. His talk included administrative issues as well as the user's perspective. He also focused his talk on security aspects, load balanc- ing, software management and conductiv- ity between different systems. CONCLUSION We learned from the session that object-oriented methodologies are infil- trating into people who design on-line and off-line software. Those who are using these methodologies are: 1) ZEUS ex- pert system designers; 2) DELPHI on- line event display designers; 3) LHC on- 39 line level 2 trigger designers; 4) GEANT- CAD interface designers, and; 5) LHC and ex-SSC off-line software designers. The methodologies we heard through the session are OMT, Fusion, Objeteering, VDM++ and Booch. Especially, for the designers of the HERA one-line software systems, these methodologies are practical and indis- pensable ones. Comparing to on-line, us- age of 00 methodologies in off-line appli- cations is still in its early stage. However, serious studies are ongoing. There have been a lot of debates since the SA/SD era whether software method- ologies really bring a systematic approach for the development of REP software sys- tems. What is different from the SA/SD era and now is that a lot of CASE tools which have direct couplings to method- ologi~s are appearing. These are HEP originated tools and also ones from ven- dors. These may potentially bring a com- pletely different way of programming to our community. However, what we have to remember here is that just using a tool does not give a quality software [3]. Concerning new program languages, on-line and off-:-line people both empha- sized advantages of using C++ in their software developments. There was no ar- gument to against to them. The partici- pants heard 00 jargon everywhere in the session. However, what we have to re- member is that most physicists are using FORTRAN in their daily physics activi- ties and it is their native language. REFERENCES 1. R. K. Bock, "A Summary of the Oxford Conference on Computing in High Energy Physics", CHEP89, Ox- ford, Conference Proceedings, Comp. Phys. Comm. 57 (1989) 1. 2. J. Knobloch, "Reality of Software En- gineering in High Energy Physics", CHEP91, Tsukuba, Conference Pro- ceedings., Universal Academy Press, Tokyo. 3. S. Loken, "Software Engineering: What do· experiments need?", CHEP92, Anecy, Conference Proceedings, CERN 92-07. 4. M. Flasinski, et al, "Use of Object- Oriented Software Methodology to De- sign of Expert/Control Systems for HEP: the ZEUS Expert System Expe- rience", these proceedings. 5. S. Du and J. Laugier, "Object Structure Modelling in the DELPHI Online Event Display", these proceedings. 6. W. Lourens, et al., "The formal develop- ment method VDM ++ and its applica- tion to second level trigger systems for LHC experiments", these proceedings. 7. A. Schaffer, et al., "Object Oriented Approach for Software Development for LHC experiments", these proceedings. 8. M. Maquina, et al., "An Object-oriented Technique for Detector Models Used by a Simulation Program", these proceed- ings. 9. K.. Amako, et al., "Object Oriented Analysis and Design of GEANT Based Detector Simulator", these proceedings. 10. S. Fisher and D.J. Candlin, "Omo - A Tk/tcl based object modelling tool to support Eiffel", these proceedings. 11. B. Rousseau et al., "A Configurable Code Generator for 00 Methodologies", these proceedings. 12. C. Maidantchik and M Isaac, "Hyper- Dev: Hypertext Tool to Support 0-0 Software Development", these proceed- ings. 40 13. D.R. Myers, et al., "Use of Object- Oriented Techniques in Beam-Line Con- trol System", these proceedings. 14. F. Riccardi, et al., "REMOS: A Portable Object Oriented Environment for Mul- tiprocessor Real Time Applications", these proceedings. 15. G. Oleynik, et al., "dbs·- DART Boot- strapping Services", these proceedings. 16. N. Katayama and M. Smyth, "A Tracker in C++", these proceedings. 17. S. Misawa, "The E771 Object Oriented Software System", these proceedings. 18. B. Nolty and C. Walter, "FARFALLA: C++ Data Management That Event FORTRAN People Can Love", these proceedings. 19. S. Jarp, "Quo Vadis Code Optimisation in HEP??", these proceedings. 20. E. Berman,et al., "The Distributed De- velopment Environment for SDSS Soft- ware", these proceedings. 21. N. Katayama, "Maintaining Software Libraries at CLEO - Moving from CMZ to CVS", these proceedings. 22. M. Marquina, "Towards a 64-bit Version of Scientific Libraries", these proceed- ings. 23. P. Avery, et al., "The UFMulti Project", these proceedings. 24. T. Finnern, "Experience at DESY- R2", these proceedings. Experience building object-oriented systems* Alan Breakstone University of Hawaii, Honolulu, HI 96822 USA ABSTRACT I describe the experience gained by the group of developers of the Gismo project, a relatively large software package to do detector simulation and event reconstruction using object-oriented techniques. 1. INTRODUCTION Most software for high energy physics is written in FORTRAN, a procedural computer language. Over the past several years com- puter scientists have been developing lan- guages which use a different way of addressing problems in computation using object-oriented techniques. A group of phys- icists and progranuners began a prototype project at CERN during the summer of 1990 to study if detector simulation and particle transport could benefit from object-oriented design [1]. This project was christened Gis- mo, which stands for Graphical Interface for Simulation and Monte Carlo with Objects. The success of this prototype project, written using the Objective-C language for NeXT workstations, culminated in a larger group of physicists and programmers becoming inter- ested in expanding the project to be a more general and useful tool, not only for high en- ergy physics, but also for other fields of phys- ics and for medical applications where radiation transport is simulated, such as radi- ation dose therapy and positron emission to- mography. Two workshops have been held, at SLAC in July, 1991, and at the University of Florida in January, 1992 to evaluate the pro- totype and redesign Gismo. A list of mem- bers of the Gismo collaboration is given in Table 1. *Work supported by Department of Energy grant number DE-FG 03-94ER40833. 41 Table 1 : Members of the Gismo Collaboration Authors of Code and/or Code System: Bill Atwood SLAC Alan Breakstone David Britton Toby Burnett Graham Cross David Myers Paul Rensing Gary Word University of Hawaii McGill University University of Washington McGill University CERN SLAC/CERN Rutgers/SSe Lab/Citicorp Consultants, Workshop Participants, and Users: Ejaz Ahmad University of Florida Dave Aston SLAC Christian Arnault Orsay Paul Avery University ofFlorida Alex Bielajew Inst. of Radiation Standards Chandra Chegirddy University of Florida Ruediger Gross- Hardt University of Bonn Walter Innes SLAC Paul Kunz SLAC Gary McGrath Univ. of California, Irvine Paolo Palazzi CERN Tom Pavel SLAC Ernest Prabhakar Cal tech Cam Sanders Art Snyder Mick Storr Dennis Weygand Saul Youssef University of Wisconsin SLAC CERN Brookhaven National Lab Aorida State University The goals of the project are to allow detector simulation and event reconstruction in one program, reusing many of the same objects, to have a platform-independent kernel written in C++, to run the kernel on Unix platforms, to have an application with a Graphical User Interface (GUI) for rapid prototyping of sim- ple detector elements, producing one-event displays, and visual methods for debugging the kernel, and to have user "hooks" for cus- tornization, mainly using the inheritance fea- ture of object-oriented languages. By early 1993 the kernel and graphical user interface (for NeXT workstations) were well enough developed for serious simulations, mostly by Gismo developers. Gismo was first released for general use in August, 1993. The most recent version as of this writing is the 0.4.1 version, installed on March 22, 1994 in the anonymous ftp area of SLAC. 2. EXAMPLES FROM GISMO To better illustrate the Gismo project, I have selected a few examples of simulations done for various projects. Gismo allows one to de- fine complex detectors, such as a prototype of the SLAC B-factocy detector shown in Figure 1. One can create particles and propagate them through the detector. Particles can inter- act in a continuous way with ionization ener- gy loss and multiple Coulomb scattering or in a discrete way with electromagnetic interac- tions using EGS4 [2], illustrated in Figure 2, and hadronic interactions using Gheisha [3], illustrated in Figure 3. Gismo also can han- Figure 1. A SLAC B-factory "long barrel" detector. The four major components are labeled. Not shown but in the simulation is the beryllium beam pipe. The detector is immersed in a 1 T magnetic field along the beam axis. .. 42 Figure 2. The electromagnetic shower pro- duced by a 1 Ge V photon incident on a Csl block in the "long barrel" B-factory detector. The shower cutoff energy is I MeV for all particles. Photons are shown in white, elec- trons and positrons in black. The calorimeter response is also shown. Figure 3. The hadronic shower produced by a I 0 Ge V 1t+ incident on a uranium-liquid argon sampling calorimeter in a I T magnetic field. Neutrals (mostly neutrons) are shown in white, charged particles in black. The calo- rimeter response is indicated by the black towers. 43 die particle decays, such as the Y(4s) decay shown in Figure 4. Gismo can also create and propagate optical photons. It can simulate detector responses, as is shown in the figures. It also can output Hippo [4] ntuples for histogramming purpos- es. Currently the Gismo kernel consists of nearly 50,000 lines of code. It is being used for sev- Figure 4. End and side views of an Y(4s) de- cay in a variant of the "long barrel" B-factory detector. The response of the various detector elements is shown in the end view only. eral projects, including the Ganuna-ray Large Area Silicon Telescope (GLAST) project by Bill Atwood, the GEM calorimeter by Toby Burnett, the BaBar B-Factory detector by David Aston and Gary McGrath, a scintillat- ing fiber detector by Ruediger Gross-Hardt, beam-line elements by Nick Walker, and Beijing Spectrometer (BES) time-of-flight counters (using optical photons) and the BELLE B-factory detector by this author. 3. USE OF OOP IN GISMO An example of the way in which Gismo uses object-oriented programming techniques is illustrated by the distanceToLeave function in the Volume class, shown below. This code is used to calculate the intersections of trajecto- ries with three-dimensional geometrical ob- jects. Each Volume .. has a" list of Surfaces which define it. The Surface class inherits from a list link class so its subclasses can be put in lists. Note that both Volume and Sur- face are virtual classes since the user only in- stantiates their subclasses. The code loops through each Surface in the list to find the closest one. Polymorphism is used in several places. The appropriate dis- tanceToLeaveSurface function in the trajecto- ry classes (Ray and Helix) are called depending on whether the reference to the ob- ject r is a Ray or Helix. In these trajectory classes, the distanceToLeaveSurface function calls the appropriate distanceAlongRay or distanceAlongHelix functions in the Surface subclasses, depending on whether the Surface is a Plane, Cylinder, etc. They in tum use function overloading to find out if a potential intersection point is within the boundary of fi- nite-sized figures (such as Rectangles) which bound a Volume. This use of function overloading and the vir- tual function table of C++ to implement poly- morphism is used extensively in Gismo. Note that one can add new types of trajectories or 44 double Volume::distanceToLeave( const Ray& r, ThreeVec& p, const Surface *&sf) const { II Distance along the Ray r or any of its II derived classes to the nearest Surface to //leave the Volume. II Gives the point p of intercept and a pointer II to the Surface which is hit. //If there is no intersection, the Surface II pointer is set to 0. II This point is not guaranteed to be inside II (or outside) the Volume. doubled= 0.0, t = FLT_MAX; ThreeVec temp ( t, t, t ); p =temp; sf=O; Surface *s = (Surface *)surface_list->first(); II Loop over each Surface in Volume's list, II find the distance to that Surface, and pick II the smallest positive (or zero) distance. II The distanceToLeaveSurface member II function of Ray will make sure that the Ray II or its derived class is leaving the Surface II (defined by the direction of the normal to II the Surface) at the point of intersection. } while ( s) { } d = r.distanceToLeaveSurface( s, temp); if ( ( t > d ) && ( d >= 0.0 )) { t=d; } p =temp; sf=s; s =(Surface *)s->next(); return t; new types of surfaces without modifying this code, illustrating the reusability of object-ori- ented code. 4. LESSONS LEARNED In designing and implementing the Gismo project, the developers learned a number of lessons concerning object-oriented design and implementation using the C++ language. We found that the spiral design cycle is the appropriate way to deal with a project of this size and complexity. The main difficulty is to get the correct abstraction. Often this is not realized at the design stage and problems only show up during implementation and testing of the code. Thus it made sense to start writing and testing prototype code early in the design cycle. We often rewrote vast sections of the code, but found that this was relatively easy to do due to the good encapsulation provided by object-oriented design. Another lesson we learned was to divide the project into manageable pieces with each piece as independent of the others as possible. This was particularly important for this project since the developers are geographical- ly widely scattered. Since we are a small group, communication was rather easy. We avoided the division between code designers and code implementors which is often done in industry. We found that C++ is a good language to use for an object-oriented program. The compil- ers catch many potential bugs at compile time. It was easy to implement object-orient- ed features such as inheritance and polymor- phism. One problem for porting the code is the lack of an ANSI standard for C++. This hopefully will be resolved in the not too dis- tant future. Early in the design phase we studied various base class libraries for suitability for Gismo. One serious constraint, both for base class li- braries and for design tools, was cost. In par- ticular we did not want to base Gismo on any class library which would require Gismo us- ers to buy some software license from a com- mercial vendor, since this would severely limit the number of physicists interested in using Gismo. The developers also were very restricted in the amount of money we could spend on design tools, so we did not base our 45 designs on the use of any commercial prod- uct. One point we found crucial was that one needs a mak:efile system as well as the source code. A couple of the Gismo developers spent most of their efforts on this. We eventually settled on a mak:efile scheme based on imak:e from the XII consortium. From the very beginning we have stressed the toolkit aspect of Gismo. Our users (mostly particle physicists) are very sophisticated. They will want to customize the simulations to their detectors and add functionality for things which the developers could not antici- pate. In addition users may want only parts of Gismo, so should be able to easily choose what they want. We learned that the key to object-oriented de- sign is a good interface, both for users and, within the project, for developers. The imple- mentation can easily change without affect- ing users. One must spend a lot of time to develop an interface which will not change. This is particularly true for constructors. For the Gismo project it was perhaps fortunate that we did not develop a large user base this early in its development, since a large user base severely constrains the developers by forcing them to freeze the interface for the us- ers, perhaps before they've found the correct abstraction for the problem at hand. 5. CURRENT STATUS AND FUTURE The Gismo kernel is available via anonymous ftp from SLAC (ftp ftp.slac.stanford.edu, look in pub/sources). The current production version is 0.4.1. One can compile it using GNU gee version 2.3.I or later. One needs XliR4 or later for the imak:e mak:efile sys- tem. Along with the kernel is a sample test job called GismoTest which uses Hippo. Li- braries based on this version have been in- stalled at SLAC for three platforms: IBM RS/ 6000 AIX, NeXT, and Sun4 workstations. This author has also ported Gismo to a DEC- Station with Ultrix at the University of Ha- waii. The Gismo project is now beginning to attract real users, not just the developers. In the future Gismo plans to use the freely available CLHEP base class library for lists, vectors, etc. We will continue our work on event and track reconstruction. There are a number of planned improvements to physics processes, such as a better treatment of multi- ple Coulomb scattering and adding non-con- stant magnetic fields. We want to provide an interface to event generators, such as MC++ [5]. There is much work to be done on detec- tor and event 110. The first step in this direc- tion has been to provide capability to read generated events in STDHEP format. Cur- rently there is only a NeXT GUI. We would like to port this to X-windows platforms. In the more distant future we would like to im- prove the Gismo graphics to include 3-dimen- sional rendering. Perhaps someday Gismo will have some sort of CAD interface. Also the documentation is woefully inadequate. Hopefully users can help with many of these projects, since the developers' time is very limited. 6. CONCLUSIONS Gismo is a large and successful software project based on object -oriented program- ming techniques. It is in a continual state of redesign and refinement. The Gismo develop- ers have found that the spiral design model is the correct one for this task. Based on our ex- perience, we discourage a top-down approach to program design for projects of this magni- tude. We are very much encouraged by in- creased interest in object -oriented software by the high energy physics community. REFERENCES: [1] W. B. Atwood, et al., International Journal of Mod- em Physics C 3, 459 (1992). 46 [2] W. R. Nelson, et al., SLAC-0265 (1985). [3] R. Brun, et al., CERN-DD/EE/84-1 (1987). More recently, see GEANT User's Guide, GEANT 3.15, Re- vised July 13, 1992. [4] Michael F. Gravina, et al., SLAC-PUB-5921 (1992). [5] L. Lonnblad and A. Nilsson, Computer Physics Communications 71, 1 (1992). Session 1 Triggering, Data Acquisition, Online, and Control Systems A BIT-SERIAL FIRST-LEVEL CALORIMETER TRIGGER FOR LHC DETECTORS C. Bohm, X. Zhao, G. Appelquist, M. Engstrom S. Hellman, S-0. Holmgren, E. Johansson, N. Yamdagni Department of Physics, University of Stockholm, S-113 85 Stockholm, Sweden ABSTRACT A first-level calorimeter trigger design, implemented as a farm of local bit- serial systolic arrays, is presented. The massive bit-serial operation can achieve higher processing throughput and more compact designs than conventional bit-parallel data representation. The construction is based on high speed optical fiber data transmissions, Application ~pecific Inte~rated Circuits (ASICs) and multi-chip modules (MCMs) packagmg technologies. INTRODUCTION The primary task for frrst level triggers in high energy physics detectors is to reduce the large flow of primary data by eliminating clearly uninteresting events. This is especially important for detectors at the Large Hadron Collider (LHC) where the size of the data rate is without precedence. In this case the reduction will be achieved by continuously monitoring global but low resolution information from the calorimeter and muon subdetectors in search for signals that are characteristic for desired events. Reduction rates between 10 3 and 1 ()4 are anticipated in the frrst level. If high granularity calorimeter data are merged into larger 0.1 x0.1 trigger cells measured in the T}-<p space, i.e. in pseudo rapidity (roughly axial) and azimuthal angle, 60x60 calorimeter trigger cells will cover the calorimeter surface within ±3 units of fl. If the proton bunch collision frequency is 40 MHz, data from 7200 calorimeter trigger cells will arrive every 25 ns. The additional factor 2 is picked up because two calorimeters are involved, a hadron and an electro- magnetic calorimeter, one outside the other. The large number of high data rate inputs suggests using optical fibers rather than coaxial cables for transferring trigger data from the detector to the trigger processor. The trigger processor is designed to identify electrons by looking for isolated energy depositions (clusters) in the electromagnetic calorimeter which have a small energy leakage into the surrounding hadron calorimeter. It will use cluster finding algorithms [1] to identify jets and compute missing transverse energy to 49 deduce the presence of neutrinos. These operations are best performed by pipelined processing of all trigger cells in parallel. The electron identification is achieved by first forming trigger sums with neighbours to the right and neighbours below. The maximum of these two sums is then used to estimate the energy of an assumed particle that has deposited most of its momentum in the given cell. The isolation is established by making certain that the particle energy is much larger than the total energy in an environment not including the primary deposition. The leakage is treated similarly, by requiring that the energy deposition into the hadron calorimeter should be sufficiently small The chosen algorithm demands access to a 4x4 trigger cell environment from both calorimeters for each trigger cell evaluation. Possible jet-algorithms can be based on the merging of blocks of say 3x3 trigger cells into jet super cells, counting the number of clusters above a certain threshold. Other algorithms may be based on the addition of all trigger cells within 4x4 blocks to obtain a sliding window which will move over the entire surface, counting the number of local maxima. An additional purpose for the first level trigger is to provide the second level trigger with coordinates identifying areas of special interest within data from selected events. This is to allow the second level trigger to concentrate on limited regions of the data which may then be examined in full detail. This process will lead to a further elimination of about 99% of the data remaining from level one. A BIT-SERIAL IMPLEMENTATION OF A FIRST -LEVEL TRIGGER PROCESSOR The structure of the trigger algorithms have strong implications on the choice of processing architecture. The fact that the calcu_lation performed for each trigger cell reqmres data from an environment implies that if all trigger cells are shared among a limited number of computational units, these units will have to exchange boundary information to have access to suf!lcient data to treat trigger cells along their borders. The fraction of information that will have to be exchanged decreases wi~h increased size of the processing umts. Thus the larger the computational unit, the less interconnections between the units. Since the natural choice is to use ASICs (Application Specific Integrated Circuits) to implement calculation units, the number of interconnections will also be bounded from above by the maximum number of inputs/output connections allowed in a package using today's technology. The information exchange between the computational units can also be regarded as a splitting (fan-out) of the data paths from border trigger cells so that they can reach several units. The advantage of large processing units is then demonstrated by the fact that the average fan-out required will decrease with increased unit size Comp. Input 110-efficiency Av. fan- unit size data size (output/input) out lXl 4x4 6% 16 4X4 7x7 33% 3.1 6X6 9x9 44% 2.3 Table showing the advantage oflarge computational units Bit-s~rial digital signal processing t~chD:tques are characterized by Slmphctty, compactness, efficiency and short latencies, especially when performing operations like addition. The simplicity allows higher clock rates than is possible_ in parallel designs (no problems wtth carry propagation). The 50 fact that the trigger algorithms mostly consist ~f simple additions followed by compansons, together with the ~hroughput and latency requirements, Imply that choosing bit-serial architec- tures wherever possible is advantageous. With algorithms based on 4x4 environments a single bit-serial trigger processor for 6x6 trigger cells will require 162 inputs (9x9x2). This number is l~ge but acceptable. 162x8, however, as IS required by a more strait forward bit-:pa~alle~ processor, is clearly not reahstlc With present technology. Time multiplexing will help in this case, though. Large computational unit are also pref~rable when evaluating and merging partial results from each point operation. A larger unit implies that less merging needs to be performed outside the unit. A tentative design was made on basis of above considerations but with the earlier assumed bunch crossing frequency 67 MHz [3]. A clock rate of 270 MHz was ~hen considered to bit-serially process mput data with 8 bits precision. The feasibility of reaching and exceeding such performances with CMOS circuits using available technology has been demonstrated in many applications [4]. However, the 4-fold increased clock rate is not sufficient to reach the required processing rate in one bit-serial processor alone. The residual increase is therefore achieved by relying on the combined capacity of a farm of 3 bit-serial processors. Even with this 3-fold increase in total chip area the net surface gain using bit-serial operations is considerable. In a later modified design, adapted to the presently stated bunch crossing frequency value of 40 MHz [5], the possibility of entering the trigger cell data via optical fibers directly into a Multi Chip Module (MCM) was considered. In ~his design the farm concept was Implemented on the MCM level with a small ASIC farm · (with still fewer me_mb~rs e.g. 2) to implement processing umts m MCMs. Each operating with clock rate of 320 MHz. However, further increasing the clock rate to 400 MHz removes the need for a farm entirely. From E/M and Hadron Calorimeter Front-ends Partition into 6x6 exclusive environments Dress with neighbouring data. Form 9x9 non-excl. u V5 <( Cl> 3+7+3 Program- mable limits ""iiiiiiiiU \;;;~ ~~6 c: 0 .E .... co <250ns @200MHz <400ns @200MHz Programmable Classifications into 8 cathegories Classification histogram 0 .0 Cl> c: 0 c: 0 E Cl> ... en ~ ~ Cl> ..c: 1- Figure I. The electron detection and Ey evaluation computation flow. All blocks except look-up table are based on bit-serial implementation. The designs have been described and simulated down to a fairly detailed Register- Transfer level using VHDL. The computation flow of the electron identification and transverse energy evaluation is shown in Fig 1. Here 51 mutually exclusive 6x6 environments are expanded by sharing information from neighbours (into 9x9), different sums are then formed for each trigger cell and classified according to value. The total classification of all energies are expressed in a 7 -bit code, one for each trigger cell. This code is then translated via a look-up table into one of 8 categories (corresponding to 8 different physics features). The number of occurrences of each feature are counted for each 6x6 environment (i.e. each ASIC), expressed in a bit-serial form then merged via bit- serial addition on the board level (about 10 ASICs) and finally on the full system level. The result is reported to the central first level trigger processor. The x and y components of the transverse energy are also evaluated for all trigger cells belonging to the ASIC and summed. This involves a bit-serial multiplication with sine <1> and cosine <1'· The two results are then sent out in bit- serial form as well, to allow easy merger with data from other units. The final result is an estimator of the missing transverse energy. The possibility to implement the suggested design depends on the feasibility of critical implementation details. An important task is therefore to resolve these uncertainties using references to literature or data from experiments. Thus will, for example, the feasibility of the required large number of fiber inputs directly into a MCM ( 162 fibers at .4 Mb/s) be studied in a demonstrator. Preliminary results are encouraging. The performance of high speed bit -serial arithmetic operations and interference problems caused by the massive high-speed processing on the chip will also be studied experimentally. CONCLUSIONS The suggested bit-serial first-level calorimeter trigger will achieve high throughput, compactness and short latencies. The major part of the computations will be performed in one ASIC minimizing the need for connectors, thus allowing high reliability. Data from different ASICs and different modules are merged via a simple bit- serial adder tree ASIC. The design also allows expansion in different directions to improve the trigger efficiency. ACKNOWLEDGMENTS The authors would like to express their gratitude for valuable contributions concerning high speed electronic circuits 52 from C. Svensson, H. Johansson and J. Yuan at Linkoping University. P. Bodo, H. Hentzell, M. Tuber have provided expertize on MCMs. U. Westergren, M. Mohktari from Industrial Microelec- tronics Center in Stockholm contributed with expertize on high speed electronics and optocommunication. The authors would also like to acknowledge many useful suggestions from the members of the RD-27 collaboration, within which the LHC first-level trigger research and development project has been carried out. REFERENCES 1. N.Ellis, J.Garvey, CERN 90-10, vol3, p. 80 ( 1990). 2. RD-27 Status Report, CERNIDRDC 93-32, (1993). 3. C. Bohm et. al. CERN RD-27 note 6, (1993). 4. J. Yuan and C. Svensson, IEEE Spectrum, p. 52 (Feb. 1991 ). 5. C. Bohm et. al. A bit-serial first-level calorimeter trigger for an LHC detector, accepted for publication in IEEE Trans. Nucl. Sci. Results of On-Line Tests of the ENABLE Prototype, a 2nd Level Trigger Processor for the TRT of ATLAS!LHC~ K.-H. Noffzl), R. Zozl,2), A. Kugell), F. Klefenzl), R. Mannerl,2) 1) Lehrstuhl fiir Infonnatik V, Universitat Mannheim, Mannheim, Gennany 2) Interdisziplinares Zentrum fiir Wissenschaftliches Rechnen, Universitat Heidelberg, Heidelberg Abstract The Enable Machine is a systolic 2nd level trigger processor for the transition radiation tracker (TRT) of ATLAS/LHC. The task of the processor is to find the best candidate for a lepton track in a high background of pions according to the EAST benchmark algorithm [2] in less than 10 jls. As described earlier [1, 2] this is done in three steps. First all interesting tracks are histogrammed by accumulating for each track the coincidences between the track mask and the region-of-interest (Roi). Next the best defined track is identified. Eventually this track is classified as e or 1t. A prototype has been developed and tested within the EAST/RD-11 collaboration at CERN. It operates at 50 MHz and finds up to 400 tracks in less than 10 jls. It is assembled of an interface board and one or more histogrammer boards. The modular design makes the Enable Machine easily scalable. The histogrammer units are systolic arrays consisting of a matrix of 36 field programmable gate arrays. Through this it is possible to optimize the trigger algorithm, to adapt it to a changed detec- tor setup, and even to implement completely new algorithms. For the beam tests in autumn 1993 at CERN the overall functionality within the detector environment could be shown. We were able to link successfully the Enable prototype to the detector raw data stream as well as to the data acquisition system. 1. Introduction Second level trigger algorithms often are quite similar. Normally they require moderately complex pattern recognition combined with a very ~ This work has been supported by the Gennan Minister for Research and Technology under grant 056MA52P, by the Gesellschaft fiir Schwer- ionenforschung Darmstadt (GSI) under grant HD SpeC, and by the RD-11- and RD-6 collabora- tions at CERN 53 high data rate while they show a high degree of par- allelism. Systolic arrays consisting of a matrix of field programmable gate arrays (FPGAs) are well suited to such problems. Each chip consists inter- nally of up to 1000 processing elements with pro- grammable interconnects, and has a flip-flop toggle rate of 100 MHz. Thus the use of reprogrammable logic provides great flexibility and high speed. This paper presents a high speed pattern recognition processor for 2nd level triggering, the Enable Machine, which exploits these advantages of FPGAs. We describe the architecture and the im- plementation of a prototype and present first results from data taken during the beam period in autumn 1993. 2. Algorithm As described elsewhere [3) the 2nd level trigger task at the TRT of A TLAS/LHC is the fol- lowing. Every 10 JlS the 1st level trigger, based on calorimeters, selects subsets of the whole detector image, Rois. They are analyzed by the 2nd level trigger. In the Roi particle tracks appear as straight lines of different slope according to their transversal momentum Pt· From these tracks the best candidate for a lepton track has to be found and its transversal momentum has to be evaluated. The Enable Machine finds tracks by histogramming the coincidence of Roi image data and predefmed search roads. The maximal slope of search roads defines the Pt cut. Two histograms are accumulated for the same Roi using two different (low and high) recording thresholds. The best lepton track candidate is searched in the "low" Roi image, and together with the corresponding track data in the "high" Rol image lepton tracks can be identified via an appropriate weighting function. 3. Implementation The main processing unit of the Enable machine consists of a matrix of 36 FPGAs of type Xilinx XC3190. The use ofFPGAs has two impor- tant advantages: First, it provides high speed pro- cessing since the algorithm is executed directly in hardware. Second, it provides high flexibility since the FPGAs can be reconfigured, i.e., different algo- rithms can simply be downloaded. For additional flexibility the search roads are defined by the con- tents of a lookup table (called activation RAM). The weighting function is also implemented in an- other lookup table. The inherent parallelism of the TRT algo- rithrp leads directly to the massively parallel and High Threshold Image Low Threshold Image 4. Hardware Setup PattemO The prototype Enable Machine is assembled of an interface board and one or more histogrammer boards (one for the test setup). Event data are received by two HIPPI chan- nels on the interface board and are broadcasted to the histogrammer units. In the histogrammer units the event is processed and transmitted back to the inter- face board. Here the results from each histogrammer board are combined to the global trigger decision of the Enable Machine. This modular concept makes the Enable Machine easily scalable from 400 to 8000 patterns where each pattern corresponds to one possible lepton track. Event data, i.e., Rol images of size 256x32x2 bit, are received by the Enable Machine's interface board via two HIPPI lines that provide a maximal input data rate of 200 MB/s. The HIPPI destination interface assembled on the interface pipelined architecture of the Enable machine. Rol image columns are handled in parallel, different slopes in a pipeline (Fig. 1): The Enable machine runs with a clock fre- quency of 50 MHz that allows a maximal data throughput of 400 MByte/s. Depending on the Rol image dimensions the processing time is between 1J.ts and 6J..Ls (z=1...256). One FPGA matrix allows the parallel search for 400 patterns. Pattern 1 High Threshold Templates Histogrammer Global Decision Histogrammer Low Threshold Templates Figure 1 54 board has been developed with Dubna/Russia in a joint project A histogrammer unit of the Enable Machine mainly consists of a matrix of 36 gate array devices of type Xilinx XC3190 and over 4 MBytes of syn- chronous SRAM for pattern definition and lookup tables. For debugging and monitoring purposes the full histogram content can be read out from the histogrammer board via VME. Like for the interface board it is also possible to download events from the VME host and to process them for testing pur- poses. The whole system houses in a VME crate. The board size is 40x38 cm2 (6 height units). The Enable Machine is controlled and programmed by a commercial VME module containing a J..LSPARC processor. It is used as the bus master whereas the Enable boards are VME slaves only (Fig. 2). This is sufficient for trigger purposes. 5 System Embedding For the beam tests in autumn 1993 at CERN the Enable Machine was embedded in a special test environment of the TRT. The detector data were input via the TRT router, a special system that copies Roi windows out of the detector data stream and send them to the Enable machine via 2 IllPPI links. The Enable VME crate was linked to the data acquisition crate via a VIC bus module containing 4 MBytes of memory. During bursts the memory was filled by Enable. In the time gap between bursts the data acquisition system read this buffer. 32 BitL50 MHz Backplane bus 200MBvte/ 64 Bit[ 50 MHz 6 MB Is tvoicallv ~ J.LSPARC VME master ..jll' j ~ ~,.. global maximum til data ~ formating HIPPI interface t Interface Board I HIP PI 6 Results from the beam period 1993 The Enable Machine is the first 2nd level trigger processor developed for ATLAS which was tested under beam conditions. For the beam tests in autumn 1993 at CERN it was intended to show the overall functionality within the detector environ- ment. This comprised data input handling, correct histogramming of events, and connection to the data acquisition system. During the run the Enable Machine could be successfully integrated in the test detector data acquisition system and 10s events could be recorded on tape. It was possible to forward a continuos event data stream from the detector through the router to the Enable Machine, although several problems were encountered. The main problems arose because error handling between the router and Enable was not thoroughly defined, and due to syn- s .oil ..j,.. 400MRvtP.I< VME ,. ~ His to- His to- til grammer ~ grammer ~ Maximum Maximum Finder Finder Histogrammer Boards Figure 2 55 chronization faults between the two HIPPI lines. Offlfne analysis verified that apart from some minor bugs both the interface board and the histogrammer board produced correct results. It was possible to identify events with the corresponding raw event data which proved that the transfer from the detector through the router to the Enable Machine worked correctly. So the principle functionality of the Enable Machine could be shown. 7 Conclusions and Outlook The pattern recognition task for most 2nd level trigger problems are of moderate complexity, offer a high degree of parallelism, and have to deal with very high data rates. For these kinds of requirements a FPGA based processor like the Enable machine with its massively parallel architec- ture is very well adapted. The execution in hardware provides additional speed. But apart from traditional special-purpose processors designed for one certain problem. recon- figurable FPGAs offer a new quality. Their massive use in form of a FPGA matrix allows the reconfig- uration of the whole processor. Reconfiguration can be used to implement different trigger algorithms on a single machine. We are investigating the im- plementation of several LHC 2nd level trigger algo- rithms on Enable in order to extract an optimal architecture for a general purpose FPGA matrix. It is intended to build such a processor with a more generalized architecture. That general pur- pose machine should be able to solve many LHC 2nd trigger problems. A prototype should be avail- able end of 1995. [1] Klefenz F.. Zoz R .• Noffz K.-H .• Manner R.: The ENABLE Machine - A Systolic Second Level Trigger Processor for Track Finding; Proc. Camp. in High Energy Physics. Annecy. France; CERN Rep. 92-07 (1992) 799-802 [2] Badier J .• Bock R.K .• Busson Ph .• Centro S .• Charlot C .• Davis E.W .• Denes E .• Gheorghe A .• Klefenz F .• Krischer W .• Legrand I.. Laurens W .• Malecki P .• Manner R .• Natkaniec z .. Ni P .• Noffz K.-H .• Odor G .• Pascoli D .• Zoz R.. Sabala A .• Taal A .• Tchamov N .• Thielmann A .• Vermeulen J., Vesztergombi G.: Evaluating Parallel Architec- tures for two Real- Time Applications with 100KHz Repetition Rate; IEEE Tr. Nucl. Sci., Vol. 40. No. 1 (1993) 45-55 [3] Klefenz F., Manner R., Noffz K.-H., Zoz R.: EAST note 92-01 56 Programmable Level-l Trigger with 3D-Flow Processor Array Daria Crosetto - SSCU' ABSTRACT The 3D-Flow parallel processing system is a new concept in processor architecture. system architecture. and assembly architecture. Compared to the electronics used in present systems. this approach reduces the cost and complexity of the hardware and allows easy assembly. disassembly. incremental upgrading. and maintenance of different interconnection topologies. The 3D-Flow parallel-processing system benefits high energy physics (HEP) by allowing: (1) common. less costly hardware to be used in different experiments. (2) new uses of existing installations. (3) tuning of trigger based on the first analyzed data. and ( 4) selection of desired events directly from raw data. The goal of this parallel-processing architecture is to acquire multiple data in parallel (up to 100 million frames per second) and to process them at high speed. accomplishing digital filtering on the input data. pattern recognition (particle identification). data moving. and data formatting. The main features of the system are its programmability. scalability. high-speed communication. and low cost. The compactness of the 3D-Flow parallel-processing system in concert with the processor architecture allows processor interconnections to be mapped into the geometry of sensors (detectors in HEP) without large interconnection signal delay. enabling real-time pattern recognition. The overall 3D-Flow project has passed a major design review at Fermilab. (Reviewers included experts in computers, triggering. system assembly, and electronics.) 1. INTRODUCTION This work originated by understanding the requirements of Level-l triggers [1] for various experiments. past and present. as well as one designed for the future. Each experiment was studied in some detail. with visits to the site when possible. with the aim of. defining a system architecture. processor architecture. and assembly architecture that had a commonality of features to implement all of the experiments. The goal is to implement a new. pro- grammable Level-l trigger by using a "3D- Flow" processor system. This will simplify the hardware and reduce the cost of Level-l trigger systems. It can be used in current experiments and is intended to open doors to new ways of doing triggering in experimental high energy physics. This new. more powert"ul tool will allow implementation of different first-level trigger algorithms. enabling researchers to fmd interesting events with much greater flexibility than existing approaches offer. The concept is rather simple. The user translates any digital fllter. and/or pattern recognition. and/or data-moving algorithm (from Monte Carlo simulation) into a real- time program of the type described in Table 4 of Report SSCL-PP-445 (August 1993). The user's effort is minimal. typically requiring writing of only one and one-half pages of code. Currently. different experiments use different electronics hardware that is not applicable to other experiments. The 3D- Flow architecture is very flexible. using only one small electronic board 02 em x 12 em) that includes 4 x 3D-Flow processor chips. *Operated by the University Research Association, Inc. for the U.S. Department of Energy under Contract No. DE-AC35-89ER40486. 57 Each 3D-Flow chip can accommodate four 3D-Flow processors. The way in which the 3D-Flow parallel- processing system maps the processing elements to the detector elements guarantees fast timing. Along with an important parameter in the performance of a Level-l trigger system is fast data communication between elements. The 3D-Flow system allows permits arrangment of the processing elements in the same relative positions as the detector elements. allowing implementation of different topologies. In a parallel- processing system. where results of a calculation of pattern recognition may be dependent on the data coming from the nei!!hborin!! elements. the overall com- mu~cation~ speed will obviously be determined by the longest cable. Thus it is important to keep cables short and approximately the same length. (The FIFOs compensate for the small differences in cable length.) The 3D configuration permits this. The current status of the system design was achieved during the past three years at the SSCL. and the chip design has been completed. All cabinets ( 1 0) for a system of 1280 calorimeter trigger tower signals have been built. as have all 80 cooling racks and 60 Mini-Racks of the 3D-Flow system. Prototypes of daughterboards. mother- boards. receiverboard. and controllerboard have been built. and tests on the transmission of the signals have been perfonned with BiCMOS drivers up to 140 MHz. The en!!ine that would be available in the present sy;tem (1 0 cabinets with 80 Mini- Racks) has a capability of 2 (8) Tera- operations-per-second at peak performance and will require only 240 (960) 3D-Flow dau!!hterboards (12 em x 12 em). and 960 (3840) 3D-Flow processor chips. The size and performance of this engine could easily be upgraded in the future. The user can use this en2:ine with an identical. almost infmite- length ~algorithm program executed on each 58 processor (Single Instruction Multiple Data mode: SIMD) or with different programs on different pr~cessors for a tinite-length program (Multiple Instruction Multiple Data mode: MIMD. limited to the size of the program memory for each 3D-Flow processor). 2. 3D-FLOW PROCESSOR ARCHITECTURE The 3D-Flow processor is a programmable. data stream pipelined device that allows fast data movements in six directions with digital signal-processing capability. Its cell architecture is shown in Figure l(a). the input/output in Figure Hb). The main features are: MIMD/SIMD mode of operation: fast simple integer processor with several units operating in parallel: simultaneous processing and data moving operations in six directions with maximum capability of 13 operations each cycle: 16-bit integer arithmetic. 32-bit precision accumulators: five 8-bit parallel input ports. five 8-bit parallel output ports. Each 3D-Flow processor in SIMD operation mode receives the same instruction through 48 input lines and operates synchronously with the other processors. There is no dependency on data present at the input or output: thus. the cable length between 3D-Flow processors must be appropriate to allow communication of data to arrive in time with respect to the instruction execution cycle. The MIMD operation mode allows instead the loading of different programs in each 3D-Flow processor prior to execution. In addition the data dependency at the input and output ports is enabled to allow the system to operate on a data-driven principle. In this case. program execution is controlled by the presence of the data at five ports (North. East. West. South. and Top) according to the instructions being executed. A clock synchronizes the operation of the cells. At each input port of the 3D-Flow processor there is a FIFO that derandomizes the data from the calorimeter to the processor array. North. East. West. and South ports are 8-bit parallel bi-directional on separate lines for input and output. while the Top port is 8-bit parallel input only. and the Bottom port is 8-bit parallel output only. North. East. West. and South ports are used to exchange data between adjacent processors belonging to the same 3D-Flow array (stage). (a) rBottom North South (b) Fig. 1. (a) 3D-Flow processor cell (b) 3D-Flow input/output. Top and Bottom ports are used to route input data and output results between stages under program control. Each 3D-Flow cell consists of a Multiply Accumulate and Divide unit (MAC/DIY): arithmetic logic 59 units (ALUs): comparator units: encoder units: a register file: a program memory. an interface to the serial RS232 (used to preload programs. data. and thresholds. and to debug and monitor during their execution): and two data memories (used also as a look-up table to linearize the compressed signal. to remove pedestals. and to apply calibration constants). Four core buses allow communication among these units. while three-ring buses also allow simultaneous communication among I/0. For an instruction limited to six different operands. in a single cycle the 3D-Flow can perform the following tasks: move the six 16-bit values from six different sources to one (or up to ten) different destination units: and calculate three different results from a multiply/accumulate (or divide) and from two ALUs on the same operands in different units: perform compare operations among the same operands. or between four operands and 32 preloaded threshold values: and initiate an encoding operation. Several 3D-Flow processing elements. shown in Figure 1. can be assembled to build a parallel-processing system. as shown in Figure 2. Fig. 2. One stage (or layer) of 3D-Flow parallel processing system. 3. INTRODUCING THE 1HIRD DIMEN- SION IN THE 3D-FLOW SYSTEM In applications where the processor algorithm execution time is greater than the time interval between two consecutive data inputs. one stage (or layer) of 3D-Flow processor is not sufficient. The problem can be solved by introducing the third dimension in the 3D-Flow parallel-processing system. as shown in Figure 3. Stage 4....,. Stage 3....,. Stage 2....,. Stage 1....,. Fig. 3. General scheme of the 3D-Flow pipeline parallel-processing architecture. A schematic view of the system is presented in Figure 3. where the input data from the external sensoring device are connected to the first stage of the 3D-Flow processor array. The program execution at stage 1 must not only route the new incoming data from the sensor to the next stage in the pipeline (stage 2). but must also execute its own algorithm. Thus. in the pipelined 3D-Flow parallel-processing archi- tecture. each processor executes an alf!orithm on a set of data from bef!inninf! to ~ Bypooo . Dolo Dolo Switch status 30-Flow ~ ~ end (e.g .. the event in HEP experiments. or the picture in graphic applications). Input data flows from the "Top Layer" to the appropriate "Layer" where it is processed. 'Results from this processing flow to the "Bottom Layer" of the 3D-Flow system. Four counters at each processor arbitrate the position of the bypass/in-out switches position in order to achieve the proper routing of data. Figure 4 shows the timing (at the bunch crossing rate) of the input data to each stage <or layer) and the algorithm execution time (latency) in the 3D-Flow pipelined archi- tecture. Fi!!ure 5 shows the arbitration bv the ~ . 3D-Flow internal counters of the position of the bypass/in-out switches for a 3D-Flow system made of three layers and with the following configuration: maximum input data rate is 1/8 of the 3D-Flow processor clock frequency: algorithm length is 24 steps. and two input and two output values for each event. TiMe Latency I 200 500 ns St~ge 1 ~~r-~~~-L~~~~~- St~ge 2 St~ge 3 st~ge 4 Bunch-X 16.67 16.67 (60 MHz) ns ns Fig. 4. Timing diagram of four 3D-Flow pipelined stages. Figures 6 and 7 show assembly details of the 3D-Flow system and Mini-Racks. counter.sl f34 35 tlf34. 35 CLOCK t 2 3 4 s & 1 a 910111213141511ll71819lD2tZZ2S211Z525Z7::tB29.1l31:sz:ss:M.!iJI5 oy_in=4 ln5b ncne p ~ · Tn =2; ~ , lin/out bypan by_r =0 1 [ ___, p r =21 ' : lnSb nonol rRJ ;lnSa lnSb ~ by_ln=2 ; 1-U In =2 1lnSa llnSb o 30-F"Iow • In/out 1 bypass by_r =2 r2o I r2b ~ 0 r =2 1 'b ~~~., ~~g I ttJ by_•n=O I P F ln =2 ~~ ?bypass 3 0-F"Iow by_r =4 ~ p =2 1 b [KJ Layer 2 Layer 1 Figure 5. Position of the switches for the data flow (Input/Output) from "Top Layer'' to "Bottom Layer." 60 Incremental Upgrading Of The Parallel Processing Stack Of 3D-Flow Procesors (4X4X4 Processors) P~wer_Sup~ly & Control Signals~' DJ.strJ.butJ.on Module ,.'J'Y? : "..., ,··· ~ 1~< I < ,· rReceiver Module z4{ 1 • .q (i I (lOOXlOO m.m or 100X160 m.m)~:)' · ~" ; 4X SJ.gnals " Serial-To-Parallel o0 Receivers /J Ar.d Delay Lines ( ~ I lU = 44.4 nun lHP = 5.08 mm Figure 6. How to assemble, disassemble, and add 3D-Flow processor boards to a Mini-Rack. OelayUnes & Receivef' Board Figure 7. 3D-Flow System Assembly Details 1 U • .U.ol!imm 1.HP•5..08rmn 30-Fiow System Assembly Details. 61 4. 3D-FLOW PROTOTYPES Figures 8 and 9 show the prototype receiverboards. motherboards. daughter- board and the flexible printed circuit on which transmiSSion tests have been performed up to 140 MHz. The 3D-Flow processor is designed at the Gate level and is awaiting only production. Meanwhile. 10 cabinets accommodating 80 Mini-Racks for a system with 1280 calorimeter trigger channels have been built 5. Fig. 8 30-Fiow Mini-Rack prototype assem-bly for the test of signal Transmission between adjacent daughtert:J<>.?f.<:l~: Fig. 9 Assembly of two adjacent prototype daughterboards. CONCLUSIONS A new approach to a programmable Level-l trigger has been described based on a study of the requirements of Level-l triggers of various experiments past. present. and future. The result is a new approach that. when compared to current and past designs. has a number of important advantages: l. It is more FLEXIBLE. because of its programmability: 2. It has LOWER COST. in both the development and production phases: 62 3. It has APPLICATIONS to other problems in addition to the calorimeter trigger problem (e.g .. real-time trigger tracking): 4. It is EASILY UPGRADED. incremen- tally: 5. It is EASILY SCALED. both in size (for different detectors) and in speed (for different experiments running on different colliders at different bunch crossing rates): and 6. It offers a POTENTIAL COMMON SOLUTION to the requirements for several current and future experiments. The core of the 3D-Flow system is the 3D-Flow chip and the 3D-Flow daughter- board (12 em x 12 em). The daughterboard (as well as its motherboard) has already been developed. The 3D-Flow chip has been designed and is awaiting fabrication. The overall 3D-Flow parallel-processing system passed a major technical review at Fermilab on 14 December. 1993. The programmability feature affords physicists the opportunity to include among the first-level trigger some algorithms otherwise left for the higher-level trigger: the result might be better rejection of background events. Today. as for the past three years. physicists continue to perform Monte Carlo simulations. and they are continually revising the trigger requirements to improve background rejection from the trigger algorithm. REFERENCES 1. L. Mapelli. "The Challange of Triggering and Data Acquisition at Supercollider Experiments." Nuclear Instruments and Methods in Physics Research. A315 (1992) 460-471. 2. D. Crosetto. "3D-Flow Processor for a Programmable Level-l Trigger." Computing in High Energy Physics. CHEP92. Annecy. France (1992). 803- 806. THE ZEUS CALORIMETER FIRST LEVEL TRIGGER C. Foudas, I. Ali, B. Behrens, C. Fordham, A. Goussiou, M. Jaworski, J. Lackey, P. Robl, S. Silverstein, W. H. Smith U. Wisconsin, J. Dawson, D. Krakauer, R. Talaga Argonne National Laboratory Abstract We present results on the efficiency and performance of the ZEUS detector Calorimeter First Level Trigger (CFLT) using data taken during the 1993 HERA physics run. The CFLT is designed to process events in a digital pipeline applying pattern recognition algorithms and fast digital summation techniques in order to collect interest- ing physics events and reduce background from beam gas interac- tions.The total FLT efficiency was 98% for neutral current events and 85% for charged current events above Q 2 of 10 GeV 2 • The in- troduction of the isolated electron trigger increases the CFLT beam gas rejection by a factor of two. INTRODUCTION The Zeus detector operates at the HERA storage ring which provides collisions be- tween 820 Ge V protons and 26.7 Ge V electrons with arateof10 MHz (every 96 nsec). Interesting physics events occur at a rate of a few Hz while background from proton beam gas interactions has a much higher rate, on the order of 100 KHz. The calorimeter first level trigger is de- signed to tag charged and neutral cur- rent, photoproduction, and exotic physics events with high efficiency while reduc- ing beam gas background below 1 KHz. This is accomplished by looking for iso- lated muons and electrons, calculating to- tal (Etot), transverse (Et) and missing transverse energy ( Emis), and finding pat- terns of energy deposition. These tasks are performed in a pipeline clocked ev- ery 96 nsec. The results from the CFLT are transmitted to the ZEUS Global First Level Trigger (GFLT)[1] where the FLT decision is made. The selection at first level trigger is made after 4.4 f-LSec 63 corresponding to a latency of 46 beam crossings. The dead time is typically less than 0.5%. CFLT DATA FLOW CFLT Front End The ZEUS calorimeter is made of de- pleted uranium plates and plastic scin- tillator read out by wavelength shifter bars into 12,864 photomultiplier tubes (PMTs). The PMT signals are received by the Front End Cards (FECs )[2] and combined by the Trigger Sum Cards (TSCs) on the calorimeter to form 896 calorimeter trigger towers (20x20 em) with separate projective electromagnetic (emc) and hadronic (hac) sections. The CFLT begins with the TSCs, which re- ceive 5% of the signal from the FECs. On the TSCs these signals are inte- grated, shaped and summed over the left and right PMTs that make up a trigger tower. The TSCs use fast analog cir- cuitry to restore the signals back to base- line in time to receive data from the next crossmg. Each TSC transmits the sig- nals from two trigger towers via a 60 m shielded -twisted pair cable to the elec- tronics house, where it enters the Trigger Encoder Cards (TECs) for digitization. CFLT digital pipeline The TSC signals are received by 224 TECs installed in 16 9U VME crates at the Zeus electronics house. There the trigger towers are arranged in 16 7 x 8 grids over the calorimeter, each served by a CFLT crate. Every 96 nsec the TECs digitize the analog signals from each tower using two 8-bit flash ADCs for high and low gain. These 8-bit quan- tities and a high/low range bit are then converted to energy by applying calibra- tion corrections using a set of lookup ta- bles preloaded with the CFLT calibration constants. The resolution is 48.8 MeV per LS B and the dynamic range from 0 to 400 Ge V. The electronic noise level per CFLT tower was measured to be be- low 200 MeV, enabling the use of trig- ger thresholds as low as 464 MeV. A second level of lookup tables preloaded with the Zeus detector geometry con- stants converts these data to Etot, Et, E:x, and Ey, which are fed into separate adder trees for hadronic and electromag- netic sums. These adder trees calculate the sums of the four towers served by each TEC. An additional set oflookup ta- bles receiving 6-bit compressed scale en- ergy information from both the hadronic and electromagnetic section of each tower compares the energy deposition against 6 programmable thresholds and calculates the energy of the tower on a 3 bit scale (threshold bits). The energy deposition of each tower is also classified as Quiet ( Q) or Minimum Ionizing(M) or Electromag- netic(E). This information is sent on an 83 MHz backplane from the 14 TECs con- tained in one CFLT crate to its two Trig- 64 ger Adder Cards (TAC)[3]. The TACs process the data into quan- tities used by the Calorimeter Trigger First Level Processor (CFLTP)[4]. The TACs use the threshold bit information to calculate energies in 8 programmable subregions of the 56 towers serviced by one crate. These sums are used by the CFLTP for calculating energy deposited in specific regions, such as towers adja- cent to the beampipe. The threshold bits are also used to provide histograms of tower energy, calculating the number of towers passing each threshold. The CFLTP will use these histograms for a future jet trigger which will search for en- ergy clusters. The TACs also use the full resolution 8- bit quantities ( Etot, Et, E:r:, Ey) to continue the sums to the 56 tower level. Lastly, the TACs use the Q,E,M bits to search with memory lookup tables for patterns of electron or muon energy deposited in 1-4 towers, surrounded by quiet towers. If the electron or muon is found isolated on an edge of the 56 tower region, this information is passed sepa- rately to the CFLTP, which compares the edge with the adjoining edge in the ad- jacent region. For this reason the TACs also flag edges as Quiet and pass this information to the CFLTP. The CFLTP then sums the totals found over the whole calorimeter and transmits them to the GFLT which uses them to derive the FLT decision. CFLT ALGORITHMS The FLT decision during the 1993 run was based on the 0 R of the following conditions: Etot 2:: 15.0 GeV, Et 2:: 11.6 Ge V, Emi 5 2:: 12.00 Ge V, total emc en- ergy 2:: 10 Ge V, barrel calorimeter emc energy 2::_ 3.4 Ge V, rear calorimeter emc energy away from the beam pipe 2: 2.0 Ge V, and rear calorimeter emc 2: 3. 75 GeV. A number of other subtriggers were also used in coincidence with the lumi- nosity detector trigger in order to collect photoproduction events. The total FLT rate was 75 Hz for a HERA luminosity of 0.7 x 10 30 , which corresponds approx- imately to 1/20 of the design luminos- ity. The efficiency of each subtrigger rel- ative to the rest was studied using CFLT data. The overall efficiency of this algo- rithm for neutral current events was 98% and for charged current events 85%. The rear calorimeter emc (REMCth) subtrig- ger was the most efficient trigger for col- lecting neutral current events. More than 92% of the ZEUS neutral current sam- ple were tagged by this subtrigger and about 49% of it was collected exclusively by REMCth. The purity of REMCth was low and about 95% of the events from this trigger were rejected by the second level trigger[1] as originating from beam gas interactions. In 1994 the HERA lumi- nosity is expected to increase by a factor of 5 and the REMCth rate has been esti- mated to be prohibitively high at the FLT level. Therefore this trigger will be re- placed by isolated electron trigger which has the same efficiency and a factor of 2 higher purity. ISOLATED ELECTRON ALGO- RITHM The CFLT executes the isolated elec- tron algorithm (ISOE) by searching in the calorimeter for patterns of 1-4 tow- ers with the E bits set surrounded by towers with the Q bits set. When such a pattern is found it results to a positive CFLT decision. A tower is defined as quiet if the emc and the 65 hac energies deposited in that tower are smaller than the two programmable thresholds Q erne and Q hac respectively. 30 Q) ..... as ll::= $...! Q) QO QO .... $...! E-o REMCth rate !=: 0 s.. ..... C) Q) ...... r;il "C Q) ..... as ...... 0 rn 10 ...... 0 2 4 6 B 10 erne/hac .Fig. 1: ISOE beam gas background rate in arbitrary units as a function of Qhac and emcjhac parameters. The dot-dashed line indicates the rate of the REMCth at 3.75 GeV. Electron bits (E) are set based on a user programmable function E F(emc, hac). In order to study and op- timize this algorithm we collected data from several ep data runs with the ISOE trigger active. The optimum values for Qemc' Qhac, and F( emc, hac) were se- lected in order to obtain maximum beam gas rejection and high physics acceptance. We have chosen Qemc = 2.52 GeV so that the trigger has 100% efficiency (including energy sharing between towers) at elec- tron energy of 5 GeV, and Qhac = 0.95 Ge V. The electron bits were set if any of the following conditions were satisfied: E = {(emc 2:: Qemc).AND.(hac::; Qhac)} OR {(emc 2:: Qemc).AND.(~ 2:: 3)}. ~ u c (1) u ~0.8 ~ w 0.6 0.4 0.2 0 0 0 20 40 Ee, (GeV) Fig. 2: ISOE efficiency versus electron energy. The efficiency rises between Eel 2.5 and 5 GeV due to events where the electron energy is shared between trig- ger towers (Qemc = 2.52 GeV). Events with Eel 2:: 30 Ge V are not electrons since they are outside the kinematic limit. This ISOE configuration results to a fac- tor of 2 reduction in Beam Gas back- ground relative to the REMCth and has the same efficiency as the REMCth for neutral current events. In Figure 1 we present the beam gas reduction achieved using the ISOE relative to the simple 66 REMCth trigger at 3.75 GeV as a func- tion of the Qhac, emcfhac cuts. The over- all efficiency of the ISOE relative to the standard ZEUS electron finder was 98%. In Figure 2 we present this efficiency as a function of the electron energy Eel· CONCLUSIONS The ZEUS CFLT has performed reliably and according to design over the past 3 HERA physics runs, enabling us to col- lect over 600 nb- 1 of physics data. The digital pipelined structure of the CFLT enabled us to collect data with essen- tially zero dead-time. The programma- bility of the CFLT via memory lookup ta- bles has proven very useful and its config- uration was changed often to accomodate the various physics requirements. In ad- dition, the ISOE pattern recognition trig- ger was proven a powerful tool for Beam Gas background rejection. This work is supported by the DoE, under Contract No. DE-AE02-76ER0881. REFERENCES 1. W.H. Smith, K. Tokushuku, L. Wig- gers, m Proceedings of the Inter- national Conference on Computing in High Energy Physics, Annecy, France, September, 1992 2. A. Caldwell et al., Nucl. Inst. Meth. A321 356 (1992). 3. C. Fordham et al. , in Proceedings of the 1993 IEEE Nuclear Science Sym- posium, San Fransisco, CA, Novem- ber, 1993. 4. J.W. Dawson et al., IEEE Transac- tions on Nuclear Science, 37, 2198 (1990). Neural Electron/Pion Discriminator With a Projective Fiber Calorimeter J .M. Seixas , L.P. Caloba and R'. Rajagopal COPPE/EE/UFRJ, C.P. 68504, Rio de Janeiro 21945, Brazil Abstract An electron/pion discrimination system is developed using artificial neural networks. Longitudinal and radial information collected by a projective fiber calorimeter are analyzed. Results show that the system is able to identify up to 99.8% of electrons with 0.1% of pions misclassified as electrons. Introduction Scintillating optical fibers have been used in calorimeters as the active mate- rial in a variety of recent experiments. They deliver fast signals and allow for a sufficiently precise and compact calorime- ter design. For the following analysis, a 19 modules projective prototype [1] was used. Modules have the shape of one quadrant of a truncated pyramid with a depth of 2 meters. Each module con- tains 2346 fibers with a diameter of 1 mm embedded in a lead matrix. All fibers run parallel to one another in the direc- tion of the incoming particles. By build- ing such a detector, it was possible to achieve an effective segmentation into an electromagnetic ( e.m.) and an hadronic section so that each section was indepen- dently readout. This segmentation is use- ful for electron/pion discrimination, as electrons, unlike pions, deposit almost all their energy in the e.m. section. Calorimeter signals were acquired in 67 such a way that concurrent energy and time signal acquisitions were possible. The energy of each section was measured by using a charge ADC 1 and time signals were sampled by a fast Digital Storage Oscilloscope (DSO) 2 . The sampled sig- nal was obtained by combining the seven innermost modules with respect to the in- teraction point of the incoming particle beam. Figure 1 shows typical pulses. This paper describes the applica- tion of neural networks for electron/pion discrimination. One can explore the ability of these networks in identify- ing multidimensional correlations on pat- tern features in order to realize a high- performance discriminator, which can contribute to build efficient trigger sys- tems. In fact, recent works [2, 3] have reported results on neural triggering sys- tems for LHC. Network simulations were performed by using JETNET 2.0 package [4] and backpropagation was the learning procedure adopted .. 1 LeCroy 2280, 2282E modules. 2 Tektronix DSA 602A, 11A32 modules. 0 .---· .---··-- -0.1 -0.2 -0.3 -0.4 20 40 60 80 100 I•) -0.05 ._ ... -.------· / 0 r--- -0.1 -0.15 -0.2 -0.25 -0.3 -0.35 -0.4 ~~~2~0~~~.0~~~60~~~670~~1~00 (b) Figure L Signals for 40 GeV electron (a) and pion (b) beams. The sampling rate is 2 GSa/s- Longitudinal Information The signals sampled by the DSO show the depositing process in depth. The pro- totype under consideration has fiber ends which are made reflective by aluminium sputtering. Therefore, as pions normally start showering deeper in the calorime- ter, their signals generally exhibit a dou- ble peak structure (Figure 1 (b)). Full signals were recorded, but only samples lying inside a 100 ns fixed window were fed into the neural network input nodes, the selection being performed by cutting the base line points that carry noise infor- mation. A 100-50-1 neural network was used. The obtained result shows that less than 0.1% (6%) of pions are misclassi- fied as electrons when a 99.8% electron efficiency is kept for 40 (20) GeV parti- cles. At 95% electron efficiency, the er- ror for pions was 0% ( 4%). This is to be compared with nonneural methods. As an example, computing the Ehad/ Ee.m. ra- tio [1], for 95% (92%) electron efficiency, 0.3% ( 4%) of the pions are misidentified, for 40 (20) GeV data. Therefore, the 68 400 350 <:-electrons 300 pions~ 250 200 150 100 50 0 -1 -0.75 -0.5 -0.25 0.25 0.5 0. 75 Network output Figure 2. Neural Network output for 20 GeV particles. proposed neural discriminator exhibits a better performance when compared with classical methods. Figure 2 shows how the network classifies events. It is known [5] that the discrimina- tion based on a constant fraction mea- surement is improved by filtering the tail introduced on calorimeter signals by the signal cable used to transmit them. How- ever, there was no improvement in the performance of the neural discriminator when filtered pulses were fed into the net- work. Therefore, the neural network per- forms some filtering action in its hidden layer, so that results with and without ca- ble filtering are similar. Radial Information The way particles deposit their energy inside the detector can be seen in Figure 3. For radial information analysis, the network was fed with the measured en- ergy from all 19 e.m. and 19 hadronic cells. The energy values were normal- ized by total energy and the same set of events used for the longitudinal analysis was considered. A 38-38-1 network was Figure 3. Typical radial profiles for electrons (a), e.m. section, and pions, e.m. (b) and hadronic (c) sections. used. For 99.8% electron efficiency, 0.1% (1.4%) of pions were misclassified as elec- trons for 40 (20) GeV data. Conclusions A neural network approach to an electron/pion discriminator system using projective fiber calorimeter information was developed. At 40 GeV, it was shown that using longitudinal or radial informa- tion, discrimination errors of less than 0.1% were found for pions when an elec- tron efficiency up to 99.8% is kept. This performance is better than reported re- sults using classical methods. 69 Acknowledgements We are thankful for the support that has been provided to this work by CNPq (Brazil) and CERN. We would like to thank our colleagues of the RD 1 Collabo- ration for their contribution during data acquisition and C.C. Jannnuzzi for help- ing in part of the analysis. REFERENCES 1. J. Badier et al. N ucl. Instr. and Met h. A 337 (1994) 326. 2. J.M. Seixas et al. A Second-Level Trigger System Based on Calorime- ters and Using Neural Networks for Feature Extraction and Elec- tron/ Jets Discrimination. IV Int. Conf. on Calorimeters for High En. Phys. Elba, Italy, 1993. 3. J.M. Seixas et al. Neural Networks Applied to a Second-Level Trigger System. III Int. Workshop in Softw. Eng., Artificial In tell. and Expert Sys. for High-En. and Nucl. Phys. Oberammergau, Germany, 1993. 4. L. Lonnblad et al. Comput. Phys. Commun. 70 (1992) 167. 5. J.M. Seixas. Fast Front-End Electronics for Electron/Pion Sepa- ration in a Lead/Scintillating Fiber Calorimeter. II Int. Conf. on Calorimetry for High- En. Phys. World Scientific, pp 445, 1992. A First-Level Calorimeter Trigger for LHC Experiments - Design Studies, and Beam Tests of a First Prototype Trigger System A.T. Watson I.P. Brawn, R.E. Carney, Y. Ermolin, J. Garvey, R.J. Staley School of Physics and Space Research, The University of Birmingham, Birmingham B 15 2TT, UK. E. Eisenhandler, M. Landon Department of Physics, Queen Mary and Westfield College, London E1 4NS, UK. C.N.P. Gee, A.R. Gillman, R. Hatley, V. Perera Rutherford Appleton Laboratory, Chilton, Didcot, Oxfords hire, OX 11 OQX, UK. N.N. Ellis CERN, 1211 Geneva 23, Switzerland Introduction: First-level triggering for LHC proton-proton collider experiments poses significant exQerimental challenges. At a luminosity of 1 0 34 .2 -1 h . I . em s t e me astlc proton-proton collision rate will be approximately 1 GHz. With a bunch-crossing interval of 25 ns this corresponds to approximately 25 collisions per bunch-crossing. The level-1 accept rate will be limited by the readout time of the front-end electronics to less than 100 kHz, requiring a rejection factor of 10 4 -10 5 . Physics signatures will be based upon combinations of high-pT leptons, photons, partons and weakly- interacting particles, and therefore the trigger must be sensitive to these particles. This paper describes tests of a first prototype calorimeter trigger processor and developments in the design of a complete first-level calorimeter trigger system. Trigger Algorithms: The choice of algorithms is based upon extensive and ongoing physics simulation studies. These have been described elsewhere [1-3]. The inputs to the algorithms are transverse-energy (ET) sums from "supercells" in the electromagnetic and hadronic calorimeters, of transverse granularity 0.1 x0.1 in pseudorapidity-azimuth and summed in depth. The most complex algorithms are required for the electromagnetic cluster trigger (Figure 1). The trigger requires an electromagnetic cluster ~ greater than a cluster 70 threshold as well as electromagnetic and hadronic isolation sums less than isolation thresholds. The trigger windows slide and overlap so as to cover the calorimeters fully. Studies indicate that such an algorithm gives acceptably sharp trigger thresholds and rates of a few x1Q4 Hz for a range of trigger conditions satisfying the requirements of LHC pp experiments [1-5]. Hadronic Calorimeter Electromagnetic Calorimeter lill Reftrence D 41 = 0.1 l'ifi Cd 11=0.1 I OR - >Cimte•Thmluid IF?;il Elecn:oma&netic II Hadronic · · IsolatiOn Rmg Isolation Figure 1: e/y trigger algorithm Trigger Prototype: In order to investigate and demonstrate the implementation of such trigger algorithms, an ASIC has been constructed to implement the electromagnetic part of the algorithm shown in Figure 1 (hadronic processing was excluded to reduce cost). The ASIC is a 0.8~ CMOS gate array operating in pipeline mode. It takes as input 16 8-bit linear ADC values and calculates cluster and isolation sums, which are compared with two sets of thresholds. In addition the sum of the 16 input values is computed; an operation required as input to the jet trigger. The ASIC delivers the 12-bit energy sum and the two trigger decision bits with latencies of six and seven clock cycles respectively. It has been described in more detail elsewhere [3]. The ASIC was tested in a cluster processor demonstrator system using a prototype LHC calorimeter. The system contains nine ASICs and fully processes 3x3 overlapping windows, requiring inputs from 6x6 trigger cells. Two backplanes were used, one with high-density Teradyne connectors (320 signal pins plus 80 grounds) for the data and clock connections and the other using a simple control/addressing protocol to interface to VMEbus. The module contains 256-deep circular buffers to capture time-slices of the input ADC data and the ASIC processing results. Comparison of the results with the inputs enables the performance of the trigger hardware to be studied in detail. Beam Tests: Data were recorded in CERN test beams with both the RD-3 barrel ("Accordion") and endcap ("Spanish Fan") liquid-argon calorimeter prototypes. Analysis of the "Spanish Fan" data is still at an early stage, so the following results come from the barrel calorimeter tests. In addition other tests have been performed with the RD-33 ("TGT") liquid argon calorimeter prototype. Trigger cells of granularity approximately 0.1x0.1 were formed by analogue summation of signals from the calorimeter cells. The signals were digitised using a linear flash-ADC system sampling at the LHC bunch-crossing frequency of 40 MHz (some data were recorded at the original LHC frequency of 67 MHz) and passed to the cluster processor operating at the same speed. Data were taken with beam energies between 10 Ge V and 300 Ge V and a mixture of electron and pion beams, over a wide range of beam positions. Data were recorded both stand-alone, and also through the RD-3 data-acquisition system, to enable comparison with the full calorimeter data. Figure 2 shows the trigger threshold curve obtained with 50 Ge V electrons compared with the expectations from an ATLAS Monte Carlo. Since the beam spot-size was small compared with a trigger cell (about the size of a single calorimeter cell, whereas the trigger cell was 4x4 calorimeter cells) data from a number of runs with beams in different positions within the trigger cell were combined to produce this threshold curve. A good agreement was found between the observed and expected performance of the cluster algorithm. >,1.2 ,------------------, 0 c ·~ 1 f-----------...._ ~ ~ w0.8 --Data + + + + Monte Carlo 0.6 i 0.4 0.2 ~. 0 0 10 20 30 40 50 60 70 E, Threshold (GeV) Figure 2: Threshold curves from test data compared with Monte Carlo The reliability with which the trigger processor executed the algorithms was studied by comparing the ASIC results with the expectation based upon the input ADC data and the trigger and isolation thresholds. 10 -- Trigger set ---------- Trigger not set 0 20 40 60 80 100 120 140 Cluster (FADC Counts) Figure 3: Performance of the ASIC cluster threshold 71 10 2 - Triggerset ·~: ... :::. '·· ., ~·t:: 10 300 320 340 360 380 400 Isolation Sum (FADC Counts) Figure 4: Performance of the ASIC isolation threshold The performance of the ASICs in forming cluster and isolation sums and comparing with thresholds is illustrated in Figures 3 and 4. In Figure 3 the cluster sum, reconstructed from the input data, is plotted for events with and without the corresponding trigger bit set. Here the isolation threshold was set high to permit a ~lean test of the clustering. In Figure 4 the Isolation sums are similarly plotted for events with clusters above the cluster threshold. In both plots it can be seen that the execution of the trigger algorithm at the full LHC clock speed was faultless. Bunch-Crossing Identification Studies: 40 30 20 10 0 0~~~10~~2~0~~30~~4~0~~50~~60 Time Slice (25 ns) Figure 5: Pulse shape from Accordion calorimeter Figure 5 shows a pulse from the Accordion calorimeter, after digitisation by the trigger F ADC. A key feature is that the pulse occupies about four LHC beam-crossings in time. For the final trigger, filtering is therefore needed to 72 · identify the peak pulse-height and timing, and to suppress off-peak data which would otherwise contribute to (or veto) triggers in other bunch-crossings. . Vole ~ave been . studying the use of digital filtenng for this purpose. Using software simulation, a range of algorithms has been studied, based upon convolution of the data from several samplings followed by peak- finding applied to the results of the convolution. Using data recorded with the Accordion calorimeter prototype as input, it was found that simple peak-finding always gave correct identification of pulses down to five counts (approximately 6 GeV), with little improvement being found from using more complicated filtering. Small pulses are the most difficult to filter, and studies in this area are continuing. Lower electronic system noise and higher-resolution ADCs would permit the performance of all algorithms to be improved. convoluted Figure 6: Block diagram of Bunch-Crossing Identification module A first-prototype bunch-crossing identification module has been constructed and tested with the "Spanish Fan" endcap calorimeter prototype. The module, which filters data from a single channel, consists of a five-element deep pipelined Finite Impulse Response (FIR) filter followed by a five-element programmable comparator (peak-finder). It is illustrated in Figure 6. By setting the parameters of the filter and peak-finder appropriately, a range of algonthms could be tested in real-time at the full LHC bunch-crossing rate. The next trigger prot~type _will inch~~~ similar bunch-crossing Id~ntific~ti.on capabilities for all input channels, usmg )_(Ihnx FPGAs for the digital signal processmg. Towards a Full LHC Calorimeter Trigger: The current prototype has demonstrated that algorithms with the performance needed for LHC first level triggering can be implemented using currently-available ASIC technology and operated at the necessary speed . In order to construct a full system, however, a greater degree of integration is needed [6]; the current module processes only 9 channels, so using this modularity a full-scale 4000-channel trigger would require approximately 450 such modules. It is straightforward to process a larger area of the calorimeter in a single ASIC, but the pin counts required for parallel data input quickly become prohibitive. For example, an ASIC fully processing 4x4 trigger cells would require -800 1/0 pins alone, and a module with four such ASICs would require -2000 backplane connections for inputs. One solution to this problem would be to use serial input of data to the ASICs. This would provide an eightfold reduction in the number of 1/0 connections, but would require a corresponding increase in the bandwidth per connection. Current CMOS ASIC technology could not accept data at these rates. However, after pedestal subtraction, bunch-crossing identification and applying a noise threshold to the trigger cell ET sums (typically 1 Ge V) the occupancy of the calorimeters is expected to be only a few percent. Transmission of only zero- suppressed data would therefore reduce the bandwidth, but the resulting asynchronous data would then require bunch-crossing tagging and matching. Although having a greater latency, one advantage of this technique is that it would be inherently self-synchronising. In order to demonstrate the viability of such a solution, as second trigger prototype is being constructed. In this system the digitised calorimeter pulses are pedestal-subtracted and applied to a bunch-crossing identification filter. The non-zero data are then tagged, serialised .and transmitted optically at a rate of 160 .MBd. The cluster-finding ASIC converts the incoming serial bitstreams to parallel data, matches the tags and them passes the re- 73 synchronised data to the trigger algorithm block. Note that while data transmission is asynchronous, the trigger decision itself is fully synchronous. Design studies for this system are well advanced. Detailed system simulations indicate that the asynchronous transmission introduces negligible data loss and no data corruption. To reduce the non-recurrent engineering costs a dual-mode ASIC is being designed, which will include all necessary system functionality. Beam tests with prototype LHC calorimeters will be performed in mid-1995. Acknowledgements: We gratefully acknowledge the considerable help we received from RD3, both in allowing us to use signals from their calorimeter and in performing the beam tests. This work is supported by the UK PP ARC. References: [1] N. Ellis et. al., Level-l Trigger System, ATLAS note DAQ-N0-005 [2] A. Watson, Physics Simulation Studies of the First-Level electron/photon Trigger, RD27 note 13 [3] I.P. Brawn et. al., Beam Tests of a Prototype Level-l Calorimeter Trigger for UIC Experiments, RAL-94-020, (Submitted to Nuclear Instruments and Methods). [4] ATLAS Letter of Intent, CERN/LHCC/92- 4 [5] CMS Letter of Intent, CERN/LHCC/92-3 [6] V. Perera, A First-Level Calorimeter Trigger Processor for the LHC, RD27 note 8 THE LEVEL-l CALORIMETER TRIGGER FOR THE CMS DETECTOR " S. Dasu, T. Gorski, J. Lackey, D. Panescu, W. H. Smith, and W. Temple Department of Physics University of Wisconsin Madison, WI 53706 USA Abstract We present results from simulation studies and implementation ideas for the level-1 calorimeter trigger for the CMS detector at the LH C collider. QCD background trigger rates and signal efficiencies for electron and photon triggers using several simple level-! algorithms are discussed. Jet trigger rates and efficiencies are studied for various calorimeter tower sums. Some of the technical challenges in imple- menting these simple trigger algorithms in a high rate environment are also explored. Design of an high speed adder ASIC is briefly discussed. INTRODUCTION The CMS detector[!] is designed to study high PT physic~ in 14-15 TeV cen- . ter of mass proton-proton collisions at the LHC. In order to extend the mass range for Higgs searches and study the TeV scale the LHC is designed to operate at the luminosity of 10 34 cm- 2 s- 1 • The physics program includes the study of electroweak symmetry breaking, studies of the top quark, searches for new heavy gauge bosons, probing quark and lepton substructure, looking for supersymmetry and exploring for other new phenomena. Most of these physics topics are best stud- ied in the events with high PT leptons or photons because the profusely produced QCD events obscure hadronic channels. *This work is supported by the Department of Energy Contract No. DE-AC02-76ER00881 and Texas National Laboratory Research Com- mission Grant No. RGFY93-205. 74 Triggering is one of the extraordinary challenges facing detector designers at the high luminosity LHC collider. For the nominal LHC design luminosity of 10 34 cm- 2 s- 1 , an average of 25 events occur at the beam crossing frequency of 25 nsec. This input rate of 10 9 interactions every second must be reduced by a factor of at least 10 4 to 100 KHz, the maximum rate that can be analyzed by subsequent processing in an on-line computer farm. This must be done for all channels with- out dead time. CMS has chosen to re- duce this rate in two steps. The first level stores all data for 3 ps, after which no more than a 100 KHz rate of the stored events is accessible by the on-line proces- sor farm. The farm processors first ana- lyze a subset of the event data using fast algorithms operating as a "virtual level- 2", to further filter events. A hierarchy of such filters screen the events before saving data to disk at 100 Hz. We have explored the trigger issues extensively for the SDC detector which was to have been built at the sse [2, 3]. The physics int&est and the background challange is similar for the CMS exper- iment at the LHC. We therefore build upon the trigger work on the SDC experi- ment that has direct application in CMS. However, the choice of the trigger algo- rithms, and, therefore, the trigger hard- ware realization, depend on the detector geometry and performance. Additionally, the greater pileup expected at the LHC, and, the lack of a physicallevel-2 trigger, are likely to place more stringent require- ments on the trigger. TRIGGER SIMULATION As a first step in this effort we have reworked our SDC fast simulation pro- gram to describe the CMS detector ge- ometry and materials. The response of the calorimeter is calculated in this pro- gram using standard shower parameter- izations available in literature. Before trigger simulation the detector response to hard scattering events and a suitable number of Poisson distributed minimum bias events at the desired luminosity were added. For the purpose of EM trigger simulation, calorimeter transverse energy deposits, in each 0.17] x 0.1¢ trigger tower region, were summed and converted to an 8-bit linear scale, with a resolution of 0.5 Ge V, to simulate the dynamic range lim- itation. The trigger response was then simu- lated for each event using various level-1 · algorithms, including several we have de- vised and algorithms from other sources such as RD-27[4]. Most algorithms con- sidered all possible two EM trigger tower 75 pairs to cut on the summed EM trans- verse energy. Our SDC-style EM trig- ger algorithm involves two separate cuts. on the longitudinal and transverse iso- lation of the EM energy deposit. The first cut requires a hit tower HAD to EM energy ratio, H/ E < 0.05. The second cut requires transverse isolation, I.e. a cut on sum of HAD transverse energies in the nearest eight towers sur- rounding the hit tower, H 1 < 1.5 GeV. In order to reduce the number of bits of information exchanged between electron- ics cards we limit the dynamic range of neighboring tower HAD information to 3 bits. Overflows of both the 8 bit scale for EM and central HAD towers, and 3 bit scale for neighboring HAD towers are treated as maxima. The RD-27 algorithm (4] involves only one cut on the sum en- ergy of the 12 border EM towers and 16 HAD towers in the 0.4ry x 0.4</> region, i.e, '£E2 + '£H2 < 5 GeV. We have studied the expected trig- ger rates for various algorithms from the QCD background, and the efficiencies for several high Pt physics processes. We have found that the electromagnetic trigger al- gorithm proposed for the SDC detector works satisfactorily for the CMS trigger. We find that the transverse isolation cri- terion which provided marginal improve- ment for the SDC is essesential to trig- ger on interesting physics at the LH C. We have also compared our SDC style al- gorithm to the one proposed by CERN RD-27 group [4] for Atlas trigger. The rates from QCD two jet production back- ground are shown for various algorithms in Figure 1. The efficiencies of the elec- tron trigger for these algorithms obtained using W decay events including the mini- mum bias background is shown in Figure QCD Background Rate for Electron!Pbotoo Trigger 10 UW- TIIOT-Trlgger a.tS Col', Calonrnotor o - No Cuto 0-H/E<0-5 .0.-H/E<O.li+IH.< 1.5 0-IC,+Df,<O.O O-Dfw<2.0 Figure 1. Single electromagnetic cluster trig- ger background rate for CMS is plotted ver- sus the two tower sum transverse energy deposited with various cuts. The circu- lar points are without any cuts, the square points and the triangular points are for our algorithm, the diamond and plus shaped points are for the RD-27 algorithm. CL8 0.5 0.4 0.2 W -Electron Trigger Efficiency I I •.••• mu•~~~,~m!!~!m! uw--- 015 CeF,Caloo1me!M Two T- TriQ9er 0- No eat. C-H/E<0.5 ..:..-II/(< 0..5 + IH. < 1.5 o-I£,+IH,<5.o 0-Dfw< 2.0 I .i •• llsSBallooUU~ 0 o 5 w ~ ~ ~ ~ ~ ~ ~ ~ Elc.</ Figure 2. Efficiency of triggering on electrons from W decay events for CMS is plotted ver- sus PT of the electron for various algorithms with labeling as defined in the Figure 1. 76 10 Jet Rates for various tower sum regions uw--- CIISCof',Cd.nmmr 0-0.1 x0.1 Barrei+EI'Idcop c - 0.2 Ill. 0.2 .0.- 0.4x0.4 t-0.8x0.8 0-I.Bx 1.8 '*- ETot 1o' 0 !->- ......... '"=':10~ .......... ~ .......... ~::"-"~:?-.........;~,.._...:~ 300 £,(Go\/) Figure 3. Jet trigger rates using various tower region sums are plotted versus the Et de- posited in the calorimeter region. The rate includes only barrel and endcap calorime- ters, i.e. 1771 < 2.6. 2. We find that our SDC algorithm per- forms similarly to the RD-27 algorithm. There are two interesting features in our SDC algorithm. Firstly, our proposed al- gorithm requires smaller amount of data than the RD-27 algorithm .. Secondly, our algorithm allows for a non-isolated elec- tron trigger for the initial low luminosity running at the LHC when one might be interested in studying B physics which re- quires a non-isolated electron trigger. We have studied jet trigger rates (see Figure 3) and efficiencies (see Figure 4) and found that transverse energy sums in 0.87] x 0.8<P regions provide sufficient per- formance. We have also studied efficien- cies for various high Et physics signals as a function of chosen thresholds for sin- gle and double EM triggers. Although the efficiency for very high Et physics processes resulting in two or more elec- trons/photons is very good, efficiency for top and W triggers is somewhat low for Jet Trigger Efficiency j ;:; f :tiH~n .::~a~;: CWS Cef'. ColotimiiiM 0.8 Barrel + Endt:cp o- 0.1 x0.1 C-0.2•0.2 A-0.4x0.4 o.e o- o.e • 0.8 0.4 0.2 o- f.&x1.& ·- E:Tot I i g •• : • 0 0 • a o • • a o 1 • a o • ! a o . a o . 1 0 a ' 0 0 50 100 150 200 2l50 300 J5() 400 450 . 500 ElGo'/ Figure 4. Efficiency of jet trigger for various tower region sums is plotted versus the jet PT· the nominal rates/thresholds proposed for CMS (see Table 1). CMS TRIGGER DESIGN The CMS Level 1 Calorimeter trigger data is received from the front end elec- tronics on optical fibers in digital form, either on an 8-bit nonlinear scale that is decoded with memory lookups or on a !O- bit linear scale. The fiber receiver con- verts the serial optical data to parallel data on copper. It synchronizes the in- coming data to the trigger system 25 nsec clock and aligns it to the correct cross- ing number. The fiber receiver does error detection, using error codes transmitted with the data, and logs the errors for sub- sequent readout. After reception and synchronization, the calorimeter trigger data is fed to two circuits. The first uses memory lookup ta- bles to convert the energies into Et, Ex, and Ey and then injects these quantities into a summation network, based on a 77 high speed GaAs Adder ASIC [5], and computes sums of energies on groups of towers for jet triggers and over the entire calorimeter for the global Et and miss- ing Pt triggers. The second circuit per- forms our isolation algorithm, described ) earlier, to identify electrons and photons. The results of both circuits are compiled by subsequent logic into lists of jets and electrons passing various thresholds and other conditions, as well as the global en- ergy sums. These are forwarded to the global level 1 trigger. We are presently in the process of completing the adder ASIC design (see Figure 5) and will produce a test GaAs integrated circuit. We will build a VME board to test this ASIC at speeds up to 160 MHz. We plan to cycle the CMS calorime- ter trigger system at four times the LH C speed, i.e. 160 MHz, in order to attain a compact size at an affordable cost. Sys- tem engineering issues to realize such a design are being studied. REFERENCES 1. CMS, The Compact Muon Solenoid, Letter of Intent, CERN /LHCC 92-3, 1992; CERN/LHCC 93-48, 1993. 2. W.H. Smith, in Proc. ofthe Int. Conf. on Comp. in HEP, Annecy, France, 1992. 3. S. Dasu, et al., Proc. of the Int. Conf. on Cal. in HEP, .Isola d'Elba, Italy, 1993. 4. N. Ellis et al., CERNfDRDC 92-17, 1992. 5. D. Panescu et al., Proc. of the 1992 IEEE Nucl. Sci. Symp., Orlando, FL. Singles Doubles Background Higgs trigger Top trigger W trigger Threshold Threshold Rate Efficiency Efficiency Efficiency GeV GeV kHz % % % 20 10 54.5 99 85 79 25 12.5 23.0 97 79 67 30 15 10.8 95 71 52 35 17.5 5.6 92 63 33 40 20 2.9 87 57 16 45 22.5 1.7 82 49 7 50 25 1.1 74 43 4 Table 1. CMS calorimeter trigger efficiency for Higgs decays to two photons, top decays to electron, and W decays to electron processes are shown for our algorithm as a function of trigger threshold with corresponding rates from QCD background. Eight Operand Adder Tree ASIC Figure 5. Adder ASIC design block diagram. 78 Evaluation of a parallel processing system and parallel algorithm for triggering in new generation colliders E. Davis t, G. Busettot, C. Carpaneset, S. Centro+, R. Heaton§, P. Nit, D. Pascolit, E. Siliottof, and G. Ursot i Dipartimento di Fisica and INFN Sezione di Padova Via F. Marzolo 8, 135131 Padova,Italy t Dept. of Computer Science, North Carolina State University Raleigh, North Carolina 27695-8206 § MCNC, PO Box 12889 Research Triangle Park, NC 27709-2889 Abstract A new system based on the Blitzen parallel processing architecture, for application to second level triggering in high energy colliders, is described. The simulated performance of this system in real-time cluster finding is presented. The efficiency has been evaluated on a sample of CDF calorimeter data by comparison with off-line analysis. The system has also been tested in track finding with the TRD algorithm from the CERN /EAST collaboration. Introduction Parallel processing has been investi- gated as a means of handling the high rates and complex, multiple interactions foreseen during the future collider exper- iments. The challenge is to find inter- esting events from the vast quantity of data produced by detectors. Selectivity is expected to be implemented in stages with each stage, or "trigger level", refin- ing selection by increasing research com- plexity. The first level of such a hierar- chical computing structure is expected to have an output event rate on the order of 100KHz [2]. For the second level trigger many ar- chitectures have been proposed [8]. A very promising one is based on the use of embedded processors acting on the data 79 of "Regions of Interest" (Rol) tagged by the first level trigger. A parallel pro- cessing array using the Blitzen device [3] seems to be a very good candidate, since detectors can be described as large arrays of cells which provide information that can be likened to images. These images may easily be mapped on an array of ele- mentary processing elements. The performance of a Blitzen array of 16 x 16 processing elements has been evaluated running two benchmark algo- rithms defined by the EAST collaboration at CERN ([4], [5], and [6]). These bench- marks were used to compare the results of various pipeline and parallel machines [2]. Simulated data sets provided by EAST were Monte-Carlo generated. After de- scribing the Blitzen architecture, this pa- per gives the performance of the Blitzen machine for cluster energy finding using a sample of CDF calorimeter experimental data. Blitzen Architecture The Blitzen device, implemented as a custom VLSI chip, is a building block for massively parallel computing systems [3]. The referenced paper has a complete de- scription of the device so we present only the major features that will aid in under- standing this paper. Each chip has an 8 x 16 array of bit-serial processing ele- ments (PEs) that operate in SIMD mode, i.e., all of the PEs simultaneously ex- ecute the same instruction on different data sets. Each PE has an arithmetic unit, a few registers, and 1 K bits of random access memory. PEs are interconnected with an X-shaped grid that provides communica- tion between each PE and its eight near- est neighbors. 1/0 data transfers make use of 4-bit buses with 16 PEs per bus. This interconnection and 1/0 architec- ture makes it possible to build arrays of different shapes and dimensions from the chips. resull data shift regisler; slaiUS register OR array -instructions- '-----.:;__--' addn=;ses HiP PI Channel HiPPI receiver, LUTs, comer turners, andFlFOs result image data data BlitzeD processing array Figure 1. Prototype System Structure. A prototype system has recently been developed [7). Features of the system, shown in Fig. 1, include a high bandwidth 80 HiP PI data interface, a VME interface for control functions and access to a host sys- tem, control logic, and a 16 x 16 array of processing elements using the Blitzen device. The input data path contributes to the algorithmic performance in that it contains, for optional use, both a lookup table and a data reformatting feature. The lookup table can convert incoming data in certain useful ways. For exam- ple, strings of equally weighted bits can be converted into coded values as part of the input :How. Data reformatting, or corner-turning, can be used to align data as it is delivered from the readout systems with the 1/0 structure of the processing array. This system is implemented as a sin- gle board with a VME form factor. It is intended to be used in conjunction with a host machine. Programs can be trans- ferred from the host to the control mem- ory and execution initiated by the host. The parallel system can proceed indepen- dently of the host, yet it can communicate both data and control information asyn- chronously. Current status is that the system is operational and has been tested with TRD track-finding, one of the two bench- marks mentioned earlier. Results are identical to those produced by simulation and reported in [5). The rest of this paper reports performance and efficiency results of a parallel algorithm for cluster :finding with CDF calorimeter data that were de- termined from a simulation of the system before the hardware was available. The CD F Calorimeter The calorimeter of CDF [1] is based on projective towers pointing to the nom- inal interaction region. It is divided into three sections covering different regions in the polar angle (J with respect to the beam axis. The segmentation of the calorimeter that the second level trigger can access has equal intervals of rapidity 11 = -In tan(~) and azimuthal angle ¢ with respect to the beam line. The inter- vals are fl'TJ = 0.1 and fl¢ = 15°. These towers are treated as distinct elements in the segmentation that results in a 44 x 24 matrix mapping of the full calorimeter. The Off-line Cluster Finder Algorithm The off-line cluster reconstruction al- gorithm first locates all towers with a transverse energy Et above a threshold of 1GeV. Every additional tower with Ee above lOOM e V and located at flR = J A.¢2 + A'T/2 < 0. 7 with respect to the centroid of the cluster is then associated. The centroid of this cluster is calculated and all the towers within AR are grouped together in a new cluster. This proce- dure is repeated until the cluster is un- changed. The On-line Cluster Finder Algorithm It is assumed that Regions-of-Interest tagged by the first level trigger are win- dows of 16 x 16 towers. Each tower pro- vides values of both hadronic and electro- magnetic energy deposition. We assign the energy values of one tower to one PE. This mapping allows the analysis of one event by processing tower data in parallel. According to the topology of the CDF calorimeter, the energy of a cluster is as- sumed to be inside a sub-window of 5 x 5 towers. There are 12 x 12 positions of a 5 X 5 sub-window within a 16 x 16 win- dow. Each of these positions represents a potential cluster. The cluster searching 81 criteria is based on the value of energy deposition in the sub-window and in its central tower. The 16 x 16 PE array exe- cutes the following computational steps: 1. Sum the electromagnetic and ha- dronic energy of each tower. 2. Compute the total energy values of all 12 x 12 potential clusters. At the end of this step each PE contains the energy value of the sub-window of which it is the center, as well as the energy of its associated tower. 3. Look for the sub-windows and the related central towers with energy values above given thresholds T h2 and Th1 respectively. Comparison of Results The performance of the parallel on- line algorithm has been compared to the off-line analysis results, both applied to a sample of CDF jet data. Events from pp collisions at .JS = l.ST e V were recorded with a minimum trigger requirement of a transverse energy Et of 20Ge V collected in a cluster. Such a trigger was mainly de- signed for tuning the calorimeter response to jets of low energy. The parallel algorithm has been ap- plied with three threshold values on the central tower energy and no condition on the cluster total energy value. The ef- fect of the threshold is shown in the clus- ter multiplicity distributions reported in Fig.2. Part(a) shows the off-line results. Parts (b), (c), and (d) show the parallel algorithm results for Th1 = 0.64, 1.28, and 2.56Ge V respectively. A qualitative agreement is reached with the intermedi- ate threshold value, while a clear over- estimate of the nu'mber of clusters is ob- tained with the lowest threshold. This effect is due to low energy clusters, as is :~t~ 0 5 10 - ' :'.' .~~. '''' .'.''.'1 15 20 25 J() Humber of clusters Humber of clusters ~i~ 0 5 10 c) I I I I 15 Humber of clusters §fR_ 0 0 5 I Lteon I • • 3 ·.~~ 25 30 d) I I I. 10 I I I I I I I I 15 20 Number or clusters Figure 2. Cluster multiplicity distributions. shown in Fig.3 where the energy distribu- tions are presented for the off-line (solid) algorithm and for the three thresholds. 2!50 .....--------, 3500 225 lOOO 200 175 2500 1:50 2000 125 ··, 1500 100 75 1000 \ 50 500 25 0 20 40 50 80 100 £ (CeV) Figure 3. Cluster energy distributions. A loss of efficiency is expected when the threshold is increased, however the multiplicity per event and the occupancy can produce critical situations in a real experiment for lower threshold values. We studied in detail the efficiency, match- ing both energy (!lEt < 3o-Ec) and po- sition ( !l.R < 0. 7) of clusters found by the parallel algorithm with respect to the 82 off-line. The result is reported in Fig.4a where the efficiency is plotted versus the energy of the cluster for the three thresh- olds. As expected the lowest threshold of 0.64Ge V produces the highest efficiency. We then try to manage the high multiplic- ity effect by increasing the threshold value Th2 of the total cluster energy. Fig.4b shows the efficiency for Thl = 0.64GeV with Th2 values of 0.64, 1.28, 2.56 and 5.28Ge V. The effect of imposing both thresholds is a sharper and higher efficien- cy curve and a possible control of multi- plicity by optimizing the value of T h2. ~ ~ w 0.8 0.6 o.• 0.2 jij!.r ~.,.,_; fti"' ... nf ,!'"" 0 o~~2~~~~~7~.5~~10~1~2~~~15~~.77.5~2~0~22~.5~2'5 E (CeV) l:' -~ 1 :f ..... 0.8 0.6 "' r o.• 0.2 •. 0 0 2~ 7.5 10 12.5 15 17~ 20 22.5 25 E (CeV) Figure 4. Clustering efficiency. Execution Times We give execution times for the algo- rithm in terms of instruction cycle counts. Since a Blitzen instruction is executed in one clock cycle, we can provide a time conversion according to the operating fre- quency of the Blitzen chips. The compu- tational steps were outlined previously. Activity Cycles time: (I'll) time: (I'll) GlOM H.& O&OMH.o input data 96 4.8 1.9 compute algorithm 458 22.9 9.2 output relllllta 60 3.0 1.2 Total alsorithm 614 30.7 12.3 We ran the same algorithm, written · in C and optimized for sequential execu- tion, on a few commercial machines. Exe- cution times, reported in the table below, are for the computational part of the algo- rithm with no I/0. Blitzen times for the same computational work are also listed for comparison. S;yatetn CPU clock time MHz P" SUN IPX SP.ARC 40 216 SUN 5510/30 SuperSP .ARC 36 105 DECaystem 5500 R3000 30 200 DEC 3000..600 DECchip21064 160 76 HP 9000/730 RISC 7100 66 86 HP 9000/735 RISC 7100 99 57 BLITZ EN 20 23 50 9 Conclusion The reported results show that a sig- nal processor based on a SIMD engine, designed originally for pattern recogni- tion and image analysis, can reach the re- quired performance in real-time, second level trigger applications. A key point is the good system balance between the array size and the required I/0 band- width, that can be achieved with appli- cation specific hardware designed around Blitzen devices. The inclusion of lookup tables and corner-turning logic AS part of the single board system reduces the need for special routing logic in the read- out architecture of the experiment. Other tests [2] performed on commercial proces- sors gave less satisfactory results mainly because of the 1/0 limitations. REFERENCES 1. F. Abe, et al., "The CDF Detector: an Overview", Nuclear Instrumenta- tions and Methods, Vol. A271, 1988, pp.387. 2. J. Badier et al, "Evaluating Parallel Architectures for two Real-Time Ap- plications with 100KHz Repetition 83 Rate", IEEE Trans. on Nuclear Sci- ence, Vol. 40, No. 1, February 1993, pp. 45-55. 3. D. W. Blevins, E. W. Davis, R. A. Heaton, and J. H. Rei£, "BLITZ EN: A Highly Integrated Massively Paral- lel Machine", Journal of Parallel and Distributed Computing, Vol. 8, No. 2, February 1990, pp. 150-160. 4. S. Centro et al, "A Parallel Algorithm for Feature Extraction from Transi- tion Radiation Detector Data: Bench- mark Results Using the Blitzen Par- allel Processor", CERN /EAST Note 92-11, CERN, Geneva, Switzerland, July 1992. Also TR DFPD 92/EI/28, Dept. of Physics, Univ. of Padova, Italy, July 1992. 5. S. Centro, E. Davis, P. Ni, and D. Pascoli, "Results of Second Level _ Trigger Algorithms Using the Blitzen Parallel Machine", CHEP '92, An- necy, France, September 1992. 6. _ S. Centro et al, "Results of Sec- ond Level Trigger Algorithm on Spa- cal Calorimeter Data Using the Blit- zen Parallel Machine", CERN /EAST Note 93-06, CERN, Geneva, Switzer- land, March 1993. Also TR DFPD 93/EI/14, Dept. of Physics, Univ. of Padova, Italy, March 1993. 7. S. Centro, et al, "Real-time Parallel Processing in High Energy Physics: Architecture of the Blitzen Data Acquisition System", Microprocess- ing and Microprogramming 40 (1994) 167-178. 8. Proc. of the Con£. on Computing in High Energy Physics, CHEP '92, An- necy, France, September 1992. A SECOND-LEVEL TRIGGER CONCEPT BASED ON COMMUNICATING DIGITAL SIGNAL PROCESSORS P. Wegner, U. Gensch, H. Leich DESY Deutsches Elektronen-Synchrotron Institut fiir Hochenergiephysik, Zeuthen, Germany Abstract A design for a second level- trigger system based on communicating signal processors is discussed. For the proposed HERA-B experi- ment at DESY-Hamburg different approaches for parallel Kalman filter track finding algorithms have been tested using an array of TMS320C40 processors. Possible hardware implementations of sec- ond level trigger architectures are presented including a special high bandwidth communication channel. INTRODUCTION In a multi-stage-trigger environment for future High Energy Physics experi- ments the second-level trigger architec- ture requires both high computing power and high bandwidth connections. New communicating signal processors like the Texas Instruments TMS320C40 (C40) [1] can fulfill this task. In the context of Research and Development activities for the proposed HERA-B experiment some parts of a possible second-level trigger have been tested. HERA-B The aim of this experiment [2] at the HERA proton ring will be to study CP violation in B ---+ J /'I! Ks decays. The B- mesons will be produced in interactions of high energetic protons with nuclei of internal targets. 84 To reach the required statistical signifi- cance the experiment has to handle sev- eral pA events per bunch, the bunch dis- tance will be 96 ns and therefore the total rate will be about 30-50 MHz. To achieve large rejection factors and to retain large efficiencies forB --t J /if! Ks a refined trig- ger for J /'I! will have to be applied. Tasks of the trigger will be lepton identification, determination of momenta and an estima- tion of the dilepton invariant mass. TRIGGERING The first-level trigger is based on spe- cial hardware, and uses only restricted in- formation. It will provide a rejection fac- tor of about 10 3 • The second-level trigger will use data from tracking layers even inside the mag- net volume. Using lepton tags from the first level and a vertex tag from the Si- vertexdetector, and including the drift times an additional rejection factor of 10 can be obtained. A further reduction can be obtained if also data (electron probability) from the Transition Radia- tion Tracker (TRT) is used. ARCHITECTURES Track finding in the second-level trig- ger follows the recursive Kalman filter method[3]. The required decision time of a few hundred microseconds for a lep- ton pair requires the use of parallel archi- tectures for computing the Kalman filter. For that purpose different concepts have been tested: • DSP farming • Pipelining • Algorithmic decomposition. Using a processor farm (similar to the third-level trigger approach known from various experiments) one track is pro- cessed by one DSP. This DSP therefore must have access to the data of all detec- tors involved in the second-level trigger schema, therefore the startup latency de- pends only on the communication time. A DSP farm provides an algorithm inde- pendent architecture which can be used if the processing time on one DSP is suf- ficient for the second-level trigger task. Then the number of processors needed for farms is much lower compared to pipelin- mg. Tracking with a DSP pipeline means that each processor is responsible for one de- tector part ( eg. one tracking chamber). Every DSP has access to the data of only this detector par~. A dedicated pipeline_ has to be used enabling the application of the recursive Kalman filter method, 85 and is therefore very algorithm depen- dent. Each Kalman filter step corre- sponds to one pipeline step and therefore needs a transfer of the previous filtered state vector and the corresponding covari- ance matrix. The decompositon into dif- ferent processing steps together with the communication time for every step leads to a large startup latency time before first results are available. From this follows that a continuous data stream is neces- sary to fill the pipeline properly. Algorithmic decomposition can be a de- composition of one single step ( eg. the separation of prediction and filtering in the case of the Kalman filter) inside a pipeline to achieve a higher granularity. Compared to the previously described pipeline architecture the required number processors increases as well as the latency time, but dependent on the time of the largest fine grained processor step an in- crease of the overall processing speed can be achieved. Another kind of algorithmic decom- position is realized by connecting co- processors to the DSPs are used. "Co- processor" stands for additional DSPs with a link or shared memory connection or Field Programmable Gate Arrays (FP- GAs) with a memory mapping interface to the DSP (6]. The latter could be use- ful if special bit operations on combined data words are needed which will take a long time on DSPs. The output of the above communicating DSP systems (the track parameters) are combined with features from the other de- tectors build up a global decision. As pro- posed in [4][5] a special arrangement of C40 processors can be used for the calcu- lation of the invariant masses of the lep- ton pairs, and additional global informa- tion useful for second-level trigger deci- sions. All described architectures have been testet in a restricted form using a VME- slave board equipped with four C40- TIMs which is connected to a SUN worksta- tion via a SBus- VME adapter. The TIMs on the board are internally connected by C40-links with an unbuffered transfer rate of 20 Mbytes/sec. The clock rate of the on-TIM C40 is 40 MHz. Time measure- ments are done by using one of the C40 timers with a resolution of lOOns. RESULTS For the tests a Kalman filter algorithm derived from that used in the off-line pat- tern recognition has been applied. Five track parameters have to be determined to realize a three-dimensional track fol- lowing. Therefore one has to handle a 5 element state vector and a 5x5 covariance matrix. The distributed programs have been written in mixture of C and 040- Assembler. The input data have been taken from the Monte Carlo simulation of a foreseen HERA-B detector setup. In the case of a processor farm consist- ing of 4 C40s the processing time for one Kalman filter step was about 65J.Ls which gives a total processing time for 10 planes involved in the second level trig- ger of 650J.Ls. Naturally, during this time 4 tracks can be processed in parallel. In a 4-stage pipeline of C40s connected via C40 links every Kalman filter step takes about 60J.Ls. The communication time for transfering the setup vector and the covariance matrix is about 6J.Ls. This gives a startup latency of about 264J.Ls ( 4 * 60J.Ls+4 * 6jts, including the time for 86 output communication), and a total pro- cessing time for a properly filled pipeline of about 66J.LS. If again 10 planes are as- sumed to be necessary for the second level trigger, 10 processors are needed for one track. The latency runs up to 660J.Ls. If the Kalman filter step is divided into the prediction and the filter itself, the prediction takes about 40J.Ls, and the fil- ter about 12J.Ls. The communication time for state vector, covariance matrix, and some error values is about 7 J.LS. Based on 10 planes the reduction of the total pro- cessing time to 4 7 J.LS leads to a latency of 940J.Ls at a doubled number of processors needed and a more sophisticated algorith- mic structure. COMMUNICATIONS Two architectures are considered for the hardware implementation of the second-level trigger : • push architecture • pop architecture Push architecture means in this context that for each Ievel-l trigger decision the corresponding data of all electronic chan- nels needed for the level-2 trigger decision are read out and transferred via fast com- munication channels into the globallevel- 2 data buffer. Data necessary for trigger calculations (so called 'regions of interest' - ROI) is then selected and distributed e.g. via a router. In the case of a pop architecture the level- 2 data buffer is distributed within the read out crates. Only ROI data are se- lected and transferred on request from the processors of the farm, thus commu- nication channels with lower bandwidth are required. It will be sufficient to use standard C40 channels for the HERA-B experiment. To perform the acquisition of ROI data from the buffers within one crate a read-out controller with C40-link interfaces and VME master capability has to be used. A specific C40 link imple- mentation with optical data transmission and pipelining prevents bandwidth degra- dation over long distances and provides a high level of EMI protection within a 'noisy' detector environment. The pop architecture seems to be bet- ter adapted to the problem of Kalman fil- ter implementation. Each Kalman filter step , i.e. tracking through a superlayer, is calculated by one processor. The var- ious track candidates ("' 10) are treated in parallel on different processors. · ROI information is popped on request from the level-2 event buffers individually for each track. CONCLUDING REMARKS A system consisting of four commu- nicating C40-DSPs has been used to test a possible second-level trigger scheme for HERA-B based on a tracking algorithm. The timing results obtained indicate that this kind of architecture could play an im- portant role in triggering at future High Energy Physics experiments as HERA-B. Especially new developments as the Ana- log Devices ADSP-21060 SHARC, the Texas Instruments five processor video DSP TMS320C80 (MVP), or a much higher clock rate TMS320C40 successor show great promise of a doubling of pro- cessor speed and bandwidth during the next two years. 87 ACKNOWLEDGEMENTS We are grateful to Siegmund Nowak and Rainer Mankel for providing the Monte Carlo data, and for discussions on the tracking algorithms. We have also benefitted greatly from the work within the CERN/EAST(RDll) collaboration, and we would like to ex- press our gratitude to Rudy Bock and Iosif Legrand for the helpful discussions on second-level trigger architectures. REFERENCES 1. TMS320C40 User's Guide, Texas In- struments, 1992. 2. Albrecht et al., "An Experiment to Study CP Violation in the B Sys- tem Using an Internal Target at the HERA Proton Ring" ,Letter of Intent, DESY-PRC 92/94, October 1992. 3. R.Friihwirth,Nucl. Instr. and Meth., A262( 1987)444. 4. R.Bock,J.Carter,I.C.Legrand, "Real time, data driven architectures simu- lated in concurrent C++ for the LHC second-level trigger," CERN/EAST Note 93-15. 5. R.Bock,J.Carter,I.C.Legrand, "What can artificial neural networks do for the global second level trigger", CERN /EAST Note 94-08. 6. A.Borgers,F.Goldbach,D.Ockeloen, "Realtime, Frond-end Parallel Signal Processing using Texas Instruments' TMS320C40 Digital Signal Proces- sors", talk given on the C40 Work- shop at Utrecht University, December 1993. The D0 Level 1.5 Calorimeter Trigger James T. Linnemann for the D0 Calorimeter Level1.5 Project * Michigan State University Department of Physics and Astronomy East Lansing, MI 48824 USA Abstract We present a trigger based on commercial DSP's currently being installed in the D0 experiment. The D0 Trigger The D0 trigger consists of a dead- timeless hardware phase (Level 1, [1]) which selects events for digitization, and a software phase (Level 2 [2]) using a pro- cessor farm. One of the scarcest resources in D0 triggering is the bandwidth into Level2. Levell.S is an intermediate hard- ware trigger level designed to improve the quality of events chosen for digitization. Level 1.5 makes decisions in 10-200 p,sec, but incurs deadtime while waiting for the decision. The Level 1.5 Calorimeter Trigger The physics goal for the Level 1.5 Calorimeter Trigger was to achieve a re- duction of a factor of 5 in electromagnetic triggers with efficiency > 90%. *B. Gibbard (BNL), U. Heintz (Columbia), M. Narain (FNAL), J. Drinkard, A. Lankford, S. Pier (UC Irvine), A. Baden, S. Eno (Mary- land), M. Abolins, D. Edmunds, S. Fahey, R. Genik, S. Gross, ,p_ Laurens, J. Linnemann, D. Owen (MSU), G. Griffin, G. Snow (Nebraska), z. Zhang (Stony Brook), D. Wirjawan (Texas A+M) 88 The technical goals included holding deadtime below 10 % (which, assuming a maximum 1KHz input rate, implied a de- cision time of 100 p,sec or less), short con- struction time (which encouraged use of commercial hardware) and flexibility for future development (which encouraged a programmable processor). The Level 1 decision is based on Et measurements for 1280 towers of dTJ x b..</J = .2 x .2 . Separate sums are available for the electromagnetic (EM) and hadronic (HAD) portion of the towers. Time con- straints limit the Levell decision to con- sideration of single towers or of sums over large fixed-size blocks of towers. Both electrons and jets may split their energy across two or more towers. To main- tain good efficiency, Level 1 thresholds for electrons and jets must be set much lower than the Et of the actual objects of interest. The Level 1.5 trigger can con- sider neighbors of towers above a thresh- old. The first algorithm implemented is for electrons. It applies a threshold to the 2xl EM sum of a tower above the Level 1 threshold added. to its highest Et neigh- bor. In addition it applies an isolation cut. It calculates a 3x3 (EM + HAD) sum around the Level 1 candidate tower and makes a cut on [2xl] / [3x3] > min. In typical operating conditions, this algo- rithm is expected to give a rejection of 3-10 for efficiency > 90%. The Level1.5 Calorimeter Trigger Hardware Preliminary design studies made it clear that for ANY design, the key prob- lem was access to the input data. The 2560 8-bit signals are spread across 10 Level 1 trigger racks. Our other design goals led us to consider a programmable processor. The algorithms under consid- eration are simple enough that many mi- croprocessors have the necessary speed, but digital signal processors are attrac- tive because they are also optimized for fast access to data. It was clear that the data must be available to the proces- sors directly, as VME bus cycles are far too slow to meet the time requirement of 100 p.sec. for the Level 1.5 decision. We chose a commercial VME board, the Hydra II by Ariel. This board carries 4 TMS320C40 DSP's. It was vital to our selection that 4 of the 6 I/0 ports of each DSP were available for data transfer from outside the board. The remaining ports are used to ring-connect the DSPs on the board. There is adequate on-board local and shared fast memory. The processor runs at 50 ns per instruction and the com- munication ports transfer 1 byte per 50 ns. We also purchased most of the other Level1.5 hardware needed to write Level 1.5 results into the data stream. Transport of Data from Level 1 to Level 1.5 We chose to assign 11 DSP's to local processing of candidates (essentially one 89 per Level 1 rack). This gives up to a 10- fold speedup due to parallelism. The lo- cal DSP's then report results to a global DSP. Each DSP handles Level 1 candi- dates from all 32 </> towers in a patch 4 1J towers wide. To execute our algo- rithm, the DSP must also have informa- tion about neighbors of the candidates. This access is simplest if the DSP also has all needed neighbors locally. So we chose to send each DSP data for two neighbor- ing racks and to assign the patches (each 1 rack wide) to the boundary between 2 racks. Special cases at the ends of the calorimeter were eliminated by providing fake Et=O data for the nonexistent neigh- bors. To transport the Level 1 data to the Level 1.5 trigger crate, driver cards were added to the existing hooks on the Level 1 cards. There is enough time available that each of the 32 Level 1 cards in a rack need not have its own cables to send data to Level1.5. One sequencer card per rack controlled which driver owned the rack's cable, and a total of 10 cables carried data from the Level 1 racks to the Level 1.5 crate. The cables were lOrn long and 2 bytes wide. The signals were sent as dif- ferential ECL, with 100 ns between data transfers. A receiver in the Level 1.5 crate trans- lated the signals to the CMOS required by the DSP communication ports and split them into two single byte signals (EM and EM+ Hadronic) for each of two communi- cation ports. These signals for each rack were sent to the two neighboring DSP's which required the rack's signals. Thus the full transfer takes place in roughly 13 J.LSec, or a rate of about 400 MB/s into the Level 1.5 trigger. We decided to rebuild the Levell can- didate list in Level 1.5, as access to the original Levell list was much more com- plex than access to the Levell input data. This implied that the Level 1 threshold settings had to be supplied to Level 1.5 as well. The Level 1.5 Calorimeter Trigger Software The Level 1.5 Calorimeter Trigger processing steps are: 1) collect all Trigger Tower energies from the Levell Calorime- ter Trigger, 2) sequentially scan 128 Trig- ger Towers/DSP looking for candidates, 3) use an algorithm to confirm some of the selected candidates, 4) combine the results and form a decision based on a global analysis. We refer to step 3 as the "tool" code, while the rest is independent of algorithm and we refer to it as frame code. The tool code comprises only 10% of the total source code. The frame code was written to support multiple algorithms in a single crate. All code was developed in DSP as- sembler, ·assisted by the commercial par- allel debugger. The simulator (written in FORTRAN) is integrated with the Level 1 and Level 2 simulators. The simulator is used for verification of the DSP code (on samples of passed and failed events) and for estimation of efficiency and re- jection. The trigger simulator is driven by the same ASCII :file that controls the actual triggering online. Facilities exist for monitoring rejection rates online, and for histogramming the location of objects found in Level 1.5. Status and Performance Readout of 6 of the 10 racks IS In- stalled. Two racks have been fully de- bugged on test data into the complete 90 Level 1.5 trigger crate. We anxiously await our first exposure to real events and the measurement of the actual mean Level 1.5 decision time, but bench tests to date are consistent with 85-100 p,sec. Conclusions More than most HEP triggers, this project depended on purchased compo- nents. This allows a straightforward up- grade path as new DSPs of the family be- come available. Choice of DSPs as en- gines allows straightforward addition of a jet algorithm. The addition of a sec- ond crate is also straightforward, as the readout of the Level 1 data has sufficient fanout for many crates. REFERENCES 1. M. Abolins, D. Edmunds, P. Laurens, J. Linnemann, B. Pi, "The Fast Trig- ger For The DO Experiment" Nuclear Instruments and Methods in Physics Research, A289, 1990, pp.543-560. and M. Abolins, D. Edmunds, P. Lau- rens, J. Linnemann, B. Pi, "A High Luminosity Trigger Design for the Tevatron Collider Experiment in DO" IEEE Transactions on Nuclear Sci- ence, Vol.37, No.1, 1989, pp.384-389. S. Abachi et al., "The DO Detector", Nucl. Instr. and Meth. A 338 (2-3) (1994) pp. 185 - 253. 2. J. Linnemann, "The DO Software Trigger" Proceedings of Compu t- ing in High Energy Physics, 1992, Annecy France, p 199-201 (CERN, 1992). IMPROVEMENTS IN THE CPLEAR TRIGGER AND DATA ACQUISI'l'ION SYSTEM The CPLEAR Collaboration : R. Adler 2 , T. Alhalel 2 , A. Angelopoulos 1 , A. Apostola.kis 1 , E. Aslanides 11 , G. Backenstoss 2 , C.P. Bee 11 , 0. Behnke 17 , J. Bennet 9 , V. Bertin 1 1, F. Blanc 7 · 13 , P. Bloch 4 , Ch. Bula 13 , P. Ca.rlson 15 , M. Carroll 9 , J. Carvalho 5 , E. Cawley 9 , S. Charala.mbous 16 , M. Chardalas 16 , G. Chardin 1 \ M.B. Chertok 3 , M. Danielsson 15 , A. Cody 9 , S. Dedoussis 16 , M. Dejardin\ J. Derre 14 , M. Dodgson 9 , J. Duclos 1 \ A. Ealet 11 , B. Eckart 2 , C. Eleftheriadis 16 , I. Evangelou 8 , L. Faravel'· 11 , P. Fassnacht 11 , J.L. Faure 1 4, C. Felder 2 , R. Ferreira-Marques 5 , W. Fetscher 17 , M. Fidecaro 4 , A. FilipCic 10 , D. Francis 3 , J. Fry 9 , E. Gabathuler 9 , R. Gamet 9 , D. Garreta 14 , T. Geralis 13 , H.-J. Gerber 17 , A. Go 3 , P. Gumplinger 17 , C. Guyot 1 4, A. Haselden 9 , P.J. Hayman 9 , F. Henry-Couannier 11 , R.\V. Hollander 6 ,E. Hubert 11 , K. Jansson 15 , H.U. Johner 7 , K .. Jon-And 15 , P.R. Kettle 13 , C. Kochowski 1 \ P. Kokkas 8 , R. Kreuger 6 , T. Lawry 3 , R. Le Gac 11 , F. Leimgruber 2 , A. Liolios 16 , E. Machado 5 , P. Malel, I. Mandic 10 , N. Manthos 8 , G. Maretl\ M. Mikuz 10 , J. Miller 3 , F. Montanet 11 , T. Nakada 13 , A. Onofre 5 , B. Pagels 17 , P. Pavlopoulos 2 , F. Pelucchi 11 , J. Pinto da Cunha 5 , A. Policarpo 5 , G. Polivka 2 , H. Postma 6 , R. Rickenbach 2 , B.L. Roberts 5 , E. Rozaki 1 , T. Ruf 4 L. Sacks 9 , L. Sakeliou 1 , P. Sanders 9 , C. Santoni 2 , K. Sarigiannis 1 , M. Schafer 17 , L.A. Schaller 7 , A. Schoppe1.4, P. Schune 1 \ A. Soares 14 , L. Tauscher 2 , C. Thibault 12 F. Touchard\ C. Touramanis 9 , F. Triantis 8 , D.A. Troster 2 , E. Van Beveren 5 , C.W.E. Van Eijk 6 , S. Vlachos 2 , P. \i\leber 17 , 0. Wigger 13 , C. Witzig 17 , M. Wolter 17 , C. Yeche 1 4, D. Zavrtanik 10 and D. Zimmerman 3 . 1 University of Athens, 2 University of Basle, 3 Boston University, 4 CERN, 5 LIP and University of Coimbra, 6 Delft University of Technology, 'University of Fribourg, 8 University of Ioa.nnina, 9 University of Liverpool, 10 J. Stefan Inst. and Phys. Dep., University of Ljubljana, 11 CPPM, IN2P3-CNRS et Universite d'Aix-Marseille II, 12 CSNSM, IN2P3-CNRS, 13 Paul-Scherrer-lnstitut(PSI), 14 DAPNIA/SPP, CE Saclay, 15 Roya.l Institute of Technology, Stockholm, 16 University of Thessaloniki, 17 ETH-ITP Zurich, presented by Fran<;ois TOUCHARD Abstract The CPLEAR experiment studies CP violation in the (K 0 , K 0 ) sys- tem. \Ve present the trigger architecture and the data acquisition system, a.s well as forthcoming upgrades 91 INTRODUCTION The CPLEAR experiment a1ms to measure the parameters of CP violation in the (K 0 , K 0 ) system. Its original- ity - when compared to other experi- ments using high energy beams of neutral kaons - resides in the use of strangeness tagged particle beams. By selecting the annihilation channels pp-+ K 0 IC IT+ and pp-+ K°K+ IT-, the strangeness of the neu- tral kaon is given by the charge of the associated charged kaon. The decay of the neutral kaon is studied in the 2 IT (IT+IT-and 1T 0 1T 0 ), 3 IT (IT+IT-rr 0 ) and semileptonic ('rr€v) channels . Unfortu- nately, the branching ratios of the inter- esting production channels are very low (2 10- 3 ) and the required statistics of neu- tral kaon events is high in order to have a sufficient accuracy on the CP violation parameters. The experiment must there- fore be able to stand a high j5 rate ( 1 MHz), the trigger must have a high re- jection (:::::: 1000) and the data acquisition system must be able to record up to 1000 events per second. The detector has a conventional cylin- drical topology [1]. The 200 MeV j c p beam from the CERN LEAR storage ring annihilates at rest in the gaseous hydro- gen target. Moving radially outwards, one first finds the tracking devices : 2 pro- portional chambers (PC's), 6 drift cham- bers (DC's) and two layers of streamer tubes (ST's) for a fast online z infor- mation. Exterior to the ST's are the Particle Identification Detectors (PID 's) : 32 modules, each consisting of a thresh- hold Cerenkov counter sandwiched be- tween two scintillators. The Cerenkov li- quid has been chosen so that one can dis- criminate fast particles (pions) from slow ones (kaons) in the phase space of the ex- 92 periment. Finally, one finds an electro- magnetic calorimeter made of lead and streamer tubes. The entire detector is mounted inside a dipole magnet. The to- tal number of channels is approximatively 70'000 and the event size lies between 2 and 2.4 kbytes, depending on the event topology. TRIGGER The trigger is multilevel. It uses al- gorithms the sophistication of which in- creases as the selection goes on. Decision logics Table 1 summarizes the successive cri- teria, the execution times and the rejec- tion rates. In the first step (Early De- cision Leve0, charged kaons are identi- fied by a SCS pattern in the PIDs (i.e. no light in the Cerenkov while the two scintillators in the same sector have been hit). One also demands at least one more charged particle (hit in the inner scintil- lator). When these patterns have been found, a strobe is sent to all front ends to start digitization. Slow pions faking kaons are rejected by a fast cut on the transverse momentum. The PT cut logic uses coincidences between adjacent wires in DC1 and DC6. The pattern recognition is performed in two steps. First, the Intermediate De- cision Level prepares the fine grain track- ing. It receives data from the previous trigger stage and hit patterns from sectors of chambers. These sectors are groups of wires, 64 for every chamber and sit- uated in front of the 32 PID modules. With this data., one can discriminate be- tween primary and secondary tracks. Pri- mary tracks have hits in the proportional chambers and are candidates for particles produced at the annihilation vertex. Sec- ondary tracks are candidates for late neu- tral kaon decay. A cut is performed on the number of tracks. The fine tracking is performed in a dedicated hard-wired processor : HWPl. The first stage of HWPl performs the ac- tual tracking by scanning tracks from the scintillators towards the target and using the wire information of the hit sectors. A cut is performed on the number of tracks. Then, tracks are ordered in registers ac- cording to their identity (kaon candidate, primary, secondary pions). A nevv· cut is performed on the number of tracks. The next stage of the processor computes the track parameters: curvature p, initial an- gle </;, distance of minimal approach t, z coordinate at the ST's radius. It also de- rives the longitudinal and transverse com- ponents of the particle momenta. The last stage of the processor computes the sum PK + P-rr and applies the cut PK + Prr > 750 MeV jc. In parallel with the kinematical cut, Processor Act on Decision EDL K candidates N(K)>O N (tracks)> 1 PT PT > 280MeV/c primary tracks IDL N(tracks) secondary tracks HWP1 fine tracking N(tracks) tracks N(tracks) parametrization kinematics PK+ Ptr HWP2 particle dE/dx identification ToF N(phe) HWP2.5 calorimeter Nshowers > j\fo showers the processor HWP2 refines the parti- cle identification. It gets the now digi- tized data from the PID front ends and compares the energy deposited in the in- ner scintillator ( dE/dx), the difference in the time of flight of the primary parti- cles (ToF) and the number of photoelec- trons created by the kaon candidates in the Cerenkov counters to the expected values calculated by using the tracks pa- rameters. The last processor in the trigger de- cision, HWP2. 5, works on events having only two charged tracks, i.e. candidates for a neutral kaon decay into two r. 0 . No correlation is made at this point between showers and charged tracks so that it is not possible to discriminate neutral show- ers from charged ones. A minimum num- ber N 0 of showers is demanded. The de- cision cuts the KL events which have not decayed inside the volume of the detec- tor (98% of them); It also improves the event reconstruction quality by imposing a minimum number of neutral showers. Get Execution Rate info from time reduction PID 60 ns 4.1 DCl,DC6 400 ns 3.1 PCl,PC2, DC1,DC2,DC5, 80 ns 1.7 DC6 sectors PC's, DC's, ST's 1.9 J.LS 1.4 detailed bus info 500 ns 1.3 from previous stage previous stage 500 ns 1.5 PID's HWP1 1.9 J.LS 6.4 calorimeter 1i J.LS 2.9 front ends (No = 6) Table 1. Trigger decisions 93 It should be noted that we have adopted a sectorized dialogue between the trigger processors and the detector front ends. Moreover, there is no hand- shake procedure in the dialogue: the pro- cessor puts a.n address on the bus and re- ceives after a predefined number of clocks the address (as a. cross-check) and the re- quired information. This procedure gives the best compromise between speed and relia.bili ty. Monitoring The monitoring of the trigger is per- formed via. the normal readout channel. Data from the processors is sent to the readout system through a. custom-built interface named SPY. Data. consists of the hit maps, the front end data received by the processors as well as the intermediate and final results of the processing. Local monitoring is performed in the local readout processor in the same way as for other detectors. The most power- ful tool for the trigger monitoring is the use of a sophisticated simulation of the processors. The detailed behavior of the processors is reproduced in a programme which accepts both the SPY data. and the full event as input. As ,,.ill be seen later, full events (including SPY data) are con- tinuously sent to the Online Vax cluster where they are treated by dedicated pro- gra.mmmes (Fig. 1) which calculate the functionality (1 vs. 2), the efficiency (1 vs. 3) and the resolutions( 1 vs. 4) of the trigger processors. Those quantities are monitored and are available on line. 94 HWP output SPY HWP FE+HWP output oulput simulalion simulation Real data event reconstruction (1) (2) (3) (4) Fig. 1 Trigger monitoring Status and future All the described processors are now implemented and have satisfactorily worked since the middle of 1992. Two new decisions are in preparation and will be tested and eventually included for pro- duction in the early days of the data. tak- ing period beginning in May 1994. • Microchamber A very large fraction of the back- ground comes from direct annihila- tion of p into four charged pions : pp-77r+7i-rr+rr-X 0 . This background can be reduced by cutting on the event multi- plicity as close as possible to the primary vertex. To do this, we are going to modify the target area by inserting a micro pro- portional chamber. This chamber is 120 mm long and :30 mm diameter. It has 96 wires and strips at 90° and 42°. The max- imum drift time is 30 ns, allowing a fast decision. We expect to impr.ove the total rejection of the trigger by a factor 3 to 4. • Kinematic event filtering A part of the background consists of events with some neutral pions : pp-77i°K+7r-K 0 , pp-7K+K-rr+7r-nrr 0 , pp-trr+rr-7i+7i-nii 0 . vVe intend to reduce it by a. kinematic event filtering using a. neural network algorithm acting on all four tracks events. The inputs of the net- work are the two components of the mo- mentum, PT and Pz, and the initial an- gle of the tracks <P- The network has been trained using Monte Carlo data. Its efficiency has been evaluated with both Monte Carlo and filtered real data. We have found an acceptance of good events of 82% while the total rejection on 4 track events was improved by a factor 2. The network has been implemented on a DSP processor, the 96002 from Motorola in a VME environment. The execution time is 38 f.lS per event. The number of good events per second does not increase, but the number of written tapes is reduced by a factor 2. One will therefore gain on the offline processing or have the possibility to relax some of the trigger constraints. DATA ACQUISITION SYSTEM The Data Acquisition System of the experiment has already been described in CHEP'92 [2]. We shall therefore only re- call its main features before presenting the forthcoming upgrade. The general layout of the system is presented in Fig. 2. The hardware is based on the Valet+ system designed by CERN and built around the FIC82:30 (68020 CPU) card from CES. Data is read out from front ends through vari- ous busses (VME, CAMAC, FASTBUS). It is then DMA'd from the readout pro- cessors to dual port memories in the crate of the Event Builder via point to point VSB connections. Note that the Fast- bus front end of the Calorimeter is di- rectly read by the Event Builder via a Fastbus to VSB interface (STR 330 mod- ule from Struck). The event is assembled in a Zebra compatible structure by the Event Builder which dispatches blocks of 95 events to downstream clients processors via a. VIC bus : TAPE which serves a IBM 3480 compatible cassette drive, MSP which sends events to the Online Vax Cluster for monitoring and FARM which feeds a. transputer farm. Detector front-end (any bus) t Detector readout (VME) VIC • • • • Multichannel parallel readout Detector front-end (any bus) t Detector readout SCSI (VME) VAX Cluster Transputers farm Fig. 2 DAQ layout On the Vax side, we use the MODEL package developed at CERN for the LEP era.. The operating system is VMS 5.5. The cluster is composed of a microva.x :3800 and 8 Vaxsta.tions :3100 or 4000- 90. Run and trigger configuration, alarm message handling, run control and slow control are all handled from the cluster. Monitoring Monitoring JS performed at vanous levels : • in individual readout processors, which can analyse data from individual detec- tors • in the MSP Valet+ which can perform consistency checks of the event structure • on the Vax cluster : events received from MSP can be transfered to the Clus- ter via Ethernet and injected in a data stream built on the MODEL MBM pack- age. They are extracted and analyzed by clients such as the online event display, a trigger monitoring programme running the trigger simulation and a data qual- ity analysis programme. All accesses to the results of the analysis, consisting of histograms and N-tuples stored on the Valet+ system or the Vax cluster, are cen- tralized in a customized version of PAW named CPPAW. Upgrade The readout busy time is the mam limitation of the DAQ system : the cur- rently used Struck 302 I/0 interface be- tween the front ends and the readout pro- cessors has no FIFO, no local memory and allows a maximum transfer speed of 0. 7 Mbytesfs. A simple-- from the front ends point of view - improvement has been found by using the CES RIO mod- ule based on a MIPS R30.51 processor [3]. This module has a local memory of 4 Mbytes. It has been customized to have two 1024 word deep FIFO registers and to mimic the behavior of the Struck 302 so that no modification of the front ends is necessary. The readout time will be re- duced from 3 f.1S/vv·ord to 1.2 f.1S, therefore allowing a maximum transfer speed of 2 Mbytes/s. This new configuration will be tested during the first 1994 data taking period. Transputer farm The transputer farm installed down- stream of the Event Builder is a. collab- oration between CPLEAR and the Eu- 96 ropean Union project GP-MIMD which aims to develop a. Scalable Data Acquisi- tion System using Transputers [4]. A configuration with 32 TSOO trans- puters has been tested in run for feasibil- ity. Of these transputers, 10 were run- ning online the full CPLEAR offline pro- duction for 2 weeks in 1993. The other transputers worked as data and record- ing device drivers. Filtered exabyte cas- settes have been written directly at a re- duced sampling rate of 10 Hz. In the fu- ture, 64 T9000 transputers will be added to the configuration which should be able to cope with the full rate of data taking. Acknowledgements I would like to thank all the en- gineers who have been involved in this work : D. Sacker from Basle, C. Engster, W.G. Reyes, C. Jacobs, L. Van Konigsveld, E.J. Watson and H. Wendler from CERN, A. Calzas, B. Dinkespiller, Y. Gally from Marseille, N. Karkhour, D. Linget from Orsay, J.P. Bard, J.C. Michau from Saclay. REFERENCES 1. L. Adiels et al., Test of CP violation with K 0 and K 0 at LEAR, Proposal CERN-PSCC/8.S-6/P82 2. C.P. Bee et a/., Proceedings of the CHEP'92 conference, CERN 92-07 :3. B. Eckart et al., 8th Conference on real time computer applications, Van- couver, June 199:3, report TRIUMPH 9:3-1 4. l\1. Ward et a!., Interim report for the scalable data acquisition system, ES- PRIT project P.5404 GP-MIMD de- liverable THE CDF ULTRANET DATA ACQUISITION SYSTEM J. Patrick, H. Areti, G. W. Foster, G. Goeransson, U. Joshi, R. Harris, E. Kennedy, K. Maeshima, J. Pangburn, M. Schmitz, K. Treptow, S. Zimmerman, T. Zmuda Fermi National Accelerator Laboratory, Box 500, Batavia, IL 60510 T. Daniels, P. Maksimovic, R. Mattingly, S. Pavlon, P. Sphicas, S. Tether, D. Vucinic MIT, 77 Massachusetts A venue, Cambridge, MA 02139 F. Abe, E. Hayashi, Y. Morita, M. Nomachi KEK and University of Tsukuba, Tsukuba-shi, Ibaraki-ken 305, Japan K. Biery, P. Musgrave, K. Ragan, K. Strahl McGill University, 3600 University Street, Montreal, Quebec, Canada H3A 2TB J. Conway, J. Doroshenko, T. Devlin, L. Groer, R. Kennedy, C. Loomis, J. Mueller, T. Watts Rutgers University, Frelinghuysen Road, Piscataway, NJ 08854 H. Kim, A. Holscher, P. Sinervo University of Toronto, 60 St. George Street, Toronto, Ontario, Canada M5S lA 7 K. Sliwa, M. Timko Tufts University, 4 Colby Street, Medf<:>!:_~,_MA 02155 Abstract The high level portion of the data acquisition system of the CDF experiment operating at the Fermilab Tevatron proton-antiproton collider has been upgraded for the current data taking run. This new system is based on the commercial Ultranet network. VME based CPUs transmit front end data through an Ultranet hub to a series of Silicon Graphics server systems where high level algorithms make the final trigger decision. The system architecture provides for simultaneous data transfers between multiple ftont end and multiple SGI systems. Also, extensive use is made of off the shelf commercial components. INTRODUCTION CD F is one of two detectors at the Fer- mi lab proton-antiproton collider. First operated in 1985, the accelerator lumi- nosity has reached 10 times the original 97 design, and a series of improvements is expected to bring another factor of 10 in- crease over the next 6-8 years. In order to cope with the higher resulting event rate, the original data acquisition system must be upgraded. This upgrade is fur- ther motivated by reliability and mainte- nance problems posed by the numerous custom modules in the system designed over 10 years ago, especially considering the remaining life of the experiment. Original CDF Data Acquisition System The original CDF data acquisition system is described in references [1] and [2]. Very briefly, front end electronics is contained in either FASTBUS crates (about 60) or custom RABBIT crates. Custom readout controllers (SSPs for FASTBUS, MXs for RABBIT) collect data from the local crates. In response to a hardware trigger, an Event Builder collects data from the readout controllers over FASTBUS Cable Segments and de- livers it via a FASTBUS- FNAL Branch Bus- VME connection to a "farm" of Sil- icon Graphics server systems. Here FOR- TRAN algorithms make the final trigger decision. Accepted events are read by Branch Bus - FASTBUS links by one or more VAX systems and written to tape. Maximum throughput is about 25 Hz ( 200 KB/event) into Level 3, limited by large tranfer setup overheads in the Event Builder and message overheads in the method of data flow control. Requirements for Upgrade system To deal with expected improvements in the accelerator luminosity, the new sys- tem is required to support an event rate into Level 3 of at least 100 Hz and be expandable to higher rates in the future. In addition, to minimize in-house main- tenance it should make maximum use of commercial components where possible. Furthermore the system must interface to the current FASTBUS and RABBIT front end systems, as well as adapt tofu- ture upgrades in the front end electron- 98 ics. And whereas any interruption in operation was not considered acceptable, the new system must completely coexist with the old system, with either being se- lectable by software on a run by run basis. Overview of Upgrade System A diagram of the new architecture is show in Fig. 1. Local FASTBUS front end data are collected by new FAST- BUS Readout Controllers (FRCs) replac- ing the SSPs. A series of six VME based CPUs collects data from the FRCs over a new custom "Scanner Bus". These CPUs then write the data through an Ultra- net Hub to an upgraded farm of Level 3 processors. Accepted events are sent via Ultranet to a dedicated Consumer Server system where they are logged, and a sample distributed to worksta- tion based monitor processes via FDDI. Data flow control is provided by a ded- icated Scanner Manager communicating with the rest of the system via a reflec- tive memory network. The Ultranet hub is logically a switch, so that that data are transfered between multiple Scanner CPUs and Level 3 systems simultane- ously. Complete events are not assembled until they reach Level 3. FASTBUS Readout Controllers The FRCs are new custom devices that collect data from local FASTBUS front end devices. They are based on the MIPS R3000 processor, with FAST- BUS ma.Ster and slave interfaces based on Xylinx programmable gate arrays. Vx- Works, from Wind River Systems serves as real time operating system is used. An auxilliary card contains an interface to the Scanner Bus. Triple ported video ram Figure 1. Architecture of the new system. is used to provide high speed simultane- ous memory access from the CPU, and the FASTBUS and Scanner Bus ports. Scanner CPU Data are read from a subset of FRCs by a set of six VME based Synergy SB/063 68030 processors running the Vx- Works operating system. Transfer is over a custom developed 16 bit paral- lel, multidrop bus based on RS-485 tech- nology known as the "Scanner Bus". A VSB /VME dual access memory receives data from the Scanner Bus via a VSB in- terface. From this memory the data are then transfered to Level 3 over Ultranet by a VME based interface. Ultranet Ultranet is a high performance, propietary, commercial network from CNT /Ultranet of Minneapolis, MN. It is a "star" architecture, with point to point links to a central hub. Serial links transmit data at a rate of 256MBitsfsec. Transfer rates between VME based in- terfaces are limited to 13 MBytes/sec, 99 excluding overheads. TCP /IP protocol with an enlarged packet size and BSD socket API is used. Part of the pro- tocol processing is done in the inter- face reducing the load on the host CPU. While overheads are significant, they can be substantially hidden by having multi- ple transfers in progress simultaneously. Maximum aggregate bandwidth has been measured to be about 50 MBytes/sec for a single backplane hub. However the hub can be configured with multi- ple sub-backplanes increasing the poten- tial throughput provided all transfers do not go through the central backplane. Scanner Manager Control of the data flow is done by tasks running on a dedicated VME based CPU called the Scanner Manager. This process ensures for example that all frag- ments of a particular event are delivered to the same Level 3 processor. Communi- cation with the Scanner CPUs and Level 3 systems is via a dedicated reflective memory network (Scramnet, from Sys- tran Corp. of Dayton, OH). Memories are located in each Scanner CPU and Level 3 VME crate and connected by fiber optic cable. A write operation to a word in one module is automatically propagated to all modules in the network using a propi- etary protocol. This provides a very fast, low overhead means of communication, as well as being completely independent of the data flow medium. Level 3 Trigger The Level 3 processor farm runs a similar algorithm as the previous system to decide which events should be logged. Events are classified into several broad categories which determine their offline production priority, including express line and other data streams. In addition, Level 3 must now receive the 6 separate Scanner CPU fragments and build the complete event as previously done by the Event Builder. The internal control sys- tem has been substantially modified to in- terface to the rest of the upgrade system. Also, to provide sufficient processing ca- pacity to deal with the larger input event rate, four new Silicon Graphics 8 proces- sor Challenge systems have been added bringing the total compute power to over 3200 VUPs. Consumer Server Accepted events are sent v1a Ultra- net to a dedicated SGI system. There, the Consumer Server process distributes them to local data logging processes as well as remote monitoring processes via TCP /IP and FDDI. Consumer processes may request events based on their classi- fication by the Level 3 algorithm. Events are logged to local SCSI disks and spooled to Smm tape asynchronously. A total log- ging rate of approximately 2MB/sec, cor- responding to approximately 20 Hz, can be supported. Typical rates for normal data taking are 6-8 Hz. Performance and Status Tests of the system as currently con- figured with approximately the expected event size give a maximum rate into Level 3 of approximately 110 Hz with a null Level3 control system, and somewhat less with the full Level 3 system. However to keep the dead time due to front end digi- tization to a reasonable level, the system will be limited to around 50 Hz for the 100 current run. Thus little effort has so far been expended in maximizing this rate. The new system has been use for part of the time and is expected to become the default for data taking very soon. Summary The CDF data acquisition system has been upgraded with a new system based on commercial VME based CPUs and Ultranet network. The system has a substantially higher throughput than the previous FASTBUS based system. The current data taking run is expected to end in mid-1995. At that time, all CDF front end electronics will be replaced, and t!le system upgraded further to deal with that and also improve the rate capability by another factor of 2. ACKNOWLEDGEMENTS This work was supported by the US Department of Energy and National Sci- ence Foundation, the Canadian Nat ural Sciences and Engineering Council, and the Japanese Ministry of Science, Educa- tion and Culture. We gratefully acknowl- edge the contributions of the the Fermi- lab Computing Division to many aspects of this upgrade. We also thank Atlantic Aerospace Electronics Corporation and DESY for providing Ultranet software for the VxWorks and SGI Challenge systems respectively. REFERENCES 1. E. Barsotti, et. al., "FASTBUS Data Acquisition for CDF " Nucl. lost. Meth. A269, 82 (1988). 2. D. Quarrie, et. al., "The CDF Online System" Proc. Oxford CHEP, Comp. Phys. Comm. 57, 325 (1989). The CHORUS Data Acquisition System Giuseppe Carnevale Universita degli Studi di Napoli "Federico IT" - CERN Beverley Friend - CERN Jaap Panman- CERN Fabio Riccardi Universita degli Studi di Napoli "Federico IT"- INFN Napoli- CERN Abstract In this paper we present the data acquisition (DAQ) system of the CHORUS experiment at CERN. We concentrate our attention on the hardware and software architecture of this system, especially on the inter process communication system and in the way it was implemented, that constitutes one of the most innovative aspects of this DAQ design. Introduction In this paper we describe the data acqui- sition (DAQ) system of the CHORUS ex- periment [1], which will take data from April 1994 to the end 1995 at the SPS Wide Band Neutrino Beam facility of CERN (European Organization for Nuclear Research, Geneva, Switzerland).The aim of the experiment is to search for neutrino flavor mixing. The search for v,.cv't oscillations will be performed by detecting the appearance of a tau neutrino in a pure muon neutrino beam. As a direct observation is impossible, it is necessary to detect the decay of particles that are produced in the interaction ofv't in the detector target. The Detector The detector target consists of a stack of 800 kg of nuclear emulsions, followed by a fiber tracking system for the precise (1 mm3) determination of the vertex of the neutrino interaction from the particles that 101 come out of the emulsion stack. A high resolution calorimeter and a muon spec- tometer will allow performing kinematical cuts on the above mentioned reaction out- comes. The emulsions will be exposed to the neutrino beam for about a year, and then removed and scanned with an automatic microscope scanning device, that inte- grates the information coming from the tracks on the emulsions with those recorded on-line by the DAQ system, al- lowing reconstruct the event geometry with a spatial resolution of 1 J.Lm, that is required to spot the tau decay signature. The emulsion scanning time is estimated to be about a year. DAQ Requirements The bulk of the DAQ data will come from the CCD based readout system of the fiber tracker. It consists of 58 CCD cam- eras, for a total of about 9 million pixels. We expect to take at most two neutrino events per SPS burst, that is about 36 MBytes of CCD data in 6 ms. Two subse- quent neutrino bursts are interleaved by 2.5 sec in the SPS cycle, that has a period of about 14 sec. The calorimeter and the spectrometer will produce about 15 KByte of data per neutrino burst. The DAQ Hardware Architecture The front-end of the CHORUS DAQ system is made of 38 different CPUs, run- ning the OS-9 real time kernel plus the· REMOS object oriented multiprocessor real time environment, collaborating to the task of reading the digitized signals com- ing from the detector, collecting, validat- ing, compressing, and eventually streaming them onto a storage device. TuBE Fig. 1: The CHORUS DAQ Hardware Ar- chitecture. Each main section of the detector sys- tem, tracker (OPTO), trigger (TRIG), calorimeter (CALO) and spectrometer (SPEC), is equipped with a local DAQ system. All these sub-systems are VME, VSB and CAMAC based, interconnected via a standard VME Inter Crate (VIC) bus (CES VIC 8251) in a tree like structure (see fig. 1). All local systems are equipped with a CES FIC8234 VME controller, connected to a main Event Builder (EVB) system, that coordinates all their activities. The EVB and the OPTO FICs are 102 equipped with a double CPU for improved perfoi:lnance. The OPTO subsystem is equipped with an array of 29 Eltec SL30 VME image processors, that read the image data from the 58 cameras' frame buffers, compress (10:1), format and ship them to the local master processor (OPTO). The EVB is then linked to a cluster of six IBM RS 6000 workstations running the UNIX operating system, that are used for the Run Control user interaction and the on-line event display monitoring. The DAQ Software Architecture All the DAQ code has been written us- ing the C++ programming language. With the object-oriented facilities of this lan- guage, we built a library of objects that integrates the operating system calls deal- ing with shared memory segments and semaphores, with those offered by our multiprocessor run-time support. REM OS is made of a collection of C++ classes interfacing user application to a server task that dispatches messages across the VIC bus network (see fig. 2). Fig. 2: The REMOS object oriented IPC. As a basis of all our system we designed a special OS9 driver that allows user pro- cesses to install interrupt service routines (ISR). They can synchronize with interrupt requests and the data that the ISR collects at interrupt time is automatically buffered and delivered to the user process at synchronization time. In this way the REMOS server and the communication system have been designed using the so called micro kernel approach, that avoids to use kernel based drivers, in favor of user tasks, allowing to achieve true real time performance. The fact that all our drivers and servers are user level processes makes them preemptible in any moment, preventing them from blocking the system during 110. A companion paper [2] presented at the same conference covers in detail the fea- tures of this environment. / I 1 - - OFTO REMOS Ouster ' ' \ / I I Fig. 3: The software architecture of the CHORUS DAQ system. To optimize the performance of the VIC bus, we organized the whole DAQ hyerar- chically in a master/slave fashion (see fig. 3), so that the bus is owned by only one system (the master), eliminating any time consuming bus contention. To make an efficient and maintainable DAQ system we defined a strong computa- tion paradigm: a data flow architecture that subdivides the system in a set of simple tasks, exchanging data among them and synchronizing through data availability. We devised a set of buffered ports allow- ing to construct a clean mechanism for in- ter-process communication, automatically matching the different process speeds. The presence of data in the input buffer and the availability of free space in the output buffer are used to schedule the activity of 103 these processes, maximizing system's per- formance. A message exchange protocol, based on this communication· system, is used by the EVB to coordinate the activities of the subsystems, and to collect the relevant in- formation on the status of the DAQ. Buffer Buffer Fig. 4: Outline of the CHORUS DAQ buffer management scheme. The run control program, on. the Event Builder CPU, communicates with a graph- ical interface program on the UNIX clus- ter, that handles the interaction between the user and the DAQ system. A sample of the raw on-line data is sent to the UNIX cluster for real time detector monitoring, and to histogramrning tasks on the local systems. Conclusions CHORUS is a middle sized physics ex- periment, but it features many of the DAQ requirements that characterize some of the future large collider experiments. There- fore it constitutes an ideal test bench for experimenting and validating a set of engi- neering techniques that can be fruitfully used in many other similar contexts. References 1 N. Armenise et al., CHORUS Collabo- ration, CERN - SPSC/90-42; M. de Jong et al., CHORUS Collaboration, CERN - PPE/93-134 2 G. Carnevale et al, "REMOS: A Portable Object Oriented Environment for Multiprocessor Real Time Applica- tions", to be published in the proceed- ings of the CHEP'94 conference, San Francisco, USA, 1994. The RD13 Data Acquisition system Aguer M 4 , Ambrosini G 1 , Bee C.P. 2 , Buono S 2 , DuvaL P.Y. 3 , Etienne F 3 , Ferrari R2, Ferrato D 3 , Fumagalli 1 , Huet M 4 , Jones R 2 , Mapelli L 2 , LeVan Suu A 3 , Momacchi G 2 , Polesello G 1 , Prigent D 2 , Qian z 3 , Rondot c'l, Sanchez-Corral E 2 , Skiadelli M 2 , Spiwoks R 2 , Tisserant S 3 , Touchard F 3 1: Dipartimento di Fisica dell' Universita 'e JNFN Sezione di Pavia, Italy 2: CERN, Geneva, Switzerland 3: Centre de Physique des Panicules de Marseille, IN2P3, France 4: Depanement de Physique Nucleaire - STEN, C.E. Saclay, France The RD13 project was originally approved in April 1991 for the study of an LHC ori~n~~d data taki.ng system and is now nearing the completion of its third phase of activities. The gmding objectives of the project include the construction of a scalable · DAQ framework capable of evolving with detector requirements, the use of a Real- Time UNIX operating system with multiprocessor support, the evaluation and use of commercial products for all aspects of software production and a software engineering approach to software design and implementation. Special attention is also given to the modelling and simulation of full architecture solutions and their demonstration via small scale setups based on different technologies. To assess the viab~lity of RD13 a fully operational data acquisition system fulfilling the initial reqmrements and based on the selected components has been successfully used as a data taking system of LHC detector prototypes that present interesting and challenging readout problems. 1. Introduction Approved in April 1991 for the study of an LHC oriented data taking system, the RD 13 project is now nearing completion of the third year of its development accord- ing to the plan proposed and approved in June 1993 [1]. Two versions of the RD13 data acquisition framework have been suc- cessfully completed for use in controlled experimental environments. The main objective of the project is the study of solu- tions to the data taking challenges of LHC- like experimentation: the construction of a data acquisition framework capable of evolving with detector requirements where modem hardware and software compo- nents can be exploited and innovative tech- nological solutions to the problem of software development can be applied. The time scale for LHC experimentation and the inadequacy of the existing readout and High Energy Physics methods for online software developments make a 'top down' design premature. A more appropri- ate preparation for LHC is then to spend some time and resources in investigating 104 system components and system integration aspects. Emphasis is given to data acquisition architecture studies by means of both sys- tem modelling and small scale prototypes based on different technologies. Improvements to the system are under way and plans for its use in more complex read- out situations involving multiple subdetec- tors have been defined. 2. Activities and Results 2.1. The RD13 Data Acquisition System Before describing the RD 13 activities and outcomes we recall the definition of one of the structuring concepts of the DAQ design: the DAQ-Unit is a set of intercon- nected DAQ-Modules, using shared mem- ory to move event data between them. Two main functional components have been defined in the DAQ: the back-end and the frontend. The former fulfills the role of the development environment, control man- agement, high-level monitoring and user interface. The latter constitute the DAQ environment proper, whose main functions are data readout and distribution, low- level monitoring and data recording. The system is currently based on VME- bus, using the VICbus (Vertical Inter- Crate) to link VME crates and to integrate back-end workstations with the frontend via the SVIC (Sbus to VIC interface) and VIC interfaces. The processing elements are the MIPS 3000 RAID 8235 which responds to our intention to evaluate a RISC architecture in the frontend and the Motorola 68040 VME card CES FIC8234 running a recently ported version of LynxOS operating system. The hardware layout reflects one of the aspects of soft- ware development to which RD 13 has given great importance: the platform inde- pendence of the DAQ software, i.e. the possibility to port the RD13 DAQ system to different environments. A first version of the RD 13 has been tai- lored to the requirements of the readout setup of three 64-channels silicon detec- tors (RD2-SiT) [2] that included a 67MHz analog pipeline and has been successfully run as the data taking system during November 1992 test-beam period. VME based and RISC technology (RAID8235) was used as the main acquisition proces- sor running a real-time· UNIX operating system (EPILX). A total of more than 5 million RD2 events were written to tape directly from the frontend processor, while monitoring was performed on a back-end SUN worksta- tion connected to the VME system via the VIC interconnect. The acquisition rate was dominated by the data transfer over a long VSBbus, nevertheless we could mea- sure DAQ rates of more than 1800Hz for 750-byte events. An upgraded version of the RD 13 DAQ with enhancements to support multipro- cessor environment (i.e. the redistribution of a DAQ-Unit from one to more than one processor) and event building technology has been successfully used for data taking of the RD6 detector prototype (technical 105 run of November 1993): an LHC-oriented Transition Radiation Detector prototype [3]. RD6 needs a DAQ system adequate for the demanding readout conditions of their prototype that includes a 3000 straw detec- tor equipped with 6 high bandwidth readout channels and a router based level- 2 like trigger system (ROll). The DAQ prototype implementation has been based on the cur- rent multiprocessor features of EPILX [4] and on a HiPPI Protocol based readout DAQ-Module. The multiprocessor features of EPILX have proven to he globally reli- able and robust. A series oftest-beam runs will take place in 1994 with detector readout setups including more than one detector prototype. 2.2. Modelling: a step towards LHC-like architectures The hierarchical structure, high data rates, data collection parallelism and stringent requirements on the technologies impose a detailed study and evaluation of architec- tures and components integration. The RD 13 project has developed a model- ling framework [5] for this purpose based on MODSIM II, an object-oriented dis- crete-event simulation language. A library of DAQ components allow to describe a variety of DAQ architectures and different algorithms and hardware options in a modular and scalable way and used to start functional modelling of a LHC-like trigger. A graphical user interface (GUI) is used for configuration, initialization and online monitoring of the simulation program. The modeling framework has been successfully used for studies of the event building, the event distribution and the interfaces to the upstream and downstream parts of the DAQ system. We are planning to make further use in sim- ulations of functional models of LHC experiments including readout, triggering and event building. 2.3. Event Building studies It is widely acknowledge that alternative solutions to today's bus-based data merg- ers have to be envisaged, providing a high level of parallelism. We have chosen to investigate the feasibility of parallel switches based on two different industrial standards: the High Performance Parallel Interface (HiPPI) and the Asynchronous Transfer Mode (ATM). The availability of commercial HiPPI switches and the recent development of a HiPPIIVME interface, compatible with the RD 13 DAQ environ- ment, made a HiPPI based setup a natural candidate for realising a first event builder prototype. Based on a hardware setup installed in the RD 13 laboratory, a readout software event builder has been imple- mented using a previous version of the HiPPI Destination Firmware [6] and an RD 13 library for the structuring of event data [7]. Suitable algorithms are being studied using simulations based on models of LHC detector data distributions. 2.4. Software Engineering The evaluation of software engineering techniques has been a focus of activity throughout the three years period of the project. Various main lines have been tackled. 2.4.1. Artifex methodology and CASE tool The application initially selected for a pilot activity with software engineering technology has been the Data Flow Proto- col: the most demanding real-time compo- nent of the RD13 DAQ. A market survey and some initial experience with CASE tools lead the collaboration to select the Artifex [8] CASE tool and its associated methodology, which consists of a numher of integrated CASE tools supporting an operational-like software development lifecycle. The protocol was successfully 106 developed and a complete Artifex based data acquisition system has been running during a test-beam period jointly done by RD13 and the RD2 LHC detector prototype [2]. The final product ran very reliably although, as was expected, performance- wise it did not compare favorably with the hand-coded RD 13 data acquisition system. The second application was the design, simulation and implementation of a track- ing algorithm, for the ATLAS SIT detector [8], targeted to run in the level-2 trigger embedded processor. The final product has been run on Monte Carlo data and com- pared to the original Fortran program: the resulting algorithm result while matching the functionality of its Fortran counterpart, performance-wise, it was some 6 times slower. The last exercise was the re-engineering of the run control system, originally design in terms of finite state machines and devel- oped with other commercial tools [ 10]. Petri- nets and the distributed facilities of Artifex coupled with the tolerant perfor- mance requirements appeared well suited to the task. The original state machines have been translated into an Artifex model, sim- ulated and then ported to the target RD 13 environment consisting of back-end and frontend processors. Although Artifex has demonstrated to cover the full software life- cycle in a seamless continuous way and the code generated to be reliable, the draw- hacks lie mainly in the 'static' nature of the modelling where instead a certain degree of dynamism is necessary in the final applica- tion. Details of this work are available through the World Wide Web at "http://rdl3doc.- cern.ch/welcome.html" [ 11]. 2.4.2. Software metrics The measurement and interpretation of suit- ably defined software metrics are key issues towards better quality (reliability, maintain- ability, etc.) software. Activities in this area· have therefore been undertaken with the aim of assessing the validity of these con- cepts, the capabilities of available tools and monitoring the quality of the RD 13 software. The logiscope tool (sold by Ver- ilog, France) provides facilities for exam- ining the structure of source code, testing it and performing quality assessment using the most widely accepted software metrics. 2.4.3. OODBMS The data acquisition of a HEP experiment needs a large number of parameters to describe its hardware and software com- ponents. These parameters have to be accessed by different parts of the DAQ system. Object-Oriented DataBase Man- agement Systems (OODBMS) seem to fit the requirements of such applications quite successfully. We have made an investigation [ 12] of two commercial OODBMS, Gemstone [13] and ITASCA [14] with the aim of comparing the two systems and study the applicability of the Object -Oriented approach with respect to the relational system already in use. The results of this work are reported elsewhere in these proceedings [ 15]. 2.4.4. Code Management The amount of programming effort, num- ber of people involved and code produced in RD 13 is such that a generalized scheme for source code management has become necessary. We have adopted the Concur- rent Version System, CVS [ 16], and defined a scheme for the organization of the source code and the maintenance of the releases of the RD 13 data acquisition system [ 17]. We are considering the evaluation of an object oriented methodology and CASE tool such as the Object Management Workbench (OMW) system [18]. OMW provides a set of tools to integrate the analysis, design, implementation and exe- cution stages of the software development lifecycle. It is an X Windows-based appii- 107 cation which runs in a UNIX environment and interfaces to an application develop- ment environment called the Kappa Devel- opment system which allows you to build object oriented applications interactively [19]. 3. Conclusions and Future Plans Encouraged by the positive and promising results obtained so far, the RD 13 Collabora- tion has proposed to continue the project, with activities in the three main areas already defined in the proposal of June 1993: 1) DAQ system upgrade to a multi-DAQ version, essential when data distribution (event building, data switching) stages are present in the system to be used in forth- coming test-beam sessions. 2) Laboratory developments, including a) Modelling of full parallel LHC-like readout layouts, as a further step towards LHC-oriented architectures and further testing of the present RD 13 modelling framework; b) Event Building studies with architec- tures based on HiPPI and ATM technolo- gies. · 3) Continue emphasis on software engi- neering by extending the use of CASE tools, addressing software quality issues and use of the ITASCA OODBMS. 4. References [ 1] L.Mapelli et al., A scalable Data Taking System at a Test Beam for LHC, CERN/ DRDC 90-64, CERN/DRDC 91-23, CERN/DRDC 92-1, CERN/DRDC 93-25. [2] S.Buono et al., A hardware setup for the SiTP test readout, RD 13 Technical Note 41. [3] B.Dopgoshein et al., RD6 Status Report, CERN/DRDC/91-47, October 1991. [4] G.Ambrosini et al., Real-Time UNIX in HEP Data Acquisition, Proceedings of ICALEPCS'93, October 1993. [Document text truncated for crawler view.]