Commit 884bee6b authored by reiche's avatar reiche
Browse files

New Lattice 10.4.8 and some fine tuning in OMHolyList

parent 90d47e5a
......@@ -249,7 +249,7 @@ import math
# 5b) Position of SARCL01-DCDR105
# 5c) SATSY03-DCDR050 moved into phase planned
# 5d) SATUN05 Chicane moved into phase planned
# 5e) SATDI01-DBPM090 and SATDI01-DQUA080 moved into phase planned
# 5e) SATDI01-DBPM090 and SATDI01-MQUA080 moved into phase planned
# 4f) Adjust various position aorund the modulator in Athos
class SwissFEL:
......
import OMType
import math
# 7) Aramis Undulator end correctors have two channels (DCR - R. Ganter)
# 8) Minor modification along the maching to get space for bellows (Email L. Schulz, 7.5.2014)
# 9) Screen added in the straigh ahead section of the final beam dumps
# Layout 8.4.1
# 1) Solenoids around Gun got correct Baugruppe (WFG and WFB)
# 2) Quadrupole in Injector spectrometer arm (S10BD01) changed to QFA type
# 3) Change Baugruppe of DHVS (Slit) to DHVS-SLIT
# 4) Apply Changes from Lothas Schult and Adriano Zandonello (email: 21.7.2014)
# 5) Cameras in Athos line have only their vacuum part installed except for one camera which is an overview camera
# 6) Change moving vacuum parts (e.g. collimator) to diagnostics group
# 7) Move Wire Scanner into Linac 3 cells 1,5,9, and 13 to separate from collimator in Linac 3
# 8) BAMs before Injector BC and in Athos line are not fully equiped and only the pick up (vacuum parts) is installed
# 9) Beam stopper after linac bunch compressor changed to type AFBC1 with corrector coil
# 10) AFDL is now 1 m long and has no tilted pole faces
# 11) Cameras in the photon beamline after the dump dipole are of type Overview
# 12) Snchrotron radiation port DSRP changed to DSRM (Synchrotron radiation monitor) and DBCM (Bunch compression monitor)
# 13) Added a synchrotron radiation monitor port after the first dipole of SATCL01
# 14) Added two coherent diffraction radiation ports (vacuum components only)
# Layout 8.5.1
# 1) Apply changes from Lothar Schulz (email 20.8.2014)
# 2) Dumps and Stopper are in the Safety group
# 3) Adjusted ALignment Ports and Outcoupling Ports for BC1 and 2. Effective Length set to 0 cm but reserved length is 10 cm (email A. Zandonella 14.8.2014)
# 4) Removed Coherent Diffraction Radiator because position and usefulness is not clear
# Layout 8.5.2
# 1) Added Alignment LAser Ports in Athos and Aramis.
# 2) Changed section layout of beam dumps. The spectrometer dipole now belongs to the straight ahead section, e.g. SARBD01
# 3) Final Screens in SARBD01/SATBD01 are of type OV38 (changed from OV16)
# Layout 8.6.1
# 1) Implementation of multiple beamlines (Phase 1 and Phase 2)
# 2) Removal of various parts in Athos Switchyard for Phase 1 (e.g. Vert Collimator, SRM, BCM)
# 3) Self/Seeding Chicane of Aramis is now Phase 2. In Phase 1 the section is instrumented with an Undulator module
# 4) Change of the Sextupoles in BC2 10 mm upstream for the first and downstream for the second (email F. Loehl 17.10)
# 5) Indexing of SATUN22 now consistant with other undulator cells
# 6) Added the chicane information and branching point (moved from SwissFELmagnets.py)
# 7) Branching dipoles have now the addition key 'branch' set to true
# 8) Chicanes magnets have now the common field entry 'BC' to mark them into a group
# 9) Move BAMs in SARBD01 and SATDI01 according to email by R. Ganter 16.1.2015
# 10) Move WSC from S10MA01 to S20CB01
# 11) Move Last camera in S10MA01 30cm upstream (email. Bruno Zandonella, 5.2.15)
# 12) New Position of CDR (vacuum only thus phase 2) according to email by Bruno Zandonella, 10.2.15)
# Layout 8.7.1
# 1) Change that OMLayout is alwazs delivering one set of beamlines. With a argument in the access function build the routine
# can implement alternative designs
# 2) Change SINEG01.MCOR220 from type SFDD to SFD1
# 3) Complete new redistributions of ICTs according to DCR50 (email M. Pedrozzi, 28.4.2015)
# 4) Correcting a 200 micron longitudinal offset for S20SY02-MBND200
# 5) Changing BAMs after Aramis and Athos to type DBAM-FS8 (formerly DBAM-FS16). Email: R. Ganter 2.6.15
# 6) Applying changes from layout optimization (email. A. Zandonella 3.6.15)
# 7) Correcting the residual transverse offset of a few nanometer in the Aramis undulator line
# 8) Changing the Wirescanner in SARUN20 to type 38mm vacuum chamber
# 9) Applying changes from A. Zandonella (email: 26.6.2015) e.g. shift of energy collimator 20 cm down stream
# Layout 8.8.1
# 1) Adjust the element in the gun section SINEG01-####190, 20 and 210 in position to get space for faraday cup
# 2) Add faraday cup as SINEG01-DFCP185
# 3) Coherent Diffraction radiation monitor DCDR are now implemented in phase 1
# 4) Adjust TAU Monitor Position according to change in Holy List (Report from Website on 9.11.2015)
# 5) Add vertical mover with slits into cxollimator section SARCL02-DSFV282
# 6) Adding shielding element SLOS in the Front End of Aramis
# Layout 9.0.1
# 1) Define new Athos layout with shorter undulator modules and period length of 38 mm
# 2) Define Laser acceleration in Phase 1 (Injector and Athos Switchyard)
# 3) Add Slits in Athos Switchyard for slicing at SATSY01 for phase 2
# 4) Add Gun Laser incoupling port
# 5) Rename Aramis and Athos radiation Shielding
# 6) Change Athos spectrometer magnet to same type as Aramis
# 7) Add Camera in SATCL01 for phase 1
# 8) adjust position of ICTs in SARBD01 and SARMA01 according to email by Zandonella 1.3.16)
# 9) changed last decirper to two individual ones of 1 meter length for horizontal and vertical plane. Responsibility is now in the undulator group.
#10) Some wire scanners have a new Baugruppe, indicating an additional AL foil for beam loss measurements.
#11) Adjusting second RF cavity in SINSB03 and SINSB04 according to email by Alessandro Citterio 2.3.16
# Layout 9.0.2 (email: Adriano 4.7.2016)
# 1) Correct the Baugruppen of the Lasser Acceleration Box
# 2) Correct the WSC with AL foil in SINDI01 and s10DI01
# 3) Shift WSC in SARUN20 downstream by 30 mm for phase 1
# 4) Correct the assignment of the 1m dechirper to insertion device group
# Layout 9.1.1
# 1) Repositioning the ICTs in SARBD01 and SARMA01 (see point 8 of 9.0.1)
# 2) Adjust length of laser acceleration chamber and shift to new position (email by Silke Pfinninger, 18.8.2016)
# 3) SATCB01 and SATCB02 have no elements in phase 1 (BPMs and Quads removed)
# 4) Adjust elements around Athos dump (email by Silke Pfinninger, 18.8.2016)
# 5) Add first design of post undulator TDS (email. E. Prat, 20.7.16)
# 6) Removal of C-Band TDS in Athos line
# Layout 9.2.1
# 1) Correct the spacing in SATUN01-SATUN05 for having the same periodicity as the following sections
# 2) Shift X-bad TDS downstream to allocate space for possible ACHIP experiment.
# Layout 9.3.1
# 1) Eliminate BC alignment ports DALA150 in both bunch compressors
# 2) Move OFC quadrupole for the gun spectrometer at position z=1.6653 and new index 212 (before 310)
# 3) ACHIP Chamber in SATSY03 is now installed from phase 1 on.
# 4) Wirescanner in SARUN20 in all phases changed to type C8 type
# 5) Position correction of SARBD01-DICT030, SARMA01-DICT090 and SARUN20-DWSC010
# 6) correct position of X-band deflector to avoid conflict of overlap
# 7) Move dechirper into Athos straight section. 2m elements into formerly SATCB02 now SATCL01, 1 m long elements into the space of the former C-band deflector in SATDI01 and one 2 m element before SATCB01
# 8) Camera before Athos beam stopper is now HR in final phase
# 9) Replace QFD at SATSY01-MQUA020/280 with QFM + Corrector magnets
#10) Remove two ICTs and one BAM from Athos beam line for the final phase
#11) Moved SFUE correctors 3 mm away from undulator (email A. Zandonella from 20.12.2016)
#12) Added ICT back into SATDI01
#13) Correction according to vacuum group (email. S.Pfinninger, 30.1.)
#14) Adding Wirescanner in SATBD01
#15) Adding Wirescanner in SATSY03 (emal. A.Zandonella, 20.1.2017)
#16) Correction of various position in Phase 1 (email. A. Zandonella: 19.1.2017)
# Layout 9.3.2
# 1) Applied some fine correction (email A. Zandonella, 8.2.2017)
# Layout 10.0.1
# 1) Omitting phase 1. Now only the final phase is given for elements where funding exists.
# 2) New Layout for chicane for two color operation in Athos and Aramis.
# 3) Chicane magnets AFSS are 30 cm long now (formerly 36 cm)
# 4) change index of SATDI wirescanner to 65
# Layout 10.1.1
# 1) Reintroducing different phases: alt=0 is current state, alt=1 is a near future state/possible modification, alt=2 is the final layout
# 2) Change correctors from SINLH03-DQUA040/080 to 030/060
# 3) Change naming of permanent and skew magnets: MQUA->MQUP, MBND -> MBNP and MQUA -> MQSK
# 4) Move two color chicane in ARAMIS from SARUN08 to SARUN09
# 5) Change number of correctors of UE38 from 1 to 2
# 6) Add some fine correction in the ATHOS undulator cells and tow color chicane positions
# Layout 10.1.2
# Synchronization of the holy list with Adriano/Hubert (email 4.6.18)
# 1) Change energy collimator from DCOL to VCOL
# 2) Temporary installation of the variable gap dechirper in SINSB05 with some change in quadrupole and BPM position in SINSB05 and SINSB04
# 3) Correction of the beam stopper dump in SATBD01, which should be after the permanent dipole magnet (index change from 205 to 305)
# 4) Reduce number of X-band deflector station to one, and shift it (and space for the other) by 22 cm against the beam (upstream): email R. Ganter 23.1.18 and confirmation by D. Hauenstein
# 5) Place 6 dechirper into Athos line, 4 in the SATCL02 section and 2 more in SATMA01
# Layout 10.1.3
# 1) Remove SATDI01-MQUA310 and SATDI-DBPM320 to SATDI01-MQUA300 and SAT-DBPM310
# 2) Take out Athos ACHIP Box in current version (alt=0)
# Layout 10.2.1
# 1) Moving planned layout (alt=1) to current
# 2) Move first QFM magnet in SATSY01 35 mm upstream
# 3) Correct for wrong calculation of the SINSB04 cell
# 4) Enables the ict in SATDI01-DICT020 for all phases
# 5) Added Athos ACHIP in 'Phase planned' (installation november shutdown 2018)
# 6) added two slit dechirper in SARUN16 (finanzed by CROSS proposal)
# 7) Move of SINDI01-DSCR080, replacing SINDI02-MQUA070
# 8) Move of SINLH03 screen to SINSB05 after the dechirper
# 9) Correct septum length from 1 m to 0.76 m
# Layout 10.2.2
# 1) pushed the two screen changes and ACHIP box from planned to current
# 2) Fine correction of the changed screen of change in 10.2.1 according to D. Hauensteins email (28.11)
# 3) Changes of BPM position in SATMA02 (email D>Hauenstein 28.11)
# 4) Added a C16 BAM to Athos in SATBD01
# 5) Placed X-band deflector in Athos in new section SATXB01
# Layout 10.2.3
# 1) Screen SINLH03-DSCR070 removed in phase current since it was move to SINSB05
# 2) Change correct length of 8 mm BAM to 100 mm
# 3) Replace BAM in SAT from 16 mm to 8 mm
# 4) Correct dechirper position in Athos according to input from Silke Pfiffinger
# 5) Correct Wire Scanner Position in final phase in SARUN09
# 6) Moved dechirpers after Aramis undulator from SARUN16 to SARUN18 after input from E. PRat
# 7) Added dechirpers from CROSS proposal in S30CB15
# 8) Possition changes of sextupoles and wirescanner in SARCL02 according to email D. Hauenstein 26.3
# 9) First implementation of seeding for the HERO project. This applies mostly to a reconfiguration of SATDI01 and the addition of a second two color chicane in SATUN05
# Layout 10.3.1
# 1) Moved final layout of Athos into planned layout
# 2) Included in the final layout of Athos HERO and EEHG first iteration.
# 3) Renamed XBAND cavity in Athos back to section SARMA02 (email by Romain, April 19)
# 4) Change in Dechirper position in SARUN18 (email D. HAuenstein 17th April 19)
# Layout 10.3.2
# 1) Add Athos beam dump SATBD02 to all phases
# 2) Verschiebung der Dechirper in S30CB15 (email. S. Pfinninger, 14.10.19)
# 3) Verschiebung der TDS in SATMA02 by 6 cm downstream (email. S. Pfinninger, 14.10.19)
# 4) Verschiebung des BAMS in SATBD01 by a small margin upstream (email. S. Pfinninger, 14.10.19)
# 5) Change Dipole type in the large EEHG chicane to AFBC3 to get maximum R56 of 12 mm for an angle of 2.3 degree
# 6) Added a power supply channel to the Athos CHIC-chicanes.
# 7) The phase final of SATDI01 will be copied over to phase planned
# 8) In the current phase there will be only 4 Athos undulator modules installed
# 9) Increase apeture from the large Athos chicane to the end of the modulator to 16 mm (before the undulator) and 8 mm after before going back to 5 mm.
# 10) Removed last sextupole in SATCL01 and moved DALA upstream
# 11) Move the periodic lattice after Athos stopper by 50 cm downstream and compensate for shorter triplet structures.
# 12) Second dechirper girder in SATCL02 moved into 'phase current', first in SATCL02 and the one in SATMA01 in 'phase planned'
# 13) Dechirper in SARUN18 comes in 'phase current'
# 14) phase current: LAst 4 Undulators and phase shifter, 'phase planned' last 8 undulators but all phase shifter in SATUN
# 15) X-Band TCAV only in phase planned and higher.
# 16) Shift of BMP sin S20SY03 and the placement of a screen, latter only from phase planned on
# 17) Remove SATDI01-DWSC290 out of phase current and planed (email R. Ganter 29.10.2019)
# Layout 10.4.2
# 1) Adding undulator SATUN12 to SATUN18 up till sep 2020
# 2) Adding back again the second RF structure for the X-band deflector in Athos
# 3) Adding CDR Monitor in SATSY02 for 'phase final'
# 4) Adding CDR Monitor in S20SY03 for 'phase final'
# 5) Adding BPM and Quadrupole before SATCL02-UDCP300
# 6) Adding Dechirper in SATMA02
# 7) Increase number of periods of bother modulator from 8 to 9
# 8) Increase length of EEHG chicane in SAT by 4 cm (last dipole shifts by 4 cm, the inner by 2 cm)
# 9) Change order of BPMs and Quads around EEHG chicane to allow for the vacuum chamber and 9 period modulator
# 10) Reduced spacing of 3 quadrupoles between EEHG chicane and modulator in SATMA01 to accomidate 9 periods
# 11) Correct position of SATDI01-DBAM
# 12) Correct the position of SARMA01-DBCM030 which is build before the correct 020. Idex swapped.
# 13) Added Dechirper 100 and 200 in SATCL02
# Layout 10.4.3
# 1) Remove Dechirper in SINSB05
# 2) Add Dechirper in S30CB15
# 3) Add Dechirper in SATMA01
# 4) Add Undulator in SATUN10
# 5) Renamed quadrupole and BPM in SATUN05 to 410 and 420 indec respectively
# Layout 10.4.4
# 1) Adding SATUN09 to the current layout
# 2) Adding Screen S20SY03-DSCR085 already to current layout.
# 3) Splitting SATDI01 into three girder due to the stage installation of the girders. Dechirper is moved into planned phase, while modulator girder and the final matching are still in final phase.
# 4) Adding SINBC01-DBAM060 to all phases
# 5) Addind SATDI01-DBAM070 to all phases
# 6) Move CDR in S20SY03 to SARCL01
# Layout 10.4.5
# 1) Complete Undulator installation in Athos
# 2) Installation of the dechirper girder in SATDI01 for current layout
# 3) Keep last girders in SATDI01 for final layout
# 4) Till the modulator is not installed the BPM and Quad before the SATDI dechirper are not enabled
# 5) The first bpm and quad on the girder after the SATDI dechirper are disabled and the names are moved to the BPM and quad directly after the dechirper
# 6) Added first draft for FCC experiment beam line at Porthos
# Layout 10.4.6
# 1) Increased angle in Porthos-FFC arm to 3 degree for a faster separation
# Layout 10.4.7
# 1) Added CDR in SARCL01 in current phase
# 2) Move wirescanner from SATDI01-DWSC065 to SATDI01-DWSC290
# 3) Displace the inner dipoles of SATUN05 and SATUN14 by 149 mm
# 4) Move the FCC experiment into S30CB15 and move the dechirper to S30CB16
# 5) Remove differences between proto list and holy list according to email by S. Pfiffinger
# 5a) Position SATDI01-DBAM070 for all phases
# 5b) Position of SARCL01-DCDR105
# 5c) SATSY03-DCDR050 moved into phase planned
# 5d) SATUN05 Chicane moved into phase planned
# 5e) SATDI01-DBPM090 and SATDI01-MQUA080 moved into phase planned
# 4f) Adjust various position aorund the modulator in Athos
# Layout 10.4.8
# 1) After decision of FCC/P3 project leader, the FCC experiment is moved back into Porthos arm
# 2) Sextupole SATCL01-MSEX200 and the Alignment laser port SATCL01-DALA210 have been removed from the lattice
# 3) Quadrupole SATCL01-MQUA120 adn MQUA190 have been moved inwards the SATCL01 symmetry point by 26.3 mm
# 4) The BAM SATDI01-DBAM095 has been temporarily removed due to aperture limitations
# 5) Define the offsets of the inner dipoles for the Athos beamline (small chicane sby 8 mm , big EEHG chicane by
# 6) correct the pointing direction of the EEHG chicane in SATMA01
class SwissFEL:
def __init__(self,alt=0):
self.alt=alt
self.Version='10.4.8'
def Types(self,TM):
# type definitions for the SwissFEL lattice
#define common Undulator
indict={'Type':'Undulator','Length':4,'K':1.2,'ku':4*math.asin(1)/0.015,'cor':0,'Baugruppe':'U15'}
TM.define('U15',indict)
indict={'Type':'Undulator','Length':2,'K':1.5,'ku':4*math.asin(1)/0.04,'corx':0,'cory':0,'Baugruppe':'UE38'}
TM.define('UE38',indict)
indict={'Type':'Undulator','Length':0.06,'Tag':'UPHS','Baugruppe':'U15-PS'}
TM.define('PSU15',indict)
indict={'Type':'Undulator','Length':0.20,'Tag':'UDLY','Baugruppe':'UE38-DELAY'}
TM.define('PSUE38',indict)
indict={'Type':'Undulator','Length':0.20,'K':25, 'ku':4*math.asin(1)/0.2, 'Tag':'UMOD','Baugruppe':'U200'}
TM.define('UMOD',indict)
indict={'Type':'Undulator','Length':0.4,'K':2.27,'ku':4*math.asin(1)/0.05,'Baugruppe':'U50','Power':20e3,'Waist':400e-6}
TM.define('U50',indict)
# define common quadrupole38
indict={'Type':'Quadrupole','Length':0.15,'LengthRes':0.25,'corx':0,'cory':0,'Baugruppe':'QFD'}
TM.define('QFD',indict)
indict={'Type':'Quadrupole','Length':0.15,'LengthRes':0.25,'corx':0,'cory':0,'Baugruppe':'QFDM'}
TM.define('QFDM',indict)
indict={'Type':'Quadrupole','Length':0.15,'LengthRes':0.15,'corx':0,'cory':0,'Baugruppe':'QFDM'}
TM.define('QFDM-short',indict)
indict={'Type':'Quadrupole','Length':0.15,'LengthRes':0.25,'Baugruppe':'QFD'}
TM.define('QFD-noCor',indict)
indict={'Type':'Quadrupole','Length':0.15,'LengthRes':0.25,'Baugruppe':'QFDM'}
TM.define('QFDM-noCor',indict)
indict={'Type':'Quadrupole','Length':0.15,'LengthRes':0.25,'Tilt':math.asin(1)/2,'Tag':'MQSK','Baugruppe':'QFD-SKEW'}
TM.define('QFS',indict)
indict={'Type':'Quadrupole','Length':0.15,'LengthRes':0.25,'Baugruppe':'QFA'}
TM.define('QFA',indict)
indict={'Type':'Quadrupole','Length':0.3,'LengthRes':0.7,'Baugruppe':'QFM'}
TM.define('QFM',indict)
indict={'Type':'Quadrupole','Length':0.3,'LengthRes':0.5,'Baugruppe':'QFM'}
TM.define('QFM-short',indict)
indict={'Type':'Quadrupole','Length':0.3,'LengthRes':0.3,'Baugruppe':'QFM'}
TM.define('QFM-veryshort',indict)
indict={'Type':'Quadrupole','Length':0.15,'LengthRes':0.25,'Tilt':math.asin(1)/2,'Tag':'MQSK','Baugruppe':'QFA-SKEW'}
TM.define('QFAS',indict)
indict={'Type':'Quadrupole','Length':0.08,'LengthRes':0.08,'corx':0,'cory':0,'Baugruppe':'QFF'}
TM.define('QFF',indict)
# indict={'Type':'Quadrupole','Length':0.08,'LengthRes':0.08,'corx':0,'cory':0,'Baugruppe':'QFG'}
# TM.define('QFG',indict)
indict={'Type':'Quadrupole','Length':0.04,'LengthRes':0.04,'Tag':'MQUP','Baugruppe':'QFU','Overlap':1}
TM.define('QFU',indict)
indict={'Type':'Quadrupole','Length':0.015,'LengthRes':0.03,'Tag':'MQUP','Baugruppe':'QFUE'}
TM.define('QFUE',indict)
indict={'Type':'Quadrupole','Length':0.08,'LengthRes':0.10,'Baugruppe':'QFC'}
TM.define('QFC',indict)
indict={'Type':'Quadrupole','Length':0.08,'LengthRes':0.10,'Tilt':math.asin(1)/2,'Tag':'MQSK','Baugruppe':'QFC-SKEW'}
TM.define('QFCS',indict)
indict={'Type':'Quadrupole','Length':0.08,'LengthRes':0.10,'Baugruppe':'QFB'}
TM.define('QFB',indict)
indict={'Type':'Quadrupole','Length':0.08,'LengthRes':0.10,'Tilt':math.asin(1)/2,'Tag':'MQSK','Baugruppe':'QFB-SKEW'}
TM.define('QFBS',indict)
indict={'Type':'Quadrupole','Length':0.16,'LengthRes':0.16,'Baugruppe':'QFCOR'}
TM.define('QFCOR',indict)
indict={'Type':'Quadrupole','Length':0.16,'LengthRes':0.16,'Tilt':math.asin(1)/2,'Tag':'MQSK','Baugruppe':'QFCOR-SKEW'}
TM.define('QFCORS',indict)
indict={'Type':'Quadrupole','Length':0.1,'LengthRes':0.1,'Baugruppe':'QPM1'}
TM.define('QPM1',indict)
indict={'Type':'Quadrupole','Length':0.1,'LengthRes':0.1,'Baugruppe':'QPM2'}
TM.define('QPM2',indict)
indict={'Type':'Sextupole','Length':0.08,'LengthRes':0.10,'Baugruppe':'HFA'}
TM.define('HFA',indict)
indict={'Type':'Sextupole','Length':0.08,'LengthRes':0.10,'Baugruppe':'HFB'}
TM.define('HFB',indict)
indict={'Type':'Solenoid','Length':0.75,'Baugruppe':'WFS'}
TM.define('WFS',indict)
indict={'Type':'Solenoid','Length':0.03,'Baugruppe':'WFB'}
TM.define('WFB',indict)
indict={'Type':'Solenoid','Length':0.26,'Baugruppe':'WFG'}
TM.define('WFG',indict)
# define common dipoles
indict={'Type':'Dipole','Length':0.25,'Baugruppe':'SHA'}
TM.define('SHA',indict)
indict={'Type':'Dipole','Length':0.12,'cor':0,'Baugruppe':'AFL'}
TM.define('AFL',indict)
indict={'Type':'Dipole','Length':0.25,'cor':0,'Baugruppe':'AFBC1'}
TM.define('AFBC1',indict)
indict={'Type':'Dipole','Length':0.5,'cor':0,'Baugruppe':'AFBC3'}
TM.define('AFBC3',indict)
indict={'Type':'Dipole','Length':0.5,'Baugruppe':'AFBC3'}
TM.define('AFBC3-noCor',indict)
indict={'Type':'Dipole','Length':0.76,'Baugruppe':'AFS'}
TM.define('AFS',indict)
indict={'Type':'Dipole','Length':0.3,'cor':0,'Baugruppe':'AFSS'}
TM.define('AFSS',indict)
indict={'Type':'Dipole','Length':2,'Tilt':math.asin(1),'Baugruppe':'AFD1'}
TM.define('AFD1',indict)
indict={'Type':'Dipole','Length':1.1,'Tilt':math.asin(1),'Baugruppe':'AFD2'}
TM.define('AFD2',indict)
indict={'Type':'Dipole','Length':0.3,'Tag':'MBNP','Baugruppe':'AFP1'}
TM.define('AFP1',indict)
indict={'Type':'Dipole','Length':1.0,'cor':0,'Baugruppe':'AFDL'}
TM.define('AFDL',indict)
# new dipole for Porthos
indict={'Type':'Dipole','Length':1.,'cor':0,'Baugruppe':'AFBC4'}
TM.define('AFBC4',indict)
# define common correctors
indict={'Type':'Corrector','Length':1,'Tag':'MKAC','cory':0,'Baugruppe':'RES-KICKER-AC'}
TM.define('RESKICKAC',indict)
indict={'Type':'Corrector','Length':0.21,'Tag':'MKDC','cory':0,'Baugruppe':'RES-KICKER-DC'}
TM.define('RESKICKDC',indict)
indict={'Type':'Corrector','Length':0.05,'LengthRes':0.1,'Tag':'MCOR','corx':0,'cory':0,'Baugruppe':'SFC'}
TM.define('SFC',indict)
indict={'Type':'Corrector','Length':0.2,'LengthRes':0.3,'Tag':'MCOR','corx':0,'cory':0,'Baugruppe':'SFQFM'}
TM.define('SFQFM',indict)
indict={'Type':'Corrector','Length':0.2,'LengthRes':0.2,'Tag':'MCOR','corx':0,'cory':0,'Baugruppe':'SFQFM'}
TM.define('SFQFM-short',indict)
indict={'Type':'Corrector','Length':0.015,'Tag':'MCOR','corx':0,'cory':0,'Baugruppe':'SFDD'}
TM.define('SFDD',indict)
indict={'Type':'Corrector','Length':0.015,'Tag':'MCOR','corx':0,'cory':0,'Baugruppe':'SFD1'}
TM.define('SFD1',indict)
indict={'Type':'Corrector','Length':0.05,'Tag':'MCOR','corx':0,'cory':0,'Baugruppe':'SFC'}
TM.define('SFC',indict)
indict={'Type':'Corrector','Length':0.005,'Tag':'MCOR','corx':0,'cory':0,'Baugruppe':'SFB'}
TM.define('SFB',indict)
indict={'Type':'Corrector','Length':0.06,'Tag':'MCOR','corx':0,'cory':0,'Baugruppe':'SFU'}
TM.define('SFU',indict)
indict={'Type':'Corrector','Length':0.01,'Tag':'MCOR','corx':0,'cory':0,'Baugruppe':'SFUE'}
TM.define('SFUE',indict)
# define common RF structure
indict={'Type':'RF','Length': 0.2,'LengthRes':0.25,'Band':'S','Tag':'RGUN','Baugruppe':'PSI-GUN'}
TM.define('GUN',indict)
indict={'Type':'RF','Length': 1.978045,'LengthRes':2.05,'Band':'C','Baugruppe':'C-BAND-ACC'}
TM.define('TW Cav C-Band',indict)
indict={'Type':'RF','Length': 4.0830,'LengthRes':4.15,'Band':'S','Baugruppe':'S-BAND-ACC'}
TM.define('TW Cav S-Band',indict)
indict={'Type':'RF','Length': 0.75,'LengthRes':0.965,'Band':'X','Baugruppe':'X-BAND-ACC'}
TM.define('TW Cav X-Band',indict)
indict={'Type':'RF','Length': 0.240,'LengthRes':0.441,'Band':'S','Tag':'RTDS','Baugruppe':'S-BAND-TDS'}
TM.define('TDS S-Band',indict)
indict={'Type':'RF','Length': 1.9,'LengthRes':2.0,'Band':'C','Tag':'RTDS','Baugruppe':'C-BAND-TDS'}
TM.define('TDS C-Band',indict)
indict={'Type':'RF','Length': 1.20,'LengthRes':1.2,'Band':'X','Tag':'RTDS','Baugruppe':'X-BAND-TDS'}
TM.define('TDS X-Band',indict)
# define diagnostics template
indict={'Type':'Diagnostic','Length':0.10,'Baugruppe':'DBPM-C16'}
TM.define('DBPM-C16',indict)
indict={'Type':'Diagnostic','Length':0.10,'Baugruppe':'DBPM-C8'}
TM.define('DBPM-C8',indict)
indict={'Type':'Diagnostic','Length':0.08,'Baugruppe':'DBPM-C5'}
TM.define('DBPM-C5',indict)
indict={'Type':'Diagnostic','Length':0.255,'Baugruppe':'DBPM-C38'}
TM.define('DBPM-C38',indict)
indict={'Type':'Diagnostic','Length':0.137,'Seval': 0.0685, 'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DSCR-OV16'}
TM.define('DSCR-OV16',indict)
indict={'Type':'Diagnostic','Length':0.137,'Seval': 0.0685, 'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DSCR-OV38'}
TM.define('DSCR-OV38',indict)
indict={'Type':'Diagnostic','Length':0.137,'Seval': 0.0685, 'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DSCR-HR16'}
TM.define('DSCR-HR16',indict)
indict={'Type':'Diagnostic','Length':0.137,'Seval': 0.0685, 'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DSCR-HR16-VO'}
TM.define('DSCR-HR16-VACONLY',indict)
indict={'Type':'Diagnostic','Length':0.137,'Seval': 0.0685, 'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DSCR-HR8'}
TM.define('DSCR-HR8',indict)
indict={'Type':'Diagnostic','Length':0.137,'Seval': 0.0685, 'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DSCR-HR8-TEMP'}
TM.define('DSCR-HR8-P1-OV16',indict)
indict={'Type':'Diagnostic','Length':0.137,'Seval': 0.0685, 'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DSCR-HR38'}
TM.define('DSCR-HR38',indict)
indict={'Type':'Diagnostic','Length':0.137,'Seval': 0.0685, 'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DSCR-LH16'}
TM.define('DSCR-LH16',indict)
indict={'Type':'Diagnostic','Length':0.137,'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DSCR-LE16'}
TM.define('DSCR-LE16',indict)
indict={'Type':'Diagnostic','Length':0.1,'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DSCR-BC120'}
TM.define('DSCR-BC120',indict)
indict={'Type':'Diagnostic','Length':0.137,'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DSCR-LE38R'}
TM.define('DSCR-LE38R',indict)
indict={'Type':'Diagnostic','Length':0.126,'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DSCR-LE38'}
TM.define('DSCR-LE38',indict)
indict={'Type':'Diagnostic','Length':0.085,'Tag':'DHVS','Baugruppe':'DHVS-SLIT'}
TM.define('DHVS',indict)
indict={'Type':'Diagnostic','Length':0.137,'Sx':1,'Sy':1,'Tag':'DCDR','Baugruppe':'DCDR'}
TM.define('DCDR',indict)
indict={'Type':'Diagnostic','Length':0.1,'Sx':1,'Sy':1,'Tag':'DSRM','Baugruppe':'DSRM-VIS'}
TM.define('DSRM-VIS',indict)
indict={'Type':'Diagnostic','Length':0.1,'Sx':1,'Sy':1,'Tag':'DSRM','Baugruppe':'DSRM-UV'}
TM.define('DSRM-UV',indict)
indict={'Type':'Diagnostic','Length':0.1,'Sx':1,'Sy':1,'Tag':'DBCM','Baugruppe':'DBCM-THZ'}
TM.define('DBCM-THZ',indict)
indict={'Type':'Diagnostic','Length':0.1,'Sx':1,'Sy':1,'Tag':'DBCM','Baugruppe':'DBCM-IR'}
TM.define('DBCM-IR',indict)
indict={'Type':'Diagnostic','Length':0.137,'Sx':1,'Sy':1,'Tag':'DALA','Baugruppe':'DALA'}
TM.define('DALA',indict)
indict={'Type':'Diagnostic','Length':0.02, 'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DSCR-LA'}
TM.define('DSCR-LA',indict)
indict={'Type':'Diagnostic','Length':0.02, 'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DLAC-TARGET'}
TM.define('DLAC-TARGET',indict)
indict={'Type':'Diagnostic','Length':0.02, 'Sx':1,'Sy':1,'Tag':'DSCR','Baugruppe':'DCDR-LA'}
TM.define('DCDR-LA',indict)
indict={'Type':'Diagnostic','Length':0.137,'Sx':1,'Sy':1,'Tag':'DLAC','Baugruppe':'DLAC-LL16'}
TM.define('DLAC-LL16',indict)
indict={'Type':'Diagnostic','Length':0.137,'Sx':1,'Sy':1,'Tag':'DWSC','Baugruppe':'DWSC-C16'}
TM.define('DWSC-C16',indict)
indict={'Type':'Diagnostic','Length':0.137,'Sx':1,'Sy':1,'Tag':'DWSC','Baugruppe':'DWSC-C16-AL'}
TM.define('DWSC-C16-AL',indict)
indict={'Type':'Diagnostic','Length':0.15,'Sx':1,'Sy':1,'Tag':'DWSC','Baugruppe':'DWSC-C38'}
TM.define('DWSC-C38',indict)
indict={'Type':'Diagnostic','Length':0.1,'Sx':1,'Sy':1,'Tag':'DWSC','Baugruppe':'DWSC-C8'}
TM.define('DWSC-C8',indict)
indict={'Type':'Diagnostic','Length':0.137,'Sx':1,'Sy':1,'Tag':'DWSC','Apery':0,'Baugruppe':'DWSC-C16-COL'}
TM.define('DWSC-C16-COL',indict)
indict={'Type':'Diagnostic','Length':0.075,'Cx':0,'Cy':0,'Cz':1,'Tag':'DBAM','Baugruppe':'DBAM-PS16'}
TM.define('DBAM-PS16',indict)
indict={'Type':'Diagnostic','Length':0.075,'Cx':0,'Cy':0,'Cz':1,'Tag':'DBAM','Baugruppe':'DBAM-FS16'}
TM.define('DBAM-FS16',indict)
indict={'Type':'Diagnostic','Length':0.1,'Cx':0,'Cy':0,'Cz':1,'Tag':'DBAM','Baugruppe':'DBAM-FS8'}
TM.define('DBAM-FS8',indict)
indict={'Type':'Diagnostic','Length':0.04,'Cx':0,'Cy':0,'Cz':0,'Tag':'DICT','Baugruppe':'DICT-C16'}
TM.define('DICT-C16',indict)
indict={'Type':'Diagnostic','Length':0.04,'Cx':0,'Cy':0,'Cz':0,'Tag':'DICT','Baugruppe':'DICT-C38'}
TM.define('DICT-C38',indict)
indict={'Type':'Diagnostic','Length':0.06,'Cx':0,'Cy':0,'Cz':0,'Tag':'DICT','Baugruppe':'DICT-C38-GUN'}
TM.define('DICT-C38-GUN',indict)
indict={'Type':'Diagnostic','Length':0.1,'Cx':0,'Cy':0,'Cz':0,'Tag':'DWCM','Baugruppe':'DWCM-C38'}
TM.define('DWCM-C38',indict)
indict={'Type':'Diagnostic','Length':0.15,'Cx':0,'Cy':0,'Sz':1,'Tag':'DTAU','Baugruppe':'DTAU'}
TM.define('DTAU',indict)
indict={'Type':'Diagnostic','Length':0.15,'Cx':0,'Cy':0,'Sz':1,'Tag':'DEOM','Baugruppe':'DEOM'}
TM.define('DEOM',indict)
indict={'Type':'Diagnostic','Length':0.126,'Cx':0,'Cy':0,'Sz':1,'Tag':'DFCP','Baugruppe':'DFCP-GUN'}
TM.define('DFCP',indict)
# define x-ray diagnostic
indict={'Type':'Photonics','Length':0.15,'Sx':1,'Sy':1,'Tag':'PPRM','Baugruppe':'PPRM'}
TM.define('PPRM-C38',indict)
indict={'Type':'Photonics','Length':0.15,'Tag':'PCRY','Baugruppe':'BRAGG-CRYSTAL'}
TM.define('PCRY-C38',indict)
# define aperture templates (moving apertures are part of diagnostics and diagnostics)
indict={'Type':'Diagnostic','Length':0.137,'Tag':'DCOL','Apery':0,'Baugruppe':'VERT-COL'}
TM.define('COL-TR-16',indict)
indict={'Type':'Diagnostic','Length':0.5,'Tag':'VCOL','Aperx':0,'Baugruppe': 'E-COL'}
TM.define('COL-Energy',indict)
indict={'Type':'Undulator','Length':1,'Tag':'UDCP','gap':20e-3,'offset':0,'Aperx':0,'Baugruppe': 'DECHIRPER-V'}
TM.define('COL-Dechirper-V',indict)
indict={'Type':'Undulator','Length':1,'Tag':'UDCP','gap':20e-3,'offset':0,'Aperx':0,'Baugruppe': 'DECHIRPER-H'}
TM.define('COL-Dechirper-H',indict)
indict={'Type':'Diagnostic','Length':0.01,'Tag':'DCOL','Aperx':0,'Baugruppe':'BC-SCRAPER'}
TM.define('COL-BC-Scraper',indict)
indict={'Type':'Diagnostic','Length':0.01,'Tag':'DSFH','Baugruppe':'SLOT-FOIL-H'}
TM.define('BC-SlotFoil-H',indict)
indict={'Type':'Diagnostic','Length':0.15,'Tag':'DSFV','Baugruppe':'SLOT-FOIL-V'}
TM.define('BC-SlotFoil-V',indict)
indict={'Type':'Vacuum','Length':0.085,'Tag':'VLAP','Baugruppe':'LH-LASER-PORT'}
TM.define('LH-Laserport',indict)
indict={'Type':'Vacuum','Length':0.1,'Tag':'VLAP','Baugruppe':'LC-GUN-IN'}
TM.define('GUN-Laserport',indict)
# Beam Stopper and Dumps
indict={'Type':'Vacuum','Length':1,'Tag':'SDMP','Baugruppe':'BEAM-DUMP-SIN'}
TM.define('Beam-Dump-Sin',indict)
indict={'Type':'Vacuum','Length':1,'Tag':'SDMP','Baugruppe':'BEAM-DUMP-S10'}
TM.define('Beam-Dump-S10',indict)
indict={'Type':'Vacuum','Length':1,'Tag':'SDMP','Baugruppe':'BEAM-DUMP-SAR'}
TM.define('Beam-Dump-Sar',indict)
indict={'Type':'Vacuum','Length':1,'Tag':'SDMP','Baugruppe':'BEAM-DUMP-SAT'}
TM.define('Beam-Dump-Sat',indict)
indict={'Type':'Vacuum','Length':2.5,'Tag':'SSTP','Baugruppe':'BEAM-STOP-SAR'}
TM.define('Beam-Stopper-Sar',indict)
indict={'Type':'Vacuum','Length':2.5,'Tag':'SSTP','Baugruppe':'BEAM-STOP-SAT'}
TM.define('Beam-Stopper-Sat',indict)
indict={'Type':'Vacuum','Length':1.6,'Tag':'SSTP','Baugruppe': 'BEAM-STOP-S10'}
TM.define('Beam-Stopper-S10',indict)
indict={'Type':'Vacuum','Length':1.5,'Tag':'SLOS','Baugruppe': 'SHIELD-FE'}
TM.define('FE-Shielding',indict)
#Laser Acceleration
indict={'Type':'Diagnostic','Length':2.13,'Tag':'DLAC','Aperx':0,'Baugruppe':'LASER-ACC-BOX'}
TM.define('Laser-Acceleration',indict)
# define branching point
indict={'Type':'Marker','Length':0.0,'Tag':'MKBR','Baugruppe': 'BRANCHING-POINT'}
TM.define('MKBR',indict)