Two-pass two-way acceleration in a superconducting continuous wave linac to drive low jitter x-ray free electron lasers

We present a design study of an innovative scheme to generate high rep rate (MHz-class) GeV electron beams by adopting a two-pass two-way acceleration in a superconducting (SC) linac operated in continuous wave (CW) mode. The electron beam is accelerated twice by being reinjected in opposite direction of propagation into the linac after the first passage. Acceleration in opposite directions is accomplished thanks to standing waves supported in rf cavities. The task of recirculating the electron beam when it leaves the linac after first pass is performed by a bubble-shaped arc compressor composed by a sequence of double bend achromat. In this paper we address the main issues inherent to the two-pass acceleration process and the preservation of the electron beam quality parameters (emittance, energy spread, peak current) required to operate x-ray free electron lasers (FEL) with low jitters in the amplitude, spectral and temporal domain, as achieved by operating in seeding and/or oscillator mode a CW FEL up to 1 MHz rep rate. Detailed start-to-end simulations are shown to assess the capability of this new scheme to double the electron beam energy as well as to compress the electron bunch length from picoseconds down to tens of femtoseconds. The advantage of such a scheme is to halve the requested linac length for the same final electron beam energy, which is typically in the few GeV range, as needed to drive an x-ray FEL. The AC power to supply the cryogenic plant is also significantly reduced with respect to a conventional single-pass SC linac for the same final energy. We are reporting also x-ray FEL simulations for typical values of wavelengths of interest (in the 200 eV – 8 keV photon energy range) to better illustrate the potentiality of this new scheme.


I. INTRODUCTION
Current x-ray free electron lasers (FELs) in operation are delivering c-ray high brilliance photon beams carrying a large number of photons per pulse, up to 10 13 , at quite modest rep rate up to 120 Hz. The only exception is the XFEL in operation at DESY in Hamburg, which is capable of very large rep rate thanks to superconducting (SC) rf cavities used for electron beam acceleration in the linac, allowing operating in pulse mode with long (millisecond) rf pulses: nevertheless the time structure of FEL photon pulses foresees a very large rep rate within the macro-pulse (up to 4.5 MHz) that lasts ∼1 millisecond, at an effective duty cycle of ∼1%, leading to an overall rep rate of ∼30 kHz.
As extensively discussed elsewhere [1], there is an increasing demand from FEL users that work on spectroscopy to decrease the number of photons per pulse down to a maximum of 10 9 , which avoids nonlinear processes in the sample. At the same time, there is interest to reach 1 MHz rep rate, with an uniform CW operation, in order to allow the sample to return to the ground state, as well as to reset the data acquisition system and proper storage of the data. Indeed, a CW operation at 1 MHz regular rep rate is ideal for spectroscopy with x-ray FEL pulses, in conjunction with high pulse-to-pulse spectral and amplitude stability, as typically achieved in full seeding operation mode of FELs, opposed to SASE operation, which is instead characterized by large amplitude and spectra jitters.
In the frame of a future development of a new scientific campus of University of Milan, the authors affiliated with INFN and University of Milan were requested by their Institutions to prepare a design study for a user facility devoted to the study of matter at the femto-second timescale with FEL photon beams. This paper reports the study of this newly conceived two-pass two way linear accelerator capable to significantly reduce footprint and AC power requirements, adding considerably to the compatibility of such kind of installation with typical university campus layouts. We believe that this concept to implement two-pass acceleration in a linac greatly improve the sustainability of large-scale facilities where multi-GeV high beam power linacs are envisaged.
The electron beams requested to drive the CW X-ray FEL under discussion, which is the backbone of a user facility named MariX (multidisciplinary advanced research Infrastructure for the generation and applications of x-rays), must have an energy variable in the 2.2-3.8 GeV range, carrying a 10-50 pC bunch charge with CW operation and up to 1 MHz rep rate, which implies a beam power at the undulator up to 190 kW for an average beam current of 50 μA.
Other relevant beam quality parameters, crucial for FEL operation, are: 1.5 to 2.0 kA bunch current, relative energy spread lower than 5 × 10 −4 and rms normalized transverse emittance lower than 0.5 mm-mrad at the undulator entrance (in both horizontal and vertical planes).
The idea of two-way acceleration is not new: in Refs. [2,3] the concept of beam recirculation and reinjection for a second pass was proposed, but no study was developed about the beam dynamics of such a recirculation: to our knowledge an arc compressor with proper geometry and double purpose of recirculating and compressing the electron bunch is being studied and presented here for the first time.
The concept of an arc compressor preserving the high brightness of an electron beam was presented in the seminal work in Ref. [4]. Here we reelaborated and implemented that concept consistently with the layout of a two-pass twoway acceleration in a SC linac, and under the constraints of beam quality for x-ray FEL emission. The SC technology reduces the timing incertitude of the SASE x-ray emission to the same scale of the photon pulse itself, minimizing the pulse to pulse time jitters with respect to existing SASE XFELs. Schemes for seeding are also explored to overcome the pulse to pulse intensity spread.
For the sake of completeness, it has to be noted that a two-pass acceleration in a linac can be implemented also with race-track scheme, e.g., the CEBAF one [5] where it has been proven that a beam can be accelerated several times in the same linac, without a two-way region. The drawback is a considerably larger footprint, and radio protected area, that in densely populated areas (e.g., Milano's suburbs) can be a severe issue concerning the costs of real estate necessary for the machine.
The paper is organized as follows: in Sec. II we discuss the accelerator design criteria, therefore issues concerning beam dynamics of high rep rate, the electron gun choice and high brightness electron beams in the specific context of two-way two-pass acceleration for driving x-ray FELs. Particular care is taken in examining the problems arising from the two-pass operation and compression in the arc; solutions are proposed for brightness preservation and matching.
The design criteria for the injector, for the two-way booster and for the matching line to the BAC are presented in subsections II A, II B and II C. In subsection II D are discussed technological challenges posed by CW operation of a high gradient SC linac, injector and photocathode requirements, rf power, SC cavities operation (including high order mode, HOM damping strategy).
Section III illustrates the start-to-end (S2E) simulation for the electron beam machine, from the bunch extraction to the FEL transfer line, while the Sec. IV illustrates the two MariX's FEL operation modes: SASE effective up to the maximum photon energy of 8 keV and full seeding, via HGHG cascaded operation, that can reach up to 3 keV photon energy.
Conclusions are finally drawn in Sec. V, underlying that the two-way SC CW linac new paradigm promises a scheme suitable to reduce construction and operational costs, besides its footprint, allowing to conceive compact research infrastructures compatible with the typical size of a University Campus.

II. DESIGN CRITERIA
In this section we present the 1 MHz, two-pass, two-way acceleration machine design. The MariX layout, shown in Fig. 1, is conceived to minimize the machine footprint without affecting the overall performance level. Rep rate requirement imposes us to choose the electron gun technology between DC guns and CW rf guns. The gun choice represents a crucial step in the whole project, since it sets the lower emittance limit. High gradient, room temperature guns, allowing for emittance compensation scheme [6][7][8], are ruled out by their low rep rate operation (100 Hz class) [9], stemming from heat dissipation issues. On the other hand, DC and CW rf guns feature lower electric peak fields at the photocathode, ∼5 MV=m and ∼20 MV=m [9] respectively, resulting in a relatively low output beam energy of ∼400 keV and 800 keV, but at much higher rep rate or even in CW. Such a low beam energy strongly affects the beam dynamics (BD) along the machine, since efficient emittance compensation schemes fail in presence of a high bunch peak current. Although DC guns show good performance, we found that an APEX-I like gun [10] better meets our requirements, due to the higher cathode peak field and the relatively higher beam energy at the exit, allowing a higher current density at the photocathode. The option presented in this paper is therefore a CW rf APEX-Ilike gun operating at 185.714 MHz.
The electron bunches are generated by Cs 2 Te photoemission [11][12][13] using UV laser pulses at 257.5 nm. The laser system we plan to use is based on a low power Yb oscillator operating at 100 MHz rep rate at 1030 nm. In order to reduce the rep rate from 100 to 1 MHz a simple solution is to use a fiber-connectorized Mach-Zehnder amplitude modulator. The laser pulses are then amplified in Yb-fiber amplifier based on the chirped pulse amplification architecture and on double-clad Yb-doped fiber. This fiber combines single mode beam quality over a large mode area with good thermal dissipation properties. After the amplifier the radiation is up-converted to the 4th harmonic (257.5 nm) via a double stage using an Lithium triborate crystal and a Cesium Lithium Borate crystal. Finally the pulses intensity is shaped in space by a pi-shaper [14] and in time using the stacking technique [14,15]. In order to obtain bunches of 50 pC we need about 30 mW (1 MHz) of laser mean power at 257.5 nm considering a 1% photocathode QE.
Downstream the gun an ∼20 m long injector brings beam energy up to 130 MeV, minimizing its longitudinal and transverse emittance; the electron bunches are then guided through a dogleg into the cryogenic booster L1. L1 is a SC linear accelerator, ∼140 m long, designed to operate in both directions. It is composed of 10 TESLA-like cryomodules [16] and one 3.9 GHz higher-harmonic cavity cryomodule [17] (Sec. II D). After acceleration in L1, the beam is injected into the BAC, a dispersive path allowing to u-turn and to reinject electron bunches into L1, while providing longitudinal compression. L1 is then traveled through a second time providing an energy doubling. The electron beam then reaches the L2 booster (a one-way element) that, being independent from L1, provides fine energy tuning before matching the beam to the undulators.

A. The injector
The MariX injector depicted in Fig. 3 is based on: (i) an APEX-I like photoinjector gun producing 800 keV electron beams at 1 MHz rep rate. (ii) a normal conducting rf buncher at 1.3 GHz positioned between two solenoids downstream the gun. The buncher starts a ballistic precompression which shortens the bunches by a factor of ∼2.5, while the solenoids compensate the transverse emittances. (iii) a SC 1.3 GHz 7-cells linac stop the fast compression effect given by the buncher, boosting the beam energy at ∼4 MeV. At this energy it is possible to work on the longitudinal phase space (LPS) shaping, applying a mild deceleration as it follows in the next point. (iv) a 3.9 GHz 3-cells high-harmonic cavity, which is dedicated to the LPS shaping and further bunch compression (an extra 2 times factor) [18], at the expenses of ∼2 MeV deceleration. (v) a second SC 1.3 GHz 7-cells linac (equal to the first one), boosting the bunch at ∼5.7 MeV. (vi) a solenoid that compensates again the transverse emittance oscillation, and refocus the beam envelope in the following 1 m long drift. At the drift end, the bunch shows beam parameters similar to that of an S-band high brightness photoinjector with beam parameters suitable to apply the velocity bunching (VB) compression technique [7,19]. (vii) a 3.9 GHz higher-harmonic 3-cells cavity, equal to the first one, for further LPS shaping (viii) One TESLA 9-cells SC linac that performs the final VB compression, shortening the bunch by a further factor of 1.8 (ix) a TESLA cryomodule that damp the last emittance oscillation, the VB compression and accelerates the beam at an energy of ∼130 MeV.
The compression and the high-harmonic LPS shaping performed along the injector have a key role. In GeV-class ultrahigh brightness machines like this, the final performance strictly depend on the (z; γ; I slice ) distribution in 3D space, whose optimization was performed using a tool based on a genetic algorithm named GIOTTO [20], which is able to cope with multidimensional problems, as illustrated in subsection III A Downstream the injector, a dogleg line brings the beam to the two-pass two-way booster, as shown in Fig. 1. A laser heater device can be inserted along this line, if needed, in order to better control possible microbunching instabilities (MBI) [21,22]. The impact of microbunching instability, driven by CSR and LSC in the bubble arc, has been FIG. 1. MariX facility layout, not to scale. The injector delivers the beam to the main booster linac (L1) through a dogleg. The L1 region (or two-way region) ends with a quadrupole matching and focusing line at the end of which the beam enters the bubble arc compressor (BAC) used to compress and for the beam u-turn. The beam is accelerated again in L1 and is finally energy-tuned in the linac L2. preliminarily evaluated. We collected indications that, with the present optics design and at full bunch compression, the instability gain is moderate, and not a show-stopper for lasing.

B. Boosting, high harmonic linac, and the arc compression matching line
The boosting section L1 provides an energy increase up to 1.6 GeV.
The higher-harmonic 3.9 GHz TESLA linac (HHL into Fig. 1) allows us to precorrect the LPS shape, giving an extra LPS rf curvature (subsection III B). This LPS pre-correction compensates for coherent synchrotron radiation (CSR) effects arising in the single-pass BAC [4,23,24], where the bunch peak current is increased by a factor up to 100. This scheme allows to control the CSR emittance dilution effect, dilution kept into a range of few percent (see Sec. III).
L1 region and the BAC are designed to avoid head-on collisions among counterpropagating bunches, accordingly the machine rep rate is closely related to the following conditions: where L 1 is the L1 region (or two-way region) length, L BAC the BAC length, N ≥ 2 the maximum number of bunches simultaneously hosted inside the BAC and λ bb the interbunches distance (@1 MHz, λ bb ≃ 300 m; see Fig. 1 for machine labels). This head-on collision-avoiding concept, in our case of N ¼ 2, is depicted in Fig. 2, which shows the bunches position separated by λ bb , at two different time steps, t and t þ T 2 that never collide each other. The quadrupole matching line between the main linac (L1) and the BAC exploits the symmetric focusing effect of a SC solenoid [25] positioned before the HHL. This section of the machine, being traveled back and forth by bunches, does not have a straightforward behaviour with respect to beam focusing. The SC solenoid is ideal for this operation because it provides an axisymmetric focusing that is independent on the versus of propagation along its magnetic axis. On the contrary, the single quadrupole action on the same axis is reversed by the crossing direction, i.e., it is focusing in the way forward (exiting from L1) and defocusing in the way back (exiting from the BAC). Therefore, the quadrupoles channel, if not properly set considering the way back bunch dynamics, results in a increasing transverse rms size. In this case, the beam will experience emittance dilution in the SC solenoid, by chromatic effects, which are proportional to the square of the transverse rms size. The 10 quadrupoles accomplish two tasks: matching the bunch to the BAC and maintaining the beam envelope within acceptable limits when entering the SC solenoid. This is the only place where quadrupoles are used in the two-pass two-way beam line region.
After the second acceleration passage in L1, the bunch, exiting from L1 left side, crosses the last injection-line dogleg dipole, with an energy of ∼30 times higher. Leaving L1 on the way back the bunch is headed to two extra cryomodules, named L2 ( Fig. 1), needed to tune the final beam energy (AE300 MeV) before the beam is matched to the undulators. A quadrupoles triplet, just before the last two cryomodules entrance, gives a focusing kick, permitting to the beam to reach the undulators transfer lines with an rms transverse size of few tens of microns.

C. Bubble arc compression line
The MariX BAC is a long dispersive path used to increase the beam peak current while it is u-turned. The lattice is based on the arc compressor seminal work described in [4] and it is composed by 14 double bend achromat (DBA) cells, each one bending the beam of 30°; Table I contains its main parameters. The arc lattice is composed as follows: two left-turns DBAs, ten right-turns DBAs, again two left-turns DBAs to complete the u-turn. The R 56 of the BAC, reported in Table I to reach full compression: the beam LPS is almost up-right and the bunch length approaches its minimum value of σ s ¼ R 56 Ã σ δ uncorr . The beam injected into the BAC, to be compressed, has a LPS properly chirped as it is discussed at the end of Sec. III B.

D. CW operation of a high gradient SC linac
The MariX operation at 1 MHz CW is possible thanks to the use of the SC technology for the accelerating sections. Indeed, all the accelerating structures will be continuously powered on and SC technology will allow to save capital and operational costs. Moreover, SC cavities typically sustain standing waves that allow the two-fold acceleration of the beam in the L1 linac as described before, at the nominal accelerating gradient here considered. This technology is now mature and it finds applications in many modern accelerators for FEL applications [26,27].
The requirements for the L1 linac of MariX are comparable to the specifications of the LCLS-II [26,28] accelerating linac now in its construction phase at SLAC. The accelerating structures will be based on the TESLA technology with proper modification for CW operation, namely HOM mode extraction and increase power dissipation. Eight cavities will be assembled inside a cryomodule and we foresee at present to have a single cryounit composed by ten cryomodules directly connected.
To reach the required 3.2 GeV, we set E acc ¼ 16 MV m −1 and a quality factor Q 0 ¼ 2 × 10 10 . With these parameters and assuming a cavity with specifications similar to LCLS-II, the estimated rf power consumption at the plug per cavity is 15 kW and the cryolosses 13.3 W. In this cryogenic calculation, the HOM losses are not included. Indeed, the short bunch passing L1 after the BAC will have a large spectral content and a proper strategy needs to be implemented to cope with it. Modes trapped in the cavity by the end tube cutoff frequencies will be absorbed by pick-up LCLS-II-like installed on the cavity while propagating modes will be intercepted by intracavity HOM absorbers at 45 W.
The two-fold operation of L1 allows to reduce the cost on cryogenics simply due the half length of the accelerating section. On the rf side, instead, the power required to accelerate the beam depends on its final energy and not on the linac length.
MariX will also use 3.9 GHz cavities to manipulate the LPS as described before. These cavities will be based, as those in LCLS-II, on a reviewed design of the cavities developed and provided to XFEL [17]. In particular, the CW operation will reflect in modification to the cavity and tank geometry and lower accelerating gradient to handle the larger dissipated power compared to pulse operation.

A. The injector
In order to generate a very high quality electron bunch, the injection beam line (Fig. 3) has been optimized by extensive numerical simulations based on the macroparticles tracking code Astra [29] and on the lattice optimization code GIOTTO [20]. Astra takes into account the space charge effects, which mainly affect the beam dynamics in this low energy section of the accelerator, GIOTTO is a code based on a genetic algorithm (GA), a powerful tool to cope with multidimensional problems. Both these codes are needful to find a proper injector working point (IWP) that sets the final machine performance in terms of the most crucial aspects: the beam current, the emittance and the energy spread. These requirements can be met by an IWP that minimizes three beam quality parameters: the transverse normalized emittance ϵ n;x−y , the longitudinal normalized emittances ϵ n;z and the bunch length σ z . As introduced in Sec. II A, the 3.9 GHz short cavities as well as working on the LPS curvature, they also allow to change the bunch current distribution. The minimization of both transverse and longitudinal emittance as target parameters for GIOTTO result into a very symmetric current distribution with a quasi parabolic current distribution showing in this injector an ideal beam laminarity behavior along the bunch, which in turn allows an optimal transverse emittance compensation [30,31]. This symmetric current distribution turned out to be beneficial also for the CSR detrimental effects, as shown below in Sec. III C.
The optimization carried on with GIOTTO worked on 16 machine knobs: 6 injection phases; 5 cavity field amplitudes (the APEX gun was set at 19.5 MV=m); 4 solenoid magnetic peak values; the drift from the last 7-cells SC cavity to the downstream 3-cells higher-harmonic cavity. This drift matches properly the emittance oscillations into the downstream devices.
The gun setting is shown in Table II, considering a beer can laser pulse shape.
The main beam parameters behavior, after the BD optimization, is shown in Fig. 4, where it is also highlighted the position of the first TESLA cryomodule. Both transverse and longitudinal emittance are minimized and damped into the cryomodule, while the beam energy increases from few MeV up to more than 130 MeV; furthermore the longitudinal bunching provided by the  upstream SC cavity (VB effect) is stopped by the cryomodule acceleration. Thereby, the injector has been studied and designed including the first cryomodule. The main beam parameter values at the injector exit are reported in Table III.

B. First pass through L1
The particles tracking for the booster region has been performed with the code Elegant [32], which can run millions of particles by using tracking matrices and can compute different collective effects. However, Elegant does implement neither transverse space charge forces, nor Liénard-Wiechert retarded potentials; in fact, both CSR and LSC are treated as impedances and their expressions convolved with the (arbitrary) longitudinal charge distribution. For this reason, only the injection beam-line that is mainly at low energy has been studied using Astra, while Elegant was adopted for the rest of the machine, above 130 MeV, where space-charge is no longer a concern.
L1 and the HHL have been simulated considering cavity long range wake-fields and the Rosenzweig Serafini rftransport matrix for SW cavities [33,34] to consider rf transverse focusing effects. The beam envelope in the first pass through L1 is shown in the upper diagram of Fig. 5 together with its energy gain along L1: note that the beam is still round in this first pass, due to the use of just rf and solenoid focusing up to this point. In two-way two-pass transport lines the use of quadrupoles, although possible, becomes critical, as already mentioned in Sec. II B. For this reason, we adopted an hybrid solution based on rf and solenoid focusing, with quadrupoles limited to the matching section between L1 and the BAC. For this purpose, the SW cavities, typically used in SC technology, give a stronger rf focusing effect than traveling wave (TW) ones, which results very advantageous. The net focusing effect of SW vs TW cavities, on 130 m booster length, is two times stronger.
The effect of the HHL downstream L1, working at 3.9 GHz providing an extra LPS rf curvature to compensate the CSR effect, is shown in Fig. 6, which shows LPS differences for both cases of HHL turned on and turned off before the bunch enters the BAC. The relevant benefit of this precorrection is shown and discussed in Sec. III. D at the BAC exit with the bunch fully compressed. Further, the HHL provides an extra acceleration of ∼80-100 MeV. This CSR compensation scheme is new, considering that the typical use of high harmonic cavities is for the LPS linearization, were bunches undergo a deceleration.
The BAC matching conditions require an additional transverse focusing provided by a short SC 5T solenoid, similar to the one reported in [25]; the effect is clearly shown in Fig. 5, where the envelope exhibits a sharp slope variation, reaching a waist at the entrance of the downstream quadrupoles focusing channel. Along the L1 boosting, where all the main beam quality parameters remain unchanged, the beam is accelerated with a shifted of þ6°w ith respect to the rf crest to provide the correct longitudinal phase space chirp inside the BAC.

C. Matching line and bubble arc compressor
The BAC quadrupole matching line is used to perform a dual action on the beam depending on its direction. In fact, every bunch travels two times along the line. Every bunch is matched to the BAC in the first pass and it is refocused, to strongly reduce its divergence, in the second pass. The obtained beam parameters after the first and the second passage through the line are summarized in Table IV  beam envelopes in the way back (beam leaving the BAC to be re-injected in L1) as needed to keep the envelopes constrained and with a low divergence in order to avoid chromatic effects inside the SC solenoid, which are detrimental to the emittance. The matched beam is then injected in the arc compressor where each bunch is gradually compressed to reach the maximum peak current at the extraction point.
The simulation was performed with Elegant taking into account collective effects crucial to this machine section: the CSR, the incoherent synchrotron radiation and the longitudinal space charge (LSC). The CSR emission is the most damaging effect since it causes an increase of beam emittance and energy spread inducing a distortion in the LPS distribution. Further, the CSR together with the LSC can lead to the MBI. All these collective effects have been simulated with a bunch of 10 6 macroparticles. The simulation results confirmed the CSR effects as we expected, although no relevant MBI signature was observed. In Sec. III E is shown the beam slice current at maximum compression with an MBI current ripple lower that 15% with respect to the maximum amplitude. This ripple is similar to the one shown in the LCLS S2E simulation reported in the Ref. [35], where the MBI effect is suppressed by the use of the laser heater device. 10 6 macroparticles are not enough for a correct MBI analysis and we just note that at this resolution it is not a concern. Since the MariX layout can easily host a laser heater (Sec. II A) we address an MBI detailed analysis in future works. These results are well-suited for our purposes.
The tracking of the main beam parameters along the line, composed by the matching section, the arc compressor and the matching section traveled in opposite direction, is shown in Fig. 9.
During the BD simulations we noted that a bunch current profile as the one in Fig. 8 has a better behavior, in terms of CSR emission negative effects, than in the case of a Gaussian beam current profile. Analytically-generated beams with a Gaussian current distribution were initially used to study the CSR effects inside the BAC, then we started to simulate beams coming from the Gun in a more realistic S2E configuration. Bunches coming from the Gun, after the gym into the injector, showed Fig. 8 similar current profiles. A comparison between different bunch current distributions, justifying what we noted, is given in Ref. [36]. The same reference gives an analytical model to find the best beam current profile to suppress the CSR negative effect. Results presented herein do not need additional optimization, therefore we did not pursuit further studies about bunch current profile shaping.
The LPS distortion effect introduced by the CSR can be fully precompensated by adopting a higher-harmonic cavity operating on the accelerating rf crest, which is a really new technique as already discussed in Sec. III B. Indeed this kind of LPS correction, inside DBA cells, is usually performed using sextupoles, which in our case are employed only for minor adjustments working at very low gradients. The LPS at the BAC exit with and without the HHL pre-correction are compared in Fig. 10 where the relative beam current profile is shown; the HHL capability to well correct the CSR LPS curvature is evident. The use of the HHL, that is characterized by only two parameters (injection phase and acceleration gradient), is advantageous with respect to the use of different sextupoles, which needs to be set with many parameters.
The beam at the arc compressor exit has the desired slice characteristics, in particular it shows a peak current of ∼1.6 kA (about 100 times than at injector exit). The normalized horizontal projected emittance is increased by the effect of the CSR emission kick, which is not a concern for the slice emittance, that in this simulation keeps the design parameter, as reported in Table V. Table V   1.0 × 10 −3 Slices @ I peak ε n;x <0.4 mm mrad Slices @ I peak ε n;y <0.2 mm mrad

D. Second pass through L1 and acceleration in L2
Downstream the BAC matching line, the returning bunch travels through the L1 booster for the second time. The weakest point on this two-pass two-way scheme is that quadrupoles cannot be used to contain beam envelopes, because their behaviour is not symmetric in both directions, and consequently their use is highly unrecommended. The only use of quadrupoles inside the two-pass region deals with the BAC beam matching. The beam envelopes and energy gain for the two passages are shown in Fig. 5 (Sec. III B), pointing out a BD comparison for the two beam directions. It is evident the SC solenoid effect at the entrance of the line, in the second passage, where the beam is over focused to few tens of microns. Then the bunch naturally defocuses and is partially kept under control by the rf focusing and the adiabatic damping focusing effect of the linac. At the end of the acceleration cycle, exiting from this second boosting phase, the bunch dimensions are about half a millimeter in both planes. The emittance is constant along the whole booster passage, except a for negligible effect given by the SC solenoid, i.e., it rises on the y-axis by a quantity ∼0.03 mm-mrad and decreases on the y-axis by ∼0.02 mm-mrad, an exchange between the transverse planes which is not worth being shown.
The MariX electron machine ends with two L-band cryomodules (Fig. 1), a one-way region named L2 dedicated to a AE300 MeV final beam energy tuning upstream the undulators transfer lines. A triplet, one meter before the L2 entrance, focuses the beam bringing it down to few microns. The beam envelopes and the energy gain in L2 are shown in Fig. 11.

E. Beam final performances
The S2E simulation ends with an electron beam at 3.4 GeV, confirming the design performance.
Because of the very high compression factor and relative high bunch slice current, the strong CSR emitted in the last DBA can cause a nontotal suppression of the (γ, x) and (γ; x 0 ) spaces bunch correlations, which means a residual space. The bottom row shows the same plots but for the best particles subset that represents more than 60% of the whole distribution (31 pC on 50 pC bunch charge). beam dispersion in the BAC bending plane. Similar effects, which arise in the last dipoles of the last magnetic compressor, have been already observed in X-ray FEL in operation worldwide. Small η x and η 0 x residues do not involve detrimental effects on the beam transport and acceleration from the BAC exit up to the L2 exit. On the contrary, residual dispersion is known to produce detrimental effects on the FEL emission [22].
Two dedicated quadrupoles within its bunch compressor are used to turn-off the dispersion at LCLS [37], a D-shape magnetic chicane with pairs of quadrupoles, skew quadrupoles and sextupoles is used at SwissFEL [38], while at XFEL, in addition to the dedicated magnetic devices, a tool has been developed that uses steerings magnets to correct both the dispersion and the beam orbit [39]. In MariX we added two additional quadrupoles in the dispersed region of the last DBA by following an approach similar to the one described in [38] and two steering magnets to remove the residual beam dispersion; insights of the last DBA lattice will be the topic of a future work. Moreover, we studied the possibility to introduce a dedicated dogleg at the L2 exit able to apply an additional correction to η x and η 0 x .
Plots representing the beam distribution at the end of the S2E, considering the complete distribution and the best slices (31 pC on 50 pC bunch charge) used in the FEL simulations, are shown in Fig. 12. The transverse phase space of the best subset (Fig. 12, bottom row, central plot) points out the strong reduction of the emittance if compared with the complete distribution (upper row). Figure 13 highlights the current distribution of the 31 pC best subset, already commented on MBI effects in Sec. III C The beam parameters for both the distributions at the S2E simulation end are reported in Table VI.
The MariX layout, compared to conventional FELs, presents the following advantages: first, the possibility to place the injector system alongside undulators room and L2, making the machine footprint compact and giving the possibility to share the same room to the gun injector laser, the FEL seeding system and devices devoted to pump and probe applications; second, the absence of magnetic chicanes (2-3, for a total of at least 30-40 m length), needed in conventional layouts, more than makes up for the arc compressor dimension, effectively halving the overall footprint and the relative civil engineering costs. In addition, considering the total length occupied by chicane elements equivalent to roughly half of the BAC, it is evident how the cost of the remaining optical elements is much lower than the cost of doubling linac L1.
Future work will be pursued to assess the stability achieved by the control and diagnostics systems to operate MariX at the desired beam performance under the effects of misalignments, errors and jitters expected in the machine components.

IV. EXPECTED FEL PERFORMANCE
Ultrabright, coherent ultrashort photon pulses of energy between 200 eV to 8 keV will be produced by the FEL at 1 MHz rep rate. The undulators UliX1 (with period λ w ¼ 2.8 cm, generating radiation from 200 eV to 4 keV) and UliX2 (λ w ¼ 1.2 cm, delivering 2-8 keV) with their matching lines terminate the device. The FEL source is tailored for time-resolved spectroscopy with coherent x-rays providing individual pulses not exceeding the linear response regime and avoiding space charge effects. This implies at most 10 8 photons per 10 fs-long pulse, which is 3-4 orders of magnitude lower than the individual peak intensity of the current XFELs. The 4-5 orders of magnitude gain in rep rate allowed by MariX, e.g., at 1 MHz, restores the high flux of the most advanced synchrotron sources, whilst providing ultrashort pulses suitable for time resolved pump-probe methods in optical, photoelectric effect and inelastic X scattering experiments. A 10 3 -10 4 X-ray beam attenuation must be applied (as at, e.g., SACLA [40]) to measure an undistorted energy-unshifted core level spectrum  Beam nominal values and radiation characteristics for the MariX FEL are summarized respectively in Tables VII and VIII. In the range of wavelengths between 2 and 5 Å, MariX provides either 10 10 -10 11 photons per shot with a 1 MHz rep rate in SASE mode or 10 9 -10 10 photons per shot in single spike SASE mode. These estimations, although do not take into account degradations due to errors, misalignments and jitters, exceed by one or more orders of magnitude the target values set by the scientific case. MariX will be therefore capable to satisfy the FEL photon beam parameters expected by the experiments, including a safety margin dealing with the losses in delivering the photon beams to experimental hutch, including the very narrow bandpass monochromatization that are needed for advanced time-resolved spectroscopy in the linear regime where 10 6 -10 7 photons per pulse are upper limits to avoid space charge losses of resolution. Then we are studying the possibility of obtaining a truly coherent photon beam at 100 kHz, by means of the cascaded High Gain Harmonics Generation (HGHG) fresh bunch technique [41]. This option will actually benefit precision timing measurements since the SASE intrinsic pulse-to-pulse jitters will be substantially eliminated, as well as the reduced pulse-to-pulse intensity fluctuations, thus approaching, at x-ray energies, the unique performance achieved today by FERMI@Elettra [42]. Typical FEL spectra for linear spectroscopy applications in the XUV and soft-Xray range are presented in Fig. 14. Case (a) has been obtained with UliX2 and the largest possible charge (50 pC) at 4.17 Å and presents SASE spectral fluctuations. Case (b) is an example of SASE single spike mode [43], with improved coherence, obtained in the same condition as case (a), but with a   8 pC lower charge. True coherence and pulse stability can be achieved with a segmented undulator, by means of cascaded fresh-bunch seeding technique. The seed energy is 12 nJ at 13.7 nm radiation wavelength and could be generated in the future by HHG in gas [44] (at least at lower rep rate) or with a dedicated FEL oscillator [45]. In the example shown in Fig. 14 (case (c)), performed at λ ¼ 9 Å, three undulator modules (with periods respectively 5 cm, 2.8 cm and 1.2 cm) are foreseen. This radiation source will cover the range of the x-ray absorption spectroscopy (XAS) and x-ray magnetic circular dichroism (XMCD) (with polarization control from quarterwavelength blades or undulators) and bulk photoemission. It will represent a highly efficient probe of matter at the nanoscale with bulk environment capability, like buried interfaces of interest in materials science, invivo biological samples or catalysers at work. The novel source will therefore create absolutely novel conditions for experiments that cannot be performed satisfactorily at present and foreseen sources based on storage rings or SASE-FEL. The MariX free electron laser anticipated performance is well beyond the state of the art of warm linac based FELs presently in operation, and in the trailing edge of EuXFEL and of the US future super-conducting FEL project of reference (LCLS-II [28]) as illustrated in Fig. 15.

V. CONCLUSIONS
In this work we presented an innovative acceleration scheme consisting in a two-pass, two-way operation made possible by the coupling of a superconducting linac to an arc compressor. SC rf cavities are meant to operate in CW, standing wave mode, allowing to significantly reduce footprint, acquisition and operational costs, while delivering high brightness electron beams at 1 MHz rep rate. The whole scheme has been explicitly conceived and purposely optimized for driving an ultrafast, coherent, x-ray FEL light source for the foreseen MariX user facility.
Multicode based start-to-end simulations demonstrate both feasibility of the acceleration scheme and the FEL potential performance that, for selected operational setups, matches the requirements of a wide scientific case based on linear spectroscopy methods. Beside these significant simulation results, the MariX's two-way beam region raises questions about beam diagnostics and beam control. Our preliminary valuation is to use directional beam position monitors that distinguish between forward and backward beam traveling directions and ultrafast striplines beam kickers [47] used like steerings, a 12 ns pulse length able to see only one bunch. Even standard steering magnets could be used with a set fulfilling both forward and backward traveling beams, but still to be proven.
Further details concerning the MariX project and the machine design can be found on the official website [48] and on the Conceptual Design Report of the machine [49].

APPENDIX: ADDITIONAL PHASE SPACES ALONG MARIX MACHINE
The MariX layout from the BD point of view is characterized by multiple zones: The injector, L1 region in forward beam direction (booster, HHL, solenoid and quads channel), the bubble arc compressor BAC, again L1 region in backward direction and concluding the L2 oneway linac for final energy adjustment before entering the FEL undulator. Figure 16 gives additional beam phase spaces, which help the reader to better figure out the machine BD. Further, in Fig. 17 is possible to locate all space phases discussed in this work along the MariX's beam line.