parameter[e_tot] = 15e6 parameter[geometry] = closed parameter[particle] = electron ldl = 0.20 lds = 0.05 lqf = 0.10 lqd = 0.10 ang = pi/21.0 g = 3.5 h = ang/(lqf+lqd+ldl+lds) tqf = 2.0*asin(0.5*h*lqf) tqd = 2.0*asin(0.5*h*lqd) tds = 2.0*asin(0.5*h*lds) tdl = ang-tqf-tqd-tds ldl_fix = 2.0*sin(0.5*tdl)/h dlh: drift, l=0.5*ldl_fix ds: drift, l=lds qf: sbend, field_master=t, l=lqf, b_field=0.0, b1_gradient=-g qd: sbend, field_master=t, l=lqd, b_field=0.0, b1_gradient=g, b_field_err=-2.0*sin(0.5*ang)*beginning[p0c]/(c_light*lqd) - 2.0*g*sin(0.5*(tdl+0.5*tqf+0.5*tqd))*sin(0.5*(tds+0.5*tqf+0.5*tqd))/(cos(0.5*ang)*h) plf: patch, x_pitch=-0.5*(tdl+tqf) pfs: patch, x_pitch=-0.5*(tqf+tds) psd: patch, x_pitch=-0.5*(tds+tqd) pdl: patch, x_pitch=-0.5*(tqd+tdl) cell: line=(dlh,plf,qf,pfs,ds,psd,qd,pdl,dlh)