Last modified: Tue Oct 20 15:03:23 PDT 2020
SLAC National Accelerator Laboratory LCLS Lattice Description
 Accelerator Directorate  LCLS NC Accelerator Systems  LCLS SC Accelerator Systems  Lattice Descriptions  LCLS Device Database

This is the home page of the lattice descriptions of the Linac Coherent Light Source (LCLS) facility. The lattice descriptions are expressed in the Methodical Accelerator Design (MAD) language (version 8).

As of April 24, 2019 the lattice descriptions described on this page include the entire LCLS facility: normal conducting (NC) and superconducting (SC) accelerator systems . This page supersedes both the original LCLS Lattice Description site and the LCLS-II Lattice Description site.

Lattice Description Files

The following are the LCLS MAD8 input files in SLAC's CVS:

File Description (SC accelerator systems) MAD8 Input file name
Main command file LCLS2sc_main.mad8
Matching command file LCLS2sc_match.mad8
Master definitions LCLS2sc_master.xsif
Common definitions common.xsif
Cryomodule definitions CM.xsif
Injector + Laser Heater + collimation section 0 definitions INJ.xsif
Post-LH diagnostic line definitions DIAG0.xsif
Bunch compressor 1 + collimation section 1 definitions BC1.xsif
Bunch compressor 2 + emittance diagnostic section definitions BC2.xsif
Linac extension definitions EXT.xsif
Bypass dogleg definitions DLBM.xsif
Bypass line definitions BYP.xsif
3-way beam spreader definitions SPRD.xsif
SXR/HXR LTU + dump area definitions LTU.xsif
SXR/HXR undulator area definitions UND.xsif
SXR/HXR safety dump line definitions SFT.xsif
DASEL definitions DASEL.xsif
Beamline definitions BSYsc.xsif
SXR XTES system definitions SXTES.xsif
HXR XTES/TXI system definitions HXTES.xsif
File Description (NC accelerator systems) MAD8 Input file name
Main command file LCLS2cu_main.mad8
Matching command file LCLS2cu_match.mad8
Master definitions LCLS2cu_master.xsif
Cu Linac definitions LCLS2cu.xsif
Linac 1 (as built) LCLS_L1.xsif
Linac 1 (for Elegant) LCLS_L1e.xsif
Linac 2 (as built) LCLS_L2.xsif
Linac 2 (for Elegant) LCLS_L2e.xsif
Linac 3 (as built) LCLS_L3.xsif
Linac 3 (for Elegant) LCLS_L3e.xsif
BSY to SXR definitions CUSXR.xsif
BSY to A-line definitions ALINE.xsif
Beamline definitions BSYcu.xsif

The following are the LCLS ELEGANT input files in SLAC's CVS:

File Description (SC accelerator systems) ELEGANT Input file name
BEAM0 to SXR dump commands LCLS2scS.ele
BEAM0 to SXR dump definitions LCLS2scS.lte
LH undulator MATRIX definition UMHTR.rmat
XLEAP undulator (off) MATRIX definition UMXL.rmat
XLEAP wiggler (off) MATRIX definition WIGXL.rmat
SXR undulator MATRIX definition UMASX.rmat
SXR phase shifter MATRIX definition PSSX.rmat
BEAM0 to HXR dump commands LCLS2scH.ele
BEAM0 to HXR dump definitions LCLS2scH.lte
HXR undulator MATRIX definition UMAHX.rmat
HXR phase shifter MATRIX definition PSHX.rmat
BEAM0 to BSY dump commands LCLS2scD.ele
BEAM0 to BSY dump definitions LCLS2scD.lte
Post-LH diagnostic line commands DIAG0.ele
Post-LH diagnostic line definitions DIAG0.lte
DIAG0 QDG001 vertical offset MATRIX definition DYQDG001.rmat
DIAG0 QDG003 vertical offset MATRIX definition DYQDG003.rmat
BEAM0 to SXR dump (XLEAP-II) commands LCLS2scS-XL2.ele
BEAM0 to SXR dump (XLEAP-II) definitions LCLS2scS-XL2.lte
XLEAP undulator (on) MATRIX definition UMXL-XL2.rmat
100 pC input beam definition (F. Zhou) FZ_100pC_10NOV17.sdds
1.3 GHz longitudinal wakefield definition zWake_1.3GHz_OneCavity_dz2um_TESLA2003-09.sdds
1.3 GHz transverse wakefield definition xWake_1.3GHz_OneCavity_dz2um_TESLA2003-09.sdds
3.9 GHz longitudinal wakefield definition zWake_3.9GHz_OneCavity_dz2um_TESLA2004-01.sdds
3.9 GHz transverse wakefield definition xWake_3.9GHz_OneCavity_dz2um_TESLA2004-01.sdds
2.856 GHz longitudinal wakefield definition Sz_1um_75mm.sdds
2.856 GHz transverse wakefield definition Sx_1um_75mm.sdds
11.424 GHz longitudinal wakefield definition Sz_10um_75mm_xband.sdds
11.424 GHz transverse wakefield definition Sx_50um_75mm_xband.sdds
resistive wall wakefield definition SS_24.5mmR_100nm3mm.sdds
resistive wall wakefield definition SS_17.4mmR_100nm_3mm.sdds
resistive wall wakefield definition Cu_17.4mmR_100nm_3mm.sdds
resistive wall wakefield definition Al5mmgap_flat_0p5um10mm.sdds
File Description (NC accelerator systems) ELEGANT Input file name
WS02 to HXR dump commands LCLS2cuH.ele
WS02 to HXR dump definitions LCLS2cuH.lte
HXR undulator MATRIX definition UMAHX.rmat
HXR phase shifter MATRIX definition PSHX.rmat
WS02 to SXR dump commands LCLS2cuS.ele
WS02 to SXR dump definitions LCLS2cuS.lte
XLEAP undulator (off) MATRIX definition UMXL.rmat
XLEAP wiggler (off) MATRIX definition WIGXL.rmat
SXR undulator MATRIX definition UMASX.rmat
SXR phase shifter MATRIX definition PSSX.rmat
WS02 to Aline dump commands LCLS2cuA.ele
WS02 to Aline dump definitions LCLS2cuA.lte
WS02 to SXR dump (XLEAP-II) commands LCLS2cuS-XL2.ele
WS02 to SXR dump (XLEAP-II) definitions LCLS2cuS-XL2.lte
XLEAP undulator (on) MATRIX definition UMXL-XL2.rmat

Lattice Output Files

The output results of "official" MAD runs are in timestamped directories under /afs/slac/www/grp/ad/model/output/lcls/mad. The latest output is always in /afs/slac/www/grp/ad/model/output/lcls/mad/latest


Modelled element and device data are available in SLAC's Oracle Database. See the Elements and Symbols tabs (they contain largely the same information).

Optics Plots

These are the Twiss parameter plots for each beampath. Click on an image for the set of plots for that beampath.

SC linac systems:

GUNB to SXR dump
GUNB to HXR dump
GUNB to BSY dump
GUNB through DIAG0

NC linac systems:

GUN to HXR dump
GUN to SXR dump
GUN to A-line


The following are descriptions of the defined electron beam paths of the LCLS facility. These include both the paths for the superconducting accelerating system (those originating at GUNB) and the original normal conducting copper accelerating system (those originating at GUN). See the dat files in the column "Elements / devices file" for complete table of the device names and their corresponding MAD element, together with their Z and the area of the machine in which each element is situated, per the Beamline Boundaries PRD, see Tables 1 and 3, and the map in Appendix A. Each element is in exactly 1 such area.

Beampath Table: Primary RF refers to the technology used for the radio frequency accelerating structures of the beamline; "SC" = 1.3 GHz CW superconducting, "NC" = 2856 MHz pulsed normal conducting. Status refers to the administrative standing of the beampath. MAD8 filename prefix refers to the filenames of the MAD8 output relating to the beampath. The Beampath ID is the unique tag of the beampath, as defined by the Beamline Boundaries PRD (and is understood by the "lname" directive of the MEME directory service). The maps are zoomable PDF; middle-click to download. Open with, for instance, Adobe Reader (zoom in with, for instance, View ↳Zoom ↳ Pan and Zoom). The maps show the all modelled elements of the LCLS MAD8 decks, including devices (where the element has one), markers etc, with their suml and Z positions, arranged left to right by Z and hierarchically by modelled line. Arrows link the elements to show the path of the beam from element to element through the machine.
Primary RF Description Status MAD8 output filename prefix Beampath ID Elements / devices file Map Link
SC GUNB to SXR dump Installing LCLS2scS SC_SXR LCLS2scS_lines.dat
SC GUNB to HXR dump Installing LCLS2scH SC_HXR LCLS2scH_lines.dat
SC GUNB to BSY dump Installing LSCLS2scD SC_BSYD LCLS2scD_lines.dat
SC GUNB through DIAG0 line Installing DIAG0 SC_DIAG0 DIAG0_lines.dat
SC GUNB to DASEL Proposal LCLS2scDA SC_DASEL LCLS2scDA_lines.dat
NC GUN to HXR dump Installing LCLS2cuH CU_HXR LCLS2cuH_lines.dat
NC GUN to SXR dump Installing LCLS2cuS CU_SXR LCLS2cuS_lines.dat
NC Gun through A-line Installed LCLS2cuA CU_ALINE LCLS2cuA_lines.dat

The mapping from elements to EPICS PV names (or at least the device name part of PV names) is defined by the file elementdevices.dat, which is itself generated from the LCLS_INFRASTRUCTURE database in SLAC Oracle. These lines files and maps were created using an awk script mad2dot.awk. mad2dot takes as input the print and survey files as output from MAD8 (see header of mad2dot), plus one or more "elementdevices" files. mad2dot creates a "lines" file for each beampath (for consumption by the directory service, so on-line apps know the device-line hierarchy), and a dot file, for instance, for each beampath. We then use the unix command dot, or Graphviz, to create a PDF from the dot file.

Publication Guide

For those people who need to change the lattice files, there is a README in CVS, in the same directory as the lattice files. That README describes how to do the CVS, and use a makefile to publish the output files to /afs/slac/www/grp/ad/model/output/.

SLAC Operated by Stanford University for the U.S. Dept. of Energy Office of Science
Page Owners: Greg White and Mark Woodley