Point-charge wakeﬁeld calculations from ﬁnite length bunch wake potentials

We present a new method to accurately calculate point-charge geometric wakeﬁelds and/or short-bunch wake potentials from wake potentials due to a much longer bunch, typically obtained with a time-domain electromagnetic (EM) ﬁeld solver. By allowing a long bunch in the EM solver, this method can signiﬁcantly reduce the need for computer resources as well as drastically shorten the computing time. After explaining the method we give examples of longitudinal wakeﬁeld calculations for several 2D accelerator structures of various complexity.


I. INTRODUCTION
Knowledge of wakefields, and in particular geometric wakefields, is critically important for understanding accelerator beam dynamics. While analytical solutions are known for a number of simple geometries, detailed wakefield calculations for realistic vacuum chamber components are typically done utilizing time-domain electromagnetic (EM) field solvers. These, by design, calculate the fields due to finite length bunches, and one is forced to use extremely fine meshes (small fraction of the bunch length) to compute wakes at small distances. This is where the wakes are usually dominated by singularities, so that a wake potential due a bunch of rms length scales as W ðzÞ / Àq , q > 0 [1,2]. Utilizing fine meshes has severe implications for computer memory requirements as well as calculation speed. For instance, the CPU time required to calculate a wake potential for a certain structure up to a fixed distance z max scales as a cube of inverse mesh size for 2D structures and as a fourth power for the 3D case [1].
While computing power has been growing dramatically over the past few decades, the demand for it for many wakefield calculation problems has been outpacing this growth. This is because the bunch length (or, often a more relevant parameter, the wavelength of bunch microstructures) in a significant fraction of accelerators has been rapidly shrinking, while the sizes of typical accelerator structures stayed relatively constant.
In this paper we propose a new method that allows us to accurately calculate geometric wakefields of arbitrarily short bunches (including point charge) without the need to use extremely short bunches (and thus fine meshes) in an EM solver. The method essentially consists of adding a (processed) long-bunch result from the EM solver to a singular analytical wakefield model. The bunch length to use in the EM solver must be shorter than a certain value, which we denote by g . As we explain later, this parameter can usually be found from simple geometric considerations. Since g is often much longer than the shortest length scale to which wakefields need to be resolved, applying this method results in significant savings of CPU time, and/or it allows one to overcome computer memory limitations. In addition, this method provides significant physics insights. So far, we found this method to work very well for a large number of 2D geometries, and we have no doubt it can be extended to a 3D case as well. The latter, however, is outside of the scope of this paper.
Preliminary results of this work were published in [3,4]. This paper is organized as follows. We start by introducing our method in Sec. II. In Secs. III, IV, V, and VI we discuss in detail the application of our method to progressively more complicated accelerator structures, starting with simple collimator-like (Sec. III) and cavitylike (Sec. IV) geometries, then adding linear tapering (Sec. V) as well as smooth transitions (Sec. VI). In Sec. VII we apply our method to a real-world accelerator structure, the NSLS-II harmonic cavity, and show how wakefield calculation by our method can be done a lot more efficiently than in the conventional approach. Finally, in Sec. VIII we summarize our findings and discuss possible future work.
Throughout the paper we concentrate on longitudinal wakefields, although, as we explain in the conclusion, the method is equally applicable to the transverse ones.
In all our examples we use EM code ECHO based on finite integration technique [5]. While we prefer ECHO due to its accuracy and computational efficiency, we emphasize that our method does not assume any particular code. In fact, the results of any code or an analytical procedure capable of accurately calculating finite length bunch wake potentials could be used by our method.

A. Main idea
To explain the main idea of our method we consider a particular example of the wake potential due to a short bunch passing through a 90-degree step-out, i.e., a step transition from a beam pipe of radius r min to that of radius r max . For the case r max ¼ 3r min ¼ 3 cm, the wake potentials W ðzÞ for several values of were calculated with ECHO, and they are plotted in Fig. 1, top. One can see that with decreasing , the wake potential inside the bunch attains larger negative values. [In our sign convention W ðzÞ < 0 corresponds to the energy loss of the particle with longitudinal coordinate z; z < 0 is the head of the bunch.] In the limit ! 0, the wake potential diverges as À1 . The singular part of this wake potential in the limit ! 0 was derived a long time ago by various authors (see, e.g., references listed in [2]), and is given by the following: where Z 0 is the free space impedance. Subtracting this from the wake potential we introduce the difference D ðzÞ ¼ W ðzÞ À W s ðzÞ: The plot of this function is shown in Fig. 1, bottom. One can see that at ! 0 the function approaches a welldefined limit shown by the solid black line. We denote this limit by D ðzÞ, i.e., This function has a discontinuity at z ¼ 0, while in the vicinity it can be approximated by D ðzÞ % ð þ zÞHðzÞ; (4) where HðzÞ is a unit step function which is equal to zero for negative z. The presence of the step function in this equation follows from the causality principle, as the wake must be zero in front of a point charge.
The crucial element of the method is that, for any geometry, the function D ðzÞ in (3) can be obtained from simulations running a relatively long bunch through the system. Indeed, if the rms bunch length used in the simulations is 0 , then well behind the bunch, z ) 0 , the function D 0 ðzÞ approaches D ðzÞ (except for certain locations, to be discussed later). In practice, the condition z ) 0 can be replaced by z > 3 0 , and hence in this region D ðzÞ can be identified from the calculated D 0 ðzÞ. In the region z 3 0 we can use the linearized representation (4) for D ðzÞ, so that D 0 ðzÞ can be obtained by a convolution with the beam density distribution ðzÞ (which we assume Gaussian), Comparing (5) with the simulated D 0 ðzÞ for z 3 0 , one can find the parameters and by any standard fitting procedure. An even simpler approach often used in this paper is to use a linear fit, D 0 ðzÞ ¼ þ z, in the region 3 0 z 4 0 to identify and [6]. For instance, this was done in Fig. 1, where we found these parameters by linearly fitting D 2 mm ð6 mm < z < 8 mmÞ.
Once the parameters and are found, the shortrange representation for the function D ðzÞ, given by (4), can be combined with the long-range one, D ðz > 3 0 Þ ¼ D 0 ðzÞ. Thus, we establish D ðzÞ for the whole region, z > 0. After D ðzÞ is found, the equation with W s ðzÞ defined by (1) in the limit ! 0 gives the point-charge wake.
For an arbitrary geometry, the particular form of the singular point-charge wake, W s ðzÞ, is determined by the high-frequency limit of the impedance. In most cases it can be found in the literature. In the following sections of the paper we will consider several such cases of practical interest and give references to the corresponding expressions for W s .
FIG. 1. Wake potentials (top) and functions D ðzÞ for a stepout geometry with r max ¼ 3r min ¼ 3 cm.
As presented above, the main idea of the method is fairly straightforward; however, we have so far omitted one important aspect. While Eq. (4) is always valid in some vicinity of the origin, z ¼ 0, for every geometry there exists a limiting length, which we denote by g , beyond which the linear representation of (4) cannot be extended. In most cases the point-charge wake has a discontinuity at z ¼ g or a singularity of its higher derivative with respect to z. For practical applications this means that in the process of finding and , one must use bunches of rms length 0 ( g . It also implies that a priori knowledge of g is critical for successfully applying our method. How to find this parameter is described next.
B. Determining the g parameter As is mentioned above, our method would only be effective if one can find g in advance, in order to correctly specify 0 for running the EM code. Sometimes one could simply guess g by performing several code runs with different values of to establish the upper bunch length limit below which D ðz > 3Þ stays relatively constant. However, such an approach never guarantees that the chosen 0 is short enough for all the wake features to be resolved. On the other hand, picking 0 too small results in unnecessarily long and memory-intensive calculations.
Fortunately, g can be effectively determined by simple analysis of the geometry and applying the principle of causality. This is best explained with an example. Consider a simple step-in geometry with a protrusion of characteristic dimensions Á s by Á r , each smaller than r min (here and below s denotes the longitudinal distance along a structure). Two variants of this geometry, as well as the reference case without protrusions, are depicted at the top of Fig. 2. Corresponding functions D ðzÞ are plotted at the bottom of the figure. Specifically, for geometries (a) and (c), D ðzÞ ¼ W ðzÞ, so ECHO wake potentials are plotted directly. For geometry (b), which includes a small step-out, we first subtract the corresponding W s , given by (1) with r max and r min replaced, respectively, by r min and r min À Á r .
To illustrate the convergence of the wake potentials to a point-charge wakefield, the curves for two different values of are shown for each geometry.
One can see that each D ðzÞ curve is slowly and monotonically varying, except for some specific locations. This is where the point-charge wakefield (with subtracted singular part, if any) is either discontinuous by itself, such as at the origin, or has a discontinuous derivative, such as at the locations marked with the arrows. For each geometry we define the parameter g as the z value of such a location that is closest to the origin.
Let us now determine g , starting with case (a). As seen in the figure the wakes for case (a), shown in red, exactly overlap with those for the structure without protrusions (brown traces) for all values of z smaller than Only at distances larger than g , the effect of the protrusion makes the wakes for case (a) to deviate from those for case (c). First they display a rising feature with characteristic length Á r (or, if shorter, 2Á s ), followed by other features seen in Fig. 2. Equation (7) follows from the causality principle. Consider an ultrarelativistic point-charge traveling on axis. Its pancake field, scattering at the innermost corner of the structure (labeled #1) at t ¼ 0, excites spherical wave fronts that can propagate at arbitrarily small angles with respect to the beam direction. Therefore they will eventually (at t ¼ 1) catch up with the charge, affecting Step-in geometry with a lateral (a), or a radial (b) protrusion and without protrusions (c); (bottom) corresponding functions D ðzÞ, calculated for r max ¼ 3r min ¼ 3 cm, and (a) the wake function for all values of z > 0. A similar scattering event also occurs at the inner-left corner of the protrusion (labeled #2), at t ¼ ÀÁ s =c. These wave fronts, however, cannot catch up with the charge, as they must first scatter at corner #1, thus acquiring a delay of g =c, where g is given by (7). For z > g , W ðzÞ includes the effect of both kinds of scattered wave fronts, resulting in a drastic change in its behavior at z ¼ g , which shows up in Fig. 2 as a ''kink'' in the wake potential.
Locations of subsequent kinks, labeled in Fig. 2, can be understood in the same manner. We emphasize, that while length scales smaller than g could exist in D ðzÞ at larger values of z, none of them can show up in the short-range wake, i.e., at z < g . This is simply because other kinds of scattering and reflection events must have longer delays. For instance, scatterings at corner #3 (and thus the parameter Á r ) do not contribute to g in this geometry, while they clearly affect the wake at longer distances.
Now we switch to case (b), i.e., a radial protrusion at the distance l 0 after the step-in. We observe that the wake is different from that of case (c) for all values of z, which is expected since the minimum cross section of the structure is reduced by the protrusion. Specifically, the wake includes a ''plateau'' of length then rises up to z ¼ 2Á r (or 2Á s , whichever is larger), and then falls down over the distance $2l 0 . Similar to case (a) these values follow directly from the causality principle. In fact, the first argument of the min function in (8) is completely equivalent to (7) after obvious parameter replacements. This is because the mechanism leading to g , specifically beam fields scattering at corner #2 and then at corner #1, is the same for both cases. However, geometry (b) also allows another scattering scenario, namely, beam fields scattered back at corner #3 and then reflected forward at corner #1. This mechanism defines the shortest range wake when Á s is small, leading to the second argument in the rhs of (8).
Similar to case (a), W ðz g Þ for case (b) can be obtained from a simpler geometry. In this case it is a step-in with extreme radii of r max and r min À Á r .
Finally, the geometry without protrusions [case (c)] has the g parameter equal to 2r min ¼ 2 cm, clearly visible in Fig. 2 (bottom, inset). This value is due to the waves scattered at corner #1 and then bouncing off a diametrically opposite corner of the structure.
Note that step-in geometry (c) must have exactly the same D ðzÞ as the step-out analyzed earlier in Fig. 1. There we succeeded in accurate modeling of short-bunch wakes from D 0 ¼2 mm ðzÞ (see dashed curves in Fig. 1, bottom) simply because we picked 0 ( g . Had we used much longer 0 , the results would obviously be way off. Having completed the analysis of particular geometries of Fig. 2, we are now in position to draw more general conclusions. Since the expressions (7) and (8) for g simply follow from the causality principle, the same analysis (leading to the same general conclusions) can be performed for arbitrary staircase geometry structures. It is important that to determine g we do not need to consider all the stairsteps in a structure, but rather just the ones that occur immediately near the minimum radius. There is a maximum of two of such steps, one on each side of the section with the minimum radius. Since each stairstep has one lateral and one radial dimension, and including the length of the minimum radius section as well as the value of 2r min , the total number of geometric parameters that could potentially define g for an arbitrarily complex staircase structure is 6. This is clearly a small enough set to analyze.
By order of magnitude, g is equal to the smallest parameter from this set, unless the ratio of the radial step size to the adjacent lateral step size is small. In this case g is simply equal to half of this radial step size multiplied by this ratio, which can be seen from (7) or (8) by expanding the square root. Thus, in this case g could be much smaller than the smallest length parameter in the set.
An important example where this occurs is the g parameter for a long cavity or a collimator, both of length g ) r min with r min < r max À r min , which we briefly discuss next. Since the derivation is very similar to Eq. (7) above, we simply illustrate it in Fig. 3 for the cavity case. We show a wave front that eventually catches up with the leading particle (i.e. no delay) in red, as well as a wave front with the smallest nonzero delay in green.
From elementary geometry it follows that For long accelerator structures this value may be quite small. We note that the cavity case was studied in detail in [7], where the locations of wake singularities, including the one given by (9), were pointed out.
Also obvious from the figure is that the short-range wake, W ðz g Þ, does not depend on the cavity geometry at large radii. This is simply because the bunch fields, scattered at large radii, can only catch up with the bunch particles that are more than g behind the leading particle. For instance, for fixed g and r min , all rectangular cavities with r max > 2r min must have identical short-range wake z g . Furthermore, if a cavity has a boundary, rðsÞ, that coincides with that pictured in Fig. 3 for rðsÞ < 2r min , but otherwise may be arbitrarily complex, it must still have the same W ðz g Þ. Therefore, identifying the parameter g often allows one to significantly simplify the geometry of any structure, and reduce it to an equivalent geometry with identical W ðz g Þ but much smaller volume. This can be a big help both for analytical (see, i.e., [8] for tapered structures) as well as for numerical wakefield studies.
To extend the analysis above to geometries that include smoothly varying radial boundaries we note that, in principle, any boundary point may scatter beam fields. However, for these scattered fields to result in qualitative changes in W ðzÞ behavior, the scattering locations must coincide with the special points of the boundary rðsÞ, being either its local minima points, or contain the discontinuities of rðsÞ or its derivatives. Therefore, the critical points of the radial boundary, closest to the minimum radius of the structure, must be considered as the candidates for defining the parameter g . Similar to staircase structures, where we only had to consider a maximum of two stairsteps, there could be a maximum of two such points with r > r min , one on each side of the section with the minimum radius.
Also, similar to staircase structures, for a particular critical point s 0 of the boundary to result in the parameter g for the entire structure, beam fields, scattered at s 0 , must be able to catch up with the beam with minimum nonzero delay, as compared to the delays of scattered wave fronts from other critical points. Thus, identifying s 0 , calculating the corresponding delay, and finally setting g equal to this delay times the speed of light, can be done by means of a simple ray-tracing analysis such as discussed above for the geometry of Fig. 2(a). Particular examples of g calculations for smoothly varying structures will be given later the paper.
In the next two sections we will illustrate in more detail how the techniques introduced in this section (determination of the g parameter, identifying and subtracting a singular wakefield model, and wake potential fit near the origin to determine the point-charge wakefield) apply to the cases of progressively complicated collimator-like and cavity-like geometries. In later sections we will include slowly tapered and smooth structures as well.

III. COLLIMATOR-LIKE GEOMETRY
For a collimator chamber that transitions from radius r max to radius r min and back, the point-charge wakefield and the wake potential due to a Gaussian bunch of rms length , are given, respectively, by where k opt ¼ ÀZ 0 c lnðr max =r min Þ=: Equations (11) and (12) are equivalent to (1). As already mentioned, Eqs. (10)- (12) were derived a long time ago by various authors. Recently it was shown [9] that this example is a particular case of the so-called optical regime, where the wakes of all collimator-like structures (including 3D) have the same z dependence as is shown above. Furthermore, in this asymptotic regime one can find exact impedances and wakefields of very complicated collimators (which amounts to calculating the value of geometry-dependent coefficient k opt , for which the recipe was given in [9]). This makes us believe that what we illustrate below for the axially symmetric case is applicable to 3D. Meanwhile through the rest of this section we assume that W s ðzÞ is given by (11) and (12). First, in Fig. 4, we present the calculations for the threestep collimator shown at the top. Specifically, we plot the function D ðzÞ defined in Eq. (2), i.e., the wake potential (calculated with ECHO) with the optical model subtracted. Clearly, the plots in Fig. 4 (middle) do not show any singular behavior as gets shorter. Furthermore, for the range of the bunch lengths shown, the traces basically overlap for most values of z, which confirms that D ðzÞ is weakly dependent on , i.e., it can serve as a good approximation for D ðzÞ.
In Fig. 4 (bottom) we plot the functions D ðzÞ at short range. As expected, they behave similar to the 1 þ erfð z ffiffi 2 p Þ function, i.e., sharply change near the origin, but, apart from that, they vary slowly up to z % g ¼ 10 1=2 À 1 % 2:16 cm, where they display a kink due to a discontinuous derivative.
According to the arguments of the previous section we should be able to determine the wakefield of an arbitrary short bunch, from the results of ECHO calculations performed with ( g . Indeed, the trace for D 0:5 mm ðzÞ (dashed magenta), reconstructed using Eq. (5) from ECHO results for the 0 ¼ 2 mm bunch, shows almost no difference with the direct ECHO calculation for the ¼ 0:5 mm bunch (solid blue). Also shown in Fig. 4 is a reconstructed point-charge function D ðzÞ (dashed black). At the origin it has a value of $0:48 V=pC implying that a short bunch loses this amount less energy than what is predicted by the optical model.
By design [see Eq. (5)] our reconstructed wake is such that D ðz > 3 0 ¼ 6 mmÞ ¼ D 0 ¼2 mm ðzÞ, therefore, for short bunches, this wake is not perfectly matching the true wake within a few 0 of z ¼ g . The same happens at other kink points (3.39 cm, 4.16 cm, etc.), where D ðzÞ has discontinuous derivatives. Note that around z ¼ g the values of the reconstructed and the directly calculated wakes are close; it is the derivative jump that gets smoothed out over a few 0 in the reconstructed wake. As long as we are not interested in the exact derivatives of the wakefield around these points [10], the short-bunch wake reconstruction algorithm described above clearly provides a very good accuracy everywhere.
If, for whatever reason, one needs to reconstruct the wakefield, so that its discontinuous derivative is accurately preserved arbitrarily close to the discontinuities, this could be accomplished by a slightly enhanced reconstruction procedure. Basically, after identifying the locations of all discontinuities (at z ¼ g ; ð1Þ g ; ð2Þ g ; . . . ) as described in Sec. II, we simply repeat the extrapolation procedure described above on both sides of each discontinuity. Of course, 0 has to be chosen to be much smaller than the minimum value of the set f g ; ð1Þ g À g ; ð2Þ g À ð1Þ g ; . . .g.
To further illustrate our method and the concept of equivalent geometry, we now consider the set of collimators plotted in Fig. 5, top. For clarity this set includes the already analyzed geometry (shown in red dash) which was first plotted in Fig. 4. All of these collimators have the same extreme radii, therefore they have identical W s ðzÞ. Furthermore, the short-range wakes for all of these collimators, W ðz g Þ, must be identical to each other. Figure 5 (bottom) confirms this statement by showing, in matching color, D 0:5 mm ðzÞ calculated with ECHO for each geometry, as well as the corresponding parameters g found from (8). Clearly, for z a few smaller than the minimum g , all D ðzÞ curves overlap. For the range 3 < z < g À 3, D ðzÞ is an almost linear, slightly sloping curve, with D ð0þÞ % 0:48 V=pC, for which a zoomed-in version was already plotted in Fig. 4. Of course, the wake reconstruction procedure described above can be applied to any one of these collimators.  Since all geometries in the set produce the same shortrange wake, they are, in this respect, equivalent to each other. Normally, however, the most important would be to identify the simplest equivalent geometry (later simply called ''equivalent geometry''), which in this case is the 90 collimator shown with the black dashed line. Note that not only this geometry has the smallest mesh volume but also, as it often happens, it has the largest g . So, if the goal is to model the short-range wake [i.e. find the and parameters in (4)], it is often beneficial to use the equivalent geometry, as it allows for longer 0 and faster calculations. While it is hardly the issue for the geometries in this set, we will see a very substantial gain from using the equivalent geometry in the final example of this paper in Sec. VII, which analyzes a fairly large real-life accelerator structure.
In these examples calculating g and identifying the equivalent geometry was fairly straightforward. The situation becomes somewhat more complicated for slowly tapered collimators with the tapering extending all the way to the minimum radius. This case will be discussed in Sec. V.

IV. CAVITY-LIKE GEOMETRY
For cavity-like structures the singular parts of the wakes are usually given by the diffraction model (i.e. [1,2]) where I AE1=4 ð s 2 4 Þ are the Bessel functions, and g is the cavity length. The minimum of the wake potential occurs at z % 0:76, and it diverges / À1=2 for short bunches.
We first consider a simple, g ¼ 1 cm long, cylindrical cavity of rectangular profile; the cavity and outer pipe radii are, respectively, r max ¼ 5 cm and r min ¼ 1 cm. ECHO-calculated wake potentials for this cavity are shown in Fig. 6. The parameter g ¼ 5 1=2 À 1 % 1:24 cm [which follows from (9) before expanding the square root] is clearly visible in the figure.
Assuming that the singular part of the wake potential, W s ðzÞ, is given by W d ðzÞ, defined by (14), and having established the value of g , we can easily reconstruct the short-range wakefields. Specifically, we pick 0 ¼ 200 m ( g , calculate the corresponding wake potential with ECHO, and then subtract the singular part to obtain D 0 ðzÞ. We then determine the parameters and of (4) and (5) by linearly fitting D 0 ðzÞ in the region 3 z= 0 4. [Alternatively, we could fit the region around the origin, jz= 0 j 3, with the function given in the rhs of (5). The fit results come out almost identical to those of the linear fitting.] The resulting fit parameters can now be used to reconstruct a short-range wake potential due to an arbitrary short bunch, including point charge. This is illustrated in Fig. 7 showing a perfect agreement between the wake potentials reconstructed as described from the 0 ¼ 200 m ECHO result, and the ones directly calculated by ECHO for ¼ 100 and 50 m.
The long-range wakefield reconstruction for this simple geometry requires, however, some further discussion. This is because, while subtracting the diffraction model (14) clearly eliminates the singularity at zero, it does not eliminate all the singularities of this wake. As is obvious from Fig. 6, singular peaks of the wake potential, also divergent / À1=2 , occur at multiples of 2g. Unlike the origin, particles around these locations gain energy.
We first point out that this case is somewhat academic, since the singularities at multiples of 2g are due to reflections of the diffracted wave at the cavity sidewalls. These singularities disappear for realistic cavities with smooth corners and/or nonparallel sidewalls [3]. Nevertheless, to find complete singular wake for this geometry, one could expand the diffraction model to analytically describe the wake potential at these locations, for instance by further developing the approach of [7]. An alternative approach, which also works effectively for more complicated geometries, is to fit the wake potential around these locations including the overall scale factor for the singular part among the fit parameters.
For instance, we can fit the wake potential around the first peak as where u ¼ z À 2g and , , , , and are the fit parameters. Such fitting, performed on W 0 ECHO ðzÞ with 0 ¼ 200 m in the range jz À 2gj= 0 3, was used to reconstruct the wake potentials due to 100 and 50 m bunches shown in Fig. 8. Clearly, the reconstruction algorithm works very well, allowing us to find short-bunch wake potentials, as well as singular and nonsingular parts of the point-charge wakefield. Applying this algorithm, one can quantify the wake behavior around any singular location, while away from them the point-charge wakefield can be simply set to W 0 ECHO ðzÞ, thus allowing for the wakefield reconstruction for arbitrary values of z.
Concluding this section, we note that occasionally one may encounter accelerator structures that have both collimator-like and cavity-like features. In some of these cases both the diffraction and the optical models need to be accounted for in the singular part of the wake potential W s ðzÞ. Fortunately, identifying these situations is straightforward, see for instance Fig. 9. Here, for the geometry shown in the blue dashed line, the minimum radius is defined by the middle iris, therefore W s ðzÞ is due to the optical model only and is given by (11). At short distances, the wake for this structure is the same as for the middle iris only, and the latter is the equivalent geometry for this case. On the contrary, for the geometry shown in solid green, r min is defined by the outer irises, so on top of the optical model one has to account for the diffraction model, Eq. (14), with g being the distance between the outer irises. In this case, the short-range wake, W ðz g Þ, is independent of the middle iris radius, and the equivalent geometry would have this iris replaced by a straight pipe of the same radius but of length g, leaving the rest of the structure unchanged.

V. GEOMETRY WITH GRADUAL LINEAR TAPERING
Examples considered so far presented untapered or sharply tapered structures. Since gradual tapering is widely used in accelerators to reduce wakefields, we present here a separate consideration on how to apply our method to slowly tapered structures.
We rely on new analytical results for short bunch wakes due to slowly tapered structures that were published elsewhere [8]. For the purposes of this paper we only need a few findings summarized below.
Any collimator-like structure which contains a small angle, ( 1, linear taper of length L, directly adjacent to its minimal radius r min , has a roughly constant D ðzÞ that extends from z ¼ 0 to z ¼ g taper , where taper g ¼ minð 1 2 L 2 ; 4r min Þ: The same expression applies to a tapered step geometry. A similar parameter for a cavity-like structure that is symmetrically tapered on both sides with linear tapers of length L each is given by where g ! 2L denotes the total cavity length (tapered and untapered parts included). It is worth noting that, unless one is dealing with a rare case of a very large cross-sectional variation, it holds that 1 2 L 2 ( 4r min , so usually the parameter that appears in (16) and (17) is simply g taper ¼ 1 2 L 2 . We also note that Eqs. (16) and (17) [as well as upcoming Eq. (18)] follow [8] from causality arguments similar to those presented in Sec. II of this paper.
To illustrate how this applies to a linearly tapered geometry, we consider the case shown in Fig. 10, top. The geometry is the same as the cavity used for Fig. 6, except for small-angle tapers symmetrically added to the sides.
With the help of (17) we conclude that 0 ( g cavity % 439 m should be adequate to reconstruct a wake of an arbitrarily short bunch. Indeed, taking 0 ¼ 50 m, and applying our usual reconstruction procedure, we can obtain, for instance, the wake potential due to a 0 ¼ 20 m bunch (shown in cyan dash) which is very close to the one directly calculated with ECHO (solid red). Similarly we can reconstruct the point-charge wake (black dash).
The point-charge wake at the origin for this geometry can be found analytically [8]; the value from our reconstruction procedure comes out very close. Note, however, that it was important to use a short enough bunch, so it was necessary to first correctly determine the value for the parameter g . Had we, instead of Eq. (17), incorrectly used Eq. (9) (which in this case describes the location of the wake feature much further away from the origin, at z % 1:89 mm), we would have ended up with too long of a 0 . Clearly, accurate reconstruction of the short-range wake for this geometry from, for instance, D 200 m ðzÞ (solid blue) is impossible.

VI. GEOMETRY WITH SMOOTH TAPERING
Let us consider a smooth structure that includes a nonlinear transition of length L such that the first derivative of the boundary, r 0 ðsÞ, is matched to zero at the minimum cross section (we call this ''smooth'' tapering). In the practically important case of a convex transition boundary, r 00 ðsÞ > 0, the g parameter is simply the difference between the arc length of the transition and L, where s 0 denotes the start of the transition. It is usually assumed that the tapering near the minimum cross section can be approximated by a quadratic polynomial. In these cases the singular part of the wakefield is given by [8] where is a geometry-dependent coefficient. For instance, for a smooth taper-in, where the second derivative of the nonlinear radial boundary, r 00 , is taken at the transition to the minimum cross section. After multiplying by 2, the same expression applies to a long symmetrically tapered collimator [8]. For other geometries with smooth tapering the coefficient could be found by fitting. The wake potential of a Gaussian bunch that follows from Eq. (19) can be expressed, for instance, in terms of the confluent hypergeometric function of the first kind (denoted 1 F 1 below) by where q ¼ À1 2 À3=2 Àð 1 6 ÞÀð 1 3 Þ; and ÀðÁ Á ÁÞ stands for the gamma function.
As an example of a smooth geometry, we consider a g ¼ 5 cm long collimator with r max ¼ 1:5 mm, r min ¼ 1 mm, which is symmetrically tapered over the distance L ¼ 1 cm with a parabola as shown in Fig. 11 (top). Applying (18) we obtain g % 16:6 m. This value, as well as the location of the next prominent feature of the wake at z ¼ 40 m [as predicted by (9)], are clearly visible in Fig. 11 (bottom). Also obvious in this figure is that the wake potential with the optical model subtracted remains singular at the origin. This remaining singularity is due to smooth tapering.
Short-bunch wakefield reconstruction for this geometry can be performed in exactly the same manner as for the cases described earlier. The only difference is that we must account both for the optical model singularity, as well as the one due to (smooth) parabolic transitions, by setting where the 2nd term is given by (21) with the coefficient ¼ 42:6 V cm 1=3 =pC given by (20) multiplied by 2. Taking 0 ¼ 2m ( g , we subtract (25) from W 2 m ECHO and then use (5) to fit the remainder, D 2 m ðzÞ, and thus determine the parameters and . Inserted in (4) they provide us with a model of nonsingular part of the pointcharge wakefield, D ðz < 3 0 Þ. At longer distances, D ðzÞ can be set to D 0 ðzÞ. Short-range wake potentials due to ¼ 1 and 0:5 m bunches, reconstructed in this manner from W 2 m ECHO , are plotted in Fig. 11 (bottom), showing perfect agreement with the direct ECHO calculations.

VII. A PRACTICAL EXAMPLE: NSLS-II HARMONIC CAVITY
Our final example illustrates the calculations of a short bunch wake for a dual-cell passive 3rd harmonic cavity to be used in the NSLS-II light source presently under construction at Brookhaven National Laboratory. A detailed description of this cavity can be found in [11,12]. The cavity geometry is shown in Fig. 12, top.
While the NSLS-II bunch length is expected to be on the order of a few mm, recent microwave instability simulations [13] have shown that for accurate modeling of this effect it is necessary to have a point-charge wake, or, at least, a ''pseudo-Green's function,'' equal to the wake potential due to a 50 m rms or shorter bunch. Furthermore, to arrive at this conclusion the authors of [13] had to estimate the instability behavior from a wake potential due to a 10 m rms bunch. Direct calculation of such a wake potential is extremely time consuming and a memory-demanding task for most accelerator components. In particular this is true for the harmonic cavity, which, while azimuthally symmetric, has dimensions more than 3 orders of magnitude higher than the 10 m bunch length.
For instance, using default ECHO mesh size, 0 =5, it takes about 480 hours of Intel(R) Xeon(R) 5570@2.93 GHz processor CPU time to calculate the harmonic cavity wake potential W 10 m ðzÞ to z max ¼ 1 cm. While running, this task occupies about 11 GB of memory. As is shown below, our method allows us to find W 10 m ðzÞ for this structure orders of magnitude faster and more efficiently, while in addition providing point-charge wakefield.
For the geometry shown in Fig. 12, the parameter g (that corresponds to the beam-field first scattered by an outer iris and then by the middle iris) follows from (8), where Ár iÀi ¼ 0:5 cm is the radial difference between an outer iris and the middle iris, and Ás iÀi ¼ 10:3 cm is the distance between them. Figure 12 (bottom) shows longrange wake potentials for this structure in solid color traces. As expected, for z > g they basically overlap. This allows us to reconstruct the point-charge wakefield W ðz > g Þ from the wake potential due to ¼ 50 m, or even longer bunch, depending on the desired accuracy at places like the valley at z % 0:25 mm or the peak at z % 0:8 cm.
As we will show below, this 50 m bunch length is well suitable for finding the short-range wakefield as well. Thus, for the goal of finding W 10 m ðzÞ our method reduces the calculation time a factor of 5 3 , bringing it down (on our computer hardware) to roughly four hours. Simultaneously, memory consumption drops by about a factor of 25.
Also plotted in Fig. 12 (top, black dots) is the equivalent geometry for calculating short-range wake potentials. The equivalent geometry coincides with the complete dual-cell cavity geometry only at the central part of the middle iris (the radial extent of this part is Ár iÀi ¼ 0:5 cm); at larger radii it continues as a 90 collimator. Wake potentials due to this geometry are plotted in Fig. 12 (bottom) in black dots. They illustrate (this is especially clear in the inset) that the equivalent geometry has exactly the same point-charge wakefield up to z ¼ g as the dual-cell cavity geometry. On the other hand, the equivalent geometry is much simpler and it has about a factor of 47 smaller mesh volume. Additionally, the wakes for this geometry do not have any special features at z ¼ g , because the relevant parameter for the equivalent geometry is much larger, g eq % 2:24 mm, as given by (18). Therefore, in contrast to the wake potentials for the entire dual-cell cavity, these wake potentials very closely approximate the point-charge wakefield in the left vicinity of z ¼ g , and we can take advantage of this.
Let us now describe how to find the short-range wakefield at distances z g . Near the origin this wake is dominated by a singularity due to the optical model that manifests itself as (truncated) dips in Fig. 12. The optical (as opposed to the diffraction) model singularity is present due to the middle iris being the defining aperture, see Fig. 9 and the relevant discussion above. The second wakefield singularity for this structure, which clearly shows up in Fig. 12 in the form of peaks close to z ¼ 0, is due to a smooth transitioning at the center of the middle iris. This singular wake is given by (21) with an unknown coefficient , which can be found by fitting.
As mentioned above, it is beneficial (although not required) to make use of the equivalent geometry, since it allows us to relax the usual 0 ( g requirement, and, if needed for higher accuracy, use a smaller mesh step size permitted by a much smaller total mesh volume. Thus, we run ECHO code twice, first for the complete cavity geometry up to the maximum value z max needed, to set The second run is performed for the equivalent geometry, up to z ¼ 5 0 , to find the short-range wake. For the same mesh step size the second run has almost no affect on the total computation time. Specifically, taking 0 ¼ 50 m, we calculated the wake potential for the complete cavity (the red curve in Fig. 12) as well as the short-range wake for the equivalent geometry, W 0 ECHO eq ðz 5 0 Þ. We then subtracted the optical model from the latter, and fitted the remainder as follows: W 0 ECHO eq ðzÞ À W 0 opt ðzÞ where , , are the fit parameters and the function f was defined in (22)-(24). The fit was performed over the interval jz= 0 j < 5, however, we found the results to be fairly insensitive to the interval boundaries. Fit parameters, found in this manner, when substituted into (19) and (4) define [together with (10)] both the singular and nonsingular parts of the point-charge wakefield. As mentioned above, at distances exceeding g the latter can be simply set to W 50 m ECHO ðzÞ.
Using the fit results we can now replace 0 in (28) with a shorter value of and reconstruct the short-range wake potential, W ðz g À 3Þ, due to an arbitrary short bunch. A comparison between the direct ECHO calculation for ¼ 5, 10, and 20 m and the results of our method with 0 ¼ 50 m are plotted in Fig. 13, showing perfect agreement.
We have also performed the same short-range wake reconstruction procedure from a longer, 0 ¼ 200 m, bunch. The results, while obtained much faster, are virtually indistinguishable from the solid curves shown in Fig. 13. This is expected because the condition 0 ( g eq is well met for this bunch length as well. The original choice for a shorter, 0 ¼ 50 m bunch, was motivated solely by the reconstruction accuracy for the long-range wake.
To summarize, applying our method we found very short bunch wake potentials for a fairly complicated and practically important accelerator structure. These wake potentials were reconstructed from ECHO calculations performed with a much longer, 0 ¼ 50 m bunch, which therefore required much less CPU time. For instance, for a ¼ 10 m bunch, we gained a factor of 5 3 . On top of that, our method provided a point-charge wakefield model for this structure.

VIII. CONCLUSION
We described a new method that allows us to accurately obtain wakefields of short bunches by adding a long-bunch result from an EM solver and a singular analytical wake model. We showed that this method provides great savings in computing time required to calculate wake potentials due to very short bunches. It also resolves an important practical question, as to how short of a bunch one needs to use in an EM solver, so that shortening this bunch further would not result in any new information about the wake. Our method also solves a fundamental problem of calculating the wakefield due to a point charge, providing significant analytical insights. For instance, one could often greatly simplify the geometry and reduce the accelerator structure volume while maintaining an identical shortrange wake, thus clearly separating geometric features that contribute to it.
The key to applying this method is being able to identify the appropriate singular wake model, as well as the parameter g for a particular geometry.
Identifying singular wake models for any geometry was shown to be straightforward. Usually, these are well-known optical and diffraction models, or their combination. For smoothly tapered structures, a more recently derived model, Eq. (19), has to be included as well. In some cases the singular wake model is only available up to an unknown scale factor, which, however, could be easily determined by fitting.
Similarly, we showed that identifying parameter g is usually quite simple. In most cases, including some relatively complex structures analyzed in this paper, one needs little more than a simple ray tracing and a causality principle. It is conceivable that there exist some very complicated 3D geometries for which ray tracing by hand to find g could be difficult, however any simple ray-tracing code should easily accomplish such a task. In addition, we point out that the problem of finding g is essentially equivalent to the well-studied mathematical problem of finding the shortest distance between the two points in the vicinity of a unpenetrable object with known boundaries (see i.e. [14] for a nonmathematical description or any book on convex optimization for solution algorithms).
Finally, while we focused here on the longitudinal wake, our method applies to the transverse wake basically without any changes. This is because analytical singular wake models are as easily available for the transverse plane, while the procedure for finding the parameter g remains exactly the same.