parameter[lattice] = g_2 parameter[geometry] = open parameter[p0c] = 3.094353005E9 parameter[absolute_time_tracking] = .true. bmad_com[aperture_limit_on] = .true. beginning[beta_a] = 63.916 ! these values give betax=1.0, betay=9.0 in inflector with Wuzeng inflector map beginning[beta_b] = 3.6027 beginning[alpha_a] = 19.567 beginning[alpha_b] = 3.1574 backhole_x_ap = 0.12 backhole_y_ap = 0.12 backleg_start: marker, x_limit= backhole_x_ap, y_limit= backhole_y_ap !M2: marker, superimpose, offset=0.5 !M3: marker, superimpose, offset=0.75 !M4: marker, superimpose, offset=1.0 !M5: marker, superimpose, offset=1.25 !M6: marker, superimpose, offset=1.5 !M7: marker, superimpose, offset=1.75 !M8: marker, superimpose, offset=2.0 !M9: marker, superimpose, offset=2.25 !M12: marker, superimpose, offset=3.0 !M13: marker, superimpose, offset=3.25 !M14: marker, superimpose, offset=3.5 !M15: marker, superimpose, offset=3.75 inf_field_scale= -1.0 !1.012747 fringe_field_scale= -1.0 call, file=backleg/inf_field_alone.bmad ! inflector call, file=backleg/ring_inject_bfield3d_wuzheng_extended.bmad !fringe cryo_us: pipe, l=0.119886, tracking_method = runge_kutta, mat6_calc_method = tracking fringe[field_overlaps]={cryo_us,inflector} fringe[x_limit]:= 0.1 !FRINGE[aperture_at] = continuous !FRINGE[aperture_type] = wall3d !FRINGE[wall] = { superimpose = .true., thickness = 0.00001, & ! section = { type = wall_start, s = 0.0, v(1) = {0.15,-0.0299},v(2)={0.15,0.0299},v(3)={-0.15,0.0299},v(4)={-0.15,-0.0299}}, & ! section = { type = wall_end, s = 2.59, v(1) = {0.02,-0.0299},v(2)={0.02,0.0299},v(3)={-0.02,0.0299},v(4)={-0.02,-0.0299}}} inflector[field_overlaps]= {fringe,cryo_us} !call, file=backleg/fringe_and_inflector.bmad INFLECTOR[aperture_at] = continuous INFLECTOR[aperture_type] = wall3d INFLECTOR[wall] = { superimpose = .true., thickness = 0.00001, & section = { type = wall_start, s = 0.0, v(1) = {0.009,-0.016}, v(2) = {0.009, 0.016}, & v(3) = {0.002,0.028}, v(4) = {-0.009,0.028}, v(5) = {-0.009,-0.028}, v(6) = {0.002,-0.028} }, & section = { type = wall_end, s = 1.7, v(1) = {0.009,-0.016}, v(2) = {0.009, 0.016}, & v(3) = {0.002,0.028}, v(4) = {-0.009,0.028}, v(5) = {-0.009,-0.028}, v(6) = {0.002,-0.028} } } INFLECTOR[offset_moves_aperture]:= .true. ! Here are the places we'd like to compute scattering/energy-loss. MARK_CRYO_US: marker, x_limit = 0.009, y_limit = 0.028, offset_moves_aperture=.true. , tracking_method=custom ! upstream inflector cryo window MARK_INFLECTOR_US: marker, x_limit = 0.009, y_limit = 0.028, offset_moves_aperture=.true. , tracking_method = custom ! upstream inflector end MARK_INFLECTOR_DS: marker, x_limit = 0.009, y_limit = 0.028, offset_moves_aperture=.true. , tracking_method = custom ! downstream inflector end MARK_CRYO_DS: marker, x_limit = 0.009, y_limit = 0.028, offset_moves_aperture=.true. ,tracking_method = custom ! downstream inflector cryo window inflector_pitch = -0.002!( positive number is anti clockwise rotation about center of girder inflector_offset = -inflector_pitch * (1.7+0.119886)/2. ! so that rotation is anti clockwise about the downstream end of the inflector g2: girder = {mark_cryo_us,cryo_us, mark_inflector_us, inflector, mark_inflector_ds}, & origin_ele = mark_inflector_ds, origin_ele_ref_pt = exit_end g2[x_pitch]= inflector_pitch g2[x_offset] = inflector_offset injection_line: line=(backleg_start,fringe,mark_cryo_us,cryo_us, mark_inflector_us, inflector, mark_inflector_ds) use, injection_line