&NEWRUN
 Head= 'FLASH, Gauss, opt. peak brilliance, velocity bunching, microbunching '
 RUN=1,
!Distribution = 'cathode.ini', Qbunch= 1., XYrms=0.566667
 Distribution = 'cathode.ini', Qbunch= 1.
 PHASE_SCAN=.F.
 AUTO_PHASE=.T.
 TRACK_ALL=.T.
  ZSTART= 0.00,  ZSTOP= 15.00, Zemit= 1000, Zphase= 1
! H_max=0.001, H_min=0.0
  H_max=0.001, H_min=0.0002
    EmitS=.T.
   PhaseS=.T.
   TrackS=.T.
     RefS=.T.
  TcheckS=.T.
 CathodeS=.T.
  Local_emit=.F., Lmagnetized=.F.
 Lmonitor= .F.
 check_ref_part=.F. 
 debunch=0.0
 LANDFS = .T.
 LPROMPT= .F.
/

&SCAN
LScan=.F. 
Scan_para='Phi(1)' ,
S_min=0.0, S_max=10, S_numb=11 
FOM(1)='length', FOM(2)='hor emit', FOM(3)='ver emit'
FOM(4)='rms energy', FOM(5)='mean energy', FOM(6)='long emit'
FOM(7)='hor spot', FOM(8)='hor div', FOM(9)='ver spot'
FOM(10)='ver div'
/

&CHARGE
 LSPCH=.T.
 Lmirror=.T.
  Nrad=15, Nlong_in=25 ! for 2.e5 part
! Nrad=30, Nlong_in=50  ! 2*2 times more for 10 times more part. !
  Cell_var=2.0, min_grid=0.00D-6, N_min=10, Max_scale=0.05
! Cell_var=2.0, min_grid=0.42D-6, N_min=100, Max_scale=0.05
! min_grid = eE/m*H_min**2= 60.e+6*1.6e-19/9.1e-31*(0.0002e-9)**2
/

&APERTURE
/

&FEM
/

&CAVITY
LEfield=.T.
File_Efield(1) = 'rf_p12_65mm.efld'
    Nue(1)=1.300, MaxE(1)= 60.0000, Phi(1)= -0.5501, C_pos(1)= 0.00000
File_Efield(2) = 'TeSLA_4_9cells_1.efld', 
    Nue(2)=1.300, MaxE(2)= 21.5312, Phi(2)=-96.0000, C_pos(2)= 3.77299
File_Efield(3) = 'TeSLA_4_9cells_24.efld',
    Nue(3)=1.300, MaxE(3)= 21.5312, Phi(3)=  0.0000, C_pos(3)= 3.77299
File_Efield(4) = 'TeSLA_4_9cells_1.efld',
    Nue(4)=1.300, MaxE(4)= 50.0000, Phi(4)= -4.0000, C_pos(4)= 9.31299
File_Efield(5) = 'TeSLA_4_9cells_24.efld',
    Nue(5)=1.300, MaxE(5)= 50.0000, Phi(5)= -4.0000, C_pos(5)= 9.31299
/

&SOLENOID
LBfield=.T.
File_Bfield(1)= 'Main2003_3m.txt'
  MaxB(1)=-0.219633000, S_pos(1)=0.0, S_xoff(1)=0.0, S_yoff(1)=0.0
FILE_BFieLD(2)= 'Buck2003_0.txt'
  MaxB(2)= 0.010944712, S_pos(2)=0.0
/
        
&QUADRUPOLE
/

