rf-induced beam dynamics in rf guns and accelerating cavities

In this paper, a detailed discussion of the rf-related beam dynamics in rf guns and accelerating cavities is presented. Other rf-gun-related aspects such as space charge and cathode physics are not treated. An effective start phase is introduced in order to yield a better description for the synchronous phase, the energy gain, and the bunch compression factor in gun cavities. Energy spread and longitudinal emittance are treated in a form applicable to guns as well as to accelerating cavities. Discussions on the transverse emittance include the chromatic emittance variation at high emission phases and effects of field asymmetries and combined solenoid-cavity sections.


I. INTRODUCTION
Photocathode rf guns are the electron sources of choice for many modern accelerators requiring high brightness beams, such as, for example, free electron lasers. There are two key aspects to these sources: electron generation by means of photoemission and direct acceleration in an rf cavity. Photoemission not only allows for the generation of higher current densities [1] than achievable with thermionic cathodes, but it also gives a better control over the transverse and longitudinal electron pulse distribution and dimension. Generation inside an rf cavity [2] provides higher fields at the cathode and a higher total accelerating voltage than a dc gun, both important aspects to control space-charge-induced emittance growth. However, the beam dynamics in an rf cavity is complex, and the rf fields themselves can contribute to the emittance of the beam. This report concentrates on rf-related dynamics; other aspects such as space charge and cathode physics are not discussed.
A first study of rf-related beam dynamics in rf guns has been presented by Kim [3], and reviews and some extensions are found in Refs. [4,5], while other publications discuss special topics in detail, e.g., Refs. [6][7][8]. The following report builds upon these earlier works and extends them in a number of aspects. It is intended to serve as an overview, e.g., for students as well as a reference for experts.
The beam dynamics in rf guns is characterized by two unique characteristics: the particles start inside an rf cavity, and the phase changes rapidly at the very beginning of the acceleration process. In order to model the varying phase, an effective start phase is introduced in Sec. V which is the basis for improved relations describing the energy gain. Discussions of the bunch compression (Sec. VI), the effect of an elongated half-cell (Sec. VIII), and the field balance (Sec. IX) are presented before the longitudinal dynamics is concluded with the calculation of the induced energy spread and the longitudinal emittance in Sec. X. The detailed discussion of the transverse dynamics in Secs. XI-XVIII includes a model for the chromatic emittance variation (Sec. XIII) and different methods to correct the rf-induced emittance in Sec. XIV. Distortions of the emittance oscillations in an rf cell due to coupler asymmetries as well as due to external solenoids are covered in Secs. XVI and XVII. The paper concludes with a discussion of spherical aberrations (Sec. XVIII) and a summary.

II. RF FIELD DESCRIPTION
Cylindrically symmetric electromagnetic fields can be described in the form of polynomial expansions in the radius r, which is especially useful for analytical calculations. For transverse magnetic rf modes (TM modes), the field is expressed to third order in r as E z ðz; r; t; ϕÞ ¼ E z;0 − r 2 4 dependence of the field and its first to third on-axis derivative, respectively. The angular frequency and phase of the wave are given by ω and ϕ, respectively, and c is the speed of light. Noting that for the fundamental spatial harmonics E 00 z ¼ −k 2 E z;0 , E 000 ¼ −k 2 E 0 z , and ω=c ¼ k it can be seen that all nonlinear terms in r are zero for a pure cosinelike on-axis field distribution.
Equation (1) can also be applied to static electric fields by setting ω ¼ 0 and ϕ ¼ 90°. Nonlinearities in r are then directly related to the appearance of higher derivatives of the on-axis field.
Equation (1) complies with Maxwell's equations except for the condition ∇ × E ¼ − _ B, which is only approximately fulfilled if a limited number of higher-order spatial harmonics is taken into account. Without higher-order spatial harmonics and in the limit of an infinite sum of harmonics, Maxwell's equations are fulfilled without restriction. Thus, for a pure cosinelike on-axis field the exact solution is written as E z ðz; t; ϕÞ ¼ E 0 cos kz sinðωt þ ϕÞ; E r ðz; r; t; ϕÞ ¼ r 2 E 0 k sin kz sinðωt þ ϕÞ; B θ ðz; r; t; ϕÞ ¼ r 2 In a cavity, the electric field lines have to end perpendicular to the cavity walls. In order to find a cavity form which allows only the fundamental spatial harmonics to appear, the inner surface of the cavity has to be shaped such that it is perpendicular to the field lines as described by Eq. (2). This condition is fulfilled for a cavity shape following where r c ðzÞ is the inner radius of the cylindrical cavity wall and a is a constant [9]. Equation (3) is divergent in the middle of the cells, i.e., at sin kz ¼ 0. Thus, no finite cavity shape can support a pure cosinelike field. However, the cavity shape at the ends of the cell, i.e., at the irises, has a much stronger influence on the field near the axis than the cavity shape in the middle of the cell. Here, Eq. (3) shows a hyperbolic behavior, and a is identified as the radius of the iris hole. For a simple cavity consisting of cylindrical cells and irises of constant thickness with a half-spherical rounding in the iris hole, Eq. (3) suggests a ratio of iris hole radius to iris thickness of one as best fit near to kz ¼ π=2. In the following, a linear field containing only the fundamental spatial harmonics is considered first. Higher-order spatial harmonics are discussed separately.

III. LONGITUDINAL SINGLE PARTICLE DYNAMICS
A peculiarity of rf guns is that the electrons are generated inside a cavity. The cavity field is thus described by Eq. (2) with the cathode being located at z ¼ 0. For electrons starting at t ¼ 0, the longitudinal field equation yields the highest gradient at the cathode for a start phase ϕ 0 of 90°; i.e., ϕ 0 ¼ 0°marks the phase where the field on the cathode changes its sign. This is the commonly used phase definition for rf guns, while for standard accelerating cavities the oncrest phase, i.e., the phase which yields the maximum energy gain, is often defined as the zero phase.
The first equation of Eqs. (2) can be rewritten in the form The position of a particle traveling with the speed of light through the cavity is given by z ¼ z 0 þ ct. Since ω and k are related via ω ¼ ck, the term ωt − kz introduces a variation of the accelerating phase at low particle velocities but becomes constant when the particles reach relativistic energies. This constant phase is called the synchronous phase. For relativistic particles, the second term in Eq. (4) describes the variation of the field amplitude inside a cell. It becomes constant (modulo 2π) when equivalent positions (i.e., separated by λ=2) are compared. (The periodicity is λ=2 because both position and time change accordingly.) By redefining the phase of the rf field as Eq. (4) is expressed as Since a standing wave can be described as a superposition of a forward and a backward traveling wave, the two sine terms in Eq. (6) can be understood as these two waves. A particle traveling synchronously with the forward wave at the speed of light experiences a constant force from the forward wave but an oscillating force from the backward wave. The doubling of the oscillating frequency of the backward wave as seen by the particle is the result of the counterpropagation of the particle and wave. This second term does not appear in a traveling wave structure. As a basis for the following discussions, analytic approximations for the energy gain, the variation of the phase, and the bunch compression factor in the rf gun cavity will now be derived.

IV. ENERGY GAIN
The variation of the energy introduced by the rf field in terms of γ, i.e., in terms of the ratio of the particle energy to its energy at rest, is given by where e is the elementary charge and m e is the electron rest mass. In an rf gun, the phase depends on the position, but we will follow an approach where the total energy gain is determined as a sum of contributions with a piecewise constant phase. By defining the energy gain for a constant phase in a section of length Δz ¼ z 2 − z 1 is described as or for the first section where the integration constant has been chosen such that γ ¼ 1 is fulfilled for all phases at z ¼ 0.
The second term in Eq. (9) is zero when the energy gain for a complete cell Δz ¼ λ=2 is considered, and thus the energy gain is maximal at ϕ ¼ 90°for full cells. In contrast, at the end of the half-cell where kz ¼ π=2, setting dγ=dϕ ¼ 0 in Eq. (10) yields a maximum energy gain when tan ϕ ¼ π=2.
Noting that cosðϕ þ 2kzÞ ¼ cos2kzcosϕ − sin2kzsinϕ ≅ cosϕ − 2kzsinϕ, an approximation for small z is found as The dimensionless parameter α represents the strength of the accelerating field [3]. To define α, the average accelerating field E 0 =2 is employed in the case of a standing wave field (because 1 π R π 0 sin 2 φdφ ¼ 1 2 ), while for a traveling wave the amplitude E 0 would be used, and is understood as the normalized vector potential A of a wave: α ¼ eA=m e c. For α ≥ 1, the particle dynamics shows relativistic effects within one period of the wave. Describing the dynamics in terms of α allows us to generalize the results to a large extent. It has to be noted, however, that important differences exist in the dynamics in standing waves as compared to traveling waves. The parameter α refers to the average gradient, i.e., half the amplitude in the case of standing waves. Thus, the mean energy gain (for example) is described for both standing wave and traveling wave fields by α. But for the dynamics near the cathode a factor of 2 arises in Eq. (11), effectively doubling α near the cathode for a standing wave field, which has important consequences as will be seen below.
Most guns operate nowadays at L-band (1.3 GHz) or S-band (3 GHz) frequencies, with gradients of 40-60 MV=m (L band) and 100-120 MV=m (S band), respectively. Hence, α is typically 1.5-2.0. It is instructive to make a rough estimate of the energy gain in the vicinity of the cathode in the gun. With α ¼ 2 and sin ϕ ¼ 0.5, we find that the electrons already reach 90% of the velocity of light after a distance of about 0.2λ, i.e., within the half-cell of the cavity. Therefore, the phase slippage essentially takes place in the half-cell in close vicinity to the cathode. This justifies using the same phase, i.e., the synchronous phase, for all cells but the half-cell. In order to take the phase slippage in the half-cell into account, the acceleration will be described in the following by a constant effective phase ϕ eff ¼ ϕ 0 þ Δϕ with ϕ 0 being the start phase and Δϕ being a yet to be determined phase shift.

V. PHASE VARIATION AND SYNCHRONOUS PHASE
We use Eq. (11) in order to find an approximation for the variation of the phase ϕ. With ω ¼ ck and dt ¼ 1 which can be integrated after substituting Eq. (11) for γ (with ϕ ¼ ϕ eff ) to yield The asymptotic value of the phase forγ ≫ 1, i.e., the synchronous phase, is found from Eq. (13) to be

VI. BUNCH COMPRESSION
The synchronous phase depends on the start phase in a nonlinear manner. If we observe two particles, representing the head and the tail of an electron bunch and therefore starting at slightly different phases ϕ 0 and ϕ 0 þ Δϕ 0 , we will find the phase difference changing as the particles travel through the cavity. The difference of the synchronous phases of these two particles divided by the difference of the start phases describes the ratio of the final temporal distance to the initial temporal difference, a quantity referred to as the bunch compression factor. (The bunch compression factor can also be understood as a compression factor for an incoming timing or phase jitter.) It is calculated by the derivative of the synchronous phase with respect to the start phase as Figure 1 illustrates the acceleration process of two electrons in an arbitrary field by plotting position versus time z − t. The electrons start at the same position but with a temporal difference Δt. Figure 1 shows the case of a static field; i.e., the second (tail) electron is accelerated in the same way as the first (head) electron and its trajectory in the z − t diagram is only a parallel shifted copy of the trajectory of the head electron. At any time, the spatial bunch length is given by the difference of the positions of the two electrons. The distance is very small at the time of emission of the second electron, in nonrelativistic approximation Δz 0 ¼ e 2m e Eðϕ 0 ÞΔt 2 , where Eðϕ 0 Þ represents the longitudinal gradient at the emission phase. However, since the particles reach relativistic energies, the derivative of the trajectories in the z − t diagram approaches the speed of light and the bunch length becomes Δz ¼ cΔt. Any difference in the acceleration process of the two particles will lead to a variation of the final bunch length. With a stronger acceleration of the tail electron (higher phase), it will reach the speed of light earlier, and hence the bunch length will become shorter, while a reduced acceleration will lead to a longer bunch. While the temporal extension of the bunch is increased or decreased due to the phase difference of the acceleration process, the bunch starts spatially in any case much shorter than the final bunch length, and the differences in the acceleration lead only to a suppression or promotion of the "natural" bunch expansion.
We still have to find a relation to determine the effective phase ϕ eff . In order to do so, we consider the bunch compression process for different start phases in an rf gun for a short bunch. Short means that the bunch extends only over a few degrees in the rf phase. When the start phase is close to zero, the phase slips considerably when the electrons are still at low energy, i.e., in the half-cell of the cavity. The synchronous phase will, however, stay below 90°. A particle starting in the tail of the bunch will hence travel from the cathode up to the end of the cavity on a higher phase than a particle in the head of the bunch; i.e., it will be more rapidly accelerated, leading to a significant bunch compression. If the start phase, on the other hand, gets closer to 90°, the synchronous phase will become larger than 90°, the tail particle will receive a smaller acceleration, and the bunch will be decompressed. In between must be a phase where the bunch compression factor is equal to one. This phase is close to the case where the synchronous phase is 90°as will be shown below. From Eq. (15), the condition of a unit bunch compression factor is given as into Eq. (14) yields the start phase for which the synchronous phase will become π 2 : The definition of the effective phase ϕ eff ¼ ϕ 0 þ Δϕ leads to the generalized conclusion The beauty of the derivation above is that it leads to a formulation of the effective start phase. The effective start phase is an important parameter for the description of the beam dynamics in the half-cell of an rf gun. Historically, the longitudinal particle dynamics in standard cavity sections has been studied first by Slater [10], and it is found in different context in many other publications [6,11,12]. The approach in these publications, which can also be applied to rf guns, differs from the derivation above and leads to more accurate relations for the synchronous phase and the bunch compression factor. The result turns out to be independent of how the acceleration of the particles develops in detail; it depends only on the start phase and on α.
Differential forms of Eq. (11), i.e., dγ dz , and Eq. (12), i.e., dϕ dz , can be directly combined to yield Equation (19) can be integrated on both sides. Addition of an integration constant leads in the limitγ ≫ 1 to a synchronous phase and a bunch compression factor of the form Note that the term 1 2α relates to the acceleration with the peak gradient of a standing wave at the cathode [cf. Eq. (11)] while only 1 α would appear if the average gradient (or a traveling wave) were assumed.
From Eq. (20), it follows that a bunch compression factor of 1 is reached at a synchronous phase of cos ϕ sync ¼ − 1 4α , which converges to 90°with large α as assumed above.

VII. COMPARISON WITH NUMERICAL RESULTS
In Figs. 2-5, analytical results for the synchronous phase, the bunch compression factor, and the energy gain in the half-and following full cell of an rf gun are compared to exact numerical integration results. At high start phases, the conditionγ ≫ 1 which is used for deriving the analytical results is not fulfilled (Fig. 5); thus, the analytical predictions deviate considerably from the numerical results, while a good agreement is achieved at lower start phases. The improved relations for the synchronous phase and the bunch compression factor [Eq. (20)] yield better results than the relations Eqs. (14) and (15), especially at start phases below ≈20°.
To determine the energy gain in the half-cell of the gun, the effective phase ϕ eff is inserted into Eq. (10). The comparison of the analytical result with the exact solution in Fig. 4 reveals a good agreement, except for phases below ≈20°, where the phase shift is underestimated. The energy gain in the full cells is determined by the synchronous phase [Eq. (20)] introduced into Eq. (9). Figure 5 shows the total energy of a 1 1 2 cell cavity. As consequence of the reduced precision of the analytical synchronous phase, the energy gain at high start phases is overestimated.
Note that the maximum energy gain in the half-cell is found from Eq. (10) at an effective phase of tan ϕ eff ¼ π=2 corresponding to a start phase of ≈42°, while the maximum energy gain in the full cell is reached at a start phase of The maximum energy gain for the 1 1 2 cell cavity is hence found at ≈60°. Since the phase is practically constant already at the exit of the half-cell, an extension to the case of cavities with more than one full cell is straightforward. Each full cell contributes to the energy in the same way as the first full cell. Hence, the phase of maximum energy gain shifts towards 74°.
High emission phases (>90°) are, in general, not well suited for the generation of high-quality beams. From the operational point of view, the beam dynamics at the high emission phases is nevertheless of great importance, because phenomena such as electron back bombardment, dark current emission, and multipacting are related to the dynamics at high phases.
The decreasing energy gain at high start phases indicates that the electrons slip onto a decelerating phase and thus lose energy. Eventually, the electrons are stopped and are accelerated back toward the cathode. While at very high start phases the electrons simply turn around and hit the cathode, electrons can move on chaotic trajectories in an intermediate phase range. Here the electrons move back and forth in the gun cavity several times before they either hit the cathode or leave the cavity in forward direction. (This corresponds to the divergent behavior of the synchronous phase and the bunch compression factor.) The peaks shown in Figs. 4 and 5 are related to such electron trajectories. Figure 6 corresponds to Fig. 5 but concentrates on the high emission phases. The first peak at about 125°is related to electron trajectories with two turning points within the full cell of the cavity. The second peak at about 128°is related to trajectories with one turning point in the beginning of the full cell and one in the half-cell, respectively. With increasing phase, the turning points shift towards the cathode, resulting in an increasing energy gain. At 128.6°, the second turning point reaches the cathode plane, so that no electrons can be emitted at higher phases. The lines above the lower and below the upper peak reveal self-similar patterns, when plotted with higher resolution, corresponding to electron trajectories with an increasing number of turning points. The phase range in which this chaotic behavior is found decreases with increasing α, while the phase range in which electrons are accelerated in an ordered fashion increases.
While high-energy electrons hitting the cathode primarily heat it [13] by penetrating deep into the cathode body, lowenergy electrons will deposit a large fraction of their energy close to the cathode surface. Besides heating of the cathode, surface-related phenomena such as desorption of surface adsorbates leading to a cleaning of the cathode surface can occur [14]. Another effect is the emission of secondary electrons [15]. The secondary emission yield depends on the energy of the impinging electrons and on the material properties. The physics of photoemission and secondary emission show great similarities, and photocathodes with high quantum efficiency are, in general, found to also be good secondary emitters. Thus, a maximum secondary emission yield above ten secondary electrons per incoming electron for energies in the range of a few keV is not unusual for semiconductor cathodes, while the secondary emission yield of metals typically only slightly exceeds 1 at primary electron energies of a few hundred eV.
The electrons starting somewhat above 128.6°(for example, dark current electrons) hit the cathode with low enough energies to produce secondary electrons with high  efficiency. In addition, the secondary electrons are accelerated, because the phase corresponds to an accelerating phase at this point in time. They will either leave the gun cavity or move again back to the cathode to produce even more secondary electrons. This process can appear in a resonant fashion with an exponentially increasing number of involved electrons, if both the energy of the impinging electrons and the start phase of the created secondary electrons match, in which case we talk about multipacting. Multipacting occurs predominantly at low rf field levels, for example, during the rising or falling edge of a pulsed rf field, and is enhanced by external solenoid fields which act as magnetic mirrors for low-energy electrons [16].

VIII. ELONGATION OF THE HALF-CELL
Many but not all rf gun cavities have an elongated halfcell. In general, this is the result of a sophisticated numerical optimization procedure which includes space charge forces [17]. The modifications of the beam dynamics caused by an elongated half-cell can hence not be expressed in all details in terms of analytical expressions. In the following, the effect on the phase-dependent energy gain will be discussed with the aim to gain a general understanding of the underlying dynamics. We can assume that the longitudinal component of the electric field in the cavity can be described by Eq. (1) but with different wave numbers for the half-and the following full cells. This leads to a discontinuity in the derivative of the field at the first zero crossing which can, however, be ignored at this point. Denoting all quantities in the half-cell with a tilde, the wavelength in the half-cell is defined asλ ¼ λð1 þ εÞ, where λ is the wavelength in vacuum and in the full cells and ε is a parameter to describe the elongation of the half-cell. We findk reduced andα increased compared to the nonelongated case, which results from the fact that the acceleration in the half-cell takes place over a longer distance. Noting that at the exit of the half-cellkz ¼ kz ¼ π 2 , the energy gain follows as for the half-cell and for the full cells. In the case of an elongated half-cell, the synchronous phase is not defined, since due to the mismatch of wavelength and frequency the phase can never become constant. In order to estimate the phase shift introduced by the additional cell length, it can be treated as an additional length which the electrons have to travel at the speed of light. The phase shift is hence given by Δϕ el ¼ 2π 4 ε, where the division by 4 takes into account that only a quarter of a period is elongated. Since the acceleration close to the cathode is not changed significantly by the elongation of the half-cell, the phase in the full cells can be estimated asφ Since the largest phase slippage takes place near the cathode, where the acceleration appears to be not significantly altered by the elongated half-cell, the effective phase may be introduced into Eq. (21) as ϕ eff ¼ ϕ 0 þ 1 2α [Eq. (18)] as in the previous section. This approach underestimates the phase shift by ignoring the effect of the elongation on the effective phase completely. If we apply the arguments made before concerning the bunch compression factor to Eq. (23) to find a new effective phase, we find Equation (24) ignores that the frequency is not matched to the elongated cell length and hence overestimates the introduced phase shift. A plausible but not stringent choice is the average of Eqs. (18) and (24), which results in a phase shift of − Δϕ el 2 and which indeed gives a good match to numerical results as shown in Figs. 7 and 8.
Comparing the results for the elongated half-cell with Figs. 4 and 5, we can conclude that an elongated half-cell results in an increased energy gain in the half-cell and in a phase shift towards lower start phases. Since the phase shift has a stronger effect in the full cell than in the half-cell, the phases of maximum energy gain in the half-and the full cells shift towards each other, so that the energy gain is further optimized. Note, however, that, while the total energy gain is increased, the gradient on the cathode during emission is reduced due to the lower start phases.

IX. FIELD BALANCE IN THE RF GUN CAVITY
The field profile defined in Eq. (1) yields the same field amplitude in all cells of the rf gun. In practice, it is, however, possible to adjust the field amplitude in each cell and, thus, the field balance defined as the ratio of the amplitude in the half-cell to the amplitude in the first full cell E h =E f during the tuning of the cavity. In order to cope with the space charge effects in the half-cell, one might want to increase the field in the half-cell at the expense of the field in the full cell. As in the case of the elongated half-cell, numerical optimization procedures are required if space charge effects are included [18]. Since we have described the total energy gain of the rf gun as the sum of the energy gained in the individual cells, the field flatness can be included in our considerations if we allow for different values of α in the equations describing the energy gain.
The phase difference between start phase ϕ 0 and effective phase ϕ eff becomes smaller with increasing α in the half-cell [Eq. (18)], and hence the maximum energy gain in the half-cell, which occurs at tan ϕ eff ¼ π=2, shifts towards higher start phases. The synchronous phase, i.e., the phase in the full cells, shifts for phases around ϕ eff ¼ 90°with the same functional dependence as the effective phase itself [Eq. (14)]. Hence, the maximum energy gain in the full cells shifts by the same amount as in the half-cell towards higher start phases.
Both an elongated half-cell and a field balance larger than one lead to an increased energy gain in the half-cell. While the elongated half-cell shifts the phase of maximum energy gain towards lower phases, the phase of maximum energy gain is shifted with an increasing field balance toward higher phases.

X. RF-INDUCED ENERGY SPREAD AND LONGITUDINAL EMITTANCE
The development of the beam parameters does not stop at the exit of the rf gun. It is therefore useful to generalize a little before calculating the rf-induced energy spread and longitudinal emittance. We recall Eq. (9): which will be multiplied by the rest energy in the following to obtain practical units. We are interested in the total energy that a particle gains in a complete rf cell and set The oscillating terms yield zero; i.e., the coupling of the electrons to the backward propagating wave in a standing wave structure yields no net energy gain (in contrast to the half-cell of an rf gun).
It is straightforward to extend the field description of Eq. (1) to higher spatial harmonics. As a result, additional trigonometric terms with a phase given by ϕ − ðn − 1Þkz for the forward wave and ϕ þ ðn þ 1Þkz for the backward wave with n being the harmonics number will appear. In the integral over a complete cell, these terms all yield zero; thus, only the fundamental harmonics contributes to the energy gain in a cavity. Note, however, that the amplitude of the fundamental harmonics is, in general, larger than the peak field (sum of all harmonics considering position and phase) if higher-order spatial harmonics are significant.
The kinetic energy gain of a chain of cells is given as The superposition of sine waves (of equal wavelength) leads again to a sinelike function, which can be written in terms of an energy amplitudeÊ and a phase ϕ as Equation (27) determines the energy spread and the longitudinal emittance of the beam. Since the energy spread depends on the weighted sum phase ϕ only, it appears that the phase in the rf gun can be chosen without consideration of the energy spread, because the induced energy spread can be compensated in the subsequent rf sections (with the exception of the case where the beam is used directly after the gun). This argument is not quite true, however, due to the dependence of the bunch length on the phase, as will be seen below. It is instructive to expand Eq. (27) in a Taylor series as The first term in the series yields to leading order the average energy gain, the second term yields the linearly correlated energy spread, and the third term is the first contribution to the nonlinear energy spread and the longitudinal emittance. Higher-order terms can be ignored as long as the bunch length does not get too long. In the following, a bunch of uniform current or line charge density ρ within the phase interval ½−ϕ m ; ϕ m will be considered. A normalized distribution simplifies the derivations; thus, For a uniform distribution, the ratio of the half-width ϕ m to the rms width σ ϕ is given by ϕ m ¼ ffiffi ffi 3 p σ ϕ . A phase interval Δϕ translates into a spatial interval Δz by the wave number as Δϕ ¼ kΔz, and thus ϕ m ¼ ffiffi ffi 3 p kσ z . Odd terms in Δϕ in the Taylor series do not contribute to the average energy or the longitudinal emittance, while even terms do. (This is not the case if an asymmetric particle distribution is considered.) The contribution of the second-order term to the average energy is small and can, in general, be ignored but needs to be taken into account in the calculation of the longitudinal emittance. The average energy gain of a bunch is hence found as The calculation of the rms value of the nonlinear energy spread can be facilitated by subtractingÊ sin ϕ from Eqs. (28) and (30). In addition, the linearly correlated term can be taken out of Eq. (28). The rms value of the nonlinear energy spread is thus found as which results in The longitudinal emittance is found by multiplying Eq. (32) with the rms bunch length: Equivalent equations can be derived for various bunch forms. They will always show a scaling asÊ sinðϕÞk 2 σ 3 z but with a different prefactor. A Gaussian particle distribution leads, for example, to a prefactor 1= ffiffi ffi 2 p . The formulas derived in this section can be applied to beam line sections with a constant bunch length. Since the average energy gain [Eq. (30)] and the longitudinal emittance [Eq. (33)] both scale withÊ sin ϕ, the induced longitudinal emittance depends directly on the required energy gain of that section but not on the phase ϕ. Within the limits of the available rf voltage, the linearly correlated energy spread is hence an independent parameter.
It has been pointed out that neither the backward propagating wave nor higher spatial harmonics contribute to the net energy gain over a complete cavity cell. The results of this section are hence applicable to all cavities including traveling wave cavities. This changes, however, if cavities with different rf frequencies need to be taken into account. Higher harmonic cavities allow the control of the longitudinal emittance by decelerating the bunch in the higher harmonic system, so that the nonlinear terms in the Taylor series of the two systems cancel [19][20][21]. Since two rf systems have four free parameters, namely, two voltages and two phases, it is possible to set terms of up to third order in Δϕ to any desired value. This is possible not only for the rf-induced nonlinearities in the longitudinal phase space but also for correlated contributions of other sources, like wake fields or the space charge field.
Before closing this section, Eq. (33) shall be applied to an rf gun cavity. This implies that a sinelike dependence of the energy gain as a function of the rf phase is assumed within the phase interval occupied by the bunch, a sufficient approximation if the bunch length is not too long. Although the Taylor expansions of Eqs. (10) and (9) yield a better description of the local dependence, other factors are more important. The condition of a constant bunch length is, for example, not fulfilled in the half-cell of the gun cavity, and the bunch compression [Eq. (20)] leads in addition to a small distortion of the bunch form, so that even if a uniform bunch is started at the cathode a slightly asymmetric bunch form appears at the exit of the cavity. Note that for any functional dependence of Eðϕ 0 Þ basic properties remain unchanged; i.e., the maximum of the energy gain coincides with the zero crossing of the correlated energy spread. Space charge and wake fields modify this, because a dependence on the local position in the bunch is introduced. Another factor is the variation of the correlated energy spread and longitudinal emittance due to velocity differences. Velocity differences lead to variations of the longitudinal distribution and depend only to first order linearly on the energy spread. This is discussed in Ref. [21] but requires more study.
The comparison of Eq. (33) with numerical results shown in Fig. 9 reveal a reasonable agreement. The basis for this figure is an energy gain calculated in correspondence to Fig. 5 (analytical result, α ¼ 1.8), which replaces the factorÊ sinðϕÞ, and a bunch length calculated as σ z ¼ cσ t

Δϕ sync
Δϕ 0 . For the numerical simulation, a uniform bunch of σ t ¼ 10 ps has been tracked with the program ASTRA [22] through an rf gun with a field profile corresponding to Eq. (2) (operating frequency 1.3 GHz, For shorter emission times than used in this example, the model tends to underestimate the emittance somewhat stronger. The drop of the longitudinal emittance (numerical result) at the right side of the plot is related to the aforementioned variation of the emittance due to velocity differences. (An equivalent effect for the transverse plane is discussed in Sec. XIII.) While the energy gain in the plotted phase interval is roughly constant, the longitudinal emittance varies in accordance to the bunch length as described by Eq. (20). Thus, if only rf effects are considered, lower start phases allow generation of shorter bunches with smaller longitudinal emittance.

XI. RF FOCUSING IN STANDARD CAVITIES AND RF GUNS
For a particle traveling parallel to the z axis ðβ ¼ β z Þ, the radial Lorentz force is given as Including Eq. (2) into Eq. (34) leads for β ¼ 1 to from which the variation of the radial momentum follows as While the longitudinal dynamics can be treated to a large extent in terms of the normalized vector potential α and thus independent of the rf frequency, the accelerating field appears without relation to the rf wavelength in the transverse dynamics. Treating the radius as constant and introducing an integration constant such that Δp r ¼ 0 is fulfilled at the entrance of the cavity yields In the literature, the integration constant is sometimes referred to as a fringe field effect, which is somewhat misleading. Here a field as described by Eq. (2) is assumed, i.e., without any additional fringe field. The field in the entrance and exit cell of a real cavity has additional field components due to the extension of the field into the beam tube, which may modify the behavior when compared to the approach discussed here. The integration constant describes an average radial momentum which the particle achieves during the passage through the cavity. Only in the case of a constant radius, i.e., for sufficiently high particle energies, is Δp r ¼ 0 also fulfilled at the exit of the cavity. In all other cases, since the oscillating term in Eq. (37) leads to first order to no net momentum transfer, the particle motion inside the cavity can be described by an angular kick of at the entrance and the exit of the cavity, where for r the values at the respective positions are to be taken, whilep z is the average momentum in the rf cell. For phases on which the particle is accelerated, the entrance kick is directed inward (focusing) and the exit kick is directed outward (defocusing). For lower particle energies, Eq. (38) gives hence a net focusing action, which is not related to the momentum gain but to the change of the transverse particle position, equivalent to the case of a doublet focusing. This focusing action has to be clearly distinguished from the damping due to the momentum gain. It is tempting to include the variation of the particle momentum into Eq. (38), i.e., to set instead of the average momentump z the momentum at the entrance and the exit of the cavity. In this case, the reduction of the initial angle by the acceleration (adiabatic damping) should also be taken into account. Note, however, that a constant radius is assumed for the integration of Eq. (36); thus, the solution is anyhow limited to small variations of the beam radius. Therefore it is not a priori clear that these attempts lead to a better description of the particle dynamics. The oscillating term in Eq. (35) yields only to first order a vanishing net momentum gain. In order to derive a second-order correction, we assume that the average radius and the longitudinal momentum over one period stay constant and calculate the oscillating particle trajectory as The corrected trajectory rðzÞ ¼ r þ Δr osc can now be inserted into Eq. (36) to calculate an average force over one rf cell as Thus, an average focusing force is acting on the particles. In the case of on-crest acceleration, for a short cavity this average or ponderomotive force yields only a small correction of the focusing characteristics; it becomes, however, the dominant term for long cavities. In addition, it is the only term present when the bunch is accelerated at the zero crossing of the rf field. Before turning to rf guns, the results should be generalized somewhat further. So far, a longitudinal electric field consisting only of the fundamental spatial harmonics was assumed, which is a good description for most standing wave pi-mode structures. The resulting transverse focusing force [Eq. (35)] is related to the backward traveling wave, while the components related to the forward traveling wave cancel. This changes if spatial harmonics are taken into account, which is particularly important for traveling wave structures, where the backward traveling wave is missing. Since traveling wave structures are, in general, not designed as pi-mode structures, they comprise a higher content of higher-order spatial harmonics. In addition, it is worth noting that the fields in the entrance and exit cell of a traveling wave structure are standing wave fields. Hence, the particle trajectory receives transverse kicks of similar order as given by Eq. (38) in the entrance and exit cells of a traveling wave structure, and the higher-order spatial harmonics lead to an additional ponderomotive force of similar strength as in a standing wave structure.
In the following discussion concerning rf guns, the ponderomotive force will be ignored. A detailed discussion of the ponderomotive focusing in standard cavities is found in Ref. [23] and the references therein.
For the case of the longitudinal dynamics in rf guns, it was successfully assumed that particles travel at the speed of light, even though the particles start with near zero velocity at the cathode. Attempting the same procedure for the transverse dynamics, we find from the integral of the transverse force Eq. (35) as transverse momentum Note that the integration constant has now a positive sign; i.e., it is defocusing, because the particles start at z ¼ 0, while they start at 2kz ¼ −π in the case of a standard cavity. At the exit of the cavity, again 2kz ¼ π holds, and thus also the oscillating term leads to a defocusing contribution at the exit of the cavity. The particle position r and the phase ϕ are not constant as implicitly assumed so far. We may set as the approximated particle trajectory a function of the form r ¼ r c þ r 0 z. The additional terms in the integral of the transverse force scale, however, as r 0 4k 2 and r 0 z 2kΔz and are hence not significant. Note that the integration constant in Eq. (41) describes only the average momentum; at the cathode, the rf field still has a focusing nature. Despite the fact that the beam is highly divergent at the cavity exit, r 0 can hence be negative inside of the cavity for certain parameters. Thus, it is justified to use the cathode position as the starting position for the particle, i.e., r ¼ r c . Since the dynamics close to the cathode is governed by the integration constant, we set the phase of the constant term to the initial phase ϕ 0 , while the synchronous phase ϕ sync is used for the oscillating term, which describes the residual contribution at the exit of the cavity. The transverse momentum at the cavity exit is hence given as The comparison of the transverse momentum according to Eq. (42) with the numerical result for an rf gun as a function of the start phase is shown in Fig. 10 and indicates a good agreement within the relevant phase interval up to about 90°.

XII. RF-INDUCED TRANSVERSE MOMENTUM SPREAD AND EMITTANCE
The phase dependence of the rf-induced transverse momentum leads to a correlated emittance growth. To simplify the calculation of the emittance, we introduce Cartesian coordinates and approximate the transverse momentum by As in the case of the longitudinal dynamics, we can expand the phase dependence as a Taylor series up to the quadratic term in the phase spread and find the rms momentum spread as where again a uniform current distribution as described in Eq. (29) is assumed. Note that the quadratic average of the particle positions hx 2 i should be calculated with respect to the axis of the rf cavity. Thus, we write it as with x off being the offset of the particle distribution with respect to the symmetry axis of the rf field and σ x being the rms width of the particle distribution. The average momentum follows as and the correlation term as which leads finally to an rf-induced transverse emittance contribution given as where ϕ m is already replaced by ffiffi ffi 3 p kσ z .
The comparison of results from Eq. (48) with numerical results as shown in Fig. 11 reveals a significant discrepancy in the position of the emittance minimum and an underestimation of the emittance at high phases. Note that the phase for the minimal emittance coincides in our theory with the phase for the maximum transverse momentum, i.e., with the phase at which the first derivative d dϕ Δp r becomes zero. The numerical emittance minimum appears, however, at an even lower phase (compare Fig. 10 with Fig. 11), which will be further explored in the following section.
The asymmetry in the emittance, i.e., the minimal value at zero start phase and the maximal value at the highest start phase, is driven by the increasing bunch length (compare with Fig. 3). For a constant bunch length, the result would be symmetric with respect to the emittance minimum, which is determined by the dominant cosine term in Eq. (48). The cosine term is linear in the bunch length and becomes zero at the central emittance minimum, at which point the sine term with its quadratic bunch length dependence becomes relevant.
It should be noted that any rf cavity acts as a timedependent focusing element [see Eq. (42)] and hence introduces a correlated momentum spread as the rf gun cavity. The induced transverse momentum spread is, however, not proportional to the beam size but, since the focusing kicks at the entrance and the exit of the cavity compensate each other, the net remaining kick being due only to the difference in the entrance and exit beam sizes. The induced emittance is given by the product of the remaining transverse momentum spread and the beam size at the exit of the cavity, i.e., the smaller beam size of the focused beam. For an on-crest operation, only the small quadratic term contributes to the emittance, while for operation at the zero crossing, as for a buncher cavity, the momentum spread and hence the induced emittance become zero. The rf-induced emittance of cavities other than rf gun cavities can therefore often be ignored; for low energies and large beam sizes, it may, however, become significant. Note also that a large beam divergence increases both the induced transverse momentum spread and the beam size at the exit of the cavity.

XIII. CHROMATIC EMITTANCE VARIATION AND THE TWO LINE MODEL
A beam exits a half-cell rf gun cavity with large transverse momenta and with a large energy spread, conditions under which the canonical phase space emittance is not conserved in a drift [24]. In order to interpret the discrepancies between the analytical theory and numerical results found in the previous section, a model for a chromatic emittance variation will now be developed.
Since the rf field acts as a time-dependent focusing element, a fanlike structure as depicted in Fig. 12 opens in phase space when the beam travels through a cavity. The position of the highly divergent particles develops in a drift behind the cavity as which corresponds to a shearing of the phase space ellipses towards increasing x as indicated by the arrows in the figure. Since the shearing is driven by x 0 ¼ p x =p z , the velocity of the shearing can be different for the different slices. While this leads, in general, to an emittance increase, an emittance reduction is possible in the present case, where the transverse momentum is linearly correlated to the longitudinal particle position. An obvious condition for this chromatic emittance reduction, besides the preconditions of a high transverse momentum and a high energy spread, is that slice A in Fig. 12 shears faster than slice B, so that the fan can close. This condition is, however, not sufficient. For a mathematical description of the process, we explore a simple model, where the phase space distribution is described by two lines defined as so thatᾱ is the average inclination and AEΔα describes a small deviation from this average. Assuming a uniform distribution of particles along these two lines, the emittance is approximately given as with x A and x B being the rms transverse extension of the two lines. The approximation is valid as long as x A and x B do not differ too much from each other. As indicated in Fig. 12 for the initial phase space, we set After a drift the bunch has expanded, and the end points of the lines are found at the positions Since the transverse momentum does not change in a drift, we can write for the rms momentum of the two lines where the prime indicates the parameters for the final phase space distribution. Equations (54) can be used to replace Δα 0 in the emittance calculation of the final state. We find which needs to be multiplied by we find the emittance in the final state as Thus, for a reduction of the incoming emittance the term describing the chromatic emittance variation needs to become negative, i.e., Now the parameters of Eq. (58) have to be identified with parameters of our phase space distribution.ᾱ is just given as the correlated rms momentum p cor divided by the rms spot size x 0 . Since the transverse momentum within the bunch is linearly correlated with the longitudinal position, we can setᾱ Also, the beam divergence is linearly correlated with the longitudinal position in the bunch. Thus, we set where z is the distance the bunch has traveled in the drift section. With these identities we can reformulate the condition for a possible emittance reduction as Before applying Eq. (61) to the phase space distribution at the exit of an rf gun cavity, the position and the shearing velocity of the head and the tail slices need to be understood. Looking at the transverse rms momentum shown in Fig. 13 (top), we note that for start phases below ≈80°t he head of the bunch gains a lower transverse momentum than the tail, while above ≈80°the head gains a higher momentum than the tail. (Since the phase is increasing with time, the head, which starts earlier than the tail, is left of the tail in Fig. 13.) Thus, for phases below ≈80°slice A is the tail, while it is the head for phases above ≈80°. The energy spread (compare with Fig. 4) is increasing with an increasing start phase above ≈40°and is oriented such that the tail gains less energy than the head. As a result, particles in the head are always less divergent than particles in the tail, as shown in the bottom part of Fig. 13. Since the tail, which has a higher divergence and hence shears faster in phase space than the head, is located at the position of slice A in Fig. 12 for phases below ≈80°, the fan can close and the emittance can shrink for phases below ≈80°. However, the condition for a chromatic emittance reduction as given by Eq. (61), which is plotted in Fig. 14 (top) for our case, restricts the emittance reduction to phases above ≈45°, since it is positive for lower phases. Figure 14 shows in the bottom plot the development of the rf-induced emittance in a drift section behind a half-cell rf gun cavity which we can now interpret. For phases between ≈45°and ≈80°, we expect a chromatic emittance reduction, since the difference in the beam divergence of the head and the tail slice can lead to a closing of the fan structure in phase space. This process works until the tail and the head slice overlap in phase space. At this point, only the quadratically correlated momentum spread contributes to the emittance. The quadratic term in Eq. (48), which is also plotted in Fig. 14 (bottom), underestimates the minimal emittance, because the difference in the shearing motion of the slices leads to an emittance increase for the quadratically correlated momentum spread as it does for an uncorrelated momentum spread. (Note that the value of the local minimum increases with increasing drift length.) After reaching an emittance minimum the emittance increases again, because slice A has overtaken slice B. As a result of this process, we can observe a shift of the minimal emittance towards lower phases in the drift behind the cavity. Indeed, the process starts already inside of the half-cell, and hence the minimal emittance is already shifted to ≈60°at the exit of the cavity rather than being at ≈80°where we expect it (compare with Fig. 11). In a multicell cavity, the process continues in the cells following the half-cell until the beam divergence is sufficiently reduced at higher beam energies due to adiabatic damping. In addition, the emittance development is modified by the differences in the focusing kicks at the entrance and the exit of the cells arising from the change in the beam radius.
Increased gradients lead to an increased rf-induced emittance contribution [cf. Eq. (48)] but also to a suppression of the chromatic emittance variation and a shift of condition (58) towards larger start phases.
Transverse offsets of the beam relative to the cavity axis lead to an additional emittance contribution as described by Eq. (48). In contrast to the spot size contribution, which has the character of a time-dependent focusing element, the offset contribution has the character of a time-dependent dipole; i.e., it leads to a difference in the average transverse momentum of the different slices as indicated in Fig. 15 [cf. Eqs. (46) and (47)].
In a drift the ellipses still shear relative to the p x ¼ 0 axis; i.e., the beam develops a transverse offset and the distorted fan structure can close until the phase space ellipses are parallel to each other (rather than overlapping each other) if the conditions as discussed in the previous section are fulfilled. Therefore, transverse offsets do not change the general characteristics of the rf-induced emittance.

XIV. COMPENSATION OF THE RF-INDUCED EMITTANCE
The rf-induced emittance is a correlated emittance contribution; thus, a compensation is not excluded by principle reasons. The three examples for a partial compensation shown in Figs. 16-18 are only roughly optimized to achieve a minimum emittance at a start phase of about ≈45°, the phase of maximum energy gain in the half-cell (which also seems to be the phase where the compensation works best). The compensation is achieved by a cavity operating at the fundamental frequency (Fig. 16), a third harmonic cavity following the rf gun (Fig. 17), and an rf gun cavity operating simultaneously at the fundamental and the third harmonic frequency. The compensation behind the half-cell (Figs. 16 and 17) takes advantage of the large beam divergence but suffers from the chromatic phase space mixing which already took place inside of the gun cavity. The superposition of a third harmonic field inside of the half-cell [7,25,26] circumvents this problem to a large extent. Besides challenging technical problems, the  relevance of the compensation of the rf-induced emittance in the presence of a large space charge field remains open at this point. Note that the start phase is defined relative to the zero crossing of the field, while an off-crest phase is defined relative to the phase of maximum momentum gain, and that theoretical fields without realistic edge fields are used.

XV. EMITTANCE OSCILLATION AND MAXIMUM EMITTANCE IN A CELL
Equation (48) describes the rf-induced emittance growth for the complete passage through a cavity. The kick model for the transverse momentum can be interpreted as an emittance contribution which is induced at the entrance of the cavity and then partly compensated at the exit (for a full cell). In the worst case, the emittance is not compensated but is doubled by the exit kick as in the case of the rf gun. However, the dynamics inside the cavity is more complex as can be seen from Fig. 19, which shows the development of the transverse emittance inside a cavity. Here a beam of relatively high energy (50 MeV) is passed on crest through the single-cell cavity, so that the variation of the beam  radius is very small and the emittance for the complete passage compensates nearly perfectly. While the transverse momentum runs through a single oscillation in the cavity, two big emittance bumps are observable, the height of which depends on the local beam size and the phase. Offcrest operation leads to an asymmetry in the height of the bumps, with the central emittance minimum shifting either left or right, depending on the sign of the off-crest phase. For on-crest operation, the first emittance maximum occurs when the beam has traveled a quarter of the cell length into the cavity. Equation (41) gives at this point a transverse momentum change of which using the described model leads to an emittance of The first term of the square bracket in Eq. (63) is dominating for on-crest operation; the emittance maxima hence show a linear dependence on the bunch length.
Looking at the quarter, the half, the three-quarter, and the end point of the cavity, where 2kz yields values of π, 2π, 3π, and 4π, respectively, we note that cosinelike terms add up with signs as −, þ, þ, −, while the sinelike terms add up as −, −, þ, þ. The maximum of the transverse momentum in the center of the cavity is hence related to the sine term, while the maxima in the momentum spread and the emittance are related to the sum of the sine and the cosine term. The residual emittance for a complete on-crest passage is thus found to be the result of a rather delicate compensation process. Distortions of this compensation, i.e., distortions over the length scale of a cavity cell, can have rather dramatic effects on the residual emittance.
In the worst case, we may expect an emittance contribution of 3-4 times the emittance given by Eq. (63). Note that Eq. (63) is independent of the beam energy, while the residual emittance for the complete passage depends via the beam size variation on the beam energy. Thus at high energies the residual rf-induced emittance contribution becomes zero, but the emittance inside a cavity still oscillates with significant amplitudes. The discussions in the following sections will point out the relevance of these detailed considerations.

XVI. EMITTANCE GROWTH BY FIELD ASYMMETRIES
A commonly used configuration to couple power into a cavity is a side slot which breaks the rotational symmetry of the coupler cell and thereby also the rotational symmetry of the accelerating field. Similar symmetry breaks can be introduced by rf components such as tuning plungers and rf probes or by coupling holes in the cavity iris. Different means to symmetrize the field, e.g., by vacuum pumping ports, symmetric power couplers, or racetrack-shaped cavity cells, are possible and have been successfully exploited [8,27,28]. Alternative designs avoid field asymmetries by on-axis circular symmetric couplers [29]. Coupler-induced field asymmetries have been theoretically discussed for various cases [8,27,30]. In general, it is assumed that the field distortion is constant over the complete length of the coupler cell. In the following, a model is developed to take a closer look at possible implications of the longitudinal distribution of the distortions. A coupling slot in the side wall of a cavity cell introduces a distortion of the rf field which can be approximated by a transverse offset of the accelerating field in the region of the slot [31]. (This is equivalent to a description as a dipolelike field distortion.) The offset is typically on the order of millimeters. Assuming that the slot is located longitudinally in the middle of the cell and that the induced distortion vanishes towards the irises of the cell suggests a field description of the form where a coupling slot location in the y direction is assumed. Thus, the force in the y direction is given as Here we are interested only in the contribution of the field asymmetry, and thus we ignore the term which describes the normal rf-induced emittance. The momentum integral then takes the form The contributions of the sinelike terms at the boundary cancel, and, as before, we develop the cosinelike term in a Taylor series, leading to Δp asym

XVII. EMITTANCE GROWTH IN COMBINED SOLENOID-CAVITY SECTIONS
Solenoids are common focusing elements in injectors and low-energy beam lines. Often the fringe field of a solenoid overlaps a cavity field; in other cases, cavities are completely embedded in solenoids. The internal compensation of the rf-induced emittance within a cell is perturbed by the external solenoid field [32] leading to an increased residual rf emittance. In the following, two examples will be discussed: first, the case where a beam is created inside a solenoid field (a so-called magnetized beam) and second, the case where the beam enters a cavity section which is embedded in a solenoid field.
A charged particle which is created and appropriately accelerated inside a solenoid field of constant strength can travel on a straight line parallel to the field lines of the solenoid. If then a transverse momentum kick is given to the particle, it will start to rotate in the transverse plane. Thus, the entrance kick of an rf cavity, which acts in the radial direction, leads to a trajectory described by where x i and y i stand for the initial particle coordinates, E 0 and ϕ for the rf field amplitude and phase, respectively, and B 0 for the constant solenoid field strength. The rotation is governed by the cyclotron angle θ C , which is twice as large as the Larmor phase angle. Note that the Larmor angle is defined with respect to the center of the solenoid, while the cyclotron angle is defined with respect to the center of the circular particle trajectory. Figure 20 illustrates the situation. For a round beam, Eq. (69) yields the rms beam size as The comparison of the beam size according to Eq. (70) with a numerical calculation shown in the top of Fig. 21 shows good agreement for low solenoid fields below ≈0.5 T for this example. For higher solenoid fields, the particle trajectories develop a spiral pattern rather than the closed circular motion predicted by the kick approximation. Both numerical and analytical results converge to a pointlike motion and hence to the incoming beam size at the highest solenoid fields. The emittance calculation would require integration of the transverse rf fields along the electron path, which leads to rather awkward equations. We will hence not pursue this but discuss some numerical results. The bottom plot of Fig. 21 shows the emittance generated when a 5 MeV beam is passed on crest through a single-cell cavity as a function of the applied solenoid field. (The emittance is corrected for the rotational mode in the solenoid field.) Except for very low solenoid fields, the emittance scales linearly with the bunch length. Note that the induced emittance growth shifts towards lower solenoid fields for lower beam energies and vice versa. In this example, the maximum emittance is reached at B 0 ≈ 1.5 T,  20. Schematic of the transverse particle motion in a solenoid field after excitation by a radial kick towards the origin. The initial particle coordinates are y i , x i ¼ 0, and r C denotes the cyclotron radius. The initial focusing kick is transferred into a pure angular motion with respect to the coordinate center at an angle θ 0 ¼ arctan y i r C ¼ arctan 4cB 0 E sin ϕ and at θ 0 þ π, while it leads to a pure radial motion at an angle 2θ 0 . rf forces act only in the radial direction; a compensation is hence possible only when the phase of the cyclotron motion and the rf phase match.
corresponding to a cyclotron angle of ≈2π over the length of the cell. The development of the emittance inside the cavity cell, shown in Fig. 22 (top), displays nicely the failing of the emittance compensation at these conditions. The maximum emittance of ≈1.2 mrad mm is 2.6 times the maximum emittance as calculated by Eq. (63).
Finally, the bottom plot of Fig. 22 shows the emittance growth as a function of the solenoid strength for a singlecell, a two-cell, and a three-cell cavity. For lower solenoid fields, the emittance growth is better compensated by more cells.
In the case where the electrons are created outside of the solenoid field, we can first trace the electron trajectories up to the entrance of the cavity, before adding the momentum kick that the cavity generates. On the way to the cavity entrance, the particle starts to rotate toward the solenoid axis in accordance to the standard equations of motion in a solenoid. The momentum kick of the cavity fields will again be modulated with the cyclotron angle during the passage through the cavity. Hence the transverse momentum inside the cavity is in the rotating frame given as p~y ¼ −y in eB 0 2 sin θ L þ p y in cos θ L − y in eE 0 4c sin ϕ sin θ C : ð71Þ y in and p y in are the coordinates at the entrance of the cavity, and the Larmor angle refers here only to the phase advance over the length of the cavity; i.e., it starts equal to the cyclotron angle at zero at the cavity entrance.
Integrating over the momentum, we find the particle position at the cavity exit, which we can directly interpret as the rms beam size, described by σ y ¼ σ y in cos θ L − eE 0 sin ϕ 4cB 0 sin θ C þ σ p y in 2 eB 0 sin θ L : The comparison of the analytical result with a numerical calculation shown in the top plot of Fig. 23 reveals a good agreement. The incoming beam and cavity parameters are the same as in the discussion of the magnetized beam above. The emittance development in cavities of varying numbers of cells shown in the bottom plot shows an increasing emittance contribution with an increasing number of cells for higher solenoid fields. However, in practice, lower solenoid fields, which show only a small emittance contribution, will in general be more relevant.

XVIII. EMITTANCE GROWTH DUE TO SPHERICAL ABERRATIONS
The effects discussed in Secs. XI-XVII are related to the phase dependence of the focusing rf field; nonlinearities of the field have so far not been included.
A nonlinearity of the transverse rf field is intimately related to the appearance of higher-order spatial harmonics [cf. Eq. (1)]. The above described treatment of the rf emittance can be extended to higher-order spatial harmonics, which appears to be a promising approach if a single, dominant higher-order spatial component exists. See Ref. [5] for a discussion of this approach. The following treatment is based on the polynomial expansion Eq. (1). We can write the transverse force to second order as Equation (80) can be useful in comparing and optimizing the impact of the spherical aberrations arising from various cavity shapes.

XIX. SUMMARY
The beam dynamics in rf guns is characterized by a rapid variation of the phase in the half-cell of the gun cavity. To yield improved analytical models for the synchronous phase, the energy gain, and the bunch compression factor, an effective start phase has been successfully introduced for the description of the dynamics in the half-cell of the gun cavity. The energy gain is calculated as sum of the energy gain in the half-cell which is traversed at the effective start phase and the energy gain from all other cells which are traversed at the synchronous phase. This approach has allowed us to discuss aspects such as elongated half-cells and unbalanced field profiles. The calculation of the energy spread and the longitudinal emittance has been presented in a generalized way which can be applied to both rf guns and accelerating cavities.
In the discussion of the transverse emittance, discrepancies between the derived analytical model and numerical simulations have been identified and found to be related to a chromatic emittance variation in the gun and the following drift section. Three methods to compensate the rfinduced transverse emittance have been compared. An important aspect of the transverse dynamics is the emittance oscillation appearing inside each rf cell. Large correlated emittance contributions build up and cancel during the passage through each cell. The final emittance growth is the result of a delicate compensation process which can be distorted, for example, by field asymmetries or by external solenoid fields overlaying the cavity. It has been pointed out that the longitudinal distribution of a field asymmetry has a significant impact on the resulting emittance growth and thus needs to be taken into account. For overlaid solenoid fields, the cyclotron angle over one rf cell has been shown to be a relevant quantity. In the final section, emittance growth due to spherical asymmetries has been discussed.
A discussion of space charge effects and cathode physics is beyond the scope of this report. Space charge effects can become the dominant source for emittance growth in the transverse and longitudinal planes, especially in the case of high bunch charges, while the ultimate limit of the transverse emittance is determined by the initial transverse beam size and momentum of the electrons as they are emitted from the cathode. The strength and time dependence of the accelerating field limits, however, the parameter space available to minimize the detrimental space charge effects.
ACKNOWLEDGMENTS I thank N. Walker for proofreading and stimulating discussions.