Self-mapping the longitudinal field structure of a nonlinear plasma accelerator cavity

The preservation of emittance of the accelerating beam is the next challenge for plasma-based accelerators envisioned for future light sources and colliders. The field structure of a highly nonlinear plasma wake is potentially suitable for this purpose but has not been yet measured. Here we show that the longitudinal variation of the fields in a nonlinear plasma wakefield accelerator cavity produced by a relativistic electron bunch can be mapped using the bunch itself as a probe. We find that, for much of the cavity that is devoid of plasma electrons, the transverse force is constant longitudinally to within ±3% (r.m.s.). Moreover, comparison of experimental data and simulations has resulted in mapping of the longitudinal electric field of the unloaded wake up to 83 GV m−1 to a similar degree of accuracy. These results bode well for high-gradient, high-efficiency acceleration of electron bunches while preserving their emittance in such a cavity.

A dense, ultra-relativistic electron bunch propagating through an uniform plasma can produce a highly nonlinear wake that can be employed for accelerating a second, trailing bunch in a scheme known as the plasma wakefield accelerator (PWFA). Recent work has shown that a PWFA cavity (the wake) can accelerate a low-energy-spread electron bunch containing a significant charge at both high gradients and high-energy extraction efficiency 1 -necessary conditions for making future particle accelerators both compact and less expensive. In addition to this, the next important issues that must be addressed are the generation 2,3 , acceleration 4 and extraction 5 of ultra-low emittance bunches from plasma accelerators. Such high quality bunches are ultimately essential for obtaining extremely bright beams for future light sources 6 and high luminosities for future particle colliders 7 .
Here we demonstrate that a highly nonlinear, three-dimensional (3D) PWFA cavity has the internal field structure needed to accelerate electrons with little emittance growth. We do this by analysing, on a single-shot basis, the observed transverse (r) oscillations of the longitudinal (x ¼ ct À z) electron-bunch 'slices' as they gain or lose energy and comparing these measurements with theory and particle simulations. We find that, for much of the PWFA cavity that is devoid of plasma electrons 8 , the transverse force F r ¼ e(E r À B y ) is uniform with x to within ±3% root mean square (r.m.s.). Here, E r is the radial electric field and B y is the azimuthal magnetic field. In this case, as a consequence of the well-known Panofsky-Wenzel (P-W) theorem in accelerator physics [9][10][11] , q x F r ¼ q r F z ¼ 0 to this degree of uncertainty. Furthermore, we have accurately mapped the longitudinal electric field E z (x) of the wake. Precise knowledge of this field/force structure is essential for determining the optimal shape and placement of the trailing bunch to load the wake so as to maximize the energy extraction efficiency 12 while retaining the narrow energy spread with little emittance growth; a major challenge for plasma accelerators. We note that beam loading modifies the longitudinal field structure of wake and may lead to a growth of head-to-tail instabilities 13,14 .
Unlike the traditional metallic accelerating cavities powered by radio frequency waves, plasma wakefields are highly transient (Bfew ps) and microscopic (B100 mm) structures that propagate along with the drive pulse at the speed of light 15 . Spectral interferometry 16 and shadowgraphy 17,18 have previously been used to give information about the shape, wavelength, lifetime and radius of the nonlinear plasma wakes produced by intense laser pulses. However, no detailed information about the field structure within the primary accelerating cavity has been obtained in these studies.
The P-W theorem for plasma wakefields is just a statement of the relationship between q x F r and q r F z . It can be readily derived (assuming stationary ions and under the quasi-static approximation) using the pseudo-potential C ¼ (j-(v f /c)A z ), where A z is the z-component of the vector potential and j is the scalar potential. For a wake with phase velocity v f ¼ c, the longitudinal and transverse forces on the relativistic particle in the wake are given by F z ¼ À eq z C and F > ¼ À er > C ¼ À e(E r À B y ). It therefore follows that r > F z ¼ q x F > which is the P-W theorem for both linear and nonlinear wakes. In other words, if one can measure the longitudinal variation of the focusing force, one can deduce the transverse variation of the accelerating/decelerating force or vice versa. For the special case of a fully blown-out wake that is azimuthally symmetric, Gauss' law gives F ? ¼ F r ¼ À 2pe 2 n p r so that q x F > ¼ 0, whence q x F r ¼ q r F z ¼ 0. Here n p is the ion density corresponding to the plasma density. Such a wake, where F r is linear in r but independent of x, has the necessary field structure for accelerating an electron bunch without any emittance growth 19 . We find that, for much of the PWFA cavity that is devoid of plasma electrons, the transverse force is indeed constant longitudinally to within ± 3% (r.m.s.). Moreover, comparison of experimental data and simulations has resulted in mapping of the longitudinal electric field of the unloaded wake up to 83 GV m À 1 to a similar degree of accuracy.

Results
Field structure of the cavity from computer simulations. Particle-in-cell code 20,21 simulations (Fig. 1a,b) show the distribution of F z and F r in the (x, x) plane at y ¼ 0, respectively (see Methods for simulation details). The horizontal lines indicate the r-locations for the lineouts of these forces that are plotted in Fig. 1c. Similarly, the vertical lines in Fig. 1a,b indicate the x-locations of the lineouts of these forces shown in Fig. 1d. It can be seen that, in the blow-out regime of the PWFA (x]0 here) F r is constant with x (dashed curve in Fig. 1c) and varies linearly with the transverse coordinate r within    wake as seen by the F r lineouts at k p x ¼ 0 and 7 (red curves in Fig. 1d). To preserve the emittance of a trailing bunch, it must be placed in the region where F r is linear; that is, where the motions of particles with a given energy but different transverse positions are correlated 19 . Furthermore, the blue curves in Fig. 1d, show that F z is uniform in r in the blow-out region, changing from decelerating at k p x ¼ 0 to accelerating at k p x ¼ 7, allowing all the particles in a particular longitudinal slice to lose or gain energy at the same rate regardless of their transverse position. In this paper, we present single-shot experimental results that give quantifiable information about the longitudinal field/force distribution within the highly nonlinear wake that are consistent with predictions of the above simulations.
Experimental overview. In the experiment, we use a dense (n b 4n p ), short (k p s z o1) and ultra-relativistic (g4 41) electron bunch that is tightly focused (k p s r o1) in a plasma to excite a 3D, nonlinear wake. Here k p, s r, s z and g are the wavenumber, the r.m.s. spot size and bunch length, and the Lorentz factor, respectively. The single bunch (at 1 Hz) from the facility for advanced accelerator experimental tests (FACET) at the SLAC National Accelerator Laboratory 22 -having an energy of 20.35 GeV, B30 mm s r and B25 mm s z and containing 2 Â 10 10 electrons with a normalized emittance of 200 Â 50 mm (e x Â e y )-is used to produce the plasma, drive the wake and probe the fields of the wake. The 2.5 Â 10 17 cm À 3 density plasma is formed by field ionization of a column of Li vapour by the electric field of the electrons in the very front of the bunch 23,24 . The Li vapour column has a 27 cm flat-topped region with 5-cm (half-width at half maximum) up-and down-ramps. Since n b 4n p , the electrons from the singly ionized Li atoms are expelled transversely by the field of beam electrons leaving a fully evacuated cavity structure that comprises plasma ions surrounded by a thin sheath of returning Li electrons. While the cavity is still forming, the bunch electrons initially experience a x-dependent focusing force and then a constant focusing force once all the plasma electrons are fully blown out which occurs for x]0 as shown in Fig. 1c. Since the beam electrons are highly relativistic, there is negligible relative motion either between the particles themselves or between the particles and the wake; that is, the electrons see a stationary cavity. However, different slices of the bunch gain energy at different rates (see eE z (x) in Fig. 1c) and therefore execute a different number of spot size s r oscillations 25,26 induced by the focusing force of the plasma ions. These slices undergo from 0 up to 27 spot-size oscillations depending on their energy and the strength of the focusing force. Once the cavity is fully formed so that F r is constant, the accumulated phase advance F(x) of the oscillations depends on the final energy of the electrons of a given slice, which in turn only depends on E z (x) and the interaction length. If one can unambiguously identify these energy-dependent oscillations once the bunch exits the wake, one can reconstruct E z (x).
Theory of slice spot-size oscillations and divergence. Consider an unmatched electron bunch that has a waist at the entrance of a slab of plasma with length L eff as shown as in Fig. 2a. For simplicity we consider three slices (only two are shown in Fig. 2a) that reside in the region of constant F r and negative (accelerating) E z having subscripts (i, J, k) with slice i exiting the wake first and slice k exiting the wake last. The divergence angle of slice i, y i (x i ) (at a large distance from the exit of the wake), is given by ds r (z, x i )/dz and depends on the phase advance of it's oscillations given by sÞÞ 0:5 Þ is the wavenumber of the oscillation so that 25 where o p is the plasma frequency and represents the square root of the ion density in the wake, W 0 ¼ g 0 mc 2 is the initial bunch energy while g(x i , s) is the energy of a beam slice at the coordinate (x i , s) where s is the propagation distance. If this slice exits the wake with phase advance F(x i )EpN i , it will exit near a spot-size maximum so that y i will be extremely small as shown by the blue solid curve in Fig. 2b. The final energy of this slice is W i . Here, N i is the total number of spot-size oscillations undergone by slice i. Now, the later slice at x J will exit the wake having necessarily a higher energy W J and thus will have undergone a smaller phase advance F(x J ). If F(x J ) ¼ F(x i ) À p/2 ¼ p(N i À 1/2), then this slice will have a minimum spot size with an accompanying large y J (red dashed curve in Fig. 2b). These two slices are illustrated in Fig. 2b as 'Bright' and 'Weak' for slices i and J, respectively. It is the settings  of-and the transport to-the spectrometer that results in the brighter spectral visibility of energy features with small exit angles because these features are relatively unaffected by the imaging energy setting of the spectrometer. This bright/weak behaviour continues so that when slice k (not shown) exits the wake with even higher energy W k and a phase advance of F(x k ) ¼ p(N i À 1)-an integer-p difference from F(x i )-it will be at a spot-size maximum and will also appear as a bright feature on the spectrometer screen.
Interpretation of experimental data. Fig. 3a shows the measured energy spectrum of the electron bunch after propagating through the Li plasma (see Methods for acquisition of electron spectra). We note that there are four bright features, labelled N-1 through N-4, in the portion of the spectrum where the electrons have gained energy. As described above, we assume that the bright features above W 0 ¼ 20.35 GeV are separated by a phase advance of p radians. We can use the relative energies of these features and equation (1) to find the expected energies of all the longitudinal slices that execute an integer number of oscillations N m . We calculate these energies as follows. Integrating equation (1) for an arbitrary slice within the full blow-out region gives where W m x m ð Þ ¼ W 0 À eE z x m ð ÞL eff is the final energy at z ¼ L eff . In this integration, we have assumed a non-evolving wake and that the ion density is constant (F r pr) for the spectral features above W 0 .
To obtain an estimate of L eff , we may take any two accelerated charge features in Fig. 3a (which are separated by integer-p radians of phase) and use equation (2) to eliminate N m (see Supplementary Fig. 1 for additional samples of measured electron spectra of which that in Fig. 3a is merely representative). For example, taking the N-3 and N-1 features at 33.6 GeV and 24.0 GeV, respectively, having a phase difference of 2p radians, gives L eff ¼ 22.5 cm. Note that L eff is shorter than the 27 cm long flat-topped region of the Li vapour. The beam forms the plasma and the cavity, and acceleration continues until the phenomenon of head erosion 27 halts the acceleration and limits the acceleration length to L eff (which takes into account the integrated phase advance that the bunch slices experience in traversing the The linear energy scale from QuickPIC has been mapped to a spatial scale using the experimentally determined dispersion of the spectrometer that produced (a). Note that the energy-loss portion of the spectrum is double valued meaning that the charge at each value of energy comes from two x locations with the wake (see Fig. 4 for the shape of the decelerating field). The energy locations of the (locally) largest transverse size of slices (that is, minimum slice divergence) upon leaving the plasma are also indicated (dashed black lines labelled N À 4 through N þ 2, obtained by analysis of this phase-space data) and are very closely matched to the experimentally identified energy features in (a). Equation (2) was used along with these energy locations to predict the N þ 3 location at 12.0 GeV as shown as shown by the red dashed line. See Supplementary Fig. 4 for a 'simulated spectrum' using the data of (b).
up-ramp), though for slices that gain energy, this is dominated by flat density region 28 . Other combinations of the four bright features above W 0 give nearly the same L eff to within 2% (mean deviation (MD)) (see Methods on statistical terminology) meaning that all four features above W 0 have have been accelerated over the same distance. We then use this value of L eff in equation (2) to predict the energies of all the beam slices that undergo an integer number of oscillations as shown by the dashed black lines labelled N-4 to N þ 3, overlaying the electron spectrum in Fig. 3a. In addition to the four distinct features above W 0 , there are three more identifiable features seen in the black lineouts (plotted to the left of the spectrum) of the spectrum near 17.8, 14.3, and 12.3 GeV (see Supplementary Fig. 3 for an unsatureated veiw of this energy-loss portion of the spectrum).
One can see that the observed positions of the spectral peaks, indicated by the horizontal magenta bars and also plotted to the left of the spectrum, match extremely well with the predicted energy positions to within 1% (MD) for the seven features identified in Fig. 3a.
The particles close to 20 GeV are comprised of a portion at the very front of the bunch expanding at near the vacuum expansion rate (where F r B0) and slices near the zero crossing of F z (thus staying near 20 GeV) and forming the feature labelled N having 24 oscillations. This feature, marked by a star in Fig. 4, separates the range in x for energy gain and loss and is located at E z ¼ 0. The N þ 1 peak at 17.8 GeV, shown in Fig. 3a, has the largest difference (4%) from the expected energy location. This is possibly due to it being affected by many closely spaced peaks near the front of the bunch (having nearly the same energy) when the plasma electrons are still being blown out and the ion cavity is still forming (see dotted, horizontal magenta line in Fig. 4).
In this single-shot spectrum, L eff is fixed and thus the observed variation of the energy locations of the identified features with respect to the expected energy locations is in fact due to a variation of F r via a variation of o p 2 ; that is, the degree of blow-out along x. For the N-1 to N-3 features used here F r is essentially 1, where unity corresponds to the force due to a pure ion column of density 2.5 Â 10 17 cm À 3 . The spread in F r is due to experimental limitations (see Supplementary Fig. 2 for F r distribution and Supplementary Discussion for errors in calculating the restoring force F r ). Although this analysis is for a single shot, for the data set as a whole, analysis of 33 combinations of such spectral peaks above W 0 gives F r ¼ 1±3.0% (r.m.s.). In other words, in the accelerating portion of the wake, q x F r E0. Since, q x F r ¼ q r F z from the P-W theorem, we conclude that q r F z ¼ 0 must also be true to a similar degree of uncertainty.
Mapping the longitudinal field structure. In Fig. 3b we show the energy spectrum obtained using the computer code QuickPIC using the same plasma and beam parameters as in the experiment except we assumed a plasma with a flat density profile (of length L eff ¼ 22.5 cm) as in the above model and a bi-Gaussian electron bunch with a 20 mm r.m.s. rise and a 30 mm r.m.s. fall. This energy spectrum shows energy-dependent spot-size modulations at nearly identical energies as observed in the experimental spectrum of Fig. 3a. Note that the energies of these features are insensitive to the precise transverse parameters in the QuickPIC model as long as the accelerating cavity reaches blow-out by approximately the peak of the current profile. The excellent agreement (except for the N þ 3 peak) between the experiment, the theoretical model and the self-consistent simulations proves that the modulations are caused by the longitudinally constant focusing force-q x F r ¼ 0-of the ions in the accelerating cavity. The N þ 3 peak, only 1 GeV below the N þ 2 peak, is missing in the simulations because small changes to the rise time of the bunch in the simulation leads to changes of this scale in the maximum energy loss of the particles without significantly affecting the energy gain. Taken together Fig. 3a,b shows an excellent agreement between the experiment, theory and simulations in predicting the energy-dependent spot-size oscillation peaks.
The dash-dotted curve in Fig. 4 shows the normalized accelerating field overlaid on the beam density and the plasma cavity at the end of the simulation; that is, at z ¼ L eff . The energies of the spot-size modulations from Fig. 3b were mapped to their local field E z,sim (x) by dividing those energies by L eff and as such these are averaged over L eff . These E z,sim (x) are indicated by the vertical dotted black lines in Fig. 4. The open black circles, plotted on top of the beam density, indicate the local spot size maxima of the beam and thus its local minimum exit angles, y min,sim (x), at the instant the simulation reached z ¼ L eff . The fact that the averaged E z,sim (x) match up with the instantaneous y min,sim (x) shows that the wake does not evolve significantly over the simulation length. Finally, using the analogous method for the experimental data, we take all the experimental energy features from Fig. 3a and convert them into a normalized field gradient E z,exp ¼ eE z,exp /mco p by dividing their energy values by L eff . For E z beyond its maximum value, E z monotonically decreases and  therefore there are unique x-intercepts of the experimental values of E z,exp and x. These are indicated by the magenta squares. The fact that the vertical lines, derived from simulation, intercept these magenta squares from experimental data to within 1.9% (1.4% MD) shows that longitudinal field structure of the wake has been accurately mapped using this technique. Note that the peak decelerating field is 36 GV m À 1 while the accelerating field at the N-4 peak is À 83 GV m À 1 . With such detailed information of the actual shape of the field, one can place an optimized shaped trailing bunch to load or flatten the wake for preserving the energy spread of the bunch and efficiently extract energy from the wake 12 .

Discussion
To conclude, we have mapped the longitudinal variation of the F z and F r forces of a fully blown out PWFA using the drive electron bunch itself to probe the field structure of the cavity. We have shown that for such a cavity (x]0 here), q x F r ¼ 0 within the measurement accuracy of about ±3% (r.m.s). This is because the cavity is comprised of a uniform density of plasma ions that exert a linear focusing force on all the beam slices that are in the accelerating phase and blown out region of the wake. This in turn implies that @ r F z is also equal to zero and that all the particles in a given slice are accelerated at the same rate. This ability to map the field structure is essential for optimizing the bunch shape so as to load a matched trailing electron bunch for high-gradient, highefficiency acceleration of a narrow energy spread beam 12 while undergoing little emittance growth in such a PWFA cavity 19 .

Methods
Computer simulations. Computer simulations were carried out with the 3D quasi-static particle-in-cell code QuickPIC 20,21 . The simulation box tracks the beam-plasma interaction in the speed-of-light coordinates x, y, x ¼ z À ct. The box has a size of 500 mm Â 500 mm Â 192 mm in the two transverse dimensions and the longitudinal dimension, respectively. The number of cells for the simulation box is 1024 Â 1024 Â 512 (B0.54 billion cells in total). The code used the same plasma and the beam parameters as in the experiment except we assumed a plasma with a flat density profile (of density 2.5 Â 10 17 cm À 3 and length L eff ) as in the model of equation (2). To pre-compensate for the lack of quasi-adiabatic focusing in the upramp, the bunch with a normalized emittance of 130 Â 130 mm (e x Â e y ) containing 2 Â 10 10 electrons (8.4 Â 10 6 beam particles in the simulation) began with a round, transverse spot of s r ¼ 7 mm r.m.s. The results were not sensitive to this exact choice of s r . The longitudinal distribution of the single, 20.35 GeV bi-Gaussian electron bunch was 20 mm r.m.s. rise and a 30 mm r.m.s. fall. The code uses the quasi-static approximation, which assumes the beam evolves slowly compared with the transit time of a plasma electron through the region of the bunch. However, the forces on the beam were updated many times per betatron oscillation. Thus, a snapshot of the particles and fields was recorded approximately every 1 mm. The fields in Fig. 1 are taken from the simulation at a distance of L eff of about 22.5 cm. The particle data of Fig. 3b and Fig. 4 are taken at this same position in the plasma. Note that, in Fig. 1c, E z is double valued for À 3uxu þ 4 and the corresponding range of energies is labelled in Fig. 3b. The 'fishbone-like' structure below 20.35 GeV is due to the fact that the wake is still forming for À 3uxu0 .
Acquisition of electron spectra. The electron spectrometer has been described in detail in Adli et al. 29 . The physical height of the entire dispersed spectrum required the use of two 12-bit charge-coupled device (CCD) cameras; one viewing from 17 to 63.8 GeV (the upper range of energies) and the other having an overlapping range of 11.7-23.7 GeV (the lower range of energies). Each of the two cameras had a background image taken just before acquiring a sequence of data and these were subtracted from the data images. The image in Fig. 3a of the main text contains spectral data from both of these CCD cameras: 11.7 GeV to W 0 ¼ 20.35 GeV from the lower-range camera and W 0 to 63.8 GeV from the upper-range camera albeit cropped at 50 GeV. A very small discontinuity (on the order of a few counts per CCD pixel) between the two images at W 0 is visible and this is believed to be due to the two cameras having slightly different light-collection efficiencies. The very low range of CCD counts, typically less than 30 counts above background, necessitated the use of a median filter. Due to apparent damage to these cameras, randomly distributed noise was mixed in with the image of the spectrum. A histogram of a region in a corner of the image showed the expected peak in the 1-2 CCD-count bin, but with an underlying, near-gaussian distribution of noise having a r.m.s. width of 8.8 counts and thus a large percentage of pixels had as much as 20 counts of noise. A median filter was chosen to be a square of 21 pixels by 21 pixels in which each pixel value was replaced by the average of those in the 21 by 21 neighbourhood surrounding that pixel. The result is what is shown in Fig. 3a. This filtering did not significantly change the size of the energy features and, more importantly, did not change their location. The transverse size of the boxout that was integrated to produce the solid black curve in Fig. 3a covered À 5 mmoxo5 mm.
Statistical terminology. The 'r.m.s.' is used often in this manuscript. However, for sets of numbers which are far from a normal distribution or contain too few points, the r.m.s. measure is inappropriate. For those number sets, it is common to specify the mean of the absolute deviation of each number from the average of the set. This 'MD' (also referred to by 'mean absolute deviation' (MAD)) of a data set A is defined as MD A ð Þ 1 NA P NA i¼1 A i À A h i j j , where A h i is the average of that data set containing N A elements. The MD does not use a '±' since it is an absolute-value deviation.
Data availability. The data that support the findings of this study are available from the corresponding author upon request.