  We investigate through beam dynamics simulations the potential of a hybrid
layout mixing RF and THz technologies to be a compact X-ray source based on
Inverse Compton Scattering (ICS), delivering few femtoseconds to
sub-femtosecond pulses. The layout consists of an S-band gun as electron source
and a dielectric-loaded circular waveguide driven by a multicycle THz pulse to
accelerate and longitudinally compress the bunch, which will then be used to
produce X-ray pulses via ICS with an infrared laser pulse. The beam dynamics
simulations we performed, from the photocathode up to the ICS point, allows to
have an insight in several important physical effects for the proposed scheme
and also in the influence on the achievable bunch properties of various
parameters of the accelerating and transverse focusing devices. The study
presented in this paper leads to a preliminary layout and set of parameters
able to deliver at the ICS point, according to our simulations, ultrashort
bunches (around 1 fs rms), at 15 MeV, with at least 1 pC charge and
transversely focused down to around 10 um rms or below while keeping a compact
beamline (less than 1.5 m), which has not yet been achieved using only
conventional RF technologies. Future studies will be devoted to the
investigation of several potential ways to improve the achieved bunch
properties, to overcome the limitations identified in the current study and to
the definition of the technical requirements. This will lead to an updated
layout and set of parameters.
