{'fraction_non_alphanumeric': 0.03171449010412527, 'fraction_numerical': 0.0116048008902313, 'mean_word_length': 4.449112169770463, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Electric field of a 2D elliptical charge distribution inside a cylindrical conductor

Many applications in beam physics, particularly those concerning transverse beam dynamics, call for an approximate computation of the transverse electric field produced by the charge distribution of the beam, namely, the field components in the plane perpendicular to the beam motion. Mathematically, this approximation becomes exact in the limit of an infinitely long charge distribution that is also constant in the longitudinal direction. In practice, the approximation is a reasonable starting point in many cases. Examples include proton beams used in spallation neutron sources, or heavy-ion fusion ion beams, in which the characteristic length of variation of the charge density along the longitudinal direction is much larger than the transverse beam size. In this case the longitudinal component of the electric field is much smaller than the transverse, hence the field is effectively contained in the 2D transverse plane. Another example arises in the case of ultrarelativistic beams, for which the electric field is effectively squeezed into a 2D transverse ‘‘pancake’’ owing to the Lorentz contraction of the longitudinal component of the field. Furthermore, the approximation of an elliptical charge distribution, as defined in Sec. II below, is also a reasonable starting point for numerous beam dynamics problems both for lepton and hadron beams. A few recent examples can be found in Refs. [1–3]. In Ref. [4] we developed a formalism to compute the 2D electric field for elliptical charge distributions in free space. The formalism makes essential use of Cauchy’s theorem, and yields a simple and quite general formula for the field in complex form. In this article we extend the formalism to elliptical distributions contained inside a perfectly conducting circular cylinder by applying the method of images. Our formalism naturally yields the electric field itself E rather than the electric potential . The fundamental reason is that, in two dimensions, E has a dependence on distance r of the form E 1=r, which lends itself naturally to analysis via Cauchy’s theorem. On the other hand, the potential has a dependence on distance of the form lnr, which is much more complicated to deal with in this formalism. For this reason, our results are not directly applicable to Hamiltonian analysis, since this requires an expression for the potential. While the analytic solution of the problem addressed here is known [1–3], our formalism, we believe, has the advantage of simplicity, ease of generalization, direct applicability to particle tracking and, in our opinion, elegance. In Sec. II we recapitulate the results for free space and define our notation, which differs slightly from Ref. [4]. In Sec. III we define the image electric field produced by the conducting cylinder. We first establish a few properties valid for any charge distribution (not necessarily elliptical), and then obtain the explicit expression for the field for elliptical distributions. Section IV presents a few concrete examples, Sec. V contains a brief discussion concerning a generalization of the previous results to extended distributions, and the Appendix presents a few auxiliary results.


I. INTRODUCTION
Many applications in beam physics, particularly those concerning transverse beam dynamics, call for an approximate computation of the transverse electric field produced by the charge distribution of the beam, namely, the field components in the plane perpendicular to the beam motion. Mathematically, this approximation becomes exact in the limit of an infinitely long charge distribution that is also constant in the longitudinal direction. In practice, the approximation is a reasonable starting point in many cases. Examples include proton beams used in spallation neutron sources, or heavy-ion fusion ion beams, in which the characteristic length of variation of the charge density along the longitudinal direction is much larger than the transverse beam size. In this case the longitudinal component of the electric field is much smaller than the transverse, hence the field is effectively contained in the 2D transverse plane. Another example arises in the case of ultrarelativistic beams, for which the electric field is effectively squeezed into a 2D transverse ''pancake'' owing to the Lorentz contraction of the longitudinal component of the field. Furthermore, the approximation of an elliptical charge distribution, as defined in Sec. II below, is also a reasonable starting point for numerous beam dynamics problems both for lepton and hadron beams. A few recent examples can be found in Refs. [1][2][3].
In Ref. [4] we developed a formalism to compute the 2D electric field for elliptical charge distributions in free space. The formalism makes essential use of Cauchy's theorem, and yields a simple and quite general formula for the field in complex form. In this article we extend the formalism to elliptical distributions contained inside a perfectly conducting circular cylinder by applying the method of images.
Our formalism naturally yields the electric field itself E rather than the electric potential . The fundamental reason is that, in two dimensions, E has a dependence on distance r of the form E 1=r, which lends itself naturally to analysis via Cauchy's theorem. On the other hand, the potential has a dependence on distance of the form lnr, which is much more complicated to deal with in this formalism. For this reason, our results are not directly applicable to Hamiltonian analysis, since this requires an expression for the potential. While the analytic solution of the problem addressed here is known [1][2][3], our formalism, we believe, has the advantage of simplicity, ease of generalization, direct applicability to particle tracking and, in our opinion, elegance.
In Sec. II we recapitulate the results for free space and define our notation, which differs slightly from Ref. [4]. In Sec. III we define the image electric field produced by the conducting cylinder. We first establish a few properties valid for any charge distribution (not necessarily elliptical), and then obtain the explicit expression for the field for elliptical distributions. Section IV presents a few concrete examples, Sec. V contains a brief discussion concerning a generalization of the previous results to extended distributions, and the Appendix presents a few auxiliary results.

II. RECAP: FREE SPACE
We consider a static charge distribution that depends only on the two coordinates x and y and is infinitely long along the direction perpendicular to the x-y plane. We write the volumetric charge density in the somewhat unconventional form x; y, where is the line charge density (with dimensions of charge/length) of the distribution along the direction perpendicular to the x-y plane, and x; y, with dimensions of 1=area, is a real function normalized to unity, For this distribution, the electric field has only nonzero components in the x-y plane, The solution of Poisson's equation in free space, r Ex x= 0 , at the observation point x x; y, subject to the condition jExj ! 0 as jxj ! 1, is where z x iy, z 0 x 0 iy 0 , the bar denotes complex conjugation, and d 2 z 0 dx 0 dy 0 . We use the notation z 0 rather than the more explicit form x 0 ; y 0 for compactness of notation; it should always be kept in mind, however, that z 0 is a real function of x 0 and y 0 . Clearly, Ex and Ez contain exactly the same information. The essential advantage of Eq. (6) over Eq. (3), however, is that Eq. (6) allows the power of complex calculus, particularly Cauchy's theorem, to be brought to bear on the computation of the field [4].
We consider first elliptical charge distributions centered at x y 0, namely, those for which x; y depends on x and y only through the single dimensionless variable rather than on x and y separately. We consider in this article only distributions of finite extent, so that a and b represent the semiaxes of the ellipse representing the edge of the distribution. This implies that t is in the range 0 t 1 or, equivalently, t 0 for t > 1 (we assume, without any loss of generality that a b). This class of distributions can be expressed in the general form Defining the dimensionless densityt abt, which is normalized to unity, then the basic result of Ref. [4] is 1 where g 2 a 2 ÿ b 2 and x=a iy=b. Now if the elliptical 2D density is centered at the point x 0 ; y 0 , then therefore Eqs. (6) and (11) yield, upon a shift of integration variable z 0 ! z 0 z 0 , where z 0 x 0 iy 0 , T j ÿ 0 j 2 , and 0 x 0 =a iy 0 =b. We have appended the subscript ''d'' to E to emphasize that this is the ''direct'' field, as opposed to the image field produced by the cylindrical boundary, which we address below. The integral in Eq. (13) can be explicitly carried out for a significant class of interesting densitiest; several examples for z 0 0 are presented in Ref. [4]. For z 0 Þ 0, the expressions for E d z are obtained from those for z 0 0 by the simple replacement x; y ! x ÿ x 0 ; y ÿ y 0 .
The complex square root in Eqs. (11) and (13) is made well defined by a specific choice of the Riemann cut topology in the complex-z plane. Only one of the two possible topologies, namely, the one in which the two Riemann cuts emanating out of the foci of the ellipse are joined together, yields the physically correct results [4]; see also Appendix A 1.

A. Generic distributions
A point charge at location z inside a cylinder of radius R centered at the origin of the x-y plane has an image point charge of the same magnitude and opposite sign located at point z i outside the cylinder given by Therefore, the complex electric field at an observation point z inside the cylinder produced by a unit point charge at location z 0 , also inside the cylinder, is the Green's function [5] where z 0 i R 2 =z 0 , hence the field for a general distribution z contained inside the cylinder is given by The perfect-conductor boundary condition, namely that the vector E x ; E y must be perpendicular to the surface at the cylindrical boundary, E x ; E y x; y 0, can be succinctly expressed in the form It is sufficient to verify this property for Gz; z 0 for any fixed z 0 inside the cylinder and for any z on the boundary, as Eq. (16) is a simple superposition of such contributions with the real weight z 0 . Substituting Eq. (15) into the left-hand side of Eq. (17) readily yields Im zGz; z 0 0 upon setting z Re i for arbitrary real . Note that, although the integral in Eq. (16) is over the entire complex-z 0 plane, it is effectively confined to the region where z 0 is nonvanishing. An alternative expression for the field can be given by finding the image distribution i z and adding up the contributions to Ez from both z and i z as if they were two independent, physical charge distributions, Since the integral in Eq. (18) is over the entire complex-z 0 plane, the first term picks up only the contribution from the direct charge density z 0 , which is inside the cylinder, while the second term picks up only the contribution from the image charge density i z 0 , which is outside the cylinder. A straightforward change of integration variable in Eqs. (15) and (16) yields where z i and z are related by Eq. (14). Sample images of round and elliptical distributions are shown in Figs. 1 and 2; see also Appendix A 2. The complex image field E i z, namely, the second term in Eqs. (15) and (16), is an analytic function of z when z is inside the cylinder, as it should be according to the discussion in Sec. 1 of Ref. [4] (see also Appendix A 3). Indeed, substituting z 0 i R 2 =z 0 in Eq. (20) yields the Taylor expansion about the origin where M n is the nth moment of z normalized to R n , In particular, E i z has the curiously simple property valid for any z. The series (21) converges everywhere inside the cylinder, a fact that follows from standard convergence tests upon noticing that jM n j 1. In general, however, the radius of convergence is larger than R because E i z is analytic everywhere outside the image density i z. The radius of convergence of the series (21), therefore, is the distance of closest approach to the origin of the edge of i z.

B. Elliptical distributions
We can now compute the complex image field E i z at an observation point z inside the cylinder of radius R produced by the elliptical distribution (12) that is also wholly contained within the cylinder. Inserting z 0 i R 2 = z 0 and z i R 2 = z yields