The origins of the circumgalactic medium in the FIRE simulations

 We use a particle tracking analysis to study the origins of the circumgalactic medium (CGM), separating it into (1) accretion from the intergalactic medium (IGM), (2) wind from the central galaxy, and (3) gas ejected from other galaxies. Our sample consists of 21 FIRE-2 simulations, spanning the halo mass range Mh ∼ 1010–1012 M⊙, and we focus on z = 0.25 and z = 2. Owing to strong stellar feedback, only ∼L⋆ haloes retain a baryon mass $\gtrsim\! 50\hbox{ per cent}$ of their cosmic budget. Metals are more efficiently retained by haloes, with a retention fraction $\gtrsim\! 50\hbox{ per cent}$. Across all masses and redshifts analysed $\gtrsim \!60\hbox{ per cent}$ of the CGM mass originates as IGM accretion (some of which is associated with infalling haloes). Overall, the second most important contribution is wind from the central galaxy, though gas ejected or stripped from satellites can contribute a comparable mass in ∼L⋆ haloes. Gas can persist in the CGM for billions of years, resulting in well mixed-halo gas. Sightlines through the CGM are therefore likely to intersect gas of multiple origins. For low-redshift ∼L⋆ haloes, cool gas (T < 104.7 K) is distributed on average preferentially along the galaxy plane, however with strong halo-to-halo variability. The metallicity of IGM accretion is systematically lower than the metallicity of winds (typically by ≳1 dex), although CGM and IGM metallicities depend significantly on the treatment of subgrid metal diffusion. Our results highlight the multiple physical mechanisms that contribute to the CGM and will inform observational efforts to develop a cohesive picture.