io_path{input =in,output=out,logfile=log.txt}
!---------------------------------------------------
! DOGLEG
!---------------------------------------------------
lattice{
        dipole  ! 1st dipole
              {position{rho=0.0,psi=0.0,marker=d1a}
               properties{r=6.548089}
               position{delta_s=0.4,delta_psi=0.0,marker=d1b}
              }
        quadrupole  ! 1st quadrupole
              {position{delta_s=1.6614,delta_psi=0.0,duty=yes,marker=q1a}
               properties{strength=4.2484}
               position{delta_s=0.3286,delta_psi=0.0,duty=yes,marker=q1b}
              }
        quadrupole  ! 2nd quadrupole
              {position{delta_s=0.9214,delta_psi=0.0,duty=yes,marker=q2a}
               properties{strength=-4.3689}
               position{delta_s=0.3286,delta_psi=0.0,duty=yes,marker=q2b}
              }
        quadrupole  ! 3rd quadrupole
              {position{delta_s=0.9214,delta_psi=0.0,duty=yes,marker=q3a}
               properties{strength=4.2484}
               position{delta_s=0.3286,delta_psi=0.0,duty=yes,marker=q3b}
              }
        dipole  ! 2nd dipole
              {position{delta_s=1.663,delta_psi=0.0,marker=d2a}
               properties{r=-6.548089}
               position{delta_s=0.4,delta_psi=0.0,marker=d2b}
              }
       }

!-------------------------------------------------------------------------------------------------------------------------------------
!----------------------------------------------------------------------------------------------------------------------------------
!      ELEMENT SEQUENCE       I                H O R I Z O N T A L               I                  V E R T I C A L
! pos.  element occ.     dist I   betax  alfax   mux    x(co)  px(co) Dx    Dpx  I   betay   alfay    muy    y(co)  py(co)  Dy    Dpy
! no.   name    no.      [m]  I   [m]    [1]     [2pi]  [mm]   [.001] [m]   [1]  I   [m]     [1]      [2pi]  [mm]   [.001]  [m]   [1]
! ----------------------------------------------------------------------------------------------------------------------------------
! begin DOGLEG     1   138.884    1.404  1.432   2.237  0.0000  0.000  0.000 0.000   16.853  7.475   2.288  0.0000  0.000  0.000 0.000
!   607 D1ECOL     1   139.284    0.603  0.561   2.308  0.0000  0.000  0.012 0.061   11.410  6.231   2.292  0.0000  0.000  0.000 0.000
!   618 D0075B     1   140.946    4.763 -3.064   2.590  0.0000  0.000  0.114 0.061    0.340  0.431   2.452  0.0000  0.000  0.000 0.000
!   619 Q3ECOL     1   141.274    4.546  3.620   2.600  0.0000  0.000  0.107-0.099    0.581 -1.274   2.599  0.0000  0.000  0.000 0.000
!   625 D0075B     3   142.196    0.509  0.761   2.704  0.0000  0.000  0.016-0.099    6.762 -5.434   2.676  0.0000  0.000  0.000 0.000
!   626 Q4ECOL     1   142.524    0.507 -0.755   2.827  0.0000  0.000 -0.016-0.099    7.008  4.807   2.683  0.0000  0.000  0.000 0.000
!   634 D0075B     5   143.446    4.527 -3.607   2.931  0.0000  0.000 -0.107-0.099    1.071  1.638   2.738  0.0000  0.000  0.000 0.000
!   635 Q5ECOL     1   143.774    4.745  3.050   2.941  0.0000  0.000 -0.114 0.061    0.636 -0.120   2.808  0.0000  0.000  0.000 0.000
!   643 D0220      1   145.436    0.604 -0.558   3.222  0.0000  0.000 -0.012 0.061    5.437 -2.769   2.984  0.0000  0.000  0.000 0.000
!   644 D7ECOL     1   145.837    1.401 -1.425   3.293  0.0000  0.000  0.000 0.000    7.861 -3.336   2.994  0.0000  0.000  0.000 0.000
!
!
!Magnetstaerken:		K		Length
!
!Q9TCOL00		-3.054		0.2768
!Q3ECOL			4.2485		0.3286
!Q4ECOL			-4.3689		0.3286
!Q5ECOL			4.2485		0.3286
!
!			phi
!D1ECOL			3.5 degrees	0.4
!D7ECOL			-3.5		0.4
!-------------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------
! particle distribution
!---------------------------------------------------
particles{reference_momentum  =453.5e6
          reference_point_x   =0.0
          reference_point_y   =0.0
          reference_point_phi =0.0
          format=fmt1,array=#file{name=dogleg_in.fmt1}
         }

!---------------------------------------------------
! online monitors
!---------------------------------------------------
online_monitor{name=sub_bunch.dat,type=subbunch
               start_time_c0=now
               end_time_marker=d2b,end_time_shift_c0=2.0
               time_step_c0=all
              }
online_monitor{name=steps.dat,type=steps
               start_time_c0=now
               end_time_marker=d2b,end_time_shift_c0=2.0
               time_step_c0=all
              }
online_monitor{name=p1.fmt3,type=phase,format=fmt3,particle=1
               start_time_c0=now
               end_time_marker=d2b,end_time_shift_c0=1.0
               time_step_c0=all
              }
!online_monitor{name=x.fmt3,type=phase,format=fmt3,particle=all
!               start_time_c0=now
!               end_time_marker=d2b,end_time_shift_c0=1.0
!               time_step_c0=1.0
!              }

!---------------------------------------------------
! force definition
!---------------------------------------------------
forces{type=projected sigma_long=0.0000005
       par1=1 par2=5000 test=no
      }
!forces{type=none}
!---------------------------------------------------
! tracking
!---------------------------------------------------
  track_step{precondition=yes
             iterative=2
             error_per_ct=0.001
             error_weight_momentum=0.0

             ct_step_min=0.01
             ct_step_max=0.05
             ct_step_first=0.05
             increase_factor=1.2
             arc_factor=0.3
             duty_steps=yes
            }

  tracker{end_time_marker=d2b,end_time_shift_c0=1.00}

!---------------------------------------------------
! offline monitors
!---------------------------------------------------
  monitor{format=fmt1,name=dogleg_out.fmt1}
!  monitor{format=fmt1,name=dogleg_out_noforce.fmt1}

exit
