module muon_mod use bmad type muon_struct real(rp) Jx, Jy,x,y,t,px,py,pz,gas,phix,phiy, flat, sigx, sigpx, sigy, sigpy type (coord_struct) coord real(rp) last_vec(6), last_time, at_vec(6) logical lost end type type electron_struct type (coord_struct) coord integer ix_start !index of element at which the electron is generated integer ix_lost !index of element at which the electron is lost integer index_mu !index of the corresponding muon in muons(:) logical exist,lost end type type g2twiss_struct real(rp) betax, betay, alphax, alphay, etax, etapx, etay, etapy, phix, phiy, gammax, gammay ! real(rp) twiss(8) end type type g2moment_struct real(rp) sigma(6,6), ave(6) real(rp) max_sigma(6,6), min_sigma(6,6), max_ave(6), min_ave(6) end type type initial_offsets_struct real(rp) x_mean, y_mean, tmean, pxmean, pymean, pzmean end type type kicker_params_struct real(rp) kicker_field(3), kick_width(3), dtRise(3), dtFall(3) end type type quad_params_struct real(rp) field_index(4) end type type averages_struct real(rp) x2_average, y2_average, px2_average, py2_average, xpx_average, ypy_average, pz2_average, xpz_average, pxpz_average, ypz_average, pypz_average, deltapz end type end module