Analytical theory of coherent synchrotron radiation wakefield of short bunches shielded by conducting parallel plates

We develop a general model of coherent synchrotron radiation (CSR) impedance with shielding provided by two parallel conducting plates. This model allows us to easily reproduce all previously known analytical CSR wakes and to expand the analysis to the situations not explored before. It reduces calculations of the impedance to taking integrals along the trajectory of the beam. New analytical results are derived for the radiation impedance with shielding for the following orbits: a kink, a bending magnet, a wiggler of finite length, and an infinitely long wiggler. All our formulas are benchmarked agains numerical simulations with the CSRZ computer code.


I. INTRODUCTION
Coherent synchrotron radiation (CSR) of short relativistic beams and its effect on beam dynamics in modern accelerators has been an area of active research for more than two decades. Various methods of calculation of the CSR wakefield were proposed in the literature. One of the first, and the simplest, approaches [1] treats the beam as having negligible transverse dimensions (a line charge model) and neglects the effect of the walls of the vacuum chamber (the free-space CSR wakefield). While the results of this model are applicable for relatively long magnets, the model is extremely useful for crude and quick estimates of the CSR effects in the system. A more complicated model [2] takes into account the shielding effect of the vacuum chamber by approximating the metal walls by two parallel conducting plates located on the opposite sides of the beam circular orbit. Even more sophisticated approaches of Refs. [3,4] solve the synchrotron radiation and find the beam impedance in a toroidal vacuum chamber of rectangular cross section.
Analyses of Refs. [1][2][3][4] are limited to a circular trajectory of the beam. An important next step has been made in Ref. [5], where the authors considered a bending magnet of finite length and calculated the CSR wakefield for a trajectory consisting of an arc of a circle with incoming and exiting straight lines. This model made it possible to study effects of CSR radiation in bunch compressors of modern x-ray free electron lasers, where short bending magnets are separated by long drift sections. A simplified version [6] of the CSR wake [5] valid in the limit v = c (v is the particle velocity and c is the speed of light) is implemented in the computer code elegant [7]. In a subsequent paper [8] the authors of [5] applied the same method to the calculation of the CSR wake in an infinitely long undulator in free space. Modification of the CSR wakefield derived in [8] for the limit v = c was carried out in [9].
In addition to various analytical approaches to the problem of CSR wakefield mentioned above, there have been a consistent effort to develop numerical algorithms for computer codes that calculate the wake in practically realistic situations. A good review of such codes can be found in Ref. [10] with some latest additions to the list in Refs. [11][12][13]. While these codes are indispensable in the design of accelerators, it is our opinion, that they do not eliminate the need for further development of new analytical tools that allow for a quick evaluation of the CSR effects in various conditions. In addition, the analytical approach usually provide the scalings of the strength of the effect and a better understanding of the mechanisms that cause the wakes. This, in turn, often allows find a solution that mitigates the adverse effect of the CSR wakefields.
In this paper we develop a general model of CSR impedance with shielding provided by two parallel conducting plates. This model reproduces all previous examples known from the literature and expands the analysis to the situations not explored before. It reduces calculations of the impedance to taking integrals along the trajectory of the beam. These integrals can often be easily computed numerically with the help of Matlab or Mathematica.
The paper is organized as follows. In Section II, starting from the retarded potentials of a relativistic beam in free space, we derive an expression for the radiation impedance in terms of integrals taken along the beam orbit. In Section III, this expression is generalized to the case of shielding with parallel conducting plates. In Section IV we give a brief description of the computer code CSRZ that we use for benchmarking our analytical results. In Section V we reproduce some known results: the CSR impedance of a circular orbit in free space and with shielding, and the impedance of infinitely long wiggler in free space. In Section VI we derive the impedance of a kink, that is an orbit consisting of two straight lines at a small angle. In Sections VII, VIII and IX we derive the impedance of a bending magnet of finite length, a finite length wiggler and an infinite wiggler, respectively. The results of the paper are summarized in Section X. The paper has four appendices containing some details of the derivations.
We use the Gaussian system of units throughout this paper.

II. ENERGY CHANGE OF THE BEAM DUE TO COHERENT RADIATION
A. Derivation of the energy change using retarded potentials We begin from the equation that describes the rate of change of energy E of a point charge e moving in electric field E(r, t) with velocity v, Expressing the electric field through the scalar potential φ(r, t) and the vector potential A(r, t), it is easy to cast (1) into the following form, where β = v/c and c is the speed of light. In Eq. (2) the full time derivative dφ/dt = ∂ t φ + v · ∇φ is taken along the particle orbit and gives the rate of change of φ as seen by the moving charge.
Eqs. (1) and (2) are valid for a point charge. To apply them to a beam of charged particles, we represent the latter as a cold fluid that is characterized by the charge density en(r, t) and the fluid velocity v(r, t), where n(r, t) is the particle density. The current density in the beam is j(r, t) = en(r, t)v(r, t). Note that in this description of the beam we neglect the effects of the beam emittance and energy spread and at a given time t associate a unique value of the velocity v with each location r within the bunch. With this new understanding of the velocity field v(r, t), Eq. (2) can be written where V(r, t) = φ(r, t) − β(r, t) · A(r, t). The function V was first introduced into the calculation of CSR wakefields in Ref. [1].
We will limit our consideration to the cases where the velocity v at a given location r does not depend on time t, v = v(r), which is a good approximation for relativistic beams with a small angular spread when all the particles at a given location are approximately moving in one direction-the direction of the tangent vector to the trajectory of the reference particle. In this case, the last term on the right-hand side of (3) can be neglected, and the rate of change of E + eφ is given by the partial time derivative of V.
In free space, far from metal boundaries, φ and A are expressed in terms of n and v through the retarded potentials [14], where τ = τ(r, r ) = |r − r |/c. Correspondingly, for function V one finds where β = β(r) and β = β(r ). Note that the integrand in this expression has a singularity when r → r because at this point τ = 0. This singularity however is integrable in three (and two) dimensions, and the function V is finite.
Considerable simplifications can be achieved if one chooses a line charge model for the beam.
In this model, all the particles in the beam are moving on the same orbit r 0 (s) parametrized by the arc length s measured along it. The vector β(s) is directed along the tangent vector to the orbit.
The distribution function in 1D is denoted by λ(s, t); it gives the number of particles per unit s.
Eq. (5) is now written as a one-dimensional integral, where τ(s, s ) = |r 0 (s) − r 0 (s )|/c is a function of s and s , and β = β(s), β = β(s ) are defined on the orbit. Note that, in general case, the singularity of the integrand in the limit s → s makes the integral (logarithmically) divergent, unless the particles are moving with the speed of light 1 .
In this latter case, |β| = |β | = 1 and in the limit s → s the term 1 − β · β tends to zero canceling the vanishing τ. Hence, in what follows we assume |β| = 1, which means that all the particles in the bunch are moving with the speed of light. In accordance with this assumption, the distribution function λ is transported along the orbit without changing its shape and can be written as a function λ(s − ct) of one argument s − ct. With this distribution function, Eq. (6) can be rewritten, Using Eq. (3) (in which we agreed to neglect the last term), we obtain where λ denotes the derivative of function λ with respect to its argument.
Our general setup for a class of problems considered in this paper consists of a region of space occupied by time independent magnetic field (a bending magnet or a sequence of magnets, an undulator, etc.). Before entering this region, and after exiting it, the beam travels along straight lines. Our goal will be to calculate the energy loss ∆E(z) (where z is the longitudinal coordinate inside the beam) of different slices of the beam after it propagates sufficiently far enough from the exit (t → ∞), so that its electromagnetic field returns to a steady state (the same state the beam had before entering the region, at t → −∞). In this calculation, we will assume that the potential at each particle of the bunch in the final state is the same as initial, This assumption is justified if the bunch is not focused transversely or compressed longitudinally relative to its initial state after it passes through the region of magnetic field. The effects of transverse focusing on φ in round pipes were studied in Ref. [15]; in principle, they can be added to our formalism, but they are not a subject of this work. 1 A different approach to eliminate the singularity without the assumption v = c was used in [5,8]: the term responsible for the singularity was called the space charge effect; it was isolated and discarded as not relevant to the radiation wakefield.
Taking into account the condition ∆φ = 0, integration of (8) over time from minus to plus infinity gives the energy change ∆E from the initial to the final state. Because of the full derivative dE/dt, the integration has to be carried out along the particle trajectory s = z + ct, where z is an integral of motion and is equal to the coordinate s of a slice in the beam at t = 0. Replacing s by z + ct on the right-hand side of (8), we integrate it over time, In the last integral we replaced the integration over time by integration over s. Formula (9) gives the total integrated energy change at coordinate z in the bunch.
We will also consider in the paper the two cases when the asymptotic trajectories at t → ±∞ are not straight lines: these are the case of a circular motion [1,2] and an infinitely long wiggler [8,9]. These two models represent a long enough region of the magnetic field, such that the transient effects due to the entrance to and exit from it can be neglected. In these two cases the relevant quantity is the energy loss per unit length (averaged over the wiggler period in the case of the wiggler). For circular motion the integration over s in (9) is omitted and the formula gives an energy loss per unit length. For an infinitely long wiggler the integration over s is replaced by averaging over one period of the wiggler.
As was first pointed out in [1], and also in subsequent studies, for short bunches, the main contribution to the integral (7) comes from the particles behind the observation point, that is s < s.
While Eqs. (6)-(9) are valid for arbitrary bunch length, in this paper, following [1], we will limit our analysis to such short bunches and replace the infinite upper limit in the integral over s by s: In many subsequent equations of this section this assumption can be easily omitted and, if needed, the original form (9) used instead of (10).

B. CSR wake and impedance
Instead of working with function ∆E(z) it is more convenient to introduce the radiation longitudinal wake w(z) and impedance Z(k). The wake w(z) of a point charge is defined by the following relation (see, e.g., [16]) where ζ = z − z . In this formula we do not assume that the wake is localized in front of or behind the particle-an assumption often used in the standard wakefield theory. The sign of the wake w is chosen so that a positive w corresponds to energy loss. The longitudinal impedance is defined by Following Ref. [17], we use here e −ikz because the coordinate z is measured in the direction of motion (in contrast to the classical wakes where z is often measured in the opposite direction).
Combining Eqs. (11) and (12) we obtain whereλ is the Fourier transform of the distribution function. Making the inverse Fourier transform of (13) we express Z through ∆E Substituting (10) into this equation, changing the integration variable from z to s = z + ct and carrying out the integration over t gives the following result: We see that the distribution functionλ is disappears from the definition of Z, as expected. Being a Fourier transform of the real function w (see Eq. (12)) the impedance has a property Z(−k) = Z * (k).
A useful formula for the total energy loss U of the bunch due to radiation can be obtained from Eq. (13),

III. DIVERGENCE OF FREE-SPACE IMPEDANCE AND NECESSITY OF SHIELDING
Eq. (16) gives a general formula for calculation of the impedance for arbitrary beam trajectory.
As we show in Section V, it can easily be applied to an infinitely long wiggler and a circular orbit (in the latter case the integration over s in (16) is dropped), and reproduces the known results.
Unfortunately, the integral over s diverges for the trajectories that begin and end as straight lines.
This statement will be proved in Appendix B for the case of a bending magnet; it also follows from the expression for the CSR wake derived in Ref. [6]. There is a simple physical mechanism behind this divergence: it is due to the edge radiation [18] of the beam at the entrance and the exit from the magnet. Indeed, the spectral energy at a given frequency ω of the edge radiation of a relativistic particle is proportional to ln γ and tends to infinity when γ → ∞. At the same time, the spectral energy loss of the beam due to radiation at this frequency is proportional to the real part of Z(ω/c), see Eq. (17); this explains the divergence of Z in the limit γ → ∞. In many practical cases, the circumstance that makes the energy of the edge radiation finite is the presence of metal walls of the vacuum chamber surrounding the orbit, or shielding.
The simplest model that takes into account the shielding and at the same time allows for analytical results consists of two parallel perfectly conducting plates with the orbit located in the middle as shown in Fig. 1. We will assume that the plates are located at y = ± 1 2 a with a being the full gap between the plates.
The derivation of ∆E(z) and Z(k) from the previous section can be easily generalized to include the boundary conditions at the metal plates. These conditions require zero tangential electric field on the surface of the plates and can be satisfied by introducing image charges and currents to the system [2]. With account of these image charges and currents, Eqs. (4) are replaced by Here index m marks the images with the charge density whereŷ is the unit vector in y direction and n 0 (r, t) is the density distribution of the "real" beam.
The normalized velocity of the m-th image is FIG. 1. Parallel plates located at y = ± 1 2 a and a plane orbit in the mid-plane shown by black. The coordinate system is chosen so that the orbit lies in the xz plane and the z-axis is directed along the tangent vector to In what follows, we consider plane orbits lying in the y = 0 plane. For such orbits β 0,y = 0 and Eqs. (20) are simplified, Substituting (19) and (21) into (18) and changing the integration variable r − maŷ → r we where cτ m (r, r ) = |r − r + maŷ|. Replacing Eqs. (4) by Eqs. (22) and repeating the derivation of the impedance Z(k) from the previous Section with the new expressions for the potentials, we obtain a generalization of Eq. (16) that includes the effect of shielding by parallel plates: where cτ m (s, s ) = |r 0 (s) − r 0 (s )| 2 + m 2 a 2 and we replaced β 0 by the original notation β. Our previous result (16) of the impedance in free space is contained in this formula as a summand with While Eq. (23) looks like a viable starting point for practical calculations, there are two difficulties associated with it. The first one is that the summation over m cannot be interchanged with the integration, because, as mentioned above, the integration in the term m = 0 diverges in the case of straight orbits. The second difficulty is due to a slow convergence of the sum over m with the subsequent summands changing sign. These two difficulties can be overcome through a transformation in which the summation over m is carried out. This transformation is described in Appendix A; it replaces (23) by the following formula, where H (1) 0 is the Hankel function of the first kind. We now make too simplifying assumptions. We first assume that that is the reduced wavelength = λ/2π that can be associated with the bunch length is much smaller than the gap a between the plates. With the sum over p rapidly converging, this allows us to treat π(2p + 1)/ka is a small parameter. Second, we assume that ckτ in the argument of the Hankel function in the region of integration that makes a dominant contribution to the integral is much greater than one. This typically means that or the reduced wavelength is much smaller than the characteristic bending radius in the system.
With these two assumptions we Taylor expand the square root in the argument of H (1) 0 in (24) and use the asymptotic expansion for the Hankel function in the limit of large argument, We then obtain One more approximation can be made if we assume that the trajectory is at a small angle with a straight line. We then choose a Cartesian coordinate system with coordinate z directed along this line and approximate cτ(s, s ) = |r 0 (s) − r 0 (s )| ≈ z − z in (28): Note that replacing cτ by its approximation z − z in two places of the integrand in (28) we do not do this in the last exponent. The reason for that is that, as we mentioned above, ckτ is a large number, and even small corrections to it can lead to a large phase error in the last exponential function. A more accurate approximation for this term will be used in subsequent sections.

IV. COMPUTER CODE CSRZ
To verify the validity of approximations that were made in the derivation of the radiation impedance, in the following sections of the paper we make a comparison of our analytical results with a computer code CSRZ that uses a numerical algorithm to find electromagnetic field of a relativistic bunch and calculate the longitudinal wake and impedance. The details of the algorithm implemented in the code can be found in Ref. [19]. Here we give its brief description.
The code solves the parabolic equation [20][21][22] in the frequency domain in a curvilinear coordinate system x, y, s, where E ⊥ = (E x , E y ) is the transverse electric field and k = ω/c is the wavenumber. The boundary conditions for the field correspond to a metal surface of a rectangular cross section with a given aspect ratio b/a (where a is the size of the rectangle along y and b is along x). The beam has transverse charge distribution en(x, y) that is independent of s. In calculations presented in this paper we used a bi-Gaussian transverse distribution with the rms sizes of a few tens of microns in the vertical and a few hundreds of microns in the horizontal directions. The radius of curvature of the reference orbit ρ(s) is allowed to arbitrary vary along s. Specifying different functions ρ(s) enables the code to simulate a broad range of practical devices, such as a single bending magnet, a series of bending magnets connected by straight chambers, or even an undulator or a wiggler.
With paraxial approximation [22], the longitudinal electric field is found to be where j s = enc is the current density. Then longitudinal radiation impedance is calculated by where (x c , y c ) denotes the center of the beam in the transverse plane and Q is the charge of the beam.
While the code calculates the impedance assuming a metallic vacuum chamber of rectangular cross section, our analytical theory deals with two parallel metal plates. To be able to do a comparison between the two approaches we set the vertical dimension of the vacuum chamber in the code equal to the gap between the plates. At the same time, to minimize the effect of the vertical walls of the chamber, we choose a large aspect ratio b/a. This positions the vertical walls far from the beam orbit and suppresses their effect on the impedance. Experimenting with various aspect ratios, we found that a good agreement with the parallel plates model can be achieved if the aspect ratio b/a 3. Below we indicate in the text the aspect ratio used in each particular simulation.

V. REPRODUCING KNOWN RESULTS
In this section we will show how some of the known analytical results for the CSR impedance can be easily obtained from the general formalism developed in the Section III.

A. Circular orbit
We first consider a circular orbit of radius ρ and calculate the CSR impedance Z per unit length.
The coordinate system and the orbit are shown in Fig. 2.
For large values of the wavenumber, k 1/ρ, the dominant contribution to the integrals (16) comes from distances much smaller then ρ, and we can use approximate formulas for the orbit: x 0 (z) = 1 2ρ z 2 , y 0 (z) = 0.
Within the same approximation, vector β is given by We now express τ and the factor 1 − β · β , as functions of z and z . Finally, integrating the relation for the arc length we obtain For unshielded CSR impedance (corresponding to the gap between the conducting plates a → ∞) we can use Eq. (16), in which, as discussed in Section II A, we drop the integration over s; this gives the impedance per unit length of the trajectory. We also replace integration over s by integration over z , ds ≈ dz and take into account that z < z which means that the wake acting on a given particle in the bunch is determined by the particles behind it. For τ in the denominator of (16) we use τ ≈ (z − z )/c, while more accurate expressions (35) and (38) are substituted into the exponent. The result is: where Γ is the gamma-function. Note that the main contribution to the integral comes from the distance z − z ∼ , with = (24ρ 2 /k) 1/3 ; this distance is interpreted as the formation length of the radiation with the wavelength 2π/k. Eq. (39) fully agrees with the wakefield first derived in [1] (and our derivation to some extent repeats the derivation in that paper).
It is also very easy to derive the shielded CSR impedance of a circular orbit between parallel conducting plates, and reproduce the result of Ref. [2]. For this we use Eq. (29) again dropping the integration over z to obtain the impedance per unit length, To improve the convergence of the integral we change the integration variable from z to t with t = e iπ/6 (k/24ρ 2 ) 1/3 (z − z ) which corresponds to the rotation of the integration path in the complex plane of the variable z − z . As a result we arrive at the expression for the impedance in the form first obtained in Ref. [2], where α = e −iπ/6 k 2/3 a 2 1/2 3 1/6 ρ 1/3 .
We see that the impedance, apart from a general scaling factor, depends on one dimensionless variable k 2/3 a/ρ 1/3 which can be interpreted as a ratio of a to the transverse coherence (or formaion) size of the radiation ⊥ ∼ ρ 1/3 /k 2/3 . Analysis shows that in the limit a ⊥ the shielded impedance (41) approaches the unshielded result (39). In the opposite limit, a ⊥ , the shielded impedance becomes much smaller that (39).

B. Infinitely long wiggler in free space
CSR wake of an infinitely long wiggler in free space was first calculated in Ref. [5]. The complicated general analytical expressions derived in that paper were somewhat simplified in Ref. [6] in the limit v = c and assuming the wiggler parameter K 1. It was then used in the study of the beam instability in damping rings in [23]. We will now show how the result of [6] can be straightforwardly obtained from the method developed in this work. The derivation below is much simpler than the approach used in Ref. [23].
Consider a long plane wiggler that is characterized by the wiggler parameter K 1 and period λ w . In this analysis we neglect the contribution to the impedance from the transient regions at the entrance to and the exit from the wiggler. The trajectory of a relativistic particle with the Lorentz factor γ in such a wiggler is given by with the velocity where k w = 2π/λ w , θ 0 = K/γ and we assume that θ 0 1. Note, that we take the limit γ → ∞ after we have introduced θ 0 ; the angle θ 0 is considered as a small, but finite number. Using the smallness of θ 0 it is easy to derive approximate expressions for all the factors that enter Eq. (16) as was done for a circular orbit in the previous section. We find (z < z) We now substitute these expressions into Eq. (16) and replace the integration over s and s by the integration over z and z using ds ≈ dz and ds = dz . We limit the integration over z by one wiggler period and divide the result by λ w ; this gives the impedance per unit length averaged over the undulator period. Finally, we replace the integration variable z by ζ = z − z . The result is 2 , where Analysis of this formula (which we do not present here) shows that this expression coincides with the result of Ref. [9]. Note that parameter q is equal to the ratio of the frequency ck to the fundamental radiation frequency of the wiggler ≈ 4ck w γ 2 /K 2 . 2 The requirement K 1 comes from the following consideration. If one does not take the limit v = c in (16), the exponential factor cτ(s, s ) should be replaced by vτ(s, s ). Tracing this term to Eq. (46) gives an addition phase term ikζ(1 − v/c) ≈ ikζ/2γ 2 in the exponential factor. To be able to neglect this term in comparison with ikθ 2 0 ζ/4 we should require θ 0 1/γ that is K 1.
The limiting case q 1 deserves a special attention-this is the case when the wavelength 2π/k is much longer the the wiggler fundamental wavelength of radiation. To calculate the real part of the impedance in this limit, Eq. (46) can be simplified taking into account that the integral converges at distances ζ ∼ /θ 2 0 1, so that we can neglect terms on the order of 1 and ∼ 1/k w ζ in the phase and replace cos 2 (k w z − k w ζ/2) by its averaged value 1 2 , Similarly, for the imaginary part we find These results are also in agreement with [9].

VI. IMPEDANCE OF A KINK ORBIT
We now proceed to the calculation of the radiation impedance for several types of orbits that have not been studied before in the literature.
One of the simplest cases is presented by a short dipole magnet that deflects the beam by angle is studied in the textbook [24]-it can be related to the low-frequency limit of the bremsstrahlung radiation. A more complicated case where the finite length of the magnet is taken into account is considered in the next Section.
We will use Eq. (29) assuming a gap a between the parallel conducting plates. It is clear that the integrand is not equal to zero only if z > 0 and at the same time z < 0, because otherwise 1 − β(z) · β(z ) = 0. Using the smallness of angle θ 0 , for z > 0 and z < 0, we find This gives the following expression for the impedance with ζ = z − z . Changing the order of integration in (51), and using the relation where t = ζkθ 2 0 /2 and erf(x) is the error function, we arrive at the following equation Using w = kaθ 0 we can write this equation in the following form where Z 0 = 4π/c is the impedance of free space. The integral on the right-hand side can be easily calculated numerically as a function of parameter w; the sum can also be calculated analytically where ψ (0) (x) = Γ (x)/Γ(x) is the polygamma function of order zero and Γ(x) is the gamma function. The plot of this function is shown in Fig. 4. As it turns out, the impedance (54) is purely real, Let us consider the limiting cases of large and small values of w. For w 1, assuming p ∼ 1, the main contribution to the integral comes from the region t ∼ w 1. In this region the error function can be replaced by its asymptotic values for t 1, erf(x) ≈ 2x/ √ π. We then obtain, where ζ(x) is the Riemann zeta function. In the opposite limit, w 1, from the asymptotic approximation of the polygamma function, it follows that Z(w)/Z 0 ∼ ln w.
Note that in the limit a → ∞ the impedance of a kink diverges because this limit corresponds to w → ∞. Hence, the radiation impedance of a kink is not defined in free space (which formally corresponds to a = ∞). This is of course a consequence of our assumption v = c.
The physical mechanism behind the radiation impedance of a kink can be attributed to the edge radiation of the beam, as discussed in Section III. Given that the minimal transverse wavenumber k ⊥ in y direction is equal to π/a, we conclude that the bulk of the edge radiation energy is localized at angles θ ∼ k ⊥ /k ∼ π/ak. There are two cones of radiation: the first one is localized around the initial direction of motion, the z axis, and the second one is around the deflected direction of motion at angle θ 0 . The regime w 1 corresponds to the overlapping of the edge radiation cones from the incoming and outgoing directions. The opposite regime, w 1, corresponds to the case when the cones are well separated in space.
Understanding the physical mechanism behind the impedance allows us to estimate the formation length l f of the radiation-the distance after which radiation decouples from the charge.
As usually l f is estimated at l f ∼ 1/kθ 2 where θ is the angular spread of the radiation; this gives l f ∼ a 2 k. Requiring the formation length to be larger than the reduces wavelength 1/k we obtain the condition when our analysis is correct, ak 1, which we have already formulated in Eq. (25).
In the opposite limit, one cannot truncate the integration over s by replacing the upper infinite limit by finite s, as was done in transition from (9) to (10).
In Fig. 5  in this regard it slightly deviates from the analytical model that predicts Im Z = 0. The simulated real part of the impedance agrees very well with the analytical one.

VII. BENDING MAGNET OF FINITE LENGTH WITH SHIELDING
We now consider a bending magnet of length L and bending radius ρ. The magnet occupies the region 0 < z < L. The orbit is located in the midplane of two shielding parallel plates with the gap a and consists of a straight line that enters the magnet at z = 0, a circular arc inside the magnet, and a straight line exiting the magnet; see Fig. 6. We assume that the bending angle θ 0 ≈ L/ρ is In Appendix B, we also show through a direct calculation that in free space (a = ∞) the contribution Z 4 diverges at the upper limit and the radiation impedance is infinite. This proves the statement made in Section III.
To demonstrate the capabilities of the analytical method, in Fig. 7, we benchmark our formulas L = 20 cm, ρ = 5 m, a = 2 cm, and the right pane shows the impedance for a magnet with L = 55 cm, ρ = 12.94 m, a = 2 cm. The second magnet has parameters of the magnets in the second bunch compressor of the LSLS-II free electron laser project [25]. In numerical calculations we used the aspect ratio 5 for the first case and 4 for the second one. The plots show an excellent agreement between the analytical and numerical results. A slight discrepancy at very large values of k at the second pane is likely due to inaccuracy associated with the parabolic equation approximation.

VIII. RADIATION IMPEDANCE OF A WIGGLER OF FINITE LENGTH
We now consider a plane wiggler that has N w periods (N w is an integer) with the period length λ w and the undulator parameter K 1. As in Section V B, we introduce θ 0 = K/γ 1 and k w = 2π/λ w . Particle orbits inside the wiggler, 0 < z < N w λ w , are given by the following equations outside of the wiggler we have x 0 (z) = y 0 (z) = 0. In comparison with Eqs. (43) and (44) we added inside the wiggler a constant shift θ 0 k −1 w to x to eliminate a jump in the first derivative of the orbit in the transition from the straight sections. The orbit is sketched in Fig. 8. Calculating the impedance with Eq. (29) we split the contributions to Z into three parts: first, Z 1 , when 0 < z, z < L w ; second, Z 2 , when −∞ < z < 0 and 0 < z < L w ; and third, Z 3 , corresponding to the integration 0 < z < L w and L w < z < ∞. The details of the calculations can be found in Appendix C with the resulting expression for the impedances given by Eqs. (C7), (C11) and (C15). 1.6 × 10 −2 . The gap is a = 2 cm and the aspect ratio b/a = 5. In another run we also used the aspect ratio b/a = 10-the result was the same as for b/a = 5. We find an excellent agreement between the numerical and analytical calculations in this case too.

IX. WIGGLER OF INFINITE LENGTH WITH SHIELDING
For a long wiggler with many periods one can use an approximation N w → ∞ and calculate the impedance averaged over one period, as it was done in Section V B for an infinitely long wiggler in free space. This calculation is carried out in Appendix D, with the impedance given by Eq. (D4).
where n is an odd and m is an even number, and a and b are the dimensions of the rectangular cross section. From the analysis of this equations if follows that the twelve spikes on the right plot of While impedances in the left and the right plots look very different, it is remarkable that at a short distance they correspond to the same wakefield. This is illustrated by Fig. 11 in which the blue and black lines show two wakefields, numerical and analytical, calculated from the impedances shown in Fig. 10 for a Gaussian bunch with rms length of 0.5 mm. We see that with both methods. In Fig. 11 we also show another numerically calculated wakefield, for an aspect ratio b/a = 16 (the dashed magenta line). As expected, this wake agrees much better with the analytical wake (the black line) of the parallel plates model.

X. SUMMARY
In this paper, we presented general expressions, Eqs. (24) and (29), for the radiation impedance of a relativistic beam moving on an arbitrary plane orbit between two parallel conducting plates.
In the derivation of these expressions we assumed that the transverse size of the beam is infinitely small and the particles move with v = c. Eq. (29) additionally assumes a short bunch and an orbit that does not deviate much from the direction of the z axis.
We showed that all known in the literature analytical results for the radiation impedance can be straightforwardly obtained from these expression. New analytical results were derived for the radiation impedance with shielding for the following orbits: a kink, a bending magnet, a wiggler of finite length, and an infinitely long wiggler. All our formulas are benchmarked agains numerical simulations with the CSRZ code.

XI. ACKNOWLEDGEMENTS
DZ would like to thank T. Agoh, K. Ohmi and K. Yokoya for helpful discussion during the development of CSRZ code. GS would like to thank K. Ohmi for the hospitality during his visits to KEK when this work has been carried out.
Appendix A: Calculation of infinite sum in Eq. (23) The infinite sum in Eq. (23) can be written as where q = cτ(s, s ) = |r 0 (s) − r 0 (s )|. We first introduce an infinite sum of the delta functions and add an integration over a continuous variable t, We then use the identity This can also be written as Using the integrals 3876.1 and 3876.2 from Ref. [28] we find that ∞ 0 cos(px) where H (1) 0 is the Hankel function of the first kind. Returning now to Eq. (A5) we finally obtain Substituting this expression for S (see Eq. (A1)) into (23) gives (24).
In the limit l 1 the factor l − ξ in (B3) is replaced by l, and the impedance becomes proportional to L. In this limit, the impedance per unit length Z 1 /L reduces to an expression that is equal to (41).
2. Contribution Z 2 from region z < 0 and L < z A simple geometrical analysis gives the following expressions for τ, s and s as functions of z and z , where ζ = z − z . We also have 1 − β(s) · β(s ) = 1 2 θ 2 0 . In these expressions we used the smallness of θ 0 and neglected terms of order higher than θ 2 0 .
With account of these relations Eq. (29) becomes We now change the integration variables from z and z to ξ = 1 2 kθ 2 0 (z − z ) and τ = 1 2 kθ 2 0 (z − L), respectively, to obtain where u = 1 2 kθ 2 0 L and q = (2p + 1) 2 π 2 /k 2 a 2 θ 2 0 . The internal integral can be expressed through the error function erf(x) and erfc(x) = 1 − erf(x) using the following identity which gives If the upper limit of integration over z in Eq. (B5) is not infinity by some finite value L + Z, it is easy to check that Eq. (B8) is replaced by the following one where u Z = 1 2 kZθ 2 0 .
3. Contribution Z 3 from region z < 0 and 0 < z < L In this region, the following expressions for τ, s, s and 1 − β · β are valid, Substituting them into (29) gives We now change the integration variables from from z and z to ξ = 1 2 kθ 2 0 (z − z ) and τ = 1 2 kθ 2 0 z, respectively, which gives where u = 1 2 kθ 2 0 L, d = 1 2 kθ 3 0 ρ and q = (2p + 1) 2 π 2 /k 2 a 2 θ 2 0 . We then use function F defined by (B7) to obtain 4. Contribution Z 4 from region 0 < z < L and L < z In this region we have, Using Eq. (29) we obtain Changing the integration variables from z and z to τ = 1 2 kθ 2 0 (L − z ) and ξ = 1 2 kθ 2 0 (z − z ) after simple transformations we obtain where u = 1 2 kθ 2 0 L, d = 1 2 kθ 3 0 ρ and q = (2p + 1) 2 π 2 /k 2 a 2 θ 2 0 . Again, using (B7) we reduce Z 4 to a one-dimensional integral If the upper limit of integration over z in Eq. (B15) is not infinity but some finite value L + Z, it is easy to check that Eq. (B17) is replaced by the following one where u Z = 1 2 kθ 2 0 Z. Using Eqs. (B14) we can now show that the contribution from this region does not converge if one uses Eq. (16) (that is the impedance for free space) instead of (29). Indeed, comparing these two expressions we see that, apart from a factor, (16) can be obtained from (29) by omitting the term −iζ(2p + 1) 2 π 2 /2ka 2 in the exponential function, replacing √ ζ → ζ in the denominator, and dropping the summation over p, In the limit z → ∞ the exponential function in the integrand tends to a constant value and the integral over z diverges logarithmically at the upper limit. Using dimensionless variables ξ = k w z, ν = k w ζ and replacing integration over z by integration over ζ we find where u = k w L w = 2πN w .