A Comparison of Circumgalactic MgII Absorption between the TNG50
  Simulation and the MEGAFLOW Survey
  The circumgalactic medium (CGM) contains information on gas flows around
galaxies, such as accretion and supernova-driven winds, which are difficult to
constrain from observations alone. Here, we use the high-resolution TNG50
cosmological magnetohydrodynamical simulation to study the properties and
kinematics of the CGM around star-forming galaxies in
$10^{11.5}-10^{12}\;M_{\odot}$ halos at $z\simeq$ 1 using mock MgII absorption
lines, which we generate by postprocessing halos to account for photoionization
in the presence of a UV background. We find that the MgII gas is a very good
tracer of the cold CGM, which is accreting inward at inflow velocities of up to
50 km s$^{-1}$. For sight lines aligned with the galaxy's major axis, we find
that MgII absorption lines are kinematically shifted due to the cold CGM's
significant corotation at speeds up to 50% of the virial velocity for impact
parameters up to 60 kpc. We compare mock MgII spectra to observations from the
MusE GAs FLow and Wind (MEGAFLOW) survey of strong MgII absorbers
($\rm{EW}^{2796\r{A}}_{0}>0.5 \; \r{A}$). After matching the equivalent-width
(EW) selection, we find that the mock MgII spectra reflect the diversity of
observed kinematics and EWs from MEGAFLOW, even though the sight lines probe a
very small fraction of the CGM. MgII absorption in higher-mass halos is
stronger and broader than in lower-mass halos but has qualitatively similar
kinematics. The median-specific angular momentum of the MgII CGM gas in TNG50
is very similar to that of the entire CGM and only differs from non-CGM
components of the halo by normalization factors of $\lesssim$ 1 dex.
