{'fraction_non_alphanumeric': 0.03761392815824374, 'fraction_numerical': 0.022715087897514037, 'mean_word_length': 4.091954022988506, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 34, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Cold streams in early massive hot haloes as the main mode of galaxy formation

The massive galaxies in the young universe, ten billion years ago, formed stars at surprising intensities. Although this is commonly attributed to violent mergers, the properties of many of these galaxies are incompatible with such events, showing gas-rich, clumpy, extended rotating disks not dominated by spheroids (Genzel et al. 2006, 2008). Cosmological simulations and clustering theory are used to explore how these galaxies acquired their gas. Here we report that they are stream-fed galaxies, formed from steady, narrow, cold gas streams that penetrate the shock-heated media of massive dark matter haloes (Dekel&Birnboim 2006; Keres et al. 2005). A comparison with the observed abundance of star-forming galaxies implies that most of the input gas must rapidly convert to stars. One-third of the stream mass is in gas clumps leading to mergers of mass ratio greater than 1:10, and the rest is in smoother flows. With a merger duy cycle of 0.1, three-quarters of the galaxies forming stars at a given rate are fed by smooth streams. The rarer, submillimetre galaxies that form stars even more intensely are largely merger-induced starbursts. Unlike destructive mergers, the streams are likely to keep the rotating disk configuration intact, although turbulent and broken into giant star-forming clumps that merge into a central spheroid (Noguchi 1999; Genzel et al. 2008, Elmegreen, Bournaud&Elmegreen 2008, Dekel, Sari&Ceverino 2009). This stream-driven scenario for the formation of disks and spheroids is an alternative to the merger picture.

The massive galaxies in the young Universe, ten billion years ago, formed stars at surprising intensities. 1,2 Although this is commonly attributed to violent mergers, the properties of many of these galaxies are incompatible with such events, showing gas-rich, clumpy, extended rotating disks not dominated by spheroids. 1,3,4 Cosmological simulations 5 and clustering theory 6,7 are used to explore how these galaxies acquired their gas. Here we report that they are stream-fed galaxies, formed from steady, narrow, cold gas streams that penetrate the shock-heated media of massive dark matter haloes. 8,9 A comparison with the observed abundance of star-forming galaxies implies that most of the input gas must rapidly convert to stars. One-third of the stream mass is in gas clumps leading to mergers of mass ratio greater than 1:10, and the rest is in smoother flows. With a merger duy cycle of 0.1, three-quarters of the galaxies forming stars at a given rate are fed by smooth streams. The rarer, submillimetre galaxies that form stars even more intensely 2,10,11 are largely merger-induced starbursts. Unlike destructive mergers, the streams are likely to keep the rotating disk configuration intact, although turbulent and broken into giant starforming clumps that merge into a central spheroid. 12,13,4,14 This stream-driven scenario for the formation of disks and spheroids is an alternative to the merger picture.

Star-Formation Rate versus Halo Growth Rate
It appears that the most effective star formers in the Universe were galaxies of stellar and gas mass of ∼ 10 11 M ⊙ at redshifts z = 2 − 3, when the Universe was ∼ 3 Gyr old. The common cases 1,3 show star-formation rates (SFR) of 100 − 200 M ⊙ yr −1 . These include UV-selected galaxies termed BX/BM 15 and rest-frame optically selected galaxies termed sBzK, 16 to be referred to collectively as "Star-Forming Galaxies" (SFGs). Their SFRs are much higher than the 4 M ⊙ yr −1 in today's Milky Way, while their masses and dynamical times are comparable. The comoving space density of SFGs is n ≃ 2×10 −4 Mpc −3 , implying within the standard cosmology (termed ΛCDM) that they reside in dark-matter haloes of masses < ∼ 3.5×10 12 M ⊙ . The most extreme star formers are dusty Sub-Millimeter Galaxies (SMG), 11,10 with SFRs of up to ∼ 1, 000 M ⊙ yr −1 and n ≃ 2×10 −5 Mpc −3 . Whereas most SMGs could be starbursts induced by major mergers, the kinematics of the SFGs indicate extended, clumpy, thick rotating disks that are incompatible with the expected compact or highly perturbed kinematics of ongoing mergers. 3,1, 17,4 The puzzle is how massive galaxies form most of their stars so efficiently at early times through a process other than a major merger. A necessary condition is a steady, rapid gas supply into massive disks.
It is first necessary to verify that the required rate of gas supply is compatible with the cosmological growth rate of dark matter haloes. The average growth rate of halo mass, M v , through mergers and smooth accretion, is derived 6 based on the EPS theory of gravitational clustering 18 (Supplementary Information, SI, §1), or from cosmological simulations. 19,20 For ΛCDM, the corresponding growth rate of the baryonic component is approximatelẏ M ≃ 6.6 M 1. 15 12 (1 + z) 2. 25 where M 12 ≡ M v /10 12 M ⊙ , and f .165 is the baryonic fraction in the haloes in units of the cosmological value, f b = 0.165. Thus, at z = 2.2, the baryonic growth rate of haloes of 2 × 10 12 M ⊙ isṀ ≃ 200 M ⊙ yr −1 , sufficient for fueling the SFR in SFGs. However, the margin by which this is sufficient is not large, implying that (1) the incoming material must be mostly gaseous, (2) the cold gas must efficiently penetrate into the inner halo, and (3) the SFR must closely follow the gas supply rate.

Penetrating Cold Narrow Streams
The deep penetration is not a trivial matter, given that the halo masses of M v > 10 12 M ⊙ are above the threshold for virial shock heating, 21,22,9,8 M shock < ∼ 10 12 M ⊙ . Such haloes are encompassed by a stable shock near their outer radius, R v , inside which gravity and thermal energy are in virial equilibrium. Gas falling in through the shock is expected to heat up to the virial temperature and stall in quasi-static equilibrium before it cools and descends into the inner galaxy. 23 However, at z ≥ 2, these hot haloes are penetrated by cold streams. 9, 8 Dekel & Birnboim 8 pointed out that because early haloes with M v > M shock populate the massive tail of the distribution, they are fed by dark-matter filaments from the cosmic web that are narrow compared to R v and denser than the mean within the halo. The enhanced density of the gas along these filaments makes the flows along them unstopable; in particular, they cool before they develop the pressure to support a shock, and thus avoid the shock heating (SI, §2).
To investigate the penetration of cold streams, we study the way gas feeds massive high-z galaxies in the cosmological MareNostrum simulation -an adaptive-mesh hydrodynamical  Figure 1. Entropy, velocity and inward flux of cold streams pouring through hot haloes. The maps refer to a thin slice through one of our fiducial galaxies of M v = 10 12 M ⊙ at z = 2.5. The arrows describe the velocity field, scaled such that the distance between the tails is 260 km s −1 . The circle marks the halo virial radius R v . The entropy, log K = log(T /ρ 2/3 ), in units of the virial quantities, highlights (in red) the high-entropy medium filling the halo out to the virial shock outside R v . It exhibits (in blue) three, radial, low-entropy streams that penetrate into the inner disk, seen edge-on. The radial flux per solid angle isṁ = r 2 ρ v r , in M ⊙ yr −1 rad −2 , where ρ is the gas density and v r the radial velocity. box of side length 320 kpc. The colours refer to inflow rate per solid angle of point-like tracers at the centers of cubic-grid cells. The dotted circle marks the halo virial radius. The appearance of three fairly radial streams seems to be generic in massive haloes at high redshift -a feature of the cosmic web that deserves an explanation. Two of the streams show gas clumps of mass on the order of one-tenth of the central galaxy, but most of the stream mass is smoother (SI, Fig. 10). The > ∼ 10 10 M ⊙ clumps, which involve about one-third of the incoming mass, are also gas richin the current simulation only 30% of their baryons turn into starts before they merge with the central galaxy.
simulation in a comoving box of side length 71 Mpc and a resolution of 1.4 kpc at the galaxy centers (SI §3). The gas maps in Figs. 1 & 2 demonstrate how the shock-heated, high-entropy, low-flux medium that fills most of the halo is penetrated by three narrow, high-flux streams of low-entropy gas (SI, Figs. 7-10). The flux map demonstrates that more than 90% of the inflow is channeled through the streams (blue), at a rate that remains roughly the same at all radii. This rate is several times higher than the spherical average outside the virial sphere,ṁ vir ≃ 8 M ⊙ yr −1 rad −2 by eq. (4). The opening angle of a typical stream at R v is 20 • −30 • , so the streams cover a total angular area of ∼ 0.4 rad 2 , namely a few percent of the sphere. When viewed from a given direction, the column density of cold gas below 10 5 K is above 10 20 cm −2 for 25% of the area within the virial radius. While the pictures show the inner disk, the disk width is not resolved, so the associated phenomena such as shocks, star formation and feedback are treated in an approximate way only.
The penetration is evaluated from the profiles of gas inflow rate,Ṁ(r), through shells of radius r, Fig. 3 (SI, Fig. 11). The average profile reveals that the flow rate remains constant from well outside R v ∼ 90 kpc to the disk inside r ∼ 15 kpc. Figure 3. Accretion profilesṀ (r). Shown is the gas inflow rate through spherical shells of radius r, from the disk vicinity to almost twice the halo virial radius, obtained by integrating r 2 ρ v r over the whole shell. The thick black curve is the average over the simulated galaxies of the fiducial case, M v ≃ 10 12 M ⊙ at z = 2.5. It shows deep penetration at a roughly constant rate ∼ 100 M ⊙ yr −1 , consistent with the virial growth rate predicted by eq. (4). Apparently, the inflow rate does decay while traveling through the halo, but this decay is roughly compensated by the higher cosmological inflow rate when that gas entered the halo, eq. (4), leading to the apparent constancy of accretion rate with radius. The coloured curves refer to four representative galaxies, two showing clumps with µ > ∼ 0.1 and two with smoother flows involving only mini-minor clumps of µ < 0.1. Clumps with µ > ∼ 0.3 appear within 2R v about once in ten galaxies; that is, major mergers are infrequent (SI, Fig. 11). TheṀ (r) profiles serve for extracting the conditional probability distribution P (Ṁ |M v ), leading to the abundance n(>Ṁ ) (SI, Fig. 12).

Abundance of Gas Inflow Rates
To relate the feeding by streams to the observed abundance of galaxies as a function of SFR, we use the MareNostrum inflow-rate profiles to evaluate n(>Ṁ), the comoving number density of galaxies with an inflow rate >Ṁ. We first extract the conditional probability distribution P (Ṁ|M v ) by sampling theṀ (r) profiles uniformly in r, using the fact that the velocity along the streams is roughly constant (SI § §5,6). This is convolved with the halo mass function, 24 n(M v ), to give The desired cumulative abundance n(>Ṁ ), obtained by integration over the inflow rates fromṀ to infinity, is shown at z = 2.2 in Fig. 4. Assuming that the SFR equalsṀ , the curve referring toṀ lies safely above the observed values, marked by the symbols, indicating that the gas input rate is sufficient to explain the SFR. However,Ṁ and the SFR are allowed to differ only by a factor of ∼ 2, confirming our suspicion that the SFR must closely follow the gas-input rate. Because at z ∼ 2.2 the star-forming galaxies constitute only a fraction of the observed ∼ 10 11 M ⊙ galaxies, 25,26 the requirement for a SFR SFR almost as great aṡ M , based on Fig. 4, becomes even stronger. Figure 4. Abundance of galaxies as a function of gas inflow rate, n(>Ṁ ). Shown is the comoving number density, n, of galaxies with inflow rate higher thanṀ at z = 2.2, as predicted from our analysis of the cosmological simulation. The upper curve refers to total inflow. It shows that galaxies withṀ > 150 M ⊙ yr −1 are expected at a comoving number density n ∼ 3×10 −4 Mpc −3 (similar to estimates in other simulations 27,28 ). Fluxes as high asṀ > 500 M ⊙ yr −1 are anticipated at n ∼ 6×10 −5 Mpc −3 . The lower curve is similar, but limited to gas input by µ > 0.1 mergers. The symbols represent the vicinity of where the observed massive star-forming galaxies can be located once their observed SFR is identified withṀ . The sBzK/BX/BM galaxies are marked SFG. 11 The SMGs respectively brighter and fainter than 5 mJy are marked accordingly. 11,10 We see that the overall gas inflow rate is sufficient for the observed SFR, but the small margin implies that the SFR must closely follow the rate of gas supply. Most of the massive star formers at a given SFR are expected to be observed while being fed by smooth flows rather than undergoing mergers. By studying the contribution of different halo masses to the abundance n(>Ṁ ), we learn that the high-SFR SFGs and SMGs are associated with haloes of mass 10 12 − 10 13 M ⊙ (SI, Fig. 13).

Smooth Flows versus Mergers
By analysing the clumpiness of the gas streams, using the sharp peaks of inflow in thė M (r) profiles, we address the role of mergers versus smooth flows. We evaluate each clump mass by integrating M clump = Ṁ (r) dr/v r (r) across the peak, and estimate a mass ratio for the expected merger by µ = M clump /(f b M v ), ignoring further mass loss in the clump on its way in and deviations of the galaxy baryon fraction from f b . We use the term "merger" to describe any major or minor merger of µ ≥ 0.1, as distinct from "smooth" flows, which include "mini-minor" mergers with µ < 0.1. We find that about one-third of the mass is flowing in as mergers and the rest as smoother flows. However, the central galaxy is fed by a clump of µ ≥ 0.1 during less than 10% of the time; that is, the duty cycle for mergers is η < ∼ 0.1. A similar estimate is obtained using EPS merger rates 7 and starburst durations of ∼ 50 Myr at z = 2.5 from simulations 29 (SI, §5).
From the difference between the two curves of Fig. 4 we learn that only a quarter of the galaxies with a givenṀ are to be seen during a merger. The fact that the SFGs lie well above the merger curve even if the SFR is ∼Ṁ indicates that in most of them the star formation is driven by smooth streams. Thus, "SFG" could also stand for "Stream-Fed Galaxies". This may explain why these galaxies maintain an extended, thick disk while doubling their mass over a halo crossing time. 4 On the other hand, if the SFR is ∼Ṁ , we learn from Fig. 4 that about half of the bright SMGs and most of the fainter SMGs lie below the merger curve and are therefore consistent with being merger-induced starbursts. 11

Conclusion and Discussion
We obtain that Stream-Fed Galaxies of baryonic mass ∼ 10 11 M ⊙ at z ∼ 2.5 were the most productive star formers in the Universe. An integration ofṀ over halo mass and time reveals that most of the stars in the Universe were formed in Stream-Fed Galaxies, within haloes > 2 × 10 11 M ⊙ at 1.5 < z < 4. The constraints on the overall SFR density at these epochs 30 imply that SFR has been suppressed in smaller galaxies, e.g., by photoionization and stellar feedback. 31,32,8 The early presence of low-SFR galaxies 25,26 requires quenching of SFR also at the massive end, perhaps due to gravitational heating by destructive streams. 33 The streams are likely also to be responsible for compact spheroids, as an alternative to mergers 34 and the associated heating by expanding shocks. 23,33 Using eq. (4), we find that at z ≥ 2 the streams can maintain both the high gas fraction and the turbulence necessary for the disk to breakup into giant clumps by gravitational instability, with dispersion-torotation ratio σ/V ∼ 0.25, as observed. 4 The clumps migrate inward and dissipatively merge into a spheroid. 12,13 The stream carrying the largest coherent flux with an impact parameter of a few kiloparsecs determines the disk's spin and orientation, and the stream clumps perturb it. The incoming clumps and the growing spheroid can eventually stabilize the disk and suppress star formation. We can thus associate the streams with the main mode of galaxy and star formation occurring in massive haloes at z ∼ 2 −3; the streams that create the disks also make them fragment into giant clumps that serve both as the sites of efficient star formation and the progenitors of the central spheroid, which in turn helps the streams to quench star formation.
Although wet mergers may grow secondary disks31, they are not as frequent as the observed SFGs (Fig. 4), these disks are neither gas rich nor clumpy enough, and, unlike most SFGs, they are dominated by stellar spheroids.
The cold streams should be detectable by absorption or emission. For external background sources, our simulation predicts that haloes with M v ∼ 10 12 M ⊙ at z ∼ 2.5 should contain gas at temperature < 10 5 K with column densities > 10 20 cm −2 covering ∼ 25% of the area at radii between 20 and 100 kpc, with coherent velocities < ∼ 200 km s −1 . Sources at the central galaxies should show absorption by the radial streams in ∼ 5% of the galaxies, flowing in at > ∼ 200 km s −1 , with column densities ∼ 10 21 cm −2 (SI, Figs. 7-9).

SUPPLEMENTARY INFORMATION
This is an extension of the Letter to Nature, aimed at providing further details, in support of the results reported in the main body of the Letter.
The time variable ω, which makes the expression time invariant, is inversely proportional to D(t), the linear growth rate of density fluctuations at time t in the assumed cosmology, with δ c ≃ 1.68. The power spectrum of initial density fluctuations enters via the variance σ 2 (M v ). The constant q is 2.2 with an uncertainty of ±0.1 intrinsic to the EPS theory. Eq.
(3) has been confirmed to resemble the assembly rate in cosmological N-body simulations. 19 For the ΛCDM cosmology, 35 a flat Universe with 72% dark energy, mass dominated by cold dark matter, and fluctuation normalization parameter σ 8 = 0.8, the corresponding growth rate of the baryonic component is well fitted by the practical formula 6 M ≃ 6.6 M 1. 15 12 2) and their own analysis of the simulations by A. Kravtsov, pointed out that at redshifts higher than z crit ∼ 2, narrow cold streams penetrate deep into the dark-matter haloes even when the haloes are more massive than the shock-heating scale, M shock < ∼ 10 12 M ⊙ , and proposed a possible explanation for this phenomenon. This prediction is summarized in Fig. 5.
The critical condition for a stable virial shock is that the radiative cooling rate behind the shock is slower than the compression rate, t −1 cool < t −1 comp , allowing the buildup of pressure support behind the shock against global gravitational collapse. 21 Based on a spherical analysis, DB06 found that a virial shock should exist in dark-matter haloes above a threshold mass M shock < ∼ 10 12 M ⊙ that is rather constant in time, at an actual value that is sensitive to the metallicity of the gas in the halo. The existence of such a threshold mass and its value as a function of redshift have been confirmed by the analysis of cosmological simulations. 9,8,23,5 However, at high redshifts, even above the threshold mass, a shock is not  Fig. 7 of DB06. The nearly horizontal curve marks the robust threshold mass for a stable shock based on spherical infall analysis, M shock (z). Below this curve the flows are predicted to be predominantly cold and above it a shock-heated medium is expected to extend out to the halo virial radius. The inclined solid curve is the conjectured upper limit for cold streams, valid at redshifts higher than z crit ∼ 2. The hot medium in haloes of M v > M shock at z > z crit is predicted to host penetrating cold streams, while haloes of a similar mass at z < z crit are expected to be all hot, shutting off most of the gas supply to the inner galaxy. Also shown is the characteristic Press-Schechter halo mass M * (z); it is much smaller than M shock at z > 2. expected to develop along narrow, cold, radial streams that penetrate through the halo, because the cooling there is more efficient than in the surrounding halo.
The appearance of intense streams at high z, as opposed to their absence at low z, is likely to reflect the interplay between the shock-heating scale and the independent characteristic scale of nonlinear clustering, i.e., the Press-Schechter 36 mass M * that corresponds to the typical dark-matter haloes forming at a given epoch. The key difference between the two epochs is that the rapid growth of M * with time, as seen in Fig. 5, makes M shock ≫ M * at z > 2 while M shock ∼ M * at lower redshifts.
Cosmological N-body simulations 9,37 reveal that while the rare dark-matter haloes of M v ≫ M * tend to form at the nodes of intersection of a few filaments of the cosmic web, the typical haloes of M v ∼ M * tend to reside inside such filaments. Since the filament width is comparable to the typical halo size R * ∝ M 1/3 * and seems not to vary much with position along the filament, one expects the rare haloes to be fed by a few streams that are narrow compared to the halo size, while the typical haloes accrete from a wide angle in a practically spherical pattern. Assuming that at any given epoch the accretion rate of dark matter,Ṁ , is roughly proportional to the halo mass M v (Eq. 1 of the Letter), while the virial densities in haloes of all masses are the same (by definition), the geometrical difference implies that the densities in the filaments penetrating M v ≫ M * haloes are higher by a factor of a few than the typical densities in their host haloes. The above is demonstrated in Fig. 6 (as well as in Fig. 5   In terms of the different ways by which these two haloes are fed by dark-matter, they correspond to two haloes of the same mass M v ∼ 10 12 M ⊙ , but at z ∼ 0 and z ∼ 2 − 3 respectively. Top: dark-matter density contrast about the mean density in the shell. Middle: particle velocity dispersion (loosely termed "temperature"), in terms of the virial value. Bottom: infall velocity, represented by the anisotropy parameter β, where β = 0 corresponds to isotropic velocities and β = 1 to pure radial motions. We see that the typical halo resides inside a broad filament so it is practically fed by wide-angle diffuse accretion. On the other hand, the rare halo is fed by narrow, dense, radially in-flowing filaments.
Assuming that the density of the gas flowing along the filaments scales with the darkmatter density, and that the infall velocity is comparable to the halo virial velocity, one expects the cooling rate in the filaments feeding an M v ≫ M * halo to be higher by a factor of a few than in the surrounding spherical halo. If the compression rate in the filaments is comparable to that in the host halo, this implies that the thin filaments should have a harder time supporting a stable shock. As a result, the critical halo mass for shock heating in the filaments feeding it must be larger by a factor of a few. This is the case for M v > ∼ M shock haloes at high redshifts.
A crude estimate along the lines above led DB06 to the conjectured upper limit for penetrating streams shown in Fig. 5: This crude maximum mass for cold streams is shown in Fig. 5 for an arbitrary choice of f = 3.
A preliminary analysis of the MareNostrum simulation 5 confirms the crude prediction of eq. (5), when taking into account the lower metallicities in the simulation compared to that assumed in the analytic calculation. The streams analysed in the current Letter, in dark-matter haloes of M v = 10 12 M ⊙ at z = 2.5, represent an encouraging confirmation of the validity of the DB06 conjecture. Further analysis in progress (T. Goerdt et al., in preparation) indicates, for example, that at z = 2.5, the fraction of inflow in cold streams drops by a factor of three at M v ≃ 2 × 10 13 M ⊙ , much in the spirit of the crude prediction of Fig. 5. The permitted cold gas supply by streams in massive haloes at high redshift, followed by a shutdown above M shock at low redshifts, turn out to provide good match to many observed galaxy properties when these features are incorporated in semi-analytic simulations of galaxy formation. 38-41 Still, the dependence of the stream properties on redshift and halo mass is yet to be explored in a more quantitative way.

The MareNostrum simulation
The cosmological simulation 5,42 used in the present analysis has been performed with the Eulerian AMR code RAMSES 43 on 2,048 processors of the MareNostrum supercomputer. The code simulates the coupled gas and dark-matter dynamics, using a Particle-Mesh scheme for the dark-matter component and a second-order Godunov scheme for the gas component. In order to describe the formation of dense star-forming disks, the code includes metal-dependent radiative cooling, UV heating by a standard photo-ionizing background, star formation, supernovae feedback and metal enrichment. The simulation box of comoving 50 h −1 Mpc involved 1, 024 3 dark-matter particles and 4 × 10 9 gas cells. Using a quasi-Lagrangian refinement strategy, the spatial resolution reaches ∼ 1 h −1 kpc in physical units at all times. The dark-matter particle mass is ∼ 10 7 M ⊙ , so each of the haloes studied here consists of ∼ 10 5 particles within the virial radius. Since one can reliably describe the formation of haloes down to ∼ 100 particles, 44 namely ∼ 10 9 M ⊙ , the 10 12 M ⊙ haloes addressed here are three orders of magnitude above the minimum halo mass. This simulation allows us to capture the important properties of gas accretion into galaxies in more than 100 haloes of ∼ 10 12 M ⊙ at z ∼ 2.5, thus providing a large statistical sample. A first analysis of galaxies from this simulation 5 have confirmed the bi-modal nature of cold flows and hot media as a function of mass and redshift. 8 Our current analysis is based on robust features that are properly simulated, such as the large-scale structure of the streams, the total flux in them, and the gas clumps larger than 10 9 M ⊙ . However, the finite resolution does not allow a fair treatment of smallscale gas phenomena such as turbulence in the hot gas, ram-pressure stripping of clumps, hydrodynamical instabilities at the stream boundaries, and the formation of small clumps. Furthermore, the current resolution does not allow a detailed study of the disks that form at the halo centers as the disk thickness is barely resolved. More accurate analysis of the fine stream structure and disk buildup should await simulations of higher resolution.

Maps of entropy, flux and density
Figs. 7 to 9 extend the visual information provided by Figs. 1 and 2 of the Letter. They display different gas properties that highlight the structure and kinematics of the cold streams in three simulated galaxies of M v = 10 12 M ⊙ at z = 2.5.
The entropy maps show log(T /ρ 2/3 ) where the temperature and gas density are in units of the virial temperature and mean density within the halo virial radius R v . They exhibit the virial shock, covering most of the area of the virial sphere and sometimes extending beyond 2R v . The narrow streams are of much lower entropy, by more than three orders of magnitude, comparable to the low entropy in the central disk they lead to. The boundaries between the streams and the hot medium within the virial radius are sharp and well defined. We also note that semi-cylindrical shocks sometimes partly surround the elongated streams long before they enter the halo virial radius.
The arrows mark the velocity field projected on the slice plane, and the flux colour maps show the flow rate per solid angle,ṁ = r 2 ρ v r . The flux inward is almost exclusively channeled through the narrow streams, typically involving 95% of the total inflow rate. This flux is several times the average over a sphere,ṁ vir ≃ 8 M ⊙ yr −1 rad −2 . The opening angle of a typical stream at R v is 20 − 30 • , so the streams cover a total area of ∼ 0.4 rad 2 , namely a few percent of the sphere. The velocity field in the hot medium is turbulent and sometimes showing vast outflows. The inward flux over most of the sphere area is negligible, both inside and outside the virial radius or the virial shock. The streaming velocities are supersonic, with a Mach number of order a few.
Although the streams tend to be rather radial when viewed on scales comparable to the halo virial radius, some of them flow in with impact parameters on the order of 10 kpc, comparable to the disk sizes. The steady high flux along a line of a rather fixed orientation with a non-negligible impact parameter is the source of angular momentum required for the buildup of an extended rotating disk (A. Zinger et al., in preparation).
The gas density maps emphasize the narrowness of the streams, and reveal that they are typically denser than the surrounding medium by more than an order of magnitude. This confirms the prediction described in §2, and explains why a virial shock is avoided along the streams, allowing them to penetrate cold and unperturbed into the inner halo.
The column-density maps of the in-flowing material are obtained by summing up the densities in grid cells along each line of sight inside the box of side 320 kpc. The cells that enter this sum are only those where the inward flux per solid angle is at least twice the average over a sphere based on Eq. 1 of the Letter. These maps highlight the threedimensional configuration of radial streams, and the clumps along some of them. Such column density maps will serve us in producing detailed predictions to guide observations in search of the cold streams in high-redshift galaxies, in absorption and in emission.  Fig. 2 of the Letter. It shows the overall structure of the in-flowing streams in 3D perspective for four simulated haloes. The pictures reveal that the typical configuration is of three major narrow streams. Some of the streams are straight lines, and others are curved. Some of the streams are of rather fixed width from well outside R v , and others display a conical shape, starting broad at large radii and getting narrower as they penetrate into the halo. The gas streams show dense clumps, with about one third of the stream mass in clumps of mass ratio µ > 0.1, namely mass above ∼ 10 10 M ⊙ . The rest is in smaller clumps, some clearly hidden below the resolution limit. Since these mini-minor clumps are not expected to cause significant damage to the central disk, 29 we can refer to them in this respect as "smooth" flows. It is not clear at this point to what extent the smooth component is truly smooth or built by mini-minor clumps, and whether the perfect smoothness has a physical origin or is merely a numerical artifact, but this distinction does not make a qualitative difference to our present diskussion.   . Profiles of total gas inflow rate through spherical shells as in Fig. 3 of the Letter. Shown here are twelve galaxies of M v ≃ 10 12 M ⊙ at z = 2.5, randomly chosen from the simulation. The lower six panels show clumps that correspond to mergers of mass ratio µ > 0.1, while the upper six are fed by smoother flows with only mini-minor mergers of µ < 0.1. Fig. 11 is an extension of Fig. 3 of the Letter, presenting the influx profiles of twelve galaxies, all with M v ≃ 10 12 M ⊙ at z = 2.5, chosen at random from the MareNostrum simulation. The profiles extend from r = 15 kpc, the disk vicinity, to r = 160 kpc, almost twice the virial radius of R v ≃ 90 kpc.

Entropy Entropy Entropy Entropy Entropy
In order to evaluate the conditional probability P (Ṁ|M v ) that enters Eq. 2 of the Letter, we first measure P 0 (Ṁ|M 0 ) from a fair sample of MareNostrum haloes of our fiducial case M 0 = 10 12 M ⊙ at z 0 = 2.5. This probability distribution, shown in Fig. 12, is derived by sampling theṀ (r) profiles shown in Fig. 11 uniformly in r, using the fact that the inflow velocity along the streams is roughly constant. The tail of the distribution shown in Fig. 12, atṀ > 200 M ⊙ yr −1 , is dominated by µ > 0.1 mergers, while the main body At z ∼ 2.5, this scaling ofṀ is good to within a factor of two for M v ≤ 10 13 M ⊙ , beyond which it becomes a more severe overestimate (Goerdt et al., in preparation). The results for other redshifts (z > 2) are obtained using the scaling from eq. (4),Ṁ ∝ (1 + z) 2. 25 .
Half the galaxies shown in Fig. 11 turn out to show clumps leading to mergers of µ > 0.1, and the rest show only smaller clumps in smoother flows. One can read from the relative width of the clumps in Fig. 11 that the duty cycle for µ > 0.1 clumps in each individual galaxy is less than 0.1. By comparing the areas above the individual profiles with the average for galaxies of that mass and redshift, one can see that on average only about one third of the stream mass is in clumps.
A similar estimate is obtained from EPS, by reading from Fig. 6 of Neistein & Dekel 7 the rate dN/dω of > µ mergers into a halo M v . The typical starburst duration is ∆t ≃ 0.1R v /V v (∼ 50 Myr at z = 2.5), based on merger simulations 29 or the typical peak width in theṀ(r) profiles (Fig. 11), given streaming at the virial velocity V v = (GM v /R v ) 1/2 ∼ 220 km s −1 . This leads to η = (dN/dω)∆t ≃ 0.09 for M = 2×10 12 M ⊙ at z = 2.2. Figure 13. Comoving number density of galaxies with total gas inflow rate higher thaṅ M at z = 2.2, as in Fig. 4 of the main body of the Letter. The numbers in magenta next to the right axis refer to log M v of haloes with the corresponding abundance. Left: Dependence on the maximum halo mass that contributes to cold streams, for M stream = 10 12 , 10 12.5 , 10 13 , 10 14 M ⊙ . Right: Variation with redshift, z = 2, 3, 4, 5, 7.
6 The abundance as a function of mass and redshift As described above, the conditional probability distribution P (Ṁ|M v ) has been estimated by scaling the results from the simulated haloes of M v = 10 12 M ⊙ . Preliminary analysis of more massive haloes at that redshift (T. Goerdt et al., in preparation) indicates that the actual inflow rate starts dropping below the adopted estimate in haloes more massive than M stream ∼ 10 13 M ⊙ . For a first crude estimate of the effect this might have on our results shown in Fig. 4 of the Letter, we re-compute the comoving number density n(>Ṁ ) as described in the main text, but now limit the halo mass range that contributes toṀ by an upper cutoff at M stream . Fig. 13 shows the results for different values of M stream . We see that a cutoff at M stream = 10 13 M ⊙ makes only a small difference to n(>Ṁ), by a factor of ∼ 2 at the high-Ṁ regime corresponding to the bright SMGs. Thus, the decay of cold streams above 10 13 M ⊙ is not expected to alter our results in a qualitative way. On the other hand, we learn from the fact that the symbols for SFGs and bright SMGs lie far above the lower curve that the high-SFR objects at these redshifts are dominated by central galaxies in haloes more massive than 10 12 M ⊙ . In fact, we read from the figure that some of the SFGs and many of the bright SMGs are associated with haloes more massive than 3 × 10 12 M ⊙ . Fig. 13 also shows the predicted abundance n(>Ṁ ) at different redshifts, now applying no finite upper mass cutoff M stream . This is justified for z > 2 based on our preliminary