Longitudinal current profile reconstruction from wakefield response in plasmas and structures

Present-day and next-generation accelerators, particularly for applications in driving wakefield-based schemes, require longitudinal beam shaping and attendant longitudinal characterization for experimental optimization. Here we present a diagnostic method which reconstructs the longitudinal beam profile at the location of a wakefield-generating source. The methods presented derive the longitudinal profile of a charged particle beam solely from measurement of the time-resolved centroid energy change due to wakefield effects. The reconstruction technique is based on a deconvolution algorithm that is fully generalizable to any analytically or numerically calculable Green's function for the wakefield excitation mechanism. This method is shown to yield precise features in the longitudinal current distribution reconstruction. We demonstrate the accuracy and efficacy of this technique using simulations and experimental examples, in both plasmas and dielectric structures, and compare to the experimentally measured longitudinal beam parameters as available. The limits of resolution and applicability to relevant scenarios are also examined.


I. INTRODUCTION
Advanced acceleration techniques based on beamdriven wakefields have produced unprecedented results in terms of achievable gradients, exceeding 10's of GV/m in plasma [1] and the GV/m threshold in dielectrics [2]. Going beyond proof-of-concept, one must now look to optimization of the acceleration scheme. In this regard, maximizing the efficiency of energy transfer to the wakefield requires breaking the symmetry in the beam distribution by precision manipulation of its longitudinal profile [3]. The characterization of the longitudinal profile in real time is therefore critical for performance optimization in wakefield accelerators.
There are a myriad of techniques to measure the bunch profile of high brightness, picosecond-scale beams, including the use of deflecting cavities [4], electro-optic sampling [5], and interferometry of emitted radiation [6][7][8]. In this paper, we present a complimentary method to analyze the bunch profile from the beam-driven wakefields in a structure or plasma. This method can be employed in a wide range of conceivable wakefield interaction scenarios. Beyond acceleration, beam-driven wakefields are already used for phase space manipulations, such as beam compression [9], linear ramp shaping [10] or dechirping [11,12]. The information gleaned from diagnostics employing these techniques can yield detailed bunch profile information that is synergistic with the signal reconstruction method we present here.
The bunch profile reconstruction technique we discuss in this work is crucially important for advanced acceleration applications because, unlike other methods, it * roussel@ucla.edu provides the longitudinal beam profile at the immediate location of wakefield generation (Fig.1). Other diagnostic methods use beamline transport in an attempt to enhance the resolution obtained at the diagnostic location. However, it may not always be possible to carefully account for the effects of beamline elements on ps-scale features in the longitudinal profile during this transport. This creates challenges in obtaining accurate bunch information for wakefield optimization, because the beam longitudinal distribution evolves in a non-trivial way between the wakefield generating media and the available diagnostic.
For example, in the case of the emittance exchange [13] process, which produces a strong correlation between the longitudinal profile and the vertical location of beam particles, the longitudinal bunch shape is modified by path length differences due to strong focusing quadrupole fields encountered as the beam particles traverse the diagnostic line [14]. In this case, direct measurements of the longitudinal current profile far upstream or downstream of the wakefield accelerator are not reflective of the beam structure where wakefields are generated. While simulations can be used to provide an estimation of these effects, a direct measurement is often untenable, due to practical constraints (e.g. unwanted loss of beam particles and the information they carry) related to the wakefield device or diagnostic method used. The described reconstruction technique provides direct, single-shot, and real time longitudinal profile information with high precision, from the measured wakefield response. This method mitigates the above-described problems, providing a new path to robust and reliable beam profile measurements.
Furthermore, this method enhances the experimental accuracy obtained when employing a commonly encountered single shot longitudinal phase space diagnostic which consists of a transverse deflecting cavity and dipole spectrometer. In this diagnostic, a slit or pinhole is placed upstream of the deflecting cavity to reduce beam transverse emittances, and improve temporal and energy resolution. However, in cases where the transverse and longitudinal phase spaces are strongly correlated, the improvement in resolution is a trade-off with overall profile accuracy because it only samples the near-axis beam current.
Finally, application of the reconstruction method yields profiles with high degree of precision, and even sub-resolution features beyond the diagnostic threshold, particularly when the wake functions of the media are well-understood. In subsequent examples, it is shown that when these reconstructed profiles are employed interactively to obtain the experimental wakefield response, the predicted wakefield is accurately corroborated by the measured effects in the drive bunch and beyond, to the region left in its wake.

II. BACKGROUND
The longitudinal profile reconstruction technique discussed here is based on the signal deconvolution of timeresolved energy change measurements due to the wakefield. For a longitudinal wakefield, the drive beam initially experiences deceleration specific to the nature of the modes supported by the medium (dielectric, corrugated structure, or plasma). This manifests itself as a time-dependant change in beam energy, ∆U , which is proportional to the induced wake potential, W (s), which is defined as the convolution of the beam longitudinal distribution and the wake function, where ρ z (s) is the longitudinal beam distribution, and G z (s) is the Green's function representing the longitu-dinal wake function, or longitudinal wake potential of a point particle [15]. Eq.(1) is valid under the assumption of a pencil-like beam, where the transverse RMS beam size σ r is small compared to either the plasma wavelength or vacuum channel size, in the case of a wakefield (e.g. dielectric or metallic) structure. With known functions W (s) and G z (s), a practical method of solving for ρ z (s) in this integral equation involves the application of Laplace transformations. We define the forward and inverse Laplace transformations as [16,17] and where κ is a real number such that the line p = κ in the complex plane avoids singularities of F (p). According to the convolution theorem for the Laplace transformation [16], the Laplace image of the convolution integral with the variable upper limit is equal to the product of the Laplace images of the the functions under the integral Here * refers to a convolution, as shown in Eq.(1) After rearrangement, the charge density, ρ z (s), can be solved for by applying an inverse Laplace transformation on the quotient, as In practice, the wake potential, proportional to the timeresolved energy change, is measurable with high precision, and the Green's function is analytically calculable for many types of media.
In the generalized case when the Green's function G(s) is given numerically, as are the measured values of W (s), one can solve Eq.(1) approximately by replacing the convolution ρ z * G z with the quadrature formula on a given mesh s n = nh, with the mesh step h. The problem of Eq.(1) in this case is reduced to a linear system that should be solved for ρ z (s m ). Here, A m are coefficients of the chosen quadrature formula. At this point, Eq.(5) and Eq.(6) are completely general, and the details of the beam reconstruction are dependent on the specific Green's function.
Hence, a longitudinal beam diagnostic method can be devised by selection of the medium with a well-known longitudinal wake response, and measurement of the beam energy change due to the self-induced wakefield. In many applications, such as wakefield acceleration or dechirping, the manipulating medium already provides the necessary change in beam energy to make the concept viable. It is also notable that this method provides an independent measure of beam charge, for proper normalization of G z (s), with the integral ρ z (s)ds = Q, where Q is the total charge.
In the following sections of this work, we explore the implications of this technique with specific application to reconstructing the bunch profile using different examples. First, we examine the simple case of a single mode wake function, which can be used in certain (linear and quasi-linear) cases of plasma wakefield acceleration [18] and a limited scenario in dielectric wakefield acceleration. Then we extend the analysis to a more general approach that incorporates multiple modes, as well as arbitrary Green's functions, which are essential for cases where the single-mode description cannot capture the complete wake response. Experimentally-derived examples of reconstructed beam profiles are presented using time-resolved energy measurements from plasma and dielectric wakefield acceleration experiments at the Argonne Wakefield Accelerator [19]. Further, we examine the fidelity of the diagnostic scheme under different situations and in the presence of measurement uncertainties.

III. SINGLE MODE DESCRIPTION
In the first case, we consider a single mode Green's function where k 0 is the wave-number associated with the fundamental mode. We then apply Eq.(5) to derive the longitudinal profile ρ z (s). Consideration of this simple wake function is also relevant for cases such as a dielectric wakefield structure that can be optimized for a singlemode operation [20,21], or quasi-linear plasma wakefields [18]. The Laplace image of Eq. (7) is The longitudinal profile is then determinable from the inverse Laplace transformation as prescribed by Eq.(5) whereW (p) ≡ L [W (s)]. By using the linearity of the Laplace transformation, we can expand Eq.(9) to obtain We notice that and Here prime in W (s) denotes the total derivative. Without loss of generality we chose the origin in s such that W (0) = 0. Finally, with Eq.(11) and Eq.(12), Eq.(10) can be written as As a check, in the simple case of constant W (s), Eq.(13) represents a beam current density distribution that increases linearly, accompanied by a short current spike at the head of the beam. This is a familiar scenario found in theoretical treatments of beam-driven wakefield acceleration (e.g. [3,[22][23][24][25][26]).

A. Example: Plasma Wakefield Acceleration
We apply the technique of Eq. 13 to the measurement of bunches in a plasma wakefield accelerator as part of a longitudinally-shaped-beam experiment described in Ref. [18]. This experiment was performed in a regime where the wakes inside the beam are described by linear plasma wakefield theory, where the beam density n b is much smaller than the plasma density n p , the perturbation to the plasma density is given by [27,28].
Furthermore, in this experiment, the beam is much narrower than the plasma skin-depth k −1 p = c/ω p , and so the longitudinal wakefield is nearly constant across the radial extent of the beam. In the case of transition to the quasi-nonlinear regime, which is encountered in this experiment, the radial dependence of the longitudinal wake disappears completely. Thus the representative Green's function for an axially symmetric beam is given by the familiar form where k p is the characteristic plasma wave-number k p . From this, and an experimental measurement of the time dependent energy gain as a proxy for the average wakefield in the plasma, we reconstruct the longitudinal beam profile inside the plasma using Eq. (13). Some comments on the validity of this method as applied to the "quasi-nonlinear" case are warranted. The fully nonlinear plasma blowout is due to short (k p σ z < 1), high charge beams [29]. In contrast, in the experiments reported in Ref. [18], a long triangularly shaped beam is used to reach blowout conditions through an extended build-up of beam charge density over several plasma wavelengths. In this case, the maximum beam charge density is larger than the unperturbed plasma density. With this strong perturbation electrons are expelled from the beam channel, creating a rarefied "bubble" region around the beam where no plasma electrons are present. However, the transverse motion of the plasma electrons is non-relativistic due to the adiabatic excitation method, and the maximum bubble radius r m is small compared to the plasma skin-depth. As a result, the longitudinal near-axis wakefield inside the drive bunch is dominated by fields generated by the population of plasma electrons reacting to the effectively linear perturbation to the plasma density outside the bubble [30]. Thus the longitudinal wakefield response can be characterized as nearly linear, and can be approximated by a single mode Green's function, of the same longitudinal dependence as the linear regime limit.
This effect is demonstrated in Fig.2 through the use of the particle-in-cell code WARP [31]. In the simulation, a linearly ramped beam with parameters matching those in Ref. [18], and displayed in Table I, was injected into a uniform plasma with a density n 0 = 1.3 × 10 14 cm −3 (λ p = 3 mm). A longitudinal slice of the simulation is shown in Fig.2(a) along with the on-axis longitudinal wakefield. Inside the drive beam, the wakefield is linear in nature as evidenced by its sinusoidal dependence on s (see Fig.2(a) inset). In Fig. 2(b), the single mode reconstruction (Eq.(13)) technique is used to reconstruct the beam profile from the simulated wakefield. The reconstructed bunch profile shows excellent agreement with the simulated bunch profile, including reproduction of fine features such as the curvature at the beam head due to defocusing forces experienced by the beam before the bubble region fully develops.
It is important to stress that the reconstruction using a single mode Green's function is only accurate inside the drive beam for these experiments. In the beam region, the wakefield contribution is dominated by the quasi-linear plasma perturbation outside the bubble region. After the drive electron density suddenly drops to zero (in a distance < k −1 p ), the bubble collapses with an attendant nonlinear response, and the wakefield is no longer approximated by a single, linear mode response.
Demonstration of the reconstruction method for a quasi-nonlinear experimental case is plotted in Fig.3. In this experiment at the Argonne Wakefield Accelerator, an emittance exchange beamline [13] was used to shape the temporal profile of the beam into two different ramped profiles, one without any leading perturbation and one with a parabolic head perturbation [18]. Here, the time-dependent energy change of the drive and witness bunches was measured using a single-shot longitudinal phase space diagnostic (Fig. 1) [32]. The time-dependent wakefield is extracted from the observed beam energy change due to the wakefield interaction averaged over the 8 cm long plasma column [33]. The plasma wave-number, k p , is calculated by measuring the distance between adjacent minima in the wakefield in the drive region, which corresponds well to the plasma wavelength 2π/k p . We apply our reconstruction method to the region before the first wakefield maximum, where the simulations indicate that we are operating in the quasi-nonlinear regime. In the first case, Fig.3(a) shows a bunch with a near-linear ramp over roughly two plasma periods along with a short tail. The development of a tail is consistent with beamline dynamics simulations as a symptom of the emittance exchange shaping process and strong focusing before the plasma stage [14]. In Fig.3(b) we observe that the beam has a linear ramp with a parabolic head perturbation. This perturbation has been shown analytically to flatten the decelerating wakefield inside the drive [23] when the perturbation stretches over a plasma wavelength, which is consistent with our observations of the wakefield itself.

IV. MULTI-MODE DESCRIPTION
The single-mode reconstruction technique works for a specific subset of problems, and is extremely useful for a rapid profile determination. However, for cases where the Green's function of the wakefield device is precisely known, either analytically or through simulation, a general approach can be used to expose finer features in the beam reconstruction. This includes both dielectric [34] and corrugated metal structures and other media where the modal description is calculated numerically, such as the woodpile structure [21] considered recently, where the wake function of a single particle is describable by a series of modes. In this section, we extend the applicability of the reconstruction algorithm beyond the single-mode description.

A. Multi-mode Green's Function: Few-mode Case
When extending the analysis to a multi-mode structure, the Green's function of Eq.(7) can be replaced by a superposition of different mode contributions To find ρ z (s) according to the Eq. dp (18) needs to be evaluated. An analysis of the integrand unveils an essential singularity at the points p = ±i∞ as well as poles that correspond to the zeros of the polynomial in the denominator: The detailed evaluation of this integral is given in Appendix A.
Again taking the origin in s such that W (0) = 0 we arrive at the final expression for the charge density with the kernel K(s) given by Here p i are the roots of the Eq.(19) that are enclosed by the integration contour (see Appendix A) except for the root at p = 0. For the case of two and three modes, the residues in Eq.(21) can be evaluated analytically, as the equations for the poles Eq. (19) are quadratic and biquadratic equations respectively. It is still possible to evaluate the four-mode case but this involves Cardano formulas for the cubic equation. If the number of modes is greater then four, one should proceed with a numerical solution of Eq. (19) and substitution of the calculated zeros into the residue formula in Eq.(21).

B. Arbitrary Green's function
The evaluation of Eq. (1) by a Laplace transformation is preferable as the integrals are calculated exactly, thus removing any error due to approximations. However, in some cases when the Green's function is computed using numerical simulation, it may be more convenient to consider a numerical reconstruction scheme. In this case the Green's function and the wake potential W (s) are given on a mesh s n = nh where we assume that the mesh s n is uniform, with step size h. Then we rewrite Eq. (1) on this mesh as If we assume that h << 1 then the integral on the right hand side can be approximated using the quadrature formula. If we chose the mesh for the integral s m = mh (the same as the initial mesh s n ) then we write the integral as Here Q m are coefficients for the corresponding quadrature formula, G n,m = G z (s n −s m ) is the element of the square matrix G, and ρ m = ρ z (s m ) is the element of the unknown vector ρ. Introducing the notation W (s n ) ≡ W n and using Eq.(23), Eq.(22) becomes a square system of linear equations of the form The most appropriate quadrature formula for the equidistant mesh and the case here is the Trapezoidal rule with coefficients Q m given by The matrix G n,m has a triangular form, so all values of ρ m can be calculated using a simple recurrent formula that with Eq.(25) for k > 2 reads To initiate the calculations, we again assume W (0) = 0 as well as ρ z (0) = 0. This allows us to calculate ρ 1 as and ρ 2 as If we assume that the total number of mesh points is N and ρ 0 = ρ z (0) = 0 then the total charge can be calculated using the same trapezoidal rule as follows

C. Example: Dielectric wakefield acceleration
As a relevant example for the multi-mode case we consider the dielectric wakefield acceleration experiment described in Ref. [19]. In this experiment a triangular shaped bunch was generated using an emittance exchange beam line [13] and sent into a slab dielectric structure. A single shot wakefield measurement system [32] was utilized to map out the wakefield behind this triangular shaped driver. Parameters of the dielectric slabs as well as external experimental conditions of Ref. [19] are summarized in Table II. For a rectangular structure, the Green's function is represented by a double sum over x and y modes as [35] G I z (s) = Nx n1 Ny m=1 A n,m cos(k n,m s) (see Refs. [35][36][37]). In this specific case, to achieve high accuracy (< 0.1%) the Green's function has to include N x = 80 x-modes and N y = 50 y-modes, for a total of 4000 modes. First, we apply Eq. (20) to the experimentally measured wakefield inside the bunch. We then apply a low-pass filter to reduce numerical noise that comes from the derivative term. The filter parameter was ad- justed manually until the difference between convolution and measurement did not exceed 15%, and most numerical artifacts were eliminated. The bunch profile that resulted from the reconstruction performed in this manner is presented in Fig.4(b) and compared to the charge density measured with the LPS diagnostic from Ref. [19], Fig.4(a). The reconstruction provides significant new insights into the fine features of the charge density profile as well as clarifying adjustments to the bunch length and the shape of the tail.
Next, the Green's function was adjusted to account for the effects of the group velocity v g as G z (s) = For the modes that give dominant contribution to the wakefield, v g ≈ 0.8c on average. The attenuated Green's function was evaluated numerically ( Fig.5(a)) and then Eq.(26) with Eq. (27) and Eq.(28) were applied to restore the charge density profile. As before, numerical noise that comes from the discretization of the convolution integral was filtered out using low-pass filter. Filter parameters were optimized based on the same strategy as before, namely the reconstructed distribution was convoluted with the Green's function and compared with the initial measured wakefield inside the bunch; the filter parameter was then adjusted to reduce error between the convolution and the measurement. The largest errors occur at the bunch tail, however 15% accuracy is enough to remove the major part of the numerical noise while resolving the spike in the charge density closest to the tail. Further smoothing of the distribution and elimination of this spike results in a quite large 40-60 % difference between the measured value and the reverse convolution of the wake at these locations.
We also use the reconstruction technique to evaluate the total charge by applying Eq. (29). We calculate the total charge for the reconstructed profile to be Q = 1.8 nC. This number is in agreement with the measured charge of ∼ 2nC within the experimental errors, yielding an independent method to corroborate charge measurements.
It is important to note that profiles which are reconstructed using the two different approaches (Fig.4(b) and Fig.4(c)) match quite well. Slight differences at the tail of the distribution may be explained by slight differences in the Green's functions, as well as variation of the parameters of the low pass filter.
In Fig.5(b) we compare the theoretical prediction of the wakefield generated by a reconstructed bunch with the measurements of the Ref. [19]. To produce the theoretical wakefield (blue line in Fig.5(b)) the Green's function for this structure Fig.5(a) is numerically convoluted with the reconstructed bunch profile (Fig.4(a)). As expected, the measured wakefield inside the bunch (magenta line in Fig.5(b)) coincides with the theoretical prediction. This indicates that the reconstruction procedure has been successful and the bunch profile agrees with the measured wakefield. Furthermore, we observe that behind the bunch the calculated wakefield is in very close Figure 5. (a) Green's function for the structure that was used in Ref. [19] for measuring the wake field. (b) Reconstructed charge density (red, filled), measured wake field inside the driver (magenta), measured wake field behind the driver (green) and theoretical calculation of the full wake field based on a Green's function and reconstructed charge density (blue). agreement with experimental observations (green line in Fig.5(b)) from Ref. [19], providing further validation of this technique.

V. DISCUSSION
It is apparent from comparisons between the experimental and simulated wakefields that the reconstruction method accurately predicts the drive beam profile present during the wakefield interaction. Several practical issues must carefully be taken into account when applying these reconstruction algorithms in order to reduce error. The accuracy of the reconstruction relies not only on the measurement accuracy of the wakefield, but also on the physical validity of the Green's function used to describe the wakefield response. For example, in the plasma wakefield case, the plasma wave-number was estimated by measuring the separation between adjacent wakefield minima in the drive beam (as well as from independent measurements of the plasma density). Variations of the parameter k p in this case, changes the weighting between the derivative and integration terms in the Eq.(13), leading to greater variations in the tail of the reconstructed beam, where the integration term is typically dominant.
It is also important to consider that the single-mode reconstruction validity (Eq. (13)) is extendable to certain multi-mode cases as well. By inspecting Eq. (20) we conclude that if max|K(s)| given by Eq. The smoothing strategy for the low-pass filter that was applied in the example cases relies on a similar optimization method. The back-convolution of the filtered result is compared to the measured wakefield and the maximum modulus of the difference is kept below a certain threshold. This strategy shows the trade-off between smoothness of the reconstructed profile and accuracy of the reconstruction procedure.
The universal solution introduced in Section IV B has a built in error that is connected with the discretization Eq. (6) of the convolution integral Eq. (1). Oversampling of the measured data for the W (s) and subsequent filtering solves this problem, however analytical evaluation of Eq.(5) is preferable, as it does not produce additional errors and requires less aggressive filtering. This in turn enables finer resolution in certain scenarios.
Finally, if the transverse size of the beam is significant (close to the size of the vacuum gap of the structure or plasma skin-depth) then additional complicating considerations regarding transverse form-factor must be incorporated into the reconstruction procedure. This is critical for some linear PWFA experiments (as might be encountered at AWAKE [38], for example). It is also especially important in the multi-mode case as modal amplitudes have to be modified to account for the transverse beam shape and size.

VI. SUMMARY
In this work, we have suggested an innovative approach to determining the longitudinal charge distribution, based on deconvolution of measured longitudinal wakefield effects in a beam. The algorithm is generalizable to a wide variety of experimental scenarios and as such, is applicable to a variety of wakefield-based media (plasma, dielectric, corrugated, photonic and Bragg structures etc.). It permits, in these applications, reconstruction of the bunch profile with high-precision, reproducing fine features that may not be observable with other beam measurement methods. This technique has been successfully applied to reconstruct longitudinal charge distribution in the plasma wakefield acceleration experiment described in Ref. [18], and in the dielectric wakefield acceleration experiment described in Ref. [19]. It is important to emphasize that the methods presented, whether they are single-or multi-mode, yield excellent results for the asymmetric beam shapes of highest interest. For rapid diagnosis of such cases, particularly in the PWFA, the single-mode treatment works very well. Enhanced beam features with finer resolution may require the multi-mode approach, while the universal solution proposed here has some inherent numerical fluctuations that must be filtered to obtain robust results.
The technique developed here may be incorporated into the diagnostic suite employed at any facility that has longitudinal phase space measurement capability, such as at upcoming experimental efforts at SLAC FACET-II [39], where detailed bunch profile information at the wakefield interaction location is needed for effective operation. Further, the method is single-shot and may be utilized in real-time, leading to ready-made applications in optimization of the current profile using novel machine learning feedback loops. These mechanisms can be further augmented with other diagnostics to provide accurate predictions for optimizing bunch properties for beam-driven wakefield acceleration. Appendix A: Evaluation of the integral in Eq. (18) In this appendix we present a detailed evaluation of the inverse Laplace transformation for the multi-mode case. For convenience we reproduce the inverse Laplace integral Eq. (18): In the limit of p → ±i∞, the products in the numerator, as well as the product in the denominator, in the expression under the integral could be modified as The integral in the second term does not have an essential singularity anymore as it is canceled out.
To evaluate the integral in the Eq.(A1) first we apply convolution theorem for the Laplace transformation [16] in a form Therefore the integral in Eq.(A9) could be calculated using the residue theorem [16,17]. It is apparent that the second term under the integral in Eq.(A9) does not contribute to these residues, thus