Phase space analysis of velocity bunched beams

Peak current represents a key demand for new generation electron beam photoinjectors. Many beam applications, such as free electron laser, inverse Compton scattering, terahertz radiation generation, have efficiencies strongly dependent on the bunch length and current. A method of beam longitudinal compression (called velocity bunching) has been proposed some years ago, based on beam longitudinal phase space rotation in a rf field potential. The control of such rotation can lead to a compression factor in excess of 10, depending on the initial longitudinal emittance. Code simulations have shown the possibility to fully compensate the transverse emittance growth during rf compression, and this regime has been experimentally proven recently at SPARC. The key point is the control of transverse beam plasma oscillations, in order to freeze the emittance at its lowest value at the end of compression. Longitudinal and transverse phase space distortions have been observed during the experiments, leading to asymmetric current profiles and higher final projected emittances. In this paper we discuss in detail the results obtained at SPARC in the regime of velocity bunching, analyzing such nonlinearities and identifying the causes. The beam degradation is discussed, both for slice and projected parameters. Analytical tools are derived to experimentally quantify the effect of such distortions on the projected emittance.


I. INTRODUCTION
The velocity bunching technique is a method for compressing an electron bunch by means of electromagnetic fields of an accelerating cavity. The theoretical model of the mechanism was described in Ref. [1]. If a not fully relativistic beam is injected in a traveling wave (TW) accelerating section close to the zero crossing phase (no net acceleration), it accumulates rf-induced correlated energy spread (higher energies to trailing particles). Because of the non-negligible correlation between energy and velocity, the beam will be compressed and at the same time will slip back to accelerating phases. Acceleration and compression take place simultaneously, the key point being the difference between the wave phase velocity and the beam mean velocity. In the velocity bunching (VB) scheme, the transverse emittance compensation is integrated by judiciously focusing the beam during rf compression, leading to high peak current and low emittance beams.
The importance of such a scheme in the context of the new photoinjector sources has been exhaustively discussed [2,3]. It entails the possibility of compressing the beam at early stages in the accelerator chain (low energies), avoiding problems related to magnetic compression, such as beam filamentation, emittance dilution, or coherent synchrotron radiation. Emittance degradation in magnetic compression has been indeed proven to be a function of the compression factor [4,5]. Experiments involving beam energies and charges close to the SPARC case showed a dilution factor of about 3.5 for a compression factor of 6 [5], not acceptable for high brightness beams demand. In the VB scheme, the absence of the path-length dependence of compression inhibits the phase space filamentation caused by self-field forces in chicanes; moreover, the absence of bending magnets exclude the increase of coherent radiation induced energy spread. Such a scheme may be of primary interest for many moderate energy photoinjectors  aiming to high peak currents, for applications as inverse Compton scattering or plasma wakefield accelerators, and can also be used as a first compression stage for future x-ray FELs.
In the past years many experiments of rf compression have been carried out with success [3,[6][7][8][9][10], but the machine setup did not allow for a complete proof of principle of the velocity bunching concept, while the SPARC photoinjector [11] as been conceived and built to use the VB as a primary mechanism of beam compression. Various key aspects of the VB setup have been studied and simulated during the machine design [12][13][14][15], and the final layout has been optimized for it.
The SPARC photoinjector layout is shown in Fig. 1. It is based on a 1.6 cell S-band (2.856 MHz) rf gun operating at 120 MV=m peak field at the cathode. A Ti:sapphire oscillator pulse at 800 nm generates the seed for a chirped pulse amplification (CPA) system. The laser beam is then frequency up-converted to 266.7 nm, shaped, and sent to a copper cathode with a quasinormal incidence.
The emittance compensation process [16,17] starts with the electron beam being focused by a solenoid after the gun, and ends up at the exit of the subsequent three linac structures, where the energy is about 150 MeV and the emittance is frozen. The entrance of the first accelerating section is placed at 1.5 meters from the cathode, where the local maximum of transverse emittance oscillations [18] coinciding with a beam waist ( 0 ¼ 0) has been measured.
The required focusing during compression is provided by two long solenoids (called TW solenoids) wrapped around the first two linac traveling wave sections ( Fig. 1), as proposed in [1]. Each solenoid is composed by a long iron joke containing 13 coils forming a long solenoidal magnetic field [19].
A diagnostic section after the three linac modules (Fig. 1) allows the measurement of beam properties: projected and slice beam parameters, both transverse and longitudinal, can be retrieved by the use of a rf deflector cavity (S band, 2.856 MHz), a spectrometer, and two quadrupole triplets [19]. The transfer line can be used to match the beam to the SPARC undulator for FEL experiments.
As said, the aim of this scheme is to increase the beam peak current keeping constant its 6D brightness. High beam densities increase the magnitude of space charge forces and may eventually cause emittance degradation. The emittance compensation in VB has already been demonstrated in [2], where the slice emittance has been proved to be constant under rf compression.
Other effects may limit the projected brightness of the beam: the VB process implies the joint presence of large energy spread and beam focusing along the compressor. Chromatic effects from focusing elements in this region may lead to transverse phase space (TPS) distortion emittance growth [20].
In the longitudinal phase space (LPS), a beam rotation is carried out, resulting in a beam shortening at expenses of energy spread. Phase space distortions may show up due to the nonlinearity of rf fields [3] or in the energy-velocity correlations. These distortions limit the maximum compression factor and create asymmetric current profiles with long tails, and can be particularly problematic if further compression is foreseen downstream (i.e., x-ray FELs).
In this paper we report both LPS (Sec. II) and TPS (Sec. III) analysis for velocity bunched beams.
Section II A focuses on the procedures, error analysis, and limitations for bunch length and LPS measurements. In Sec. II B we investigate LPS distortions, comparing measurements with simulations and analytical calculations. The mechanism of VB itself is studied showing how, even in the absence of space charge forces, nonlinear correlations between particle velocities and energy, leads to asymmetric current profiles and curved phase spaces. Such distortions are a function of the initial beam kinetic energy and injection phase in the compressor, i.e., of the compression factor.
The impact of magnetic focusing along the accelerating structures is experimentally characterized and discussed in Sec. III A both with and without rf compression. The presence of such focusing is demonstrated to be beneficial in both cases and the agreement between slice and projected emittance is reached, once the correlations between transverse and longitudinal planes is taken out. In Appendix A we derive an analytical method which can be applied to experimental data to include (or exclude) transverse-longitudinal correlations starting from slice measurements. In our case such correlations are well FIG. 1. Layout of SPARC linac and matching section. The two blue cylinders around the first two accelerating cavities represent the iron jokes of the TW solenoids. explained by the solenoid misalignment. The reconstructed phase space and the magnitude of slice misalignment underline the criticality of treating with large energy spread beams.
Finally, an increasing interest is directed by the FEL community toward low charge-low emittance beams, because of the potentiality they have of creating fully coherent x-ray beams. In Sec. IV we report the first measurements of a highly compressed low charge beam. The time resolution of the diagnostic setup did not allow for slice emittance measurements, but the projected values obtained are encouraging, since they brought to the highest transverse brightness beam measured at SPARC so far.

II. LONGITUDINAL COMPRESSION BY RF FOCUSING
A. Resolution and limitations of the measurement Bunch length measurements are performed with a rf deflector (RFD) streaking the beam then intercepted by a photoluminescent screen [21]. The RFD calibration is obtained by measuring the beam centroid displacement on the detection screen as a function of the deflecting phase. The vertical dimension of many images (typically 10) is then averaged to measure the bunch length and its uncertainty uðÞ [22]. Figure 2 shows a typical image created by a 3 ps and 280 pC beam on a screen 4 m downstream the deflector. The left and right pictures report, respectively, undeflected and deflected beam images. This measurement is affected by a systematic error associated with the finite vertical dimension of the undeflected beam [23]. This contribution can be deconvolved by the measured quantity. In the case of Gaussian distributions we can use where ON ( OFF ) is the root mean square (rms) vertical size of the beam with (without) deflection. The above correction is meaningful only when ON is of the same order as OFF , e.g., for highly compressed beams.
In the following, we assume ðÈÞ as the rms bunch length at a given injection phase in the first accelerating section (so-called compression phase È); 0 is the bunch length corresponding to the ''on-crest'' acceleration (È ¼ 0), i.e., to the maximum beam output energy. The bunch length ðÈÞ and the compression factor CðÈÞ ¼ 0 =ðÈÞ can be measured as a function of the compression phase È. As an example in Fig. 3 we report a measurement taken from [2] of a 280 pC beam, generated from a longitudinally Gaussian laser pulse. The energy for the on-crest beam is 141.30 MeV with 0.09% rms energy spread. The shortest beam achieved in this case is 0.20 ps for an injection phase of 94.9 deg bunch length uncertainty ¼ ðÈÞ (computed using type A evaluation, [22]) is in the few tens of femtoseconds range, while for the compression factor C ¼ CðÈÞ holds which explains the higher uncertainty for higher compression factors (Fig. 3). The phase uncertainty (about 0.4 deg for all measurements) comes from the measured compression phase jitter.
The longitudinal phase space (LPS) is measured using the vertically streaking RFD in combination with a magnetic dipole creating a horizontal dispersion section. The Panofsky-Wenzel theorem [24] links the time and the energy resolution of the deflecting cavity and determines the ultimate measurable longitudinal emittance. The beam emittance here can be treated as ''noise'' so that, in order to be able to measure the bunch length, we need the RFDinduced angular kick (the signal) to be equal or greater than the intrinsic angular spread of the beam (SNR ! 1). The same can be said for the induced energy spread, which would need to be smaller than the beam energy spread. If we use these definitions of resolution together with the derived formulas for RFD resolution and energy spread [21], we find where the y plane is the deflection plane, y;rfd and 0 y;rfd are the beam size and angle spread at the center of the deflecting cavity, ind E is the RFD-induced energy spread, and ris is the minimum bunch length that can be resolved. In the case of a drift between the RFD and the imaging screen, and a beam waist on the screen itself, the resolution can be written in terms of measurable quantities: L is the distance between the deflector and the screen, Ã y is the beta function at the screen, and " n y is the normalized emittance along the deflection axis. Despite the presence of L in the formula, there is no net dependence of the longitudinal emittance resolution on the screen position, since Ã y is also proportional to such distance. The LPS resolution does not depend on the deflecting voltage which increases the time resolution but also the induced energy spread, and in the case of SPARC, with " n y $ 2 m, L ¼ 4 m and y;0 $ 2 m, we obtain " n z;ris $ 4 m. Few other parameters may cause loss of resolution beyond the intrinsic limitations of the deflecting cavity. The distance between the RFD and the screen plays a role in the design of the imaging system, by transforming the RFD kick in transverse displacement that can be resolved by the detector. Magnetic dipoles are often used to measure beam energy distribution. The consequent nonzero dispersion causes an energy-dependent transverse displacement at the downstream detector and sets the energy resolution. In the case of SPARC, the line has been designed to have a resolution res E smaller than ind E for nominal parameters. As an example, for the same beam parameters used above and 1 MW input power in the RFD, we would have res E ¼ 20 keV and ind E ¼ 35 keV, with a time resolution of 190 fs at 150 MeV.
With the present photoinjector performances, at least one of the beam longitudinal parameters, either the energy spread or the bunch length, hits the RFD resolution limit. In the absence of compression, the slice energy spread from the gun is usually around 1 keV [25] and is expected to be below 10 keV at the photoinjector exit (%100 MeV). For time resolutions 1 ps the RFD-induced ind E exceeds this value and prevents precise measurements of longitudinal emittance. On the other side, during rf compression the LPS rotation makes the energy spread larger and the bunch length shorter, eventually hitting the time resolution of the system. The consequence is a longitudinal emittance overestimation in both cases. Figure 4 shows some measurements performed with a low charge beam to test the actual resolution limit of the system. An 80 pC beam was transported on crest up to the photoinjector exit, and its LPS was measured. Simulations indicate a longitudinal emittance for such a beam of % 4 m (after removing the rf curvature correlation), while the measured one was " z ¼ 15 m with a bunch length of 0.84 ps rms. For the same beam in the high compression regime, the measured value of " z jumped to about 25 m, with respect to a simulated value of 5 m. Such discrepancy is a consequence of the system resolution in longitudinal phase space. The dots in Fig. 4 represent the mentioned values of measured " z with (blue) and without (red) compression, while the three curves represent the longitudinal emittance estimation taking into account the system resolution [Eq. (4)]. To explain such curves we recall that the longitudinal phase space measurement entails the concurrent measure of energy and time. The Panofsky-Wenzel theorem relates the resolution in these two planes, but depending on the specific beam properties there may be cases where the resolution limit is hit only in one direction. The cyan curve of Fig. 4 represents the ultimate RFD resolution: it shows the measured values in case both pulse duration and slice energy spread would be too small to be measured. In this case the beam image size at the screen would be dominated by transverse emittance. Blue and red curves instead show the emittance estimation for the two measured beams with and without compression. In the latter case the pulse is long with a slice energy spread smaller than the resolution limit, and the red curve was calculated using the real time distribution and the . Comparison between measured longitudinal emittance and calculated system resolution. The three curves represent minimum longitudinal emittance measurable as a function of beam transverse emittance. The cyan curve represents the values we would measure for a zero beam longitudinal emittance. The red (blue) curve represents the case in which only the energy (time) resolution is hit. The blue (red) dot represents measured longitudinal emittance for (un)compressed beam where one expects to have a pulse duration (energy spread) smaller than the system resolution. energy resolution as energy spread, while in the opposite case of compression we used the measured energy spread and a bunch length equal to time resolution. The plot confirms that measured values are dominated by the system resolution. The jump of " z between the compressed and noncompressed case is only a consequence of the difference between energy and time resolution limits. Figure 4 also show the behavior of the resolution with the transverse emittance of the beam, which is the dominant term in limiting the resolution. Collimating the beam to decrease the transverse emittance would increase the resolution.

B. Longitudinal phase space analysis
PARMELA simulations of the energy and energy spread out of the SPARC photoinjector as a function of the compression phase È are plotted in Fig. 5. Here the first accelerating section is used as compressor and the other two sections are tuned for maximum output energy. The energy spread increases up to 1.5% from the on-crest phase to À75 deg , and then starts decreasing [13]. As shown in Fig. 3, to induce a significant compression the beam injection in the compressor has to be delayed by more than 80 deg.
Typical current profiles for different compression phases are shown in Fig. 6 and compared with PARMELA simulations. The beam charge was 280 pC, and the bin size for current calculation has been chosen equal to the pixel resolution. Table I reports measured values for these profiles.
Peaked current distributions with long tails are typical of VB experiments, and they are usually associated with LPS nonlinearities. Here we report for convenience the longitudinal equations of motion in the case of a particle traveling inside a TW accelerating structure: where e and m are, respectively, the electron charge and mass, c is the velocity of light, E 0 is the TW accelerating gradient, k is the rf wave number, k ¼ 2=, , and are the particle phase respect to the rf field and the normalized electron total energy. Two sources of nonlinearity are present: the particle phase dependency of the rf field amplitude in the first equation, and the relation between particle energy and phase slippage in the second one. The latter term is a consequence of the relation between the velocity and the energy for a relativistic particle.
In [3] an approximate solution for the particle longitudinal dynamics has been derived writing the system Hamiltonian, and deriving the extraction phase 1 and the final compression factor. Particles in longitudinal phase space follow different curves of constant Hamiltonian during the motion, reshaping a linear phase space into a nonlinear one and causing tails on the phase axis projection. In fact, it limits the ultimate compression factor that one can achieve and depends separately from the initial  Table I. Simulated profiles (PARMELA, red curve) are compared to the measured ones (black lines).  (2011) 092804-5 energy and phase spread. Hence, even for a zero initial emittance, one would not get infinite compression. The presence of nonlinearities in [3] has been associated only with the rf field nonlinearities. In the SPARC case however, the total slippage of a 5 MeV particle injected in the 3 m long compressor at the zero crossing is only about 18-19 deg. Hence, the accelerating field can still be considered linear for the entire motion, i.e., solving the system linearizing the first equation lead to the same results. If we solve numerically Eq. (6), we find out that indeed the nonlinear ðÞ relation plays the dominant role. Even with a perfectly linear chirp in the starting beam we would have ¼ 3 . In Fig. 7 is shown the single particle solution for individual particles with a 5 MeV initial kinetic energy, different injection phases, distributed around È inj ¼ À90 deg (zero crossing phase), and an accelerating electric field E z ¼ 20 MV=m.
Green dots in Fig. 7 show the nonlinear correlation between the extraction phase and energy, while the blue line relates the injection to extraction phases. The latter curve represents the system phase mapping, and can be used to predict the final current profile from the injected one, i.e. I out ¼ I½È out ðÈ inj Þ. A final energy between 18 and 20 MeV is reached, losing about 40 MeV in the compression respect to the 60 MeV of the on-crest acceleration. The plot uses the same phase axis convention used for Fig. 3, i.e., 0 deg correspond to on-crest acceleration and À90 deg to the zero crossing phase. The head of both the injected and extracted beam point toward more negative phases (bottom-left corner of the graph). Leading particles injected beyond À91 deg will end up in the tail at the extraction, and their energy will be lower because of the lower accelerating fields. However, if we delay the injection further beyond À100 deg , the particles energy starts to increase again. Here the decelerating field increases the phase slippage velocity of the particle toward the peak of the field, increasing the net energy integral along the cavity. Trailing particles gain energy but do not reach the current peak, since the acceleration slows down the LPS rotation. They form most of the tail.
The mean energy of the input beam is important when considering LPS distortions. Taking as reference a particle in the center of the beam with energy equal to the mean beam energy ð 0 ; 0 Þ, a particle with higher energy ( þ ¼ 0 þ Á, þ trailing edge) would gain less velocity than what a particle with lower energy ( À ¼ 0 À Á, À ) would lose with respect to the reference. The asymmetry in velocity spread leads to the profile distortion, long tails, and curvatures in the LPS. In the hypothesis of ( , we get Here Á À;þ ¼ 0 À À;þ ; Á depends on the rf field amplitude and frequency, and initial bunch length, but not on beam mean energy. By increasing 0 , in principle one decreases the spread and receives a more linear transfer function. On the other hand, the beam rotation velocity in the phase space decreases with 0 , and so does the compression factor C: These formulas are appropriate in case a rf thin lens (buncher) is used. For velocity bunching they should be integrated with the equations of motion to take into account the change in during the propagation. The energy increase will slow down the phase space rotation during the transport, leaving less time for compression. Indeed the optimum accelerating gradient that optimizes compression and longitudinal nonlinearities may indeed be different from the maximum. For given cavity length and rf gradient, the injection phase corresponding to maximum compression depends on the electron beam initial kinetic energy and longitudinal emittance, and in our case is found for decelerating injection phases ( inj < À90 deg , Fig. 3).
The optimum accelerating gradient that optimizes compression and longitudinal nonlinearities may indeed be different from the maximum.
Lower beam energies at injection result in more compression and more nonlinearities. They also result in higher output energies, because the lower starting velocity increases the phase slippage, and brings particles up to higher accelerating fields along the structure, resulting in an final higher energy. Figure 7 shows as an example how a 8 ps ( $ 8 deg ) beam injected at È inj ¼ À87 deg would be compressed roughly by a factor C ¼ 7, maintaining small distortions in LPS. If the same beam is injected at È inj ¼ À91 deg , it would end up with C ¼ 15 and a very nonlinear LPS. A further increase of the phase delay brings the beam to overcompression. Here the beam undergoes more than half synchrotron oscillation and starts lengthening again (Fig. 3). The head of the beam is pushed beyond the current peak, and contributes to the tail (À 91 to À110 deg in Fig. 7). Higher currents and faster rise times [Figs. 6(c) and 6(d), compared to Fig. 6(b)] are obtained at expenses of energy spread and longitudinal emittance. Single particle dynamics show us that particles with separate mean energies overlap in time, creating two energy bands. Space charge fields may complicate the dynamics even further here. The loss of longitudinal laminarity and the presence of energy bands flowing in opposite directions may induce friction forces, increase the slice energy spread via particle scattering, and lead to phase space filamentation.
As an example of LPS distortion, we report in Fig. 8 a measured LPS of compressed beam with a charge of 300 pC. The rms bunch length is 0.42 ps, with a compression ratio of about 7, with a final peak current of 380 A. Measured rms projected (slice) energy spread was about 1.2% (0.6%) with a linear chirp of À8:7 keV=m. The beam parameters correspond with the example reported above and shown by the lines in Fig. 7. The beam was indeed injected with È inj ¼ À87 deg , and an initial length of 3.2 ps rms (8 ps FWHM, full width half maximum). The LPS is mostly linear until it reaches the leading edge, where the current goes up and the mean energy deviates from the line, as predicted by the analytical model. Such beam has then been used to produce FEL radiation. The FEL process needs high current-low emittance beams, and is therefore a perfect diagnostic tool to demonstrate the effectiveness of the VB technique in increasing the transverse beam brightness [B ? ¼ 2I=ð x y Þ]. TW solenoids have been used to compensate the transverse emittance, and the beam has been matched into the SPARC undulator chain. The energy chirp has been compensated by undulator tapering, resulting in a high powersingle spike radiation pulse [26]. The deeper tapering of the last two undulator sections (shown in Fig. 3 of [26]) is mostly given by the nonlinear energy chirp toward the head of the beam.
It is also worth noting that the sharp edge in the current profile is a signature of the high frequency components in the bunch spectrum which make velocity bunched beams good candidates also for production of THz radiation [27].

A. Slice emittance
For a complete emittance compensation the beam has to be transversely matched into the linac. In [17] the invariant envelope condition has been obtained as a generalization of Brillouin flow to accelerated particles. This optimum solution represents the balance between defocusing and focusing forces, and in the case of acceleration along a TW section and no rf compression, the optimum accelerating field E acc is given by [28]  where I 0 ' 17 kA is the characteristic current, n is the beam normalized emittance, and is the beam optical function. The beam has to be injected into the accelerating cavity in a laminar waist, with 0 ¼ 0, hence w in Eq. (9) represents the beam size at waist.
The same condition holds in the case of rf focusing. Here if the current is assumed linearly dependent from , i.e. I ¼ I 0 0 [8], I 0 and 0 being the values at injection, then has to decrease linearly with in order to satisfy Eq. (9). In the SPARC case w ¼ 300-500 m (depending on the starting laser beam on the cathode), and usual initial currents span from 30 to 70 A. The resulting accelerating gradient would be between 28 and 35 MV=m, well above the actual one of 20 MV=m. Since the cavity rf fields do not provide enough focusing, two long solenoids surrounding the first two accelerating sections provide extra confinement. Adding these fields to the dynamics brings to a new beam matching into the linac: ¼ w =, with the dimensionless focusing gradient ¼ eB sol mc 0 . For a magnetic field of 450 G and E acc ¼ 20 MV=m, we find ¼ 0:75.
The beam matching to the linac is critical for the emittance compensation process. Small errors in the choice of focusing field right after the gun cause over-or underrotation of different slice ellipses that are not easily compensated by the subsequent focusing during acceleration. Here the beam becomes stiffer and the continuous acceleration with the difference in slice energy given by compression would need complicated field profiles to compensate errors. Hence, we keep the TW solenoid field to a fixed value given by simulations, and then scan the final beam emittance as a function of gun solenoid field. The results of these scans on the projected emittance will be presented and discussed in Sec. III B; here we report an analysis of slice emittance after the optimization. Based on the above discussion and on the simulations [28], the use of magnetic focusing during acceleration should increase the final beam brightness even in the absence of rf compression by keeping an invariant envelope. In Fig. 9 we report the slice emittance measurement comparisons between optimized beams during on-crest acceleration. The black line is the slice emittance without TW focusing, while the red line has been obtained with the same beam and both TW solenoids on. The beam parameters and magnetic fields are listed in the left column of Table II (TW solenoid  fields between parentheses, same for both solenoids). The laser was set up in order to produce a charge of 280 pC with a flattop temporal shape. The gun peak field was 105 MV=m, lower than the nominal 120 MV=m. This lower peak field decreases the beam current at the gun exit, but increases the maximum compression factor achievable by using a fixed-length (3 m) compressor, as explained in Sec. II B. The emittance profile obtained with extra focusing is flatter and in the high current region is smaller by about 20%, with a consequent increase in beam transverse slice brightness. As proof of an overall higher transverse beam brightness, the projected emittance has been retrieved from the slice parameters by weighting each slice emittance by the relative charge, and adding a cross term accounting for the different angles in phase space. The formula is reported in Eq. (11a) and, more explicitly in Eq. (A2) of the Appendix [29]. Those values are reported on the same plot at z ¼ 0, showing a 5% improvement with focusing. The projected emittance does not seem to be very sensitive to the focusing as the slice emittance. The reason is related to the orientation of different slice phase space ellipses. Projected emittance optimization requires indeed not only low slice emittance values, but also a precise superposition of the ellipses, a matched orientation in the phase space [16]. For this reason, even if the slice emittance profiles are different, the same cannot be said a priori for the projected value. Again this condition is very sensitive to the beam injection into the linac. As an example we report in Fig. 10 the slice emittance for three different gun solenoid field values around the optimum. In this case the beam has been compressed by a factor 3, and the beam parameters have been reported in the right side of Table II. To the graph already reported in [2], we have added the calculated projected emittance values (shown at z ¼ 0 in the plot). The emittance sensitivity to the gun solenoid field is shown here: as the field increases, the slice emittance minimum moves from the tail (2.43 kG data) to the head of the beam (2.46 and 2.49 kG data); within 60 G (i.e. about 2.5% of FIG. 9. Comparison between slice emittance of uncompressed beams, with TW solenoids on (red) and off (black). The points at z ¼ 0 represent the horizontal projected emittance reconstructed from the measured slice parameters. The green curve shows the current profile. the absolute field value) the minimum emittance moves along the whole bunch. If we use for slice brightness the standard formula B s ¼ 2I=ð slice x slice y Þ, and we assume equal x and y emittance, the maximum is found for the beam at 2.49 kG (position 1150 m on the z axis), with B s ¼ 1:12 Â 10 14 A=m 2 . The difference with respect to 0:85 Â 10 14 A=m 2 maximum brightness of the 2.46 kG curve gives a difference of about 30%.
On the other hand, the minimum projected emittance value is the one associated with the 2.46 kG curve. Again this can be explained by the relative orientation of different slice ellipses in the phase space. To quantify it we use the definition of mismatch parameter [30]: where 0 , 0 , and 0 are the Twiss parameters of the whole beam while i , i , and i are the parameters of the ith slice. It measures the deviation of each slice ellipse angle from the projected one, i.e., the degree of alignment between different slices in the phase space (being 1 the optimum value). Figure 11 reports for the cases of Fig. 10. The green curve corresponding to 2.46 kG data shows the best slice alignment, hence, the smallest projected emittance, as shown in Fig. 10.
In conclusion, the optimization of projected emittance out of the photoinjector brings the focusing field close to the optimum, but a further tuning (to the percent level) on slice parameters (or at the FEL output power light itself) would be needed for complete optimization.

B. Transverse phase space distortions
The first step in the optimization process is a scan of final emittance as a function of focusing strength in order to find the matched beam. Projected emittance was measured with the quadrupole scan technique [20,31] using the first quadrupole triplet after the linac. As already mentioned, only the gun solenoid field was varied, given the high sensitivity of the compensation process from the linac matching. Figure 12 gives an example of such sensitivity. It shows the result for on-crest acceleration optimization, using the same beam of Fig. 9. To a 4% relative variation of magnetic field corresponds a more than 100% variation on the emittance (300% on the vertical).
The plot reports (black diamond) the optimum horizontal and vertical emittance in absence of TW focusing fields. The comparison suggests, on the contrary to what was argued in Sec. III A, that the use of TW magnetic fields leads to higher and asymmetric emittances. Furthermore, these values do not match those obtained by indirect reconstruction from slice measurements and reported in Fig. 9.
We have also observed a dramatic change in emittance values by changing the electron beam orbit in the accelerating sections. As an example, in Fig. 13 we report a scan of projected emittance for the compressed beam of Fig. 10. The scan was carried out for two different beam orbits, one passing through the center of the accelerating sections (the operating orbit) and another one found by minimizing the beam centroid motion as a function of TW solenoid fields. The projected emittance behavior shows high sensitivity to the beam orbit that does not have a correspondence in the slice emittance. In fact, we measured the same green curve of Fig. 10 for both setups. Also, the reconstructed values given in Fig. 10 do not match the measured ones. If we take as an example the reconstructed horizontal emittance value of B ¼ 2:46 kG (green dot at z ¼ 0), it equals the measured vertical emittance of the compressed beam, and both match the measured projected emittance of Fig. 13, while the corresponding value of the measured horizontal emittance is much higher, suggesting an emittance growth in this plane.
Such discrepancies have been related to the presence of correlations between longitudinal and transverse planes. FIG. 11. Mismatch parameter for the three cases of Fig. 10 Such correlations can be enhanced by the presence of distributed magnetic focusing along the line, and indirectly magnified by the velocity bunching process, but they can be measured and eliminated. An image of x-t beam distribution in compression is reported in Fig. 14, compared to the noncompressed beam of Fig. 2. Such correlations change by varying the position of the beam at the entrance of the compressor, as discussed above. Also, a slope change was observed by changing the quadrupole fields, meaning that the correlation is generated upstream [19]. In our case the major cause of such correlations has been found on solenoid chromatic aberrations. A high charge beam at the exit of the gun has already a correlation between time and energy given by the space charge, with energy spread at the percent level; in the compression regime the relative chirp spread rises to about 10% inside the first part of the compressor. If the magnetic axis of the focusing solenoid does not match the electromagnetic axis of the cavity, the beam will experience an energy (time) dependent focusing strength which causes a relative displacement of different slice centroids.
Such a mechanism has a net effect on projected emittance, with no consequences on individual slices. The formula that has been used to retrieve projected emittance from slices includes the mismatch of slice ellipses orientation that we discussed in Sec. III A, but does not take into account slice centroid misalignment (already pointed out in Ref. [32]), both in space and angles.
To quantify the effect of such correlation on projected emittance and verify the consistency between slice and projected results, we generalize the mathematical treatment of [29]. A complete derivation is reported in the Appendix; here we report the final results. Three different contributions sum quadratically to obtain the final total emittance: where s ( 0 s ) is the rms dimension (divergence) of each slice, X s (X 0 s ) is the slice centroid in space (divergence), while hÁi stands for the weighted mean on all the slices. The first term, " env n , is the one we calculated in the previous section using the slice parameters; it represents the minimum emittance, when all the slice centroids are aligned. The second term, " centr n , takes into account the contribution of centroid offsets; it differs from zero only if different slice centroids do not lie on a line. The third term, " cross n , correlates the centroid offset to the slice width in the x-x 0 plane. All the information needed to calculate each one of these terms is already contained in the slice emittance measurement itself: the relative centroid deviation in the beam is retrieved from the quad scan data by plotting the beam slice centroid motion as a function of focusing strength.
If we apply the analysis to the 2.46 kG data set of Fig. 10, we obtain the graphs of Fig. 15. The left plot shows the x-z and x 0 -z planes reconstructed at the linac exit. Each slice is plotted with its centroid displacement with respect to the mean beam centroid both in x and in x 0 , with the bars representing the slice rms width. The centroid offset spans about 600 m in space and 250 rad in angle. The consequent trace space distortion can be seen from the right plot of Fig. 15, where the x-x 0 plane has been reconstructed by merging the two planes and eliminating the dependency from z. The x-x 0 correlation shown here matches, at least qualitatively, the expected behavior suggested by Fig. 14   A comparison between these values and the one directly measured and reported in Fig. 13 (" nx ¼ 2:3 m) shows an excellent agreement this time, and confirms the dominant contribution of the cross term " cross nx to the total projected emittance. In our case a judicious beam based alignment of all low energy accelerator components could bring the total projected emittance down to the level of " env nx . The proposed analysis is a general treatment that can be used to quantify correlations between transverse and longitudinal planes, starting from slice emittance data. Not only chromatic effects but also wakefields can generate such correlations, or they can even be artificially induced for beam manipulation or emittance exchange studies [33].

IV. HIGH COMPRESSION OF LOW CHARGE BEAMS
The recent increasing interest on short, low charge beams for coherent radiation production has lead to the set of following measurements. Beam parameters for the following measurements are reported in Table III. The laser size was decreased to 250 m and beam charge to 60 pC. Nonreported parameters were kept constant respect to the high charge case.
The beam was first accelerated on crest, to 150 MeV. Projected and slice measurements are reported in Table III and in Fig. 16. The projected emittance is 0:55 m, while the slice stays below 0:4 m (Fig. 16). The final bunch is compressed by the bunching slope of rf fields in the gun, given the weak space charge defocusing forces. The longitudinal emittance at linac exit is 27 m, about 3 times less than in the high charge case.
Going to the compression regime, the beam injection phase into the first linac section has been shifted toward the zero crossing phase. The bunch length for three different phases is reported in Fig. 17. The red curve shows PARMELA simulations of the compression curve. The maximum compression factor achieved (C ¼ 17) was higher than in the 280 pC case (Fig. 3), as expected due to smaller longitudinal emittance. Beam measurement results for C ¼ 17 are reported in Table III, while the beam longitudinal profile is visible in the upper-right corner of Fig. 17. A current of 217.5 A has been achieved, with a bunch  length of 115 fs. The minimum slice length (32 fs) has been chosen to define a slice current, due to the beam shortness. This value corresponds to the measurement intrinsic resolution, equal to the single CCD pixel physical dimension.
The diagnostic setup resolution is limited by the beam emittance and the deflecting voltage to about 100 fs, approximately equal to the rms beam length. Time resolved measurements are indeed out of range in this case, and only the projected emittance can be measured for transverse characterization.
A minimum value of 1.52 and 1:62 m, respectively, for X and Y was found, finely tuning the gun solenoid field to 2.35 kG, with a constant focusing field of 450 kG along the accelerating cavities. Without such focusing the measured projected emittance at the linac exit gave, respectively, 4.1 and 3:4 m in X and Y planes, underlying the effectiveness of the TW solenoid in compensating the emittance. Nevertheless, compensated values are still much higher than the starting ones. The lack of slice measurements makes impossible an analysis as the one of Sec. III B, to understand if such an increase of projected emittance is due to the slice centroid misalignment in phase space or to real slice emittance increase.
A qualitative check of whether the same phenomena is affecting these value can be given by the measurement of slice centroid misalignment. Even if the resolution is too low for slice emittance, it still allows one to estimate the centroid displacement between the center and the tail of the beam. In the streaked beam shown in Fig. 18 this difference is about 170 m, on the level of what we expect from a comparison with Fig. 15, given the total rms energy spread and the quadrupole settings in the considered case. The emittance value is indeed expected to be dominated by the two terms of Eqs. (11b) and (11c).
A lower limit for the slice brightness can be found by using the slice current measured and the projected emittance values measured. We obtain B s ¼ 1:8 Â 10 14 A=m 2 , which already is the highest transverse slice brightness ever measured at SPARC.
More detailed measurements on high compression factors require one to increase the time resolution of the measurement, increasing the RFD deflecting voltage.

V. CONCLUSIONS
The SPARC machine has been equipped to match the hardware requirements needed to the emittance compensation process in the regime of rf compression. With the aid of additional magnetic focusing field during the acceleration, we demonstrated that it is possible to increase the beam current, still maintaining the slice emittance low.
The VB process has some impact on the longitudinal phase space. The velocity dispersion is not linear with energy, causing some distortions in the LPS that increase with the compression factor. Those nonlinearities are the source of the triangular shape in the current profile shown in Fig. 6.
The measure of longitudinal emittance and slice energy spread is not an easy task. In fact our setup is limited by the RFD intrinsic resolution. This resolution is proportional to the beam transverse emittance, as Eq. (4) shows in the case of a drift. In practice we always measured the system resolution, leading to higher longitudinal emittance values. Beam collimation before the RFD would help in decreasing the transverse emittance and therefore increasing the resolution.
In a previous work [2] we have shown the preservation of the beam transverse slice emittance during rf compression by the use of additional focusing. In this paper the presence of such focusing has been proved to be effective even in absence of compression, as already predicted [28]. Futhermore, the effect of the compression on the projected emittance and transverse phase space have been investigated. The transverse phase space has been retrieved from slice emittance measurements, and the measured growth of projected emittance explained as phase space distortions caused by solenoid chromaticity. A new formula for the projected emittance that takes into account transverselongitudinal correlation has been derived, and used in one example to match the measured projected emittance with the measured slice emittance. Such distortions in transverse phase space can be avoided by careful alignment of magnets along the beam line, but the high energy spread needed for the compression (as high as 10% inside the compressor) makes the tolerance to the alignment at least 1 order of magnitude more stringent.
First tests with a low charge beam have been carried out in the extreme compression (C ¼ 17) regime (Sec. IV). Time resolved measurements were excluded because of the poor resolution, and the projected emittance measured was higher than the noncompressed one. The x-t plane shown in Fig. 18 suggests that even in this case the measured value was dominated by the centroid misalignment, but this has not been proven. Even using the measured projected emittance values, the current increase leads to the highest transverse slice brightness measured at SPARC.

APPENDIX: GENERALIZED EMITTANCE CALCULATION FROM SLICE MEASUREMENTS IN CASE OF TRANSVERSE-LONGITUDINAL CORRELATIONS
In the following we demonstrate Eq. (11) directly from the RMS emittance definition: we discuss only horizontal emittance, but the same reasoning applies to vertical ones as well.
The beam can be divided in N s longitudinal slices, being N j the number of particles of the j slice (j ¼ 1; . . . ; N s ), N ¼ P N s j¼1 N j the total number of particles, and x ij (x 0 ij ) the transverse position (moment) of the i particle of the j slice. The second order moment of the position is with " x the x coordinate of the beam centroid, " x j the x position of the centroid of the j slice, i.e., x ij ; and hx 2 i j the second order moment of the particle position in the j slice, Similar equations hold for hx 02 i as well. The positionmoment correlation reads xÞð " x 0 j À " x 0 Þ ¼ h s 0 s i þ hX s X 0 s i; with the position-moment correlation for the particle in the same slice being equal to Applying the previous relations and the corresponding ones for hx 02 i, Eq. (A1) can then be written [see Eq. (11d)] as the sum of the envelope emittance " env n;x , the centroid emittance " cent n;x , and the cross emittance " cross n;x . Thus, the envelope emittance, Eq. (11a), " env n;x is the weighted sum of the emittance of each slice plus a term mixing the contributions from different slices. The emittance of centroids, Eq. (11b), accounts for the different slice centroids and it depends only on the mixed terms between a pair of slices, in fact " cent n;x x 0 Þ. The cross emittance, Eq. (11c), is then " cross n;x The previous equations for " env n;x , " cent n;x , and " cross n;x applied to a homogeneous beam give the same result reported in Ref. [29].