(Translated by https://www.hiragana.jp/)
! MAD INPUT DECK FOR BEAM LINE 2
! CHICANE IN H-LINE NOT ENERGIZED
! 04/19/2010 Misha add sextupoles on 06/29/2010
IB:= 32.0 ! was 50/1.8 in 10/06/2008 edition
ASSIGN,PRINT=out.txt
BEAM, ENERGY=IB*1.8E-3, EXN=4*2.0E-6, EYN=4*2.0E-6, SIGE=0.01
HR:=BEAM[ENERGY]/2.99792458E-4
H: LINE=(HO00,HPOP1,HO01,HQ1,HO02,HQ2,HO03,HQ3,HO04,HPOP2, &
CHO1,CHBEND1,CHO2,CHBEND2,CHO3,CHBEND3,CHO2,CHBEND4, &
CHO4,HPOP3,HO06,HQ4,HO07,HQ5,HO08,HQ6,HO09,HPOP4, &
HO10,m2,HO10,HPOP5,HO11,HQ7,HO12,HQ8,HO13,HQ9,HO14,HPOP6, &
HO15,BPM5,HO16,Hendl)
m2:marker
HO00: DRIFT, L=0.20
HPOP1: MONITOR, L=0.00
HO01: DRIFT, L=0.17
HQ1: QUADRUPOLE, L=0.10, K1=IHQ1/4.4444E-3/HR
HO02: DRIFT, L=0.20
HQ2: QUADRUPOLE, L=0.20, K1=IHQ2/4.4444E-3/HR
HO03: DRIFT, L=0.20
HQ3: QUADRUPOLE, L=0.10, K1=IHQ3/4.4444E-3/HR
HO04: DRIFT, L=0.17
HPOP2: MONITOR, L=0.00
! Chicane not activated
CHBEND1: SBEND, L=0.41, ANGLE=+0.0, E1=-0.0, E2=0.0, TILT
CHBEND2: SBEND, L=CHBEND1[L], ANGLE=-CHBEND1[ANGLE], E1=-0.0, TILT
CHBEND3: SBEND, L=CHBEND1[L], ANGLE=-CHBEND1[ANGLE], E2=0.0, TILT
CHBEND4: SBEND, L=CHBEND1[L], ANGLE=CHBEND1[ANGLE], E1=-0.0, &
E2=0.0, TILT
! Arc Length L=0.447 for ANGLE=20.0
CHO1: DRIFT, L=0.845
CHO2: DRIFT, L=0.08
CHO3: DRIFT, L=0.24
CHO4: DRIFT, L=0.535
HPOP3: MONITOR, L=0.00
HO06: DRIFT, L=0.17
HQ4: QUADRUPOLE, L=0.10, K1=IHQ4/4.4444E-3/HR
HO07: DRIFT, L=0.20
HQ5: QUADRUPOLE, L=0.20, K1=IHQ5/4.4444E-3/HR
HO08: DRIFT, L=0.20
HQ6: QUADRUPOLE, L=0.10, K1=IHQ6/4.4444E-3/HR
HO09: DRIFT, L=0.17
HPOP4: MONITOR, L=0.00
HO10: DRIFT, L=1.50/2
HPOP5: MONITOR, L=0.00
HO11: DRIFT, L=0.17
HQ7: QUADRUPOLE, L=0.10, K1=IHQ7/4.4444E-3/HR
HO12: DRIFT, L=0.20
HQ8: QUADRUPOLE, L=0.20, K1=IHQ8/4.4444E-3/HR
HO13: DRIFT, L=0.20
HQ9: QUADRUPOLE, L=0.10, K1=IHQ9/4.4444E-3/HR
HO14: DRIFT, L=0.17
HPOP6: MONITOR, L=0.00
HO15: DRIFT, L=0.25
BPM5: MONITOR, L=0.0000
HO16: DRIFT, L=0.28
Hendl: monitor, L=0.00
F1: LINE=(FD1,FO01,FP1,FO02,FQ1,FO03,HES,FO041,FS1,FO042,FQ2,FO05, &
FP2,FO06,FQ3,FO07)
FD1: SBEND, L=0.4000, ANGLE=-0.3491, HGAP=0.115, FINT=0.0
FO01: DRIFT, L=0.6705
FP1: MONITOR, L=0.0000
FO02: DRIFT, L=0.3500
FQ1: QUADRUPOLE, L=0.1000, K1=IFQ1/4.4444E-3/HR
FO03: DRIFT, L=0.1925
HES: MONITOR, L=0.0000
FO041: DRIFT, L=1.08075
FS1: SEXTUPOLE, L=0.05, K2=IFS2/4.444E-3/HR ! -?- need calibration--!---------------
FO042: DRIFT, L=0.6775
FQ2: QUADRUPOLE, L=0.1000, K1=IFQ2/4.4444E-3/HR
FO05: DRIFT, L=0.2230
FP2: MONITOR, L=0.0000
FO06: DRIFT, L=1.6654
FQ3: QUADRUPOLE, L=0.1000, K1=IFQ3/4.4444E-3/HR
FO07: DRIFT, L=1.1520
FD2: SBEND, L=0.4000, ANGLE=0.3491, HGAP=0.015, FINT=0.5
! Beam leaves line here if entering beamline 1 or continues along the remainder of beamline 0 if entering beamlines 2 or 3
F2: LINE=(FO08,FP3,FO09,mask,FO10,FQ4,FO111,FS2,FO112,FQ5,FO12,FP4,FO13)
FO08: DRIFT, L=0.69
FP3: MONITOR, L=0.0000
FO09: DRIFT, L=0.0900
mask: MONITOR, L=0.0000
FO10: DRIFT, L=0.1700
FQ4: QUADRUPOLE, L=0.1000, K1=IFQ4/4.4444E-3/HR
FO111: DRIFT, L=0.1500
FS2: SEXTUPOLE, L=0.05, K2=IFS2/4.444E-3/HR ! ??????? need calibration!!!!!!!!!!!
FO112: DRIFT, L=1.8000
FQ5: QUADRUPOLE, L=0.1000, K1=IFQ5/4.4444E-3/HR
FO12: DRIFT, L=0.4929
FP4: MONITOR, L=0.0000
FO13: DRIFT, L=0.5445
! beam continues to either of beamlines 2 or 3
IHQ1:= 5*32*1.8/50
IHQ2:=-5*32*1.8/50
IHQ3:= 5.5*32*1.8/50
IHQ4:= 0
IHQ5:= 0
IHQ6:= 0
IHQ7:= -6.4*32*1.8/50
IHQ8:=-3*32*1.8/50
IHQ9:= 10.2*32*1.8/50
IFQ1:=-5.57*32*1.8/50
IFQ2:= 6.19*32*1.8/50
IFQ3:=-3.63*32*1.8/50
IFQ4:= 6.33*32*1.8/50
IFQ5:=-3.04*32*1.8/50
bx:= 10 ! startup twiss
by:= 10
ax:= -1.000
ay:= -1.000
USE, PERIOD=(H,F1,F2)
SELECT, TWISS, HPOP1
SELECT, TWISS, HPOP2
SELECT, TWISS, HPOP3
SELECT, TWISS, HPOP4
SELECT, TWISS, HPOP5
SELECT, TWISS, HPOP6
SELECT, TWISS, HES
SELECT, TWISS, FP2
SELECT, TWISS, FP3
SELECT, TWISS, FP4
twiss,BETX=bx,BETY=by,ALFX=ax,ALFY=ay,SAVE
plot,haxis=s, vaxis1=BETX,BETY, vaxis2=Dx,Dy, table=twiss, &
Hmin=0, Hmax=30,Vmin=0,vmax=40,SPLINE, colour=100