Sie sind auf Seite 1von 5

Nuclear Instruments and Methods in Physics Research B 139 (1998) 476480

Particle optics and accelerator modeling software for industrial and laboratory beamline design
George H. Gillespie *, Barrey W. Hill
G.H. Gillespie Associates, Inc., P.O. Box 2961, Del Mar, CA 92014, USA

Abstract The expanding variety of accelerator applications in research and industry places increased demands upon scientists and engineers involved in developing new accelerator and beamline designs. Computer codes for particle optics simulation have always played an important role in the design process and enhanced software tools oer the promise of improved productivity for beamline designers. This paper summarizes recent work on the development of advanced graphic user interface (GUI) software components, that can be linked directly to many of the standard particle optics programs used in the accelerator community, and which are aimed at turning that promise of improved productivity into a reality. An object oriented programming (OOP) approach has been adopted and a number of GUI components have been developed that run on several dierent operating systems. The emphasis is on assisting users in the setup and running of the optics programs without requiring any knowledge of the format, syntax, or similar requirements of the input. The components are being linked with several popular optics programs, including TRANSPORT, TURTLE, TRACE 3-D and PARMILA, to form integrated easy-to-use applications. Several advanced applications linking the GUI components with Lie algebra and other high-order simulation codes, as well as system level and facility modeling codes, are also under development. An overview of the work completed to date is presented, and examples of the new tools running on the Windows 95 operating system are illustrated. 1998 Elsevier Science B.V. Keywords: Computer codes; Particle optics; Accelerator design; Graphic interface

1. Introduction The varied applications of accelerators cover a wide range of beam parameters and operating requirements. Each application often poses unique problems for the designer and the particle optics optimization and simulation codes that he or she

* Corresponding author. Tel.: +1 619 677 0076; fax: +1 619 677 0079; e-mail:

uses. Several codes may be required to develop a sound design; codes which typically have incompatible input formats and conicting output capabilities. While there are a large number of accelerator and charged particle optics programs available, which have been extensively tested and bench marked on selected types of problems, their application to a new problem is usually a daunting challenge to the non-expert. This paper summarizes progress on the development of new software tools focused on improving the accessibility and

0168-583X/98/$19.00 1998 Elsevier Science B.V. All rights reserved. PII S 0 1 6 8 - 5 8 3 X ( 9 7 ) 0 0 9 4 0 - 3

G.H. Gillespie, B.W. Hill / Nucl. Instr. and Meth. in Phys. Res. B 139 (1998) 476480


ease of use of a large group of codes. These tools had their genesis in a unique graphic user interface concept named the Shell for Particle Accelerator Related Codes, or S.P.A.R.C. [1], and are now being implemented in a second generation multi-platform (MP) renaissance of the concept, S.P.A.R.C. MP [2]. While the emphasis in this paper is on the new tools available to users, it is useful to summarize some of the features and typical applications of the programs that have been integrated with S.P.A.R.C. and/or S.P.A.R.C. MP. A partial listing is given in Table 1. More details on each program can be found in Refs. [36]. 2. Multi-platform shell for particle accelerator related codes The conceptual foundation for the new software tools is derived from a unique graphic user interface designed specically for codes used in the accelerator community, known as S.P.A.R.C. [1]. A new MP version, S.P.A.R.C. MP, has been developed to support a number of dierent operating systems [2]. An object oriented programming (OOP) approach has been adopted and the architecture of the software has been developed specifically to run on several dierent operating systems. S.P.A.R.C. MP is written in C++ and includes an object model for describing beamlines [7]

useful for supporting dierent accelerator modeling codes. 3. The particle beam optics laboratory The Particle Beam Optics Laboratory (PBO Lab) is the rst commercially available software [8] developed with S.P.A.R.C. MP. The PBO Lab [2,9] has four key elements: (1) a graphic user interface shell, (2) a graphic beamline construction kit for setting up design problems, (3) a set of help tutorials on the physics and technology of charged particle optical devices, and (4) several computational engines that produce transfer matrices, beam envelopes and trajectories, t parameters to optical constraints, and carry out similar calculations for the graphically dened beam lines. The rst element of the PBO Lab has been described elsewhere [1,2,7]. The last three of these PBO Lab elements are the focus of the remainder of this paper. Fig. 1 illustrates selected windows from the PBO Lab beamline construction kit used for setting up a design problem on a Windows 95 computer. 3.1. Dening beamlines in the PBO lab One goal of the PBO Lab is to allow the setup and running of optics programs without requiring the user to have any knowledge of the format or syntax of the input needed by the program. Beamlines and accelerator systems are graphically constructed on the computer screen using drag and drop icons. Default parameters are incorporated for all required inputs so that both the topology of the beamline and a complete set of input data are dened automatically during the graphical construction. Setting up a particular design is reduced to editing the values of parameters, which are displayed in windows together with the parameter descriptions. Dierent parameter set options are available for dening optical elements, and a variety of units options may be used. Expert system type rules provide guidance for editing input parameters, and additional displays, such as eective focal lengths and phase space plots, provide users with further useful feedback on their input.

Table 1 Beam optics and simulation codes working in the SPARC and/ or SPARC MP environments Code name TRANSPORT TURTLE TRACE 3-D PARMILA Selected characteristics and uses Third-order matrix code, magnetic optics tting options, optimization aberration control Third-order ray tracing code, multi-particle simulation of TRANSPORT designed beamlines First-order matrix & space charge, magnetic, RF, electrostatic optics, tting, optimization, envelopes Multi-particle space charge code, magnetic and RF optics, emittance growth, particle loss


G.H. Gillespie, B.W. Hill / Nucl. Instr. and Meth. in Phys. Res. B 139 (1998) 476480

Fig. 1. Windows from the graphical beamline construction kit of the S.P.A.R.C. MP PBO Lab.

Each beamline is initially built by selecting and dragging (with the mouse) icons from the Palette Bar and dropping them onto the Model Space Pane. Individual Pieces or groups of Pieces may be selected for use in other beamline construction tasks, such as dragging them to the Work Space Pane for future use. Pieces from the Work Space may be inserted into, or dropped onto the ends of, the beamline on the Model Space. Selected Pieces may also be dened as ``Sublines'' to be used, for example, in constructing beamlines composed of repetitive elements [7,9]. Sublines may contain additional Sublines, as well as individual Pieces. Fig. 1 illustrates a Model Space beamline composed of Drifts and Quads, using Sublines. A powerful object model has been developed [7], which very eciently describes either hierarchical (Subline), at (single Pieces), or mixed beamline representations. This object model forms the basis for the interactive graphic functionality and the organization of the data les used to save beamline descriptions. The model is especially suited to representing machines with a large number of repetitive components. Parameter values are edited using Data Tables in the Global Parameter Pane, in Piece Windows for individual beamline components, and in vari-

ous other PBO Lab Windows. A Piece Window is accessed by ``double clicking'' on the icon of the desired beamline component. Fig. 1 illustrates the Piece Window for the second Quad of the rst Subline. The Quad parameters can be edited using any of three descriptions: eld gradient, pole tip eld and aperture, or quadrupole coecient. the PBO Lab Piece Windows have several other features that assist users in editing input data, including a Tutorial linked to the data in the Window. 3.2. Help tutorials in the PBO lab Another goal of the PBO Lab is to integrate an information and knowledge database on charged particle optics and the technologies and hardware used in charged particle beamlines. Interactive, self-directed tutorials are used to present this material to the user. Much of the material developed for the PBO Lab tutorials was utilized as part of a US Particle Accelerator School (USPAS) optics course aimed at graduate and upper division undergraduate students. The information presentation format consists of two components: an interactive slide show and a hypertext component. The hypertext component includes narratives, graphics, equations, glossaries

G.H. Gillespie, B.W. Hill / Nucl. Instr. and Meth. in Phys. Res. B 139 (1998) 476480


Fig. 2. Selected screens from the PBO Lab Tutorial for a magnetic quadrupole element.

and similar content with many hypertext links. The slide show component presents conceptual graphics and useful formulae with numerical results for individual optics components that are based upon the user's input parameters for that

component. The content of a given slide changes dynamically as the user modies relevant data in the component's Piece Window. Selected windows for the quadrupole tutorial of the PBO Lab are shown in Fig. 2.

Fig. 3. Graphic output from the TRANSPORT, TURTLE and trajectories modules of the PBO Lab.


G.H. Gillespie, B.W. Hill / Nucl. Instr. and Meth. in Phys. Res. B 139 (1998) 476480

3.3. PBO lab computation engines and output The primary computational engines in the PBO Lab are the third-order TRANSPORT code, the multiple ray tracing program TURTLE, and a new rst-order matrix code that includes an envelope space charge model with support for calculating single trajectories in the presence of the beam space charge. Graphic results may be displayed on the screen without the need for additional post-processing. Fig. 3 illustrates examples of output from each of the three computation engines. 4. Summary The S.P.A.R.C. MP concept promises improved productivity for scientists and engineers involved in the analysis or design of accelerators, as well as a signicant reduction in the time required to train new researchers in the use of optics programs. Substantial progress has been made in developing the rst S.P.A.R.C MP software product, the PBO Lab, into a useful tool. Acknowledgements The authors are indebted to the development team of Hendy Martono, John Moore, Chris Babcock and Mark Reed for their outstanding work in prototyping and writing the nal code used for the PBO Lab. Nathan Brown assisted in the development of prototype concepts and tutorials, and Michael Lampel has contributed signicantly to the testing, evaluation and concept improvement.

The assistance of James Gillespie in the design of the software architecture for the PBO Lab is gratefully acknowledged. Portions of this work have been supported by the US Department of Energy under SBIR grant number DE-FG0394ER81767. Windows is a trademark of Microsoft Corporation. References
[1] G.H. Gillespie, The shell for particle accelerated related codes (SPARC) A unique graphical user interface, AIP Conference Proceedings 297 (1993) 576583. [2] G.H. Gillespie, B.W. Hill, N.A. Brown, H. Martono, D.C. Carey, The particle beam optics interactive computer laboratory, AIP Conf. Proc. 391 (1996) 264269. [3] D.C. Carey, K.L. Brown, F. Rothacker, Third-order TRANSPORT A computer program for designing charged particle beam transport systems, Stanford Linear Accelerator Center Report No. SLAC-R-95-462, 1995, 295 pp. [4] D.C. Carey, TURTLE (Trace Unlimited Rays Through Lumped Elements) A computer program for simulating charged particle beam transport systems, Fermi National Accelerator Laboratory Report No. NAL-64, 1978, 45 pp. [5] K. Crandall, D. Rusthoi, TRACE 3-D Documentation, third edition, Los Alamos National Laboratory Rep. LAUR-97-886, 1997, 106 pp. [6] G. Boicourt, J. Merson, PARMILA Users and Reference Manual, Los Alamos National Laboratory Rep. LA-UR90-127, Revised, 1992, 141 pp. [7] B.W. Hill, H. Martono, J.S. Gillespie, An object model for beamline descriptions, AIP Conf. Proc. 391 (1996) 361365. [8] The PBO Lab is available from AccelSoft Inc., San Diego, CA, USA. [9] G.H. Gillespie, B.W. Hill, H. Martono, J.M. Moore, N.A. Brown, M.C. Lampel, R.C. Babcock, The particle beam optics interactive computer laboratory for personal computers and workstations, to be published in the Proc. 1997 Particle Accelerator Conference, 1997, 3 pp.