parameter[lattice]                = g_2
parameter[particle]               = antimuon
parameter[geometry] = open
betaz = 0.4
parameter[p0c]                    = 3.094353005E9
parameter[absolute_time_tracking] = .true.
bmad_com[aperture_limit_on]       = .false.
bmad_com[electric_dipole_moment]=0.
!parameter[ran_seed]               = 123	 
radius = 7.112
B0 = 1.4513007

!HALFRING: sbend, b_field = B0, angle=twopi/2, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta
HALFRING: sbend, rho = radius, angle=twopi/2, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta
!SixteenthRING: sbend, b_field=B0,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta
amp =0.002
SixteenthRING1: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi/32)
SixteenthRING2: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*3/32)
SixteenthRING3: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*5/32)
SixteenthRING4: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*7/32)
SixteenthRING5: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*9/32)
SixteenthRING6: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*11/32)
SixteenthRING7: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*13/32)
SixteenthRING8: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*15/32)
SixteenthRING9: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*17/32)
SixteenthRING10: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*19/32)
SixteenthRING11: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*21/32)
SixteenthRING12: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*23/32)
SixteenthRING13: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*25/32)
SixteenthRING14: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*27/32)
SixteenthRING15: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*29/32)
SixteenthRING16: sbend, rho = radius,   angle=twopi/16, y_limit=10000., x_limit=10000. , hgap=10000., field_calc = custom, tracking_method=runge_kutta, y_offset = amp*cos(twopi*31/32)
!RING: LINE = (16*sixteenthring)
RING: LINE = (sixteenthring1,sixteenthring2,sixteenthring3,sixteenthring4,sixteenthring5, &
sixteenthring6,sixteenthring7,sixteenthring8,sixteenthring9,sixteenthring10,sixteenthring11,sixteenthring12,sixteenthring13,sixteenthring14,sixteenthring15,sixteenthring16)

!RING: LINE = (halfring,halfring)


use, RING

