!space charge is switched on
&NEWRUN
ZSTART = 2.6
ZSTOP = 13.85
Head='FLASH 30cm'
RUN=1
Loop=F,
Nloop=2
Distribution = flash.0260.ast
Xoff=0.0,
Yoff=0.0
Lmagnetized=.F
EmitS=.T
PhaseS=.T
TrackS=.T
RefS=.T
TcheckS=.T
CathodeS=.T
TRACK_ALL=.T,
AUTO_PHASE=.T
check_ref_part=.F,
Zemit=1000
Zphase=1
H_max=0.001
H_min=0.0001
Step_width=200
Step_max=500001
Max_Step=500001
Lmonitor=.F
!LPROMPT=.F
Qbunch = 0.25
XYrms= -1
Trms=-1
/

&SCAN
/

&CHARGE
LSPCH = .T
Nrad = 30
Nlong_in = 60
Cell_var=2.0
min_grid=0.0
N_min=20
Max_scale=0.5
Max_count=50
Lmirror=.T
/

&Aperture
LApert=.f
/

&FEM
/
&CAVITY
LEFieLD=.T
FILE_EFieLD(1)='FLASHgun_p12.dat'
Nue(1)=1.3,
MaxE(1)=45.0
Phi(1)=-2.0,
C_pos(1)=0.0,
! ACC1_1 koef=4.31
FILE_EFieLD(2) = 'tesla4cav.dat',
Nue(2)=1.3,   
MaxE(2) = 26.402
Phi(2) = -2.597
C_pos(2)=3.30,
FILE_EFieLD(3) = 'tesla4cav.dat',
Nue(3)=1.3,	
MaxE(3) = 40.513
Phi(3) = -2.597
C_pos(3)=8.84,
! ACC1_3 koef=0.7201 design voltage 16 MV => Emax=2*V/L
FILE_EFieLD(4) = 'tesla4cav3.dat',
Nue(4)=3.9,	
MaxE(4) = 28.9206
Phi(4) = -153.8791
C_pos(4)=14.55,
! ACC2
FILE_EFieLD(5) = 'tesla8cav.dat', !32.7115
Nue(5)=1.3,	
MaxE(5) = 33.5299
Phi(5) = -24.2259
C_pos(5)=39.2261,
! ACC3
FILE_EFieLD(6) = 'tesla8cav.dat', !47.0339
Nue(6)=1.3,	
MaxE(6) = 48.2015
Phi(6) = -24.2259
C_pos(6)=51.4275,
! ACC4
FILE_EFieLD(7) = 'tesla8cav.dat',
Nue(7)=1.3,	
MaxE(7) = 42.5699
Phi(7)= 0, 
C_pos(7)=88.0271,
! ACC5
FILE_EFieLD(8) = 'tesla8cav.dat',
Nue(8)=1.3,	
MaxE(8) = 42.5699
Phi(8)= 0, 
C_pos(8)=100.2285,
! ACC6
FILE_EFieLD(9) = 'tesla8cav.dat',
Nue(9)=1.3,	
MaxE(9) = 42.5699
Phi(9)= 0, 
C_pos(9)=112.4299,
/

&SOLENOID
loop=f
LBfield=.T,
File_Bfield(1)='Main3mcomp.txt'
MaxB(1) = 0.17331
S_pos(1)=0.0
S_xoff(1)=0.0,
S_yoff(1)=0.0,
S_Smooth(1)=20 
/

&QUADRUPOLE
Loop=.F
LQUAD=.T

! Quadrupole Q9ACC1
Q_length(1)=0.1850
Q_K(1)=2.867
Q_Bore(1)=0.0000001
Q_pos(1)=13.9752

! Quadrupole Q10ACC1
Q_length(2)=0.1850
Q_K(2)=-3.3249
Q_Bore(2)=0.0000001
Q_pos(2)=14.2252

! Quadrupole Q1.1UBC2
Q_length(3)=0.0930
Q_K(3)=-3.1935
Q_Bore(3)=0.0000001
Q_pos(3)=19.61

! Quadrupole Q1.2UBC2
Q_length(4)=0.1310
Q_K(4)=-3.2809
Q_Bore(4)=0.0000001
Q_pos(4)=19.735

! Quadrupole Q1.3UBC2
Q_length(5)=0.0930
Q_K(5)=9.6129
Q_Bore(5)=0.0000001
Q_pos(5)=19.86

! Quadrupole Q1DBC2
Q_length(6)=0.2768
Q_K(6)=-1.6051
Q_Bore(6)=0.0000001
Q_pos(6)=25.74

! Quadrupole Q1.1DBC2
Q_length(7)=0.2768
Q_K(7)=5.1868
Q_Bore(7)=0.0000001
Q_pos(7)=26.34

! Quadrupole Q2DBC2
Q_length(8)=0.2768
Q_K(8)=-5.3407
Q_Bore(8)=0.0000001
Q_pos(8)=26.94

! Quadrupole Q2.2DBC2
Q_length(9)=0.2768
Q_K(9)=4.2153
Q_Bore(9)=0.0000001
Q_pos(9)=27.54

! Quadrupole Q3DBC2
Q_length(10)=0.2768
Q_K(10)=-0.96171
Q_Bore(10)=0.0000001
Q_pos(10)=28.14

! Quadrupole Q4DBC2
Q_length(11)=0.2768
Q_K(11)=-2.1228
Q_Bore(11)=0.0000001
Q_pos(11)=28.74

! Quadrupole Q5DBC2
Q_length(12)=0.2768
Q_K(12)=2.1228
Q_Bore(12)=0.0000001
Q_pos(12)=29.69

! Quadrupole Q6DBC2
Q_length(13)=0.2768
Q_K(13)=-2.1228
Q_Bore(13)=0.0000001
Q_pos(13)=30.64

! Quadrupole Q7DBC2
Q_length(14)=0.2768
Q_K(14)=2.1228
Q_Bore(14)=0.0000001
Q_pos(14)=31.59

! Quadrupole Q8DBC2
Q_length(15)=0.2768
Q_K(15)=-2.1228
Q_Bore(15)=0.0000001
Q_pos(15)=32.54

! Quadrupole Q9DBC2
Q_length(16)=0.2768
Q_K(16)=2.1228
Q_Bore(16)=0.0000001
Q_pos(16)=33.49

! Quadrupole Q10DBC2
Q_length(17)=0.2768
Q_K(17)=-2.1228
Q_Bore(17)=0.0000001
Q_pos(17)=34.44

! Quadrupole Q10.3DBC2
Q_length(18)=0.3046
Q_K(18)=1.3043
Q_Bore(18)=0.0000001
Q_pos(18)=35.617

! Quadrupole Q11DBC2
Q_length(19)=0.3046
Q_K(19)=0.56008
Q_Bore(19)=0.0000001
Q_pos(19)=36.217

! Quadrupole Q12DBC2
Q_length(20)=0.3046
Q_K(20)=-1.1238
Q_Bore(20)=0.0000001
Q_pos(20)=36.817

! Quadrupole Q9ACC2
Q_length(21)=0.1850
Q_K(21)=3.2789
Q_Bore(21)=0.0000001
Q_pos(21)=49.9052

! Quadrupole Q10ACC2
Q_length(22)=0.1850
Q_K(22)=-3.2789
Q_Bore(22)=0.0000001
Q_pos(22)=50.1552

! Quadrupole Q9ACC3
Q_length(23)=0.1850
Q_K(23)=2.3362
Q_Bore(23)=0.0000001
Q_pos(23)=62.1066

! Quadrupole Q10ACC3
Q_length(24)=0.1850
Q_K(24)=-2.187
Q_Bore(24)=0.0000001
Q_pos(24)=62.3566

! Quadrupole Q1UBC3
Q_length(25)=0.3046
Q_K(25)=0
Q_Bore(25)=0.0000001
Q_pos(25)=65.391

! Quadrupole Q2UBC3
Q_length(26)=0.3046
Q_K(26)=0
Q_Bore(26)=0.0000001
Q_pos(26)=65.891

! Quadrupole Q1DBC3
Q_length(27)=0.2768
Q_K(27)=0
Q_Bore(27)=0.0000001
Q_pos(27)=82.898

! Quadrupole Q2DBC3
Q_length(28)=0.3728
Q_K(28)=0.85864
Q_Bore(28)=0.0000001
Q_pos(28)=83.448

! Quadrupole Q3DBC3
Q_length(29)=0.3728
Q_K(29)=-0.79372
Q_Bore(29)=0.0000001
Q_pos(29)=83.998

! Quadrupole Q9ACC4
Q_length(30)=0.1850
Q_K(30)=2.1405
Q_Bore(30)=0.0000001
Q_pos(30)=98.7062

! Quadrupole Q10ACC4
Q_length(31)=0.1850
Q_K(31)=-2.0865
Q_Bore(31)=0.0000001
Q_pos(31)=98.9562

! Quadrupole Q9ACC5
Q_length(32)=0.1850
Q_K(32)=2.0973
Q_Bore(32)=0.0000001
Q_pos(32)=110.9076

! Quadrupole Q10ACC5
Q_length(33)=0.1850
Q_K(33)=-2.0616
Q_Bore(33)=0.0000001
Q_pos(33)=111.1576

! Quadrupole Q9ACC6
Q_length(34)=0.1850
Q_K(34)=2.4097
Q_Bore(34)=0.0000001
Q_pos(34)=123.109

! Quadrupole Q10ACC6
Q_length(35)=0.1850
Q_K(35)=-2.5049
Q_Bore(35)=0.0000001
Q_pos(35)=123.359

! Quadrupole Q9ACC7
Q_length(36)=0.3350
Q_K(36)=0.20985
Q_Bore(36)=0.0000001
Q_pos(36)=134.458

! Quadrupole Q2TCOL
Q_length(37)=0.2768
Q_K(37)=-0.43389
Q_Bore(37)=0.0000001
Q_pos(37)=144.803

! Quadrupole Q8TCOL
Q_length(38)=0.2768
Q_K(38)=2.9996
Q_Bore(38)=0.0000001
Q_pos(38)=151.295

! Quadrupole Q9TCOL
Q_length(39)=0.2768
Q_K(39)=-3.1788
Q_Bore(39)=0.0000001
Q_pos(39)=152.095

! Sextupole S2ECOL
Q_length(40)=0.2150
Q_K(40)= 0.0001
Q_Bore(40)=0.0000001
Q_mult_b(3,40)= 0
Q_pos(40)=154.5184

! Quadrupole Q3ECOL
Q_length(41)=0.3286
Q_K(41)=4.2486
Q_Bore(41)=0.0000001
Q_pos(41)=154.8977

! Quadrupole Q4ECOL
Q_length(42)=0.3286
Q_K(42)=-4.3688
Q_Bore(42)=0.0000001
Q_pos(42)=156.1454

! Quadrupole Q5ECOL
Q_length(43)=0.3286
Q_K(43)=4.2486
Q_Bore(43)=0.0000001
Q_pos(43)=157.3931

! Sextupole S6ECOL
Q_length(44)=0.2150
Q_K(44)= 0.0001
Q_Bore(44)=0.0000001
Q_mult_b(3,44)= 0
Q_pos(44)=157.7724

! Quadrupole Q1MATCH
Q_length(45)=0.2768
Q_K(45)=-2.8371
Q_Bore(45)=0.0000001
Q_pos(45)=160.7558

! Quadrupole Q2MATCH
Q_length(46)=0.2768
Q_K(46)=2.7247
Q_Bore(46)=0.0000001
Q_pos(46)=161.5058

! Quadrupole Q4MATCH
Q_length(47)=0.2768
Q_K(47)=0.093208
Q_Bore(47)=0.0000001
Q_pos(47)=163.3058

! Quadrupole Q6MATCH
Q_length(48)=0.2768
Q_K(48)=-0.84682
Q_Bore(48)=0.0000001
Q_pos(48)=164.8618

! Quadrupole Q1SUND1
Q_length(49)=0.2768
Q_K(49)=0.71749
Q_Bore(49)=0.0000001
Q_pos(49)=167.0281

! Quadrupole Q5SUND1
Q_length(50)=0.2768
Q_K(50)=-0.54371
Q_Bore(50)=0.0000001
Q_pos(50)=171.5182

! Quadrupole Q4SUND2
Q_length(51)=0.2768
Q_K(51)=0.54371
Q_Bore(51)=0.0000001
Q_pos(51)=176.0083

! Quadrupole Q4SUND3
Q_length(52)=0.2768
Q_K(52)=-0.54371
Q_Bore(52)=0.0000001
Q_pos(52)=180.4984

! Quadrupole Q3SEED
Q_length(53)=0.2768
Q_K(53)=0.54371
Q_Bore(53)=0.0000001
Q_pos(53)=184.9885

! Quadrupole Q7SEED
Q_length(54)=0.2768
Q_K(54)=-0.54371
Q_Bore(54)=0.0000001
Q_pos(54)=189.4786

! Quadrupole Q12SEED
Q_length(55)=0.2768
Q_K(55)=0.54371
Q_Bore(55)=0.0000001
Q_pos(55)=193.9687

! Quadrupole Q16SEED
Q_length(56)=0.2768
Q_K(56)=-1.0582
Q_Bore(56)=0.0000001
Q_pos(56)=198.4588

! Quadrupole Q18SEED
Q_length(57)=0.2768
Q_K(57)=1.5578
Q_Bore(57)=0.0000001
Q_pos(57)=200.2588

! Quadrupole Q20SEED
Q_length(58)=0.2768
Q_K(58)=-0.95918
Q_Bore(58)=0.0000001
Q_pos(58)=202.0588

! Quadrupole Q21SEED
Q_length(59)=0.1272
Q_K(59)=0
Q_Bore(59)=0.0000001
Q_pos(59)=203.2438

! Quadrupole Q22SEED
Q_length(60)=0.1272
Q_K(60)=0
Q_Bore(60)=0.0000001
Q_pos(60)=203.6288
/
