  The demands on performance of advanced linear accelerator based facilities
strongly depend on the quality of the particle beams produced by such machines.
Indeed, state-of-the-art applications in photon production and high-energy
physics colliders require to use very high brightness electron beams, implying
the coexistence of high peak currents and small transverse emittances. In such
systems, the nominal phase-space density may be diluted by the presence of
self-induced electromagnetic fields, causing interaction among charged
particles through space charge forces and the excitation of wakefields. The two
sources of collective effects may both be present in significant levels, and be
coupled by the strong externally applied transverse and longitudinal fields
present in modern high gradient linear accelerators. Thus, beam dynamics
studies investigating all relevant effects, applied and collective, are
necessary to predict the operational limitations of a given instrument. Such
modeling, involving a large number of computational particles, can require
significant numerical resources. In this paper we present a fast tracking code
which permits accurate evaluation of wakefield effects in rf linacs, while also
including a simple, robust model for space-charge forces to streamline the
computations. The features of such a tool are discussed in detail in this paper
and comparisons with more time-intensive commonly used tracking codes or
analytical models are utilized to validate the approach we introduce. In
addition, the applications motivating the development of this code define
unique and challenging scenarios from the perspective of beam physics.
Specifically, the fast simulation framework developed in this paper aims to
describe intense electron beams injected at low energy in high-gradient
accelerating structures which introduce strong rf focusing as well as strong
wakefield interactions.
