!--------------------------------------------------------------------------------- ! Module for CESR injection simulation code !--------------------------------------------------------------------------------- module injparam_mod use bmad_interface type inj_struct integer ix_injpt ! element index of injection point (Q34E) integer ix_injsex ! element index of sext at inj pt (S34E) integer ix_bumper(3) ! element index of 3 pulsed bumpers (26,28,36) integer ix_pinger ! element index of East Pinger real pb_coef(3) ! pulsed bump amplitude real delta_t ! relative time of bunch passing B36E at poc. real t0(3) ! Pulsed bumper t0s (including t.o.f. delay) real pingkick ! One-turn pinger kick strength real pingturn ! Turn on which to kick real nsigcesr ! Number of sigma separation at pulsed bump poc real nsigsync ! Number of sigma separation at septum real septthick ! Septum wall thickness real injerr ! Ad-hoc injection position error real duration ! pulsed bump duration real omega ! omega = 2Pi f for pulsed bump time dependence real xpb_stored(2)! x, x-prime of stored beam at pulsed-bump max real ypb_stored(2)! y, y-prime of stored beam at pulsed-bump max real x36_stored(2)! x, x-prime of stored beam at bumper 36e real xrms_ws,delta_ws,xrms_wpi,xprms_wpi ! Injection envelope params real pingcu2rad end type type synch_beam_struct real epsx, epsy ! Horizontal and vertical synch emittance real dele ! Energy spread real length ! Bunch length real centroid(6) ! Phase space coordinates of inj beam centroid type (twiss_struct) a, b ! Twiss params of injected beam end type type pretzel_struct real prz1 real prz13 integer ix_hsep(4) real hkick(4) real prz1_theory ! crossing angle at IP real hkick_theory(4) integer ix_mag(8) real mag_hkick_theory(8) ! corrector strength to get theory prz real mag_hkick(8)! actual used corrector strengths end type type qtune_struct integer ix_qth, ix_qtv ! indices for Qtuening group knobs real hcoef ! H qtuening coeff in dQ/dcommand real vcoef ! V qtuneing coeff in dQ/dcommand end type type xqune_struct integer ix_xih, ix_xiv ! indices for H, V Chromaticity knobs integer ix_tonh, ix_tonv! indices for H, V Tonality knobs real xih_coef ! H chromaticity coef in dXi/dcmd real xiv_coef ! V chromaticity coef in dXi/dcmd real ele_tonh_coef ! e- H tonality coef in dQ/dcmd at fixed PRZ real ele_tonv_coef ! e- V tonality coef real pos_tonh_coef ! e+ H tonality coef in dQ/dcmd at fixed PRZ real pos_tonv_coef ! e+ V tonality coef end type type tunes_struct real q0h_pos ! nominal e+ H tune with pretzel On and Qt = XQ=0 real q0v_pos ! nominal e+ V tune real q0h_ele ! nominal e- H tune real q0v_ele ! nominal e- V tune end type end module