10.12 CCBEND—A canonically-integrated straight dipole magnet, assumed to have multipoles defined in Cartesian coordinates.

A canonically-integrated straight dipole magnet, assumed to have multipoles defined in Cartesian coordinates.
Parallel capable? : yes
GPU capable? : no
Back-tracking capable? : yes






Parameter NameUnitsType Default

Description






L M double0.0

arc length (not chord 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






TILT RADdouble0.0

rotation about incoming longitudinal axis






YAW RADdouble0.0

rotation about vertical axis through entrance point






FRINGEMODEL long 0

fringe model to use






HGAP M double0.0

half-gap between poles






FINT1 double0.0

edge integral for entrance






FINT2 double0.0

edge integral for exit






FRINGE1K0 double0.0

Lindberg’s K0 edge integral for entrance






FRINGE1I0 double0.0

Lindberg’s I0 edge integral for entrance






FRINGE1K2 double0.0

Lindberg’s K2 edge integral for entrance






FRINGE1I1 double0.0

Lindberg’s I1 edge integral for entrance






FRINGE1K4 double0.0

Lindberg’s K4 edge integral for entrance






FRINGE1K5 double0.0

Lindberg’s K5 edge integral for entrance






FRINGE1K6 double0.0

Lindberg’s K6 edge integral for entrance






FRINGE1K7 double0.0

Lindberg’s K7 edge integral for entrance






CCBEND continued

A canonically-integrated straight dipole magnet, assumed to have multipoles defined in Cartesian coordinates.






Parameter Name UnitsType Default

Description






FRINGE2K0 double0.0

Lindberg’s K0 edge integral for entrance






FRINGE2I0 double0.0

Lindberg’s I0 edge integral for exit






FRINGE2K2 double0.0

Lindberg’s K2 edge integral for exit






FRINGE2I1 double0.0

Lindberg’s I1 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






FRINGE2K7 double0.0

Lindberg’s K7 edge integral for exit






DX M double0.0

misalignment






DY M double0.0

misalignment






DZ M double0.0

misalignment






ETILT RADdouble0.0

misalignment rotation about longitudinal axis






EPITCH RADdouble0.0

misalignment rotation about vertical axis. Ignored if MALIGN_METHOD=0






EYAW RADdouble0.0

misalignment rotation about horizontal axis. Ignored if MALIGN_METHOD=0






MALIGN_METHOD short 0

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






FSE double0.0

fractional strength error






FSE_DIPOLE double0.0

fractional strength error of dipole component






FSE_QUADRUPOLE double0.0

fractional strength error of quadrupole component






XKICK RADdouble0.0

horizontal steering angle (approximate)






CCBEND continued

A canonically-integrated straight dipole magnet, assumed to have multipoles defined in Cartesian coordinates.






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.






INTEGRATION_ORDER short 4

integration order (2, 4, or 6)






SYSTEMATIC_MULTIPOLES STRINGNULL

input file for systematic multipoles






EDGE_MULTIPOLES STRINGNULL

input file for systematic entrance/exit edge multipoles






EDGE1_MULTIPOLES STRINGNULL

input file for systematic entrance edge multipoles. Overrides EDGE_MULTIPOLES.






EDGE2_MULTIPOLES STRINGNULL

input file for systematic exit edge multipoles. Overrides EDGE_MULTIPOLES.






RANDOM_MULTIPOLES STRINGNULL

input file for random multipoles






SYSTEMATIC_MULTIPOLE_FACTOR double 1

Factor by which to multiply systematic and edge multipoles






RANDOM_MULTIPOLE_FACTOR double 1

Factor by which to multiply random multipoles






REFERENCE_ORDER short 0

Reference order for multipole errors. Overridden by value in multipole files, if those are given.






MIN_NORMAL_ORDER short -1

If nonnegative, minimum order of systematic and random normal multipoles to use from data files.






MIN_SKEW_ORDER short -1

If nonnegative, minimum order of systematic and random skew multipoles to use from data files.






MAX_NORMAL_ORDER short -1

If nonnegative, maximum order of systematic and random normal multipoles to use from data files.






CCBEND continued

A canonically-integrated straight dipole magnet, assumed to have multipoles defined in Cartesian coordinates.






Parameter Name UnitsTypeDefault

Description






MAX_SKEW_ORDER short-1

If nonnegative, maximum order of systematic and random skew multipoles to use from data files.






SYNCH_RAD short0

include classical, single-particle synchrotron radiation?






ISR short0

include incoherent synchrotron radiation (quantum excitation)?






ISR1PART short1

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






USE_RAD_DIST short0

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






ADD_OPENING_ANGLE short1

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






SR_IN_ORDINARY_MATRIX short0

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






OPTIMIZE_FSE short1

Optimize strength (FSE) to obtain the ideal deflection angle.






OPTIMIZE_DX short1

Optimize x offset to obtain centered trajectory.






OPTIMIZE_FSE_ONCE short0

If nonzero, the FSE offset is optimized only once, even if relevant parameters are changed.






OPTIMIZE_DX_ONCE short0

If nonzero, the x offset is optimized only once, even if relevant parameters are changed.






CCBEND continued

A canonically-integrated straight dipole magnet, assumed to have multipoles defined in Cartesian coordinates.






Parameter Name UnitsType Default

Description






COMPENSATE_KN short 0

If nonzero, K1 and K2 strengths are adjusted to compensate for the changes in FSE needed to center the trajectory.






REFERENCE_CORRECTION short 1

1: correct pathlength, 2: correct trajectory, 3: correct both.






EDGE_ORDER short 3

Gives order of edge effects. Does not affect edge multipoles.






DX_DY_SIGN short 1

Prior to 2020.4, the sign of DX and DY was reversed for ANGLE<0. For backward compatibility, this is retained. Set this field to a positive value to use a consistent convention.






VERBOSE short 0

If nonzero, print messages showing optimized FSE and x offset.






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 straight-pole, bending magnet with the exact Hamiltonian in Cartesian coordinates [61]. The quadrupole, sextupole, and other multipole terms are defined in Cartesian coordinates. The magnet at present is restricted to having rectangular ends. This is quite different from CSBEND, where the edge angles are user-defined and where the field expansion is in curvilinear coordinates. Strictly speaking, CSBEND is only valid when the dipole is built with curved, beam-following poles.

Integration of particles in CCBEND is very similar to what’s done for KQUAD, KSEXT, and KOCT. The only real difference is that coordinate transformations are performed at the entrance and exit to orient the incoming central trajectory to the straight magnet axis. In addition, the fractional strength error is adjusted to ensure that the outgoing central trajectory is correct.

By default, two adjustments are made at start-up and whenever the length, angle, gradient, or sextupole term change:

  1. The fractional strength error is altered to ensure the correct deflecting angle. This is required because the bending field varies along the trajectory. By default, this affects all field components together, per the usual convention in elegant. To restrict the strength change to the dipole term, set COMPENSATE_KN=1. To turn off this optimization, set OPTIMIZE_FSE=0.
  2. The transverse position is adjusted to center the trajectory in the magnet. If the sagitta is σ and ANGLE is positive, the initial and final x coordinates are x = -σ∕2, while the center coordinate is x = σ∕2. To turn off this optimization, set OPTIMIZE_DX=0.

One can block the re-optimization of these parameters by setting OPTIMIZE_FSE_ONCE and OPTIMIZE_DX_ONCE to 1. Note also that the optimization is performed with all error-defining parameters (DX, DY, DZ, FSE, ETILT, etc.) set to zero. However, errors that are assigned to, say, the K1 value directly would not be recognized as such. For this reason, assigning errors to K1 is not recommended; instead, use the FSE_QUADRUPOLE parameter.

Having computed the ideal trajectory through a CCBEND element, elegant can suppress any errors in the trajectory. Such errors may occur due to limited accuracy in numerical integration. It is recommended to set REFERENCE_CORRECTION=1 to ensure that the path length is corrected. Optionally, setting REFERENCE_CORRECTION=2 would instead correct residual transverse trajectory errors. Using REFERENCE_CORRECTION=3 corrects both types of error.

Edge angles and edge effects

The user may specify edge multipoles using the EDGE_MULTIPOLE parameter. In addition, the CCBEND element supports two fringe models, selected via the FRINGEMODEL parameter, which may have a value of 0 (default) or 1.

Multipole errors

Multipole errors are specified for the body and edge in the same fashion as for the KQUAD element. The reference is the dipole field by default, but this may be changed using the REFERENCE_ORDER parameter.

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 SYNCH_RAD and SR_IN_ORDINARY_MATRIX are non-zero, classical synchrotron radiation will be included in the ordinary matrix (e.g., for twiss_output and matrix_output). 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, FSE_DIPOLE, FSE_QUADRUPOLE, ETILT, EPITCH, and YAW, DX, DY, and DZ 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. Note that when adding errors to FSE, the error is assumed to come from the power supply, which means that multipole strengths also change.

Assigning errors to K1 is also possible, but is not the best approach, since it changes the internal reference trajectory calculation for the element.

Splitting dipoles

The CCBEND element does not support splitting. Important: Users should not attempt to split CCBEND elements by hand, since this will not result in the correct geometry entering and exiting the various parts.

Matrix generation

elegant will use tracking to determine the transport matrix for CCBEND elements, which is needed for computation of twiss parameters and other operations. This can require some time, so elegant will cache the matrices and re-use them for identical elements.

CENTER