10.21 CSBEND—A canonical kick sector dipole magnet.

A canonical kick sector dipole magnet.
Parallel capable? : yes
GPU capable? : yes
Back-tracking capable? : yes






Parameter NameUnitsType Default

Description






L M double0.0

arc length






ANGLE RADdouble0.0

bend angle






K1 1∕M2double0.0

geometric quadrupole strength






K2 1∕M3double0.0

geometric sextupole strength






K3 1∕M4double0.0

geometric octupole strength






K4 1∕M5double0.0

geometric decapole strength






K5 1∕M6double0.0

geometric 12-pole strength






K6 1∕M7double0.0

geometric 14-pole strength






K7 1∕M8double0.0

geometric 16-pole strength






K8 1∕M9double0.0

geometric 18-pole strength






E1 RADdouble0.0

entrance edge angle






E2 RADdouble0.0

exit edge angle






TILT RADdouble0.0

rotation about incoming longitudinal axis






H1 1∕M double0.0

entrance pole-face curvature






H2 1∕M double0.0

exit pole-face curvature






HGAP M double0.0

half-gap between poles






FINT double0.5

edge-field integral






FINT1 double-1

edge-field integral. If negative, use FINT.






FINT2 double-1

edge-field integral. If negative, use FINT.






FRINGE1K0 double0.0

Lindberg’s K0 edge integral for entrance






FRINGE1K1 double0.0

Lindberg’s K1 edge integral for entrance






FRINGE1K2 double0.0

Lindberg’s K2 edge integral for entrance






FRINGE1K3 double0.0

Lindberg’s K3 edge integral for entrance






FRINGE1K4 double0.0

Lindberg’s K4 edge integral for entrance






FRINGE1K5 double0.0

Lindberg’s K5 edge integral for entrance






CSBEND continued

A canonical kick sector dipole magnet.






Parameter Name UnitsType Default

Description






FRINGE1K6 double0.0

Lindberg’s K6 edge integral for entrance






FRINGE2K0 double0.0

Lindberg’s K0 edge integral for entrance






FRINGE2K1 double0.0

Lindberg’s K1 edge integral for exit






FRINGE2K2 double0.0

Lindberg’s K2 edge integral for exit






FRINGE2K3 double0.0

Lindberg’s K3 edge integral for exit






FRINGE2K4 double0.0

Lindberg’s K4 edge integral for exit






FRINGE2K5 double0.0

Lindberg’s K5 edge integral for exit






FRINGE2K6 double0.0

Lindberg’s K6 edge integral for exit






DX M double0.0

misalignment






DY M double0.0

misalignment






DZ M double0.0

misalignment






XKICK RADdouble0.0

bend-plane steering angle (approximate)






YKICK RADdouble0.0

non-bend-plane steering angle (approximate)






FSE double0.0

fractional strength error of all components






FSE_DIPOLE double0.0

fractional strength error of dipole component






FSE_QUADRUPOLE double0.0

fractional strength error of quadrupole component






ETILT RADdouble0.0

error rotation about incoming longitudinal axis






EPITCH RADdouble0.0

error rotation about horizontal axis. Ignored if MALIGN_METHOD=0






EYAW RADdouble0.0

error rotation about vertical axis. Ignored if MALIGN_METHOD=0






CSBEND continued

A canonical kick sector dipole magnet.






Parameter Name UnitsType Default

Description






N_SLICES long 4

Number of slices (full integrator steps).






N_KICKS long 4

number of kicks. Deprecated. Use N_SLICES.






ETILT_SIGN short 1

Sign of ETILT relative to TILT. -1 is the old convention prior to 2020.5






NONLINEAR short 1

include nonlinear field components?






SYNCH_RAD short 0

include classical, single-particle synchrotron radiation?






SR_IN_ORDINARY_MATRIX short 0

If nonzero, the tracking-based matrix used for routine computations includes classical synchrotron radiation if SYNCH_RAD=1.






EDGE1_EFFECTS short 1

If nonzero, determines the method used to include entrance edge effects.






EDGE2_EFFECTS short 1

If nonzero, determines the method used to include exit edge effects.






EDGE_ORDER short 1

order to which to include edge effects for both edges






INTEGRATION_ORDER short 4

integration order (2, 4, or 6)






EXPAND_HAMILTONIAN short 0

If 1, Hamiltonian is expanded to leading order.






EDGE1_KICK_LIMIT double-1

maximum kick entrance edge can deliver






EDGE2_KICK_LIMIT double-1

maximum kick exit edge can deliver






KICK_LIMIT_SCALING short 0

scale maximum edge kick with FSE?






USE_BN short 0

use b<n> instead of K<n>?






CSBEND continued

A canonical kick sector dipole magnet.






Parameter Name UnitsType Default

Description






EXPANSION_ORDER short 0

Order of field expansion. (0=auto)






B1 1∕M double0.0

K1 = b1/rho, where rho is bend radius






B2 1∕M2double0.0

K2 = b2/rho






B3 1∕M3double0.0

K3 = b3/rho






B4 1∕M4double0.0

K4 = b4/rho






B5 1∕M5double0.0

K5 = b5/rho






B6 1∕M6double0.0

K6 = b6/rho






B7 1∕M7double0.0

K7 = b7/rho






B8 1∕M8double0.0

K8 = b8/rho






XREFERENCE M double0.0

reference x for interpretation of fn values






F1 double0.0

Fractional normal field error fn=bn*xrˆn  /n!, adds to K1 or b1.






F2 double0.0

Fractional normal field error fn=bn*xrˆn  /n!, adds to K2 or b2.






F3 double0.0

Fractional normal field error fn=bn*xrˆn  /n!, additive.






F4 double0.0

Fractional normal field error fn=bn*xrˆn  /n!, additive.






F5 double0.0

Fractional normal field error fn=bn*xrˆn  /n!, additive.






F6 double0.0

Fractional normal field error fn=bn*xrˆn  /n!, additive.






F7 double0.0

Fractional normal field error fn=bn*xrˆn  /n!, additive.






F8 double0.0

Fractional normal field error fn=bn*xrˆn  /n!, additive.






G1 double0.0

Fractional skew field error.






G2 double0.0

Fractional skew field error.






G3 double0.0

Fractional skew field error.






CSBEND continued

A canonical kick sector dipole magnet.






Parameter Name UnitsType Default

Description






G4 double 0.0

Fractional skew field error.






G5 double 0.0

Fractional skew field error.






G6 double 0.0

Fractional skew field error.






G7 double 0.0

Fractional skew field error.






G8 double 0.0

Fractional skew field error.






ISR short 0

include incoherent synchrotron radiation (quantum excitation)?






ISR1PART short 1

Include ISR for single-particle beam only if ISR=1 and ISR1PART=1






SQRT_ORDER short 0

Ignored, kept for backward compatibility only.






USE_RAD_DIST short 0

If nonzero, overrides SYNCH_RAD and ISR, causing simulation of radiation from distributions, optionally including opening angle.






ADD_OPENING_ANGLE short 1

If nonzero, radiation opening angle effects are added if USE_RAD_DIST is nonzero.






PHOTON_OUTPUT_FILE STRINGNULL

output file for photons, if USE_RAD_DIST=1






PHOTON_LOW_ENERGY_CUTOFFeV double 0.0

Lower limit of photon energy to output.






REFERENCE_CORRECTION short 0

If nonzero, reference trajectory is subtracted from particle trajectories to compensate for inaccuracy in integration.






TRACKING_MATRIX short 0

If nonzero, gives order of tracking-based matrix up to third order to be used for twiss parameters etc. If zero, 2nd-order analytical matrix is used.






CSBEND continued

A canonical kick sector dipole magnet.






Parameter Name UnitsType Default

Description






FSE_CORRECTION short 0

If nonzero, FSE is adjusted to compensate for edge effects when EDGE1_EFFECTS or EDGE2_EFFECTS = 2






MALIGN_METHOD short 0

0=original, 1=new entrace-centered, 2=new body-centered






XSTEERING short 0

use for x steering (bend plane)?






YSTEERING short 0

use for y steering (non-bend plane)?






GROUP stringNULL

Optionally used to assign an element to a group, with a user-defined name. Group names will appear in the parameter output file in the column ElementGroup






This element provides a symplectic bending magnet with the exact Hamiltonian. For example, it retains all orders in the momentum offset and curvature. The field expansion is available to eighth order.

One pitfall of symplectic integration is the possibility of orbit and path-length errors for the reference orbit if too few kicks are used. This may be an issue for rings. Hence, one must verify that a sufficient number of kicks are being used by looking at the trajectory closure and length of an on-axis particle by tracking. Using INTEGRATION_ORDER=4 is recommended to reduce the number of required kicks.

As of version 28.0 and later, the REFERENCE_CORRECTION feature is available to compensate for errors inherent in the numerical integration of the trajectories. In particular, depending on the number of kicks used, as well as the bending radius and angle, an on-axis particle may emerge from the element with a non-zero trajectory and a path-length error. With REFERENCE_CORRECTION set to a non-zero value, these errors are subtracted from the coordinates of all particles. There are some pitfalls to using this feature: first, one may not realize that the number of kicks is too small to provide good results, since the output trajectory of the central particle will always be (nearly) identically zero. Second, in a magnet with a gradient or other field nonuniformities, a particle may emerge centered on the ideal trajectory yet still see the impact of the gradient, sextupole, etc. For these reasons, this feature should be used with caution and only when the residual trajectory is large enough to cause problems.

Higher-order field components

Normally, one specifies the higher-order components of the field with the Kn, with n = 1 through 8. The field expansion in the midplane is By(x) = Bo * (1 + n=18Kn ρo
--n!xn). By setting the USE_bN flag to a nonzero value, one may instead specify the bn parameters, which are defined by the expansion By(x) = Bo * (1 + n=18bnn!xn). This is convenient if one is varying the dipole radius but wants to work in terms of constant field quality.

Setting NONLINEAR=0 turns off all the terms above K_1 (or b_1) and also turns off effects due to curvature that would normally result in a gradient producing terms of higher order.

The EXPANSION_ORDER parameter controls the order of the expansion of the nonlinear fields, so that terms are limited to xiyj with i + j EXPANSION_ORDER. By default, when EXPANSION\_ORDER=0, the expansion order is set automatically, as follows: If the highest non-zero multipole order (specified by Kn, Bn, Fn, or Gn) is n (with n = 1 being quadruople), then the expansion order is set to n + 3. However, the expansion order is never automatically set to less than 4, unless all the multipole terms are zero, in which case the expansion always yields a constant. Since the number of polynomial terms increases like the square of the expansion order, using many multipole terms can significantly increase run time. The maximum value for the expansion order is 10.

Edge angles and edge effects

Some confusion may exist about the edge angles, particularly the signs. For a sector magnet, we have of course E1=E2=0. For a symmetric rectangular magnet, E1=E2=ANGLE/2. If ANGLE is negative, then so are E1 and E2. To understand this, imagine a rectangular magnet with positive ANGLE. If the magnet is flipped over, then ANGLE becomes negative, as does the bending radius ρ. Hence, to keep the focal length of the edge 1∕f = -tanEi∕ρ constant, we must also change the sign of Ei.

Several models are available for edge (or fringe) effects. Which is used depends on the settings of the EDGE_ORDER, EDGE1_EFFECTS, and EDGE2_EFFECTS parameters EDGE1_EFFECTS controls entrance edge effects while EDGE2_EFFECTS controls exit edge effects, as follows:

Radiation effects

If SYNCH_RAD is non-zero, classical synchrotron radiation is included in tracking. Incoherent synchrotron radiation, when requested with ISR=1, normally uses gaussian distributions for the excitation of the electrons. (To exclude ISR for single-particle tracking, set ISR1PART=0.) Setting USE_RAD_DIST=1 invokes a more sophisticated algorithm that uses correct statistics for the photon energy and number distributions. In addition, if USE_RAD_DIST=1 one may also set ADD_OPENING_ANGLE=1, which includes the photon angular distribution when computing the effect on the emitting electron.

If TRACKING_MATRIX and SYNCH_RAD are non-zero, classical synchrotron radiation can be included in the ordinary matrix (e.g., for twiss_output and matrix_output) by setting SR_IN_ORDINARY_MATRIX to a non-zero value. Symplecticity is not assured, but the results may be interesting nonetheless. A more rigorous approach is to use moments_output. SR_IN_ORDINARY_MATRIX does not affect tracking.

Adding errors

When adding errors, care should be taken to choose the right parameters. The FSE and ETILT parameters are used for assigning errors to the strength and alignment relative to the ideal values given by ANGLE and TILT. One can also assign errors to ANGLE and TILT, but this has a different meaning: in this case, one is assigning errors to the survey itself. The reference beam path changes, so there is no orbit/trajectory error. The most common thing is to assign errors to FSE and ETILT. Note that when adding errors to FSE, the error is assumed to come from the power supply, which means that multipole strengths also change.

There are three modes for implementing alignment errors. Which is used is controlled by the value of the MALIGN_METHOD parameter:

For elements with non-zero TILT, error displacements and rotations are performed in the lab frame. An exception is the CCBEND, where error displacements and rotations are performed in the tilted frame.

Splitting dipoles

When dipoles are long, it is common to want to split them into several pieces, to get a better look at the interior optics. When doing this, care must be exercised not to change the optics. elegant has some special features that are designed to reduce or manage potential problems. At issue is the need to turn off edge effects between the portions of the same dipole.

First, one can simply use the divide_elements command to set up the splitting. Using this command, elegant takes care of everything.

Second, one can use a series of dipoles with the same name. In this case, elegant automatically turns off interior edge effects. This is true when the dipole elements directly follow one another or are separated by a MARK element.

Third, one can use a series of dipoles with different names. In this case, one must also use the EDGE1_EFFECTS and EDGE2_EFFECTS parameters to turn off interior edge effects.

CSRCSBEND