\section{Introduction}
\label{sec:intro}

Galactic morphologies vary widely. Broadly speaking, galaxies range
from elliptical, dispersion-supported systems to disk-dominated
structures where the majority of stars are on well-ordered circular
orbits \citep[e.g.][]{Hubble1926,Huertas-Company2011}.  The former
dominate at both the high-mass end \citep[e.g.][]{Bamford2009} and
at the low-mass end \citep[e.g.][]{Wheeler2017}, with disky galaxies
emerging primarily at intermediate stellar masses of $\sim10^{9}-10^{11}\textnormal{M}_\odot$
\citep[e.g.][]{Simons2015}.  The preponderance of ellipticals at the
high-mass end is typically associated with these galaxies growing primarily
through dry mergers \citep{vanDokkum2005,vanDokkum2010,Rodriguez-Puebla2017},
which scramble stellar orbits and promote bulge formation
\citep[e.g.][]{White78,Hopkins2009b,Stewart2009,Hopkins2010}.  At the
low-mass end, stars are both born out of gas with a high degree of
pressure support (rather than rotational support), and they are then
dynamically heated by the repeated cycles of gas blowouts that continue
to $z\sim0$ in $\lesssim10^{11}\textnormal{M}_\odot$ halos \citep[][]{Kaufmann2007,
Pontzen2012,Governato2012,diCintio2014a,DiCintio2014b,Onorbe2015,Chan2015,
Wheeler2017,ElBadry2016,KEB2017,AnglesAcazar2017,Sparre2017,CAFG2017}.

At intermediate masses, however, the exact properties of a galaxy and/or
halo that drive the morphology of that system remain relatively poorly
understood.  \citet*[][hereafter MMW98]{MoMaoWhite} reproduced both the
$z=0$ population of disk galaxies and the properties of $z\sim2.5$ damped
Ly$\alpha$ systems in semi-analytic models by assuming (1) galaxy sizes
are determined by their angular momentum, (2) the baryons in a galaxy
acquire their angular momentum from the host dark matter (DM) halo, (3) DM
halos respond adiabatically to the growth of galaxies, and (4) baryons
initially have the same density profile as DM \citep[also see ][]{Fall1980,
Fall1983,Romanowsky2012,Fall2013}.  This model therefore predicts that
the size of a galactic disk (relative to the radius of the halo) depends
primarily on the spin of the host DM halo, such that elliptical galaxies
reside in low angular momentum halos.

Though the \citetalias{MoMaoWhite} paradigm broadly reproduces the
galactic population, it has not been possible to
directly test it against hydrodynamic simulations that include
star formation and feedback, the latter of which appears to be
particularly important for regulating the angular momentum (and
therefore shapes) of galaxies.  Such simulations typically fall
into two categories: large-volumes simulations such as Illustris
\citep{Illustris1,Illustris2}, Illustris-TNG \citep{IllustrisTNG2,IllustrisTNG1},
and EAGLE \citep{EAGLE}; and ``zoom-in'' simulations
\citep{Katz1993,Onorbe2014} that focus on individual systems.
While the former contain huge populations of galaxies in a given
mass bin ($\gg10^3$), each galaxy typically contains $\lesssim10^3$
resolution elements, with spatial resolutions $\gtrsim1~\mathrm{kpc}$, such
that it is impossible to fully resolve the vertical scale lengths
of MW-like disks.  However, recent work with this style of simulations
have managed to broadly reproduce the observed Hubble sequence of galaxy types
\citep[e.g.][]{Pedrosa2014,Pedrosa2015,Genel2015,Teklu2015,Zavala2016,Genel2017}.
In particular, \citet{Rodriguez-Gomez2017} found that the morphologies of
massive systems ($M^\mystar_\mathrm{galaxy}\geq10^{11}\textnormal{M}_\odot$) in the Illustris simulation are
determined by their merger histories, while the morphologies of low mass
galaxies ($M^\mystar_\mathrm{galaxy}\leq10^{10}\textnormal{M}_\odot$) correlate with their host halo spin.
However, they found that neither spin nor merger history could individually
explain morphologies at the intermediate mass scale occupied by the MW.

Conversely, zoom-in simulations excel at resolving the structure of the
galaxy (or galaxies) that they target, but each additional galaxy incurs
a significant CPU cost, such that many suites of zoom-in simulations only
include a few galaxies at a given mass simulated with a given physical
model.  There are thus only a few suites of hydrodynamic zoom-in runs
(e.g. GIMIC, \citealp{Crain2009}; MAGICC, \citealp{Stinson2012}; NIHAO,
\citealp{Wang2015}; Auriga, \citealp{Grand2017}) that have the sample
size to test and explore even basic correlations between morphology
and halo properties (such as the \citetalias{MoMaoWhite} model).  However,
some trends have emerged across a number of analyses of various zoom-in
simulations, which have generally become successful in recent years at
producing realistic disk galaxies \citep{Governato2007,Governato2009,Scannapieco2009,Guedes2011,Aumer2013,
Marinacci2014,Fiacconi2015,Murante2015,Colin2016}.  A wide variety of
authors using different simulation codes agree that stellar feedback is
crucial for regulating star formation in low angular momentum material,
which otherwise quickly collapses to form overly-massive bulge
components \citep{Okamoto2005,Scannapieco2008,Agertz2011,Roskar2014,
Agertz2016,Brooks2016}.

Some of these authors have examined the conditions that lead to disk
formation.  For example, \citet{SpringelHernquist2005} and \citet{Robertson2006}
found that mergers of gas-rich galaxies can result in an
extended star-forming disk, rather than a bulge-dominated system
\citep[also see][]{Robertson2008}.  Similarly, \citet{Governato2007}
found that a substantial disk formed following a gas-rich major merger
in a cosmological simulation.  \citet{Governato2009} also examined the
distribution of \emph{light} at $z=0$ in a galaxy that experienced a
major merger at $z=0.8$, and found that this violent merger primarily
grows the disk, rather the bulge.  Combined with the passive evolution
of the older stars in the bulge, this fresh star formation results in a
bright, blue stellar disk.  Together, these results suggest that gas-rich
major mergers can lead to extended stellar disks \citep{Hopkins2009a},
particularly if they occur at late times when the potential is deep enough
to prevent the burst-quench cycles that occur at higher redshift
\citep{Muratov2015,Sparre2017,CAFG2017}, which heat stellar orbits and
generally inhibit disk formation.

Other works have used suites (of varying sizes) of zoom-in simulations
to attempt to uncover the underlying drivers of stellar morphology.
\citet{Scannapieco2009}, for example, argued that the fraction of mass
in the disk does not depend on the spin parameter of the halo, but
instead that the individual formation history of each galaxy is crucial
to predicting its $z=0$ morphology.  They also showed that spheroidal
(bulge) components typically form earlier, while disks tend to form
at later times from the inside-out \citep[also see][]{Aumer2013,Sokolowska2017},
in general agreement with observations tracing the evolution of
the kinematics of gas in galaxies \citep{Simons2017}.  Using a set of
100 MW-mass halos in high-resolution regions embedded within the
Millennium \citep{millennium} simulation volume, \citet{Sales2012}
similarly found that galaxy morphology was not correlated with the
spin of the halo.  They then further showed that it also does not monotonically
depend on either the halo formation time \citep[which scales with the
concentration of a halo; e.g.][]{Ludlow2014} or the merger history: even
halos that grow significantly through major mergers can host either a
disk-dominated or a bulge-dominated system at $z=0$.  Instead, they argued
that the star formation history is key:  disks tend to form gradually and
at late times, while spheroidal components assemble in episodic bursts of
star formation that occur following the accretion of gas that is misaligned
from the existing galaxy.  More recently, \citet{Grand2017} used 30
galaxies from the Auriga Project to argue (1) that disk size \emph{does}
correlate with halo spin (though the kinematic disk fraction, which we
define below, does not) and (2) that well-aligned mergers of gas-rich
satellites promote disk growth.

Collectively, the results from large-volume and zoom-in simulations suggest
that a picture where stellar morphology is regulated by angular momentum
is not necessarily wrong, but that it is likely incomplete.  However, the
majority of these studies have focused on simulations that adopt a stiff
equation of state for the interstellar medium, which could plausibly introduce
artifacts into, e.g., the behavior of the gas during galactic mergers,
motivating a study with an more physical description of the interstellar
medium.  Here, we use a sample of fifteen MW-mass galaxies, seven of which are
isolated and eight of which are in Local Group-like pairs, from high resolution
zoom-in simulations, run with physically-motivated and identical models and
parameters for star formation and feedback, to explore correlations and drivers
of (primarily) stellar morphology.  We first test the \citetalias{MoMaoWhite}
predictions against the sizes of our galaxies, then search for physically meaningful
correlations between stellar morphology at $z=0$ and various properties of the
host halo, including their evolutionary histories.  We then explore the evolution
of the stellar morphologies and the fraction of stars born in a disk at any
given time to better understand the impact of dynamical interactions and the
instantaneous state of the star-forming gas at any given time.  Finally, we examine
the morphology of the gas at $z=0$ to understand the morphologies of stars being
born today.

Throughout this work, we assume flat $\Lambda$CDM\ cosmologies, with
$h = 0.68$~--~$0.71$, $\Omega_\mathrm{m} = 0.266$~--~$0.31$,
$\Omega_\mathrm{b} = 0.0455$~--~$0.048$, and
$\Omega_\Lambda = 1 - \Omega_\mathrm{m}$
\citep[e.g.][]{Larson2011,Planck15}.\footnote{The differences in
average halo properties due to variances in the cosmological parameters
are smaller than the typical halo-to-halo variance within a given
cosmology, and, moreover, any systematic variations would be automatically
included in the physical parameters we explore here.}  We adopt the
\citet{Bryan1998} definition of $M_\mathrm{vir}$ and $R_\mathrm{vir}$ throughout, except
when computing the \citetalias{MoMaoWhite} predictions, which depend
on the properties of the halo within $R_{\rm 200}$, the radius at
which the density is $200$ times the critical density.  For all stellar
images and properties presented herein, we use a coordinate system where
the $z$-axis is aligned with the shortest principal axis of the moment of
inertia tensor of all star particles within $20~\mathrm{kpc}$.  For the gas, we
align our coordinate system with the shortest principal axis of the gas
within $10~\mathrm{kpc}$; we select a smaller radius for the gas because the gas
moment of inertia tensor at $20~\mathrm{kpc}$ is occasionally dominated by gas
outside the galaxy.  We sometimes refer to halo properties in the corresponding
dark matter-only simulation; such properties will be indicated as ``DMO.''

We explicitly opt not to make comparisons with observations in this work
because our goal is not to demonstrate the ``reasonableness'' of our
galactic disks, but rather to understand why and how they came to have
their $z=0$ morphologies.  However, we note that the FIRE/FIRE-2 physics
are broadly successful at reproducing observed galactic properties over
a range of galaxy masses, including the stellar mass \emph{vs} halo mass
relation \citep{FIRE,FIRE2}, the normalization and scatter of the star
formation rate \emph{vs} stellar mass relationship \citep{Sparre2017},
the Kennicutt-Schmidt law \citep{Orr2017}, the mass-metallicity
relationship \citep{MaMassMetallicity}, and even the vertical and radial
structure (including stellar ages and metallicities) of the MW disk
\citep{Ma2016b}.  Sanderson et al. (in prep) also show that the masses
of the stellar halos around the FIRE-2 MW-mass galaxies are in relative
agreement with those measured by \citet{Merritt2016}.  Moreover, proper
comparisons to observations requires a careful conversion from the stellar
mass to observed light to make a fair comparison with observables,
including the effects of dust attenuation and stellar evolution
\citep[e.g. radial variations in the mass-to-light ratio;][]{Wuyts2010}.
\citet{Scannapieco2010}, for example, used mock observations to show that
photometric bulge/disk decompositions typically overestimate the true disk
fractions by at least a factor of two.  A detailed comparison of observer-space
disk indicators will be the focus of subsequent work(s).

This paper is organized as follows.  In \S~\ref{sec:sims}, we describe
the simulations and briefly review the star formation and feedback models.
\S~\ref{sec:quant} presents our measures of morphology, $f^\mystar_\mathrm{disk}$ and $R^{\mystar}_{90}$,
and compares them to other (primarily theoretical) quantifiers.
\S~\ref{sec:drivers} compares the actual morphologies to those predicted
by the \citetalias{MoMaoWhite} model, then presents correlations between
$z=0$ morphologies and various properties of the galaxy and their host halos,
while \S~\ref{sec:evolution} explores the evolution of the stellar
morphologies and the birth properties of stars.  \S~\ref{sec:gas_morph}
presents the morphologies of the gas disks in our sample.  We summarize
our results and conclusions in \S~\ref{sec:conclusions}.

\section{Simulations}
\label{sec:sims}

We analyze hydrodynamic, cosmological zoom-in \citep{Katz1993,Onorbe2014}
simulations from the Feedback in Realistic Environments
(FIRE)\footnote{\url{http://fire.northwestern.edu}} project, specifically
with the improved ``FIRE-2'' version of the code from \citet{FIRE2}.  In order
to maximize our sample size, we include simulations with varying resolutions,
which we discuss below, but the numerical methods and primary physical models
are identical across all of the simulations.  All of the simulations were run
using \texttt{GIZMO}
\citep{GIZMO},\footnote{\url{http://www.tapir.caltech.edu/~phopkins/Site/GIZMO.html}}
a multi-method gravity plus hydrodynamics code, in meshless finite-mass
(``MFM'') mode. This is a mesh-free Lagrangian finite-volume Godunov
method which automatically provides adaptive spatial resolution while
maintaining conservation of mass, energy, and momentum (for extensive
tests, see \citealt{GIZMO}). Gravity is solved with an improved
version of the Tree-PM solver from GADGET-3
\citep{Springel2005}, with fully-adaptive (and fully-conservative)
gravitational force softenings for gas (so hydrodynamic and force
softenings are always self-consistently matched), following
\citet{Price2007}.

The FIRE physics and source code are {\em exactly} identical to those in
previous FIRE-2 simulations; these are described in detail in the papers
above but we briefly review them here. Radiative heating and cooling is
treated (from $10-10^{10}\,$K), including free-free,
photo-ionization/recombination, Compton, photoelectric \& dust collisional,
cosmic ray, molecular, and metal-line \& fine-structure processes (following
each of 11 tracked species independently), and accounting for photo-heating
both by a UV background \citep{FaucherGiguere2009} and an approximate model
for local sources, and self-shielding. Star formation occurs only in gas
identified as self-gravitating according to the \citet{Hopkins2013sf_criteria}
criterion, which is also molecular and self-shielding (following
\citealt{Krumholz2011}), Jeans unstable, and exceeds a minimum density threshold
$n_{\rm min}=1000\,{\rm cm^{-3}}$. Once a star particle forms, the simulations
explicitly follow several different stellar feedback mechanisms, including
(1) local and long-range momentum flux from radiation pressure (in the initial
UV/optical single-scattering, and re-radiated light in the IR), (2) energy,
momentum, mass and metal injection from SNe (Types Ia and II) and stellar mass loss
(both OB and AGB), and (3) photo-ionization and photo-electric heating. Every star
particle is treated as a single stellar population with known mass, age, and
metallicity, and then all feedback event rates, luminosities and energies, mass-loss
rates, and all other quantities are tabulated directly from stellar evolution models
({\sc starburst99}; \citealt{Leitherer1999}), assuming a \citet{Kroupa2001} IMF.
We emphasize that the FIRE physics were not tuned to reproduce galaxy sizes or
morphologies.  One of the pairs, \run{Romulus} \run{\&} \run{Remus}, was simulated
with subgrid turbulent metal diffusion \citep{Hopkinsmetaldiff,Escala2017}; however,
\citet{Su2016} showed metal diffusion has a small impact on the morphology of a
MW-mass galaxy.

\begin{table*}
\centering

\begin{tabular}{lcccccccccccc}
\vspace*{0.125em}
Galaxy        & $M_\mathrm{vir}$           & $M^\mystar_\mathrm{galaxy}$          & $M^\mathrm{gas}_\mathrm{galaxy}$           & $f^\mystar_\mathrm{disk}$ & $R^{\mystar}_{90}$ & $Z^{\mystar}_{90}$ & $R_\mathrm{gas}$ & $f^\mystar_{\geq0.7}$ & $m_i,\,\mathrm{gas}$ & $m_{\rm DM}$  & Reference \\
              & [$10^{12} \textnormal{M}_\odot$] & [$10^{10} \textnormal{M}_\odot$] & [$10^{10} \textnormal{M}_\odot$] &           & [kpc]    & [kpc]    & [kpc]   &                       & [$10^3\textnormal{M}_\odot$]        & [$10^4\textnormal{M}_\odot$] & \\
\hline\hline
\run{Romeo}   & 1.28              & 6.98              & 3.45              & 0.79      & 17.4     & 1.95     & 30.5    & 0.65                  & 28                   & 15            & A \\
\run{Juliet}  & 1.06              & 5.26              & 3.16              & 0.76      & 13.7     & 1.67     & 20.8    & 0.59                  & 28                   & 15            & A \\
\run{Louise}  & 1.10              & 6.39              & 3.23              & 0.69      & 12.2     & 1.5      & 24.2    & 0.56                  & 32                   & 16            & A \\
\run{Robin}   & 1.56              & 5.99              & 2.90              & 0.66      & 9.5      & 1.65     & 20.8    & 0.51                  & 57                   & 31            & A \\
\run{Thelma}  & 1.44              & 11.58             & 2.56              & 0.65      & 11.6     & 2.13     & 11.2    & 0.5                   & 32                   & 16            & A \\
\run{m12f}    & 1.58              & 7.53              & 2.85              & 0.64      & 11.1     & 2.39     & 20.8    & 0.48                  & 7.1                  & 3.5           & B \\
\run{Romulus} & 1.95              & 13.46             & 3.55              & 0.61      & 11.6     & 2.55     & 22.4    & 0.48                  & 32                   & 16            & E \\
\run{m12i}    & 1.14              & 6.16              & 2.23              & 0.58      & 9.9      & 2.07     & 17.8    & 0.44                  & 7.1                  & 3.5           & C \\
\run{m12z}    & 0.86              & 3.5               & 1.82              & 0.57      & 11.4     & 3.23     & 8.3     & 0.4                   & 33                   & 17            & D \\
\run{m12c}    & 1.27              & 8.09              & 0.92              & 0.56      & 4.3      & 1.08     & 3.6     & 0.42                  & 57                   & 28            & A \\
\run{Remus}   & 1.23              & 10.05             & 0.90              & 0.53      & 7.7      & 1.71     & 8.3     & 0.45                  & 32                   & 16            & E \\
\run{m12m}    & 1.47              & 10.88             & 1.41              & 0.53      & 13.3     & 2.75     & 12.1    & 0.34                  & 7.1                  & 3.5           & A \\
\run{m12b}    & 1.36              & 9.13              & 2.32              & 0.33      & 5.2      & 1.16     & 12.1    & 0.27                  & 57                   & 28            & A \\
\run{m12q}    & 1.61              & 11.23             & 0.56              & 0.21      & 5.4      & 1.57     & 0.9     & 0.11                  & 57                   & 28            & A \\
\run{Batman}  & 1.89              & 10.21             & 1.96              & 0.20      & 2.4      & 0.98     & 11.2    & 0.08                  & 57                   & 31            & A \\
\end{tabular}
\caption{
Properties of the central galaxies and their host halos, sorted by decreasing
$f^\mystar_\mathrm{disk}$.  In order, columns indicate the host halo virial mass, the stellar
and gas mass of the central galaxy (defined in \S\ref{ssec:simprops}), the
fraction of stars in the central galaxy on ``disk-like'' orbits
($\epsilon\geq0.5$), and the sizes of the stellar and gas disks (see
\S\ref{ssec:defns} for details).  To give an estimate of how sensitive the
disk fractions/ordering are to our $\epsilon\geq0.5$ cut, the following
column lists the fraction of stellar mass with $\epsilon\geq0.7$.
The remaining columns list the resolution of each simulation, given by the
initial gas particle mass and the mass of the DM particles in the high
resolution region.  The final column lists the publication each run first
appeared in:   A: \citet{FIRE2}, B: \citet{GKDisk}, C: \citet{Wetzel2016},
D: \citet{Hafen2016}, E:  this work.  Galaxies beginning with
``\run{m12}'' are isolated MW-mass analogues, while those with names of
individuals are in Local Group-like pairs.  \run{Romulus} \run{\&} \run{Remus}
and \run{Thelma} \run{\&} \run{Louise} are hydrodynamic re-simulations of the
same pairs originally presented (as DMO simulations) in \citet{ELVIS}.
Figures~\ref{fig:morph_v_mass}~and~\ref{fig:gas_drivers} plot the
relationships between several of these properties.
}

\label{tab:sims}
\end{table*}

We focus on the roughly MW-mass galaxies simulated with FIRE-2.
Therefore, we combine the Latte halo (here referred to as
\run{m12i}) from \citet{Wetzel2016}; five additional isolated halos
simulated with an identical pipeline, two at the same resolution and
three with a factor of $8$ higher mass particles; one isolated halo from
\citet{Hafen2016}; three pairs of halos in Local Group-like
configurations \citep[first reported in][but analyzed in detail here
for the first time]{FIRE2}, and one additional pair that has not yet
been reported elsewhere.  Hosts in Local Group-like pairs were selected
with the same criteria as \citet{ELVIS}:  isolated pairs with $M_\mathrm{vir}\sim10^{12}\textnormal{M}_\odot$
that are approaching one another.  All other hosts were selected purely on
the basis of their mass and isolation from other massive halos.  The mass
resolution of each galaxy is listed in Table~\ref{tab:sims}.\footnote{We
list the initial mass of a gas particle in each simulation, but note that
due to deposition onto gas particles from stellar mass loss, baryonic
particle masses fluctuate slightly about their initial value.}  Softening
lengths for the gas are fully adaptive, typically down to $1~\mathrm{pc}$, with
fixed stellar and DM softening lengths set according to the typical
inter-particle spacing.  \citet{FIRE2} list the exact values for our
runs, but all are sufficient to resolve the disk heights.   For each galaxy,
we analyze the highest resolution simulation available that has been
completed to $z=0$.  We demonstrate the stability of our morphologies
and sizes with numerical resolution in Appendix~\ref{sec:resolution}:
the general trends are robust to resolution, but we caution that
quantitative values do change slightly with resolution.

Movies showing the formation and evolution of each galaxy in our sample,
created using identical pipelines, may be found at
\url{http://www.tapir.caltech.edu/~sheagk/firemovies.html}.

\section{Quantifying morphology of the FIRE-2 galaxies}
\label{sec:quant}

There are a wide variety of reasonable definitions for galactic morphology
that one can adopt.  Broadly speaking, they range from kinematic distinctions
(e.g.\ the fraction of stars on circular orbits) to visual quantifiers
(e.g.\ photometric bulge-to-disk ratios, \citealp{Sersic1963} indices, and
half-light radii).  Though the former are straightforward to measure in
simulations, they are difficult to determine with observations.  The latter,
however, are relatively straightforward to extract with photometry, but can
only be measured for simulated galaxies if one assumes models for stellar
evolution and dust attenuation.  Though the relationship between observable
morphological measures and kinematic quantifiers is extremely interesting,
a full study requires ``mock observations'' of the simulated galaxies (including
radiative transfer) and subsequent fitting of those images with the tools
typically used by observers.  We consider these steps to be beyond the scope
of this paper, which instead focuses on the physical drivers of those
morphologies, but plan to investigate this question in greater detail in
future work.

\begin{figure*}
\centering
\includegraphics[width=\textwidth]{plots/star_disk_frac_starsgas.pdf}
\vspace{-3em}
\caption{Mass-weighted PDFs (normalized to a maximum of one) of the
circularity $\epsilon = j_z/j_\mathrm{c}(E)$ for the stars (colored histograms)
and gas (dashed green curves) within the MW-mass FIRE-2 galaxies at $z=0$.
The stellar distributions are colored by the average cosmic formation time
(where $z=0$ corresponds to $t_\mathrm{form}\simeq13$--$14~\mathrm{Gyr}$) of the stars
in each bin.  The vast majority of the galaxies transition to younger
ages at higher circularities; the exceptions are \run{m12q} and \run{Batman},
which form counter-rotating disks at late times.  The gray curves show
the kinematics measured when stars are born; we discuss them in detail in
\S~\ref{sec:evolution}, but emphasize here that almost all stars are born
in $z=0$ MW-mass galaxies form on disk-like orbits (i.e. with very high
circularities).  We quantify the ``diskiness'' of a galaxy by $f^\mystar_\mathrm{disk}$,
defined here as the fraction of stars with $\epsilon \geq 0.5$, indicated
by the dashed vertical line.  The panels are sorted by decreasing $f^\mystar_\mathrm{disk}$,
with the numbers in parentheses indicating the rank they would have if the
panels were instead sorted from largest to smallest $R^{\mystar}_{90}$, the 2D radial
extent of the stars.  We also demonstrate in
Figures~\ref{fig:mymorh_vs_othermorph}~and~\ref{fig:morph_vs_sig1} that
both $f^\mystar_\mathrm{disk}$ and $R^{\mystar}_{90}$ correlate strongly with other kinematic and
spatial measures of morphology. All but one of the galaxies has a
well-ordered, rotating gas disk at $z=0$; the exception is \run{m12q},
which is nearly gas-free and is in the process of expelling what little
gas remains by $z=0$.  The stars display a range of kinematics
ranging from well-ordered disks (\run{Romeo}) to dispersion supported bulges
(\run{Batman}).
}
\label{fig:joverjz}
\end{figure*}

\subsection{Definitions}
\label{ssec:defns}
Here, we focus primarily on morphological measures that do not rely on
specific profiles or on assumptions regarding the luminosities/colors of
individual star particles.  We primarily adopt two independent measures
of galactic morphology, $f^\mystar_\mathrm{disk}$ and $R^{\mystar}_{90}$.  The latter, $R^{\mystar}_{90}$,
is the radial extent of the disk.  It is defined together with $Z^{\mystar}_{90}$,
the height of each galaxy, such that 90\% of the stellar \emph{mass}
within $30~\mathrm{kpc}$ of the galactic center is contained within a 2D radius
$R^{\mystar}_{90}$ and a height above/below the disk $Z^{\mystar}_{90}$ when the stars are
aligned with their principal axes.
We then define $M^\mystar_\mathrm{galaxy}$ as the stellar mass within a radial distance $R^{\mystar}_{90}$
and a height above/below the disk $Z^{\mystar}_{90}$.\footnote{We note that this
definition differs from the stellar masses listed in \citet{FIRE2}, who
quoted total stellar masses within $3\timesr^{\mystar}_{50,\,3D}$.}.  For the purposes of
comparing with semi-analytic models (\S\ref{ssec:spin}), we identically define
$R^\mystar_{50}$, the 2D radius that encloses 50\% of the stellar mass. We
similarly define 3D stellar radii $r^{\mystar}_{90,\,3D}$ and $r^{\mystar}_{50,\,3D}$ as the radii
that contain 90\% and 50\% of the stellar mass within $30~\mathrm{kpc}$.  Though
the same process typically yields accurate results for the gas, it
artificially inflates the sizes of extremely gas-poor galaxies (e.g. \run{m12c}
and \run{m12q}; see Figure~\ref{fig:gas_viz}).  Therefore, we define the
radial and vertical extents of the gas disk by first taking the peak of
the face-on mass profile, $\mathrm{d}M_\mathrm{gas}(R)/\mathrm{d}\ln R$, as
$R_\mathrm{gas}$, then defining $Z_\mathrm{gas}$ as the break in the vertical 1D mass profile
of all the gas with a projected radius $R<R_\mathrm{gas}$.  $M^\mathrm{gas}_\mathrm{galaxy}$ is then defined
as the total gas mass within ($R_\mathrm{gas}, Z_\mathrm{gas}$).  $M^\mathrm{gas}_\mathrm{galaxy}$ typically changes
by only $\sim10-20\%$ between this method and the approach we adopt for
the stars, with the technique we adopt for the gas yielding a slightly
lower $M^\mathrm{gas}_\mathrm{galaxy}$ in all but two cases.  All properties are based on centers
calculated via a shrinking spheres approach \citep{Power2003}.

Our kinematic morphological definition, $f^\mystar_\mathrm{disk}$, measures the fraction of
stars on circular orbits that are aligned with the angular momentum of the
galaxy as a whole.  Specifically, for each particle within $r^{\mystar}_{90,\,3D}$, we
compute the circularity $\epsilon = j_z/j_\mathrm{circ}(E)$ following the
method of \citet{Abadi2003} and described in detail in \citet{KEB2017}.  For
a given mass element, the circularity relates the component of the specific
angular momentum that is aligned with the average angular momentum vector of
the galaxy, $j_z$, to the specific angular momentum of a circular orbit with
the same energy, $j_\mathrm{circ}(E)$.  Stars (or gas) with $\epsilon = 1$
are therefore on perfectly circular orbits in the plane of the galaxy,
those with $\epsilon = 0$ have orbits that are exactly perpendicular to
the galaxy, and those with $\epsilon = -1$ are perfectly counter-rotating.
We adopt a cut of $\epsilon \geq 0.5$ to distinguish disk stars, and define
$f^\mystar_\mathrm{disk}$ as the mass fraction of stars that meet this cut within $r^{\mystar}_{90,\,3D}$.
We find nearly identical disk fractions if we consider all stars within
$30~\mathrm{kpc}$:  the fractional difference is typically $<5\%$.

\begin{figure*}
\centering
\includegraphics[width=0.95\textwidth]{plots/star_viz_by_star_disk_frac.jpg}
\caption{Face-on (top panels) and edge-on (bottom panels) projections
of the stars in the FIRE-2 galaxies, again sorted by decreasing $f^\mystar_\mathrm{disk}$,
with the radius $R^{\mystar}_{90}$ and height $Z^{\mystar}_{90}$ that contain 90\% of the
mass indicated by the white circles/rectangles; the green lines show
the equivalent half-mass quantities.  Each panel is $80~\mathrm{kpc}$ across;
the edge-on projections are $20~\mathrm{kpc}$ tall.  Though there is not a direct
correspondence between $f^\mystar_\mathrm{disk}$ and disk size, they are clearly
correlated (see Figure~\ref{fig:mymorh_vs_othermorph}).
}
\label{fig:stellarviz}
\end{figure*}

\subsection{Simulation Properties}
\label{ssec:simprops}

\begin{figure*}
\centering
\includegraphics[width=\textwidth]{plots/morphology_vs_morphology.pdf}
\caption{
Comparing our adopted measures of morphology, $f^\mystar_\mathrm{disk}$ (black points;
left axis) and $R^{\mystar}_{90}$  (open magenta squares; right axis), to other
spatial and kinematic measures of morphology, all measured at $z=0$.  The
panels show $1-(Z^{\mystar}_{90}/R^{\mystar}_{90})$, a measure of the flatness of the stellar
distribution; $\lambda_\mystar(R^{\mystar}_{90})$, the \citet{Bullock2001} spin
parameter of the stars in the galaxy; $(c/a)_\mystar$, the ratio of the
shortest to longest principal axes of the stars, measured within $20~\mathrm{kpc}$;
and the disk fraction $f^\mystar_\mathrm{disk}$ \emph{vs} $R^{\mystar}_{90}$.  The $r_\mathrm{sp}$ values indicate
the median Spearman $r$-coefficient obtained over 100,000 bootstrapping
trials; the upper and lower values give the full 95\% confidence interval.
In all but the final column (and in the remainder of this work), we compute
the $r$-coefficient by combining the magenta squares and black circles;
i.e. $r_\mathrm{sp}$ represents the joint correlation between the property on the $x$
axis and both $f^\mystar_\mathrm{disk}$ and $R^{\mystar}_{90}$ (see $\S\ref{ssec:morphvmorph}$ for
details).
}
\label{fig:mymorh_vs_othermorph}
\end{figure*}

The distributions of $\epsilon$ for both the stars and gas in each MW-mass
FIRE-2 galaxy (i.e.\ within $r^{\mystar}_{90,\,3D}$) are shown in Figure~\ref{fig:joverjz}.
Each panel represents an individual galaxy; they are ordered by decreasing
$f^\mystar_\mathrm{disk}$, which is indicated for each galaxy.  The number in parentheses
below $f^\mystar_\mathrm{disk}$ indicates the rank that each galaxy \emph{would} have if
they were instead ordered by decreasing $R^{\mystar}_{90}$; we compare $f^\mystar_\mathrm{disk}$ and
$R^{\mystar}_{90}$ explicitly in Figure~\ref{fig:mymorh_vs_othermorph}.  We will retain
this sorting by $f^\mystar_\mathrm{disk}$ in other figures to ease comparison.

The stellar distributions, which are plotted as the colored histograms
in Figure~\ref{fig:joverjz}, vary widely even in our relatively small
sample.  Without pre-selecting for expected morphology, the MW-mass
FIRE-2 sample includes nearly bulge-less disk galaxies (e.g. \run{Romeo}
and \run{Juliet}), galaxies with clear bulge and disk components (e.g.
\run{Remus} and \run{m12b}), and almost entirely dispersion-supported
galaxies (\run{Batman} and \run{m12q}).\footnote{We note that \run{Batman}
and \run{m12q} are very compact, with $R^\mystar_{50}\simeq0.5$~and~$1~\mathrm{kpc}$
respectively, and may be outliers in observations \citep[e.g.][]{Shen2003}.
As noted, though, we caution against direct comparisons with observations
without mock-observing the sample.}  The color of each curve at a
given $\epsilon$ indicates the average formation time of stars with
that $\epsilon$.  Other than \run{Batman} and \run{m12q}, which have
formed roughly counter-rotating disks at late times, the disk
($\epsilon \geq 0.5$) is almost always composed of younger stars on
average, in agreement with previous results that disks in MW-mass
galaxies begin to appear at $z\lesssim1$ \citep[e.g.][]{Ma2016b,Mametalgrad}.
In some cases, such as \run{m12b} and \run{Remus}, the average
ages of the bulge and disk components differ dramatically, while
the transition is much smoother in other systems (e.g. \run{m12m}
and \run{m12z}).

In contrast with the diversity in the kinematics of the stars, the gas
distributions (green dashed curves) are almost uniform across this
mass-selected sample.  Specifically, every galaxy except \run{m12q},
(which has not experienced any significant gas accretion since $z\sim0.1$)
hosts a thin, primarily rotation-supported gas disk.  The gray curves
in Figure~\ref{fig:joverjz}, which show the circularity distributions
of the stars formed in the galaxy \emph{at birth} (i.e.\ stacking over
all snapshots) are similarly uniform, with the vast majority of stars
forming with $\abs{\epsilon} \geq 0.5$.  We will discuss the kinematics of
stars at birth along with the evolution of those kinematics in \S~\ref{sec:evolution},
and we will explore the characteristics of the gas disks in greater detail in
\S~\ref{sec:gas_morph}, but we first focus on the $z=0$ stellar morphologies.

Visualizations of the stars in all fifteen galaxies are shown in
Figure~\ref{fig:stellarviz}, again sorted by $f^\mystar_\mathrm{disk}$.  The top panels show
face-on views of each galaxy, while the lower panels visualize the galaxy
edge-on. There is a clear trend for galaxies to become more elliptical, less
disky, and typically more spatially compact as $f^\mystar_\mathrm{disk}$ decreases.  The thick
dashed and thin solid circles (rectangles) in the upper (lower) panels of
Figure~\ref{fig:stellarviz} indicate ($R^{\mystar}_{90}$, $Z^{\mystar}_{90}$) and ($R^\mystar_{50}$,
$Z^\mystar_{50}$), respectively.  As intended, the former captures roughly the full
extent of the stellar populations.  We also plot circular velocity
profiles for the full sample in Appendix~\ref{sec:rotcurves}:  galaxies
with higher disk fractions tend to have flatter, more extended circular
velocity curves and, conversely, the bulge-dominated systems have rotation
curves that peak at small radii, but there is some scatter about that
trend.

We summarize several basic properties of each galaxy in Table~\ref{tab:sims},
including the host virial mass $M_\mathrm{vir}$, the galaxy stellar mass $M^\mystar_\mathrm{galaxy}$, and
the mass in gas within the galaxy $M^\mathrm{gas}_\mathrm{galaxy}$, along with the fraction of stars in
the galaxy on circular orbits $f^\mystar_\mathrm{disk}$ and the radial extent of the stars and
gas in each galaxy, $R^{\mystar}_{90}$ and $R_\mathrm{gas}$.  To give an indication of how sensitive
our results are to our definition of ``disk'' stars having $\epsilon\geq0.5$, we
also list the fraction of stellar mass with $\epsilon\geq0.7$.

While the FIRE-2 physics successfully reproduce observed relationships over a
wide range of masses \citep[see][and \S\ref{sec:intro}]{FIRE2}, our
mass-selected sample does face some tension with observations.  First, our
galaxies are overly massive for their halo masses:  our stellar mass definition
places our sample between $0.2$--$0.55$~dex above the \citet{Behroozi2013}
stellar mass \emph{vs} halo mass relation.  Second, at these stellar masses, a
non-negligible fraction of observed galaxies are quenched, with strongly
suppressed star formation rates \citep[e.g.][]{Salim2007}.  However, none of
the galaxies in our sample fall into this category:  our lowest 100~Myr averaged
specific star formation rate at $z=0$ is $\sim10^{-11.5}$~yr$^{-1}$ (possibly
because these simulations do not include AGN feedback; \citealp{Bower2006,
Cattaneo2006,Croton2006,Somerville2008}).  Though our sample includes only
fifteen galaxies, we caution that we may overproduce (or at least over-represent)
late-type galaxies, which could potentially alter the correlations we present
herein.  Furthermore, if quenching correlates with properties of either the
galaxy or the halo \citep[e.g. the mass of the DM halo at fixed stellar
mass;][]{Woo2013} in a way not captured by the FIRE-2 models, then our
analysis will miss those relationships.

\subsection{Comparing morphological measures}
\label{ssec:morphvmorph}

Before examining correlations between various halo/galaxy properties,
$f^\mystar_\mathrm{disk}$, and the radial extents of our galaxies, we briefly explore the
relationship between our morphological measures ($f^\mystar_\mathrm{disk}$ and $R^{\mystar}_{90}$)
and other potential measures of morphology.  As discussed in \S\ref{sec:intro}
and \ref{ssec:defns}, we do not explicitly compare with observational measures,
as that lies beyond the scope of this work.  However, we do note that the stellar
radii that we adopt in this paper scale closely with the half-mass radii derived
from fitting two-component S\'{e}rsic profiles to these same galaxies (Sanderson
et al., in prep), though the bulge-to-disk ratios of those profiles do not
correlate particularly well with the true kinematic disk fraction $f^\mystar_\mathrm{disk}$.

In addition to the properties we discuss above, there are a number of
viable morphological definitions we could adopt, such as the angular
momentum of the stars, the thickness of the stellar disk, or the shape
of the stellar mass distribution.  We examine how these properties correlate
with $f^\mystar_\mathrm{disk}$ and $R^{\mystar}_{90}$ in Figure~\ref{fig:mymorh_vs_othermorph}.
In the first three panels, the filled black circles plot each quantity
against $f^\mystar_\mathrm{disk}$ (left $y$ axis), while the open magenta squares correspond
to the right $y$ axis and indicate $R^{\mystar}_{90}$.  The final panel shows $f^\mystar_\mathrm{disk}$
and $R^{\mystar}_{90}$ against one another and therefore omits the black points.

\begin{figure}
\centering
\includegraphics[width=\columnwidth]{plots/morph_vs_sigma1_2panel.pdf}
\caption{The stellar surface density within $1$ projected kpc of the
center of the galaxy $\Sigma_1$ \emph{vs} our adopted morphological
measures, $f^\mystar_\mathrm{disk}$ on the left and $R^{\mystar}_{90}$ on the right.  Black circles
show $\Sigma_1$ as measured from a perfectly face-on view, while the open
symbols indicate $\Sigma_1$ measured along orthogonal edge-on projections.
Regardless of viewing angle, the projected central density of the
galaxy correlates strongly with both $f^\mystar_\mathrm{disk}$ and $R^{\mystar}_{90}$.  The
anti-correlation arises because higher central densities necessarily
imply more compact (and therefore less disky) galaxies at fixed mass.}
\label{fig:morph_vs_sig1}
\end{figure}

Any of these properties shown in Figure~\ref{fig:mymorh_vs_othermorph} (along
with other measures that we do not plot here, such as the stellar radius scaled
by the virial radius, the specific angular momentum of the stars, the radius where
the log-slope of the stellar density profile equals $-3$, or the kinematic
bulge-to-disk ratio) are viable alternatives to $f^\mystar_\mathrm{disk}$ and $R^{\mystar}_{90}$.  The
correlations are unsurprising:  at roughly fixed mass, galaxies that are
radially extended are also flatter, have larger stellar spin parameters,
and have a greater fraction of rotation support.  The final panel in
Figure~\ref{fig:mymorh_vs_othermorph} indicates the relationship between
$f^\mystar_\mathrm{disk}$ and $R^{\mystar}_{90}$.  As suggested by the visualizations in
Figure~\ref{fig:stellarviz}, the radial extent of the stars correlates with
the degree of order in the disk, but with non-trivial scatter, motivating
our analysis of both properties throughout.

\begin{figure*}
\centering
\includegraphics[width=\textwidth]{plots/morphology_vs_masses.pdf}
\caption{The $z=0$ relationship between our morphological measures and,
(\textit{a}) the virial mass of the halo $M_\mathrm{vir}$, (\textit{b}) the
stellar mass of the galaxy $M^\mystar_\mathrm{galaxy}$, (\textit{c}) the gas mass within
the galaxy $M^\mathrm{gas}_\mathrm{galaxy}$, and (\textit{d}) the total gas mass within $R_\mathrm{vir}$.
Morphology in the FIRE-2 simulations is not correlated with either
$M_\mathrm{vir}$, $M^\mystar_\mathrm{galaxy}$, or the total gas mass within $R_\mathrm{vir}$, across this
narrow mass range, but gas rich galaxies are more likely to be disky
today; we discuss this correlation in more detail below.}
\label{fig:morph_v_mass}
\end{figure*}

The text in each panel (and in similar Figures below) indicates the
Spearman $r$-coefficient, $r_\mathrm{sp}$, which quantifies the monotonicity of each
relationship.  We compute $r_\mathrm{sp}$ on the joint relationship with $f^\mystar_\mathrm{disk}$
and $R^{\mystar}_{90}$: we assign each galaxy a rank based on $f^\mystar_\mathrm{disk}$ and a rank
based on $R^{\mystar}_{90}$, then combine those ranked datasets and compute
$r_\mathrm{sp}$ against two copies of the ranked $x$ values of each plot.  Our
qualitative conclusions are unchanged if we compute $r_\mathrm{sp}$ against
$f^\mystar_\mathrm{disk}$ and $R^{\mystar}_{90}$ independently.  For each relationship, we perform
100,000 bootstrapping trials (randomly drawing $N$ points, with replacement).
We report the median $r_\mathrm{sp}$ of those trials, and the values in superscripts
and subscripts indicate the full 95\% confidence interval for those trials.
We provide identical statistics throughout the remainder of this work.  Based
on the correlations reported in Figure~\ref{fig:mymorh_vs_othermorph}, which
plots correlations between morphological properties that we expect to be
reasonably well correlated, we adopt a rough criterion of $\abs{r_\mathrm{sp}}\gtrsim 0.8$,
with a lower 95\% bound on the confidence interval of $\abs{r_\mathrm{sp}}\gtrsim 0.6$,
as a ``tight'' correlation.

Before turning to the drivers of stellar morphology, we briefly examine
one non-parametric morphological measure that is relatively easy to measure
in both simulations and observations: $\Sigma_1$, the stellar surface density
within the central $1~\mathrm{kpc}$ \citep[e.g.][]{Cheung2012,Bell2012,Fang2013}.
For this mass-selected sample, we find a tight relationship between
$\Sigma_1$ and morphology at $z=0$: Figure~\ref{fig:morph_vs_sig1} shows
$\Sigma_1$ as measured edge-on in open symbols and face-on in black circles.
The viewing angle has a small impact, though edge-on projections are always
higher, as expected.  The anti-correlation between $\Sigma_1$ and the true
morphology of a galaxy is striking, though somewhat unsurprising:  for a
roughly fixed stellar mass, galaxies with high central densities must be
more compact, and Figure~\ref{fig:mymorh_vs_othermorph} demonstrated that
radial extent and degree of order in the stellar orbits are well correlated,
again at fixed galaxy mass.  We therefore conclude that $\Sigma_1$ is a reliable
morphological measure, at least for roughly MW-mass galaxies.  However,
we caution that the low-lying outlier from the trend is \run{m12z}, our
lowest mass galaxy, suggesting the possible emergence of a mass trend.
Moreover, while some analyses have associated high $\Sigma_1$ with galactic
quenching \citep[e.g.][]{Woo2015,Woo2017}, all of our galaxies show some
level of continued star formation to $z=0$ (as noted above).

\section{Drivers of Stellar Morphology}
\label{sec:drivers}

We now turn to correlations between stellar morphology, quantified
primarily by $f^\mystar_\mathrm{disk}$ and $R^{\mystar}_{90}$, and various properties of the
galaxy and the host halo, both in the hydrodynamic simulation and
in the analogous dark matter-only (DMO) run.  In short, we search
for physical drivers of and explanations for the $z=0$ morphologies
of each of the galaxies in our sample.

\subsection{Mass (around MW masses)}
\label{ssec:mass}

We begin by checking whether the morphologies of the FIRE-2 MW-mass
galaxies are driven by either the halo or galaxy mass.
Figure~\ref{fig:morph_v_mass} indicates the virial mass $M_\mathrm{vir}$, the
stellar mass $M^\mystar_\mathrm{galaxy}$, the gas mass $M^\mathrm{gas}_\mathrm{galaxy}$, and the total gas mass
within $R_\mathrm{vir}$, all at $z = 0$.  As in Figure~\ref{fig:mymorh_vs_othermorph},
black points correspond to the left axis and plot $f^\mystar_\mathrm{disk}$, while
magenta squares indicate $R^{\mystar}_{90}$ (right axis).  Of the masses shown
in Figure~\ref{fig:morph_v_mass}, only $M^\mathrm{gas}_\mathrm{galaxy}$ displays evidence for
a correlation with the $z=0$ stellar morphology.  Though we do not plot
it, we also find no correlation between the total baryonic mass within
$R_\mathrm{vir}$ and kinematics/morphology ($r_\mathrm{sp} = -0.6$ -- 0.06).  There is
evidence for a correlation with the total mass in cold gas (defined
as $T<10^5$ K) within $R_\mathrm{vir}$ ($r_\mathrm{sp} = 0.52$--$0.85$), but because the
cold gas is predominantly in the galaxy, this correlation is driven
by $M^\mathrm{gas}_\mathrm{galaxy}$.  We will return to the correlation with $M^\mathrm{gas}_\mathrm{galaxy}$ below,
but here we emphasize that the morphologies of the MW-mass FIRE-2
galaxies do not correlate with either the halo mass, the stellar
mass of the galaxy, or the total baryonic mass within $R_\mathrm{vir}$.  Note
that over a large dynamic range, however, there is a strong mass
dependence (e.g. \citealt{KEB2017} showed that the FIRE-2 dwarfs
are spherical and dispersion dominated).

\subsection{Spin (and other DM properties)}
\label{ssec:spin}

As discussed in \S\ref{sec:intro}, many authors have pointed out
that, if baryons acquire their angular momentum from their dark matter
halos and begin with the same density profile as those halos, then the
size of the stellar disk should be predicted by a combination of the
\citet{PeeblesSpin} spin parameter $\lambda_{\rm Peebles}$, the size
of the host halo, the fraction of angular momentum in the halo that
resides in the disk $\mathcal{j}_{\rm d}$, and the fraction of halo mass that resides in the
disk $\mathcal{m}_{\rm d}$.  In the simpler model of \citetalias{MoMaoWhite}, wherein the
galaxy is hosted by a static isothermal sphere,
\begin{equation}
R_\mathrm{d} = 2^{-1/2} (\mathcal{j}_{\rm d}/\mathcal{m}_{\rm d}) \lambda_{\rm Peebles} R_{\rm 200}.
\label{eqn:mmwRd}
\end{equation}
In their more complete model, where the disk grows adiabatically within an
initially NFW \citep{Navarro1996} halo, the disk radius is modified by two
multiplicative functions; the first arises from the change in the total
energy of the NFW profile relative to an isothermal sphere and the second
from the (assumed) adiabatic contraction of the halo in response to the
growth of the disk.  If such a relationship is borne out by the FIRE-2
simulations, and if $\mathcal{j}_{\rm d}/\mathcal{m}_{\rm d} = j_{\rm disk}/j_{\rm halo}$, the ratio of
the specific angular momentum of the disk to the halo, is roughly constant
(i.e. if the baryons acquire their angular momentum from the halo, as
assumed in \citetalias{MoMaoWhite}), then one can accurately populate halos
in DMO simulations with galaxies of the proper size and, by virtue of the
correlation between $R^{\mystar}_{90}$ and $f^\mystar_\mathrm{disk}$, roughly the proper disk
fraction.  Moreover, validation of the model would provide evidence for
the overall theory of angular momentum-regulated disk growth.

Figure~\ref{fig:mmw_comparison} tests this picture by comparing the half-mass
radius predicted by the models of \citetalias{MoMaoWhite} to the
half-mass radius of each simulated galaxy.  Circles show the results
of the isothermal model (Equation~\ref{eqn:mmwRd}), and squares plot the
full model assuming an adiabatically contracted NFW halo (Equation 28 of
\citetalias{MoMaoWhite}).  In order to test the assumption that galaxies
acquire their angular momentum from the dark matter, the left panel uses
properties available from the DMO simulations and fixes $\mathcal{j}_{\rm d}=\mathcal{m}_{\rm d}$.\footnote{We
adopt $\mathcal{j}_{\rm d} = \mathcal{m}_{\rm d} = 0.1$, but our overall results are insensitive to the
chosen value.}  Given the relatively small variations in $R_{\rm 200}$ within
our sample, the left panel implicitly tests whether disk size is driven
by the spin of the halo at $z=0$.  Neither model is able to reproduce the
actual size of our galaxies, in line with the general results of zoom-in
simulations discussed in \S~\ref{sec:intro}.  The bracketed numbers in the
legends indicate the average fractional error of each set of points relative
to the simulations: the isothermal \citetalias{MoMaoWhite} model dramatically
over-predicts the size of the galaxies when assuming $\mathcal{j}_{\rm d}=\mathcal{m}_{\rm d}$.  The
contracted-NFW halo model produces a reasonable order-of-magnitude
estimate of $R^\mystar_{50}$, but the actual predictive value is quite poor.

\begin{figure}
\centering
\includegraphics[width=\columnwidth]{plots/MMW_comparison.pdf}
\caption{The half-mass radius of the FIRE-2 galaxies \emph{vs} the disk
radius predicted by the \citetalias{MoMaoWhite} model for each galaxy
(see Eq.~\ref{eqn:mmwRd}).  Circles show results assuming an isothermal
potential, and squares indicate the full model (an adiabatically contracted
NFW profile).  The left panel uses the properties of the halo
available in the DMO simulation (fixing $\mathcal{j}_{\rm d} = \mathcal{m}_{\rm d}$), and therefore
tests the assumption that the baryons acquire their angular momentum
from the DM halo (given the small variations in $R_{\rm 200}$ in our
sample).  The right panel frees this assumption by adopting $\mathcal{j}_{\rm d}$
and $\mathcal{m}_{\rm d}$ from the hydrodynamic simulations, and instead tests
whether the galaxies are well-described by a rotationally-supported
disk in a fixed potential.  The numbers in brackets indicate
the average fractional error of the model relative to the
simulations.}
\label{fig:mmw_comparison}
\end{figure}

The right panel frees the assumption that the angular momentum of the
galaxy is correlated with the spin of the halo and instead fits the
galactic angular momentum independently by adopting $\mathcal{j}_{\rm d}$ and $\mathcal{m}_{\rm d}$
(along with the remainder of the halo properties) from the hydrodynamic
simulations.  We calculate $\mathcal{j}_{\rm d}$ ($\mathcal{m}_{\rm d}$) from the simulations as the
ratio of the stellar angular momentum (mass) within $R^{\mystar}_{90}$ to the
total angular momentum (mass) within $R_{\rm 200}$.  By doing so, we measure
the true angular momentum of the galaxy (i.e., independent of the spin
of the halo) and therefore test the assumption that a rotationally supported
disk in a fixed gravitational potential (determined by a simple NFW or
isothermal model) provides a reasonable approximation.  Even under this
assumption, the predictions are only moderately accurate, though we do
find order-of-magnitude agreement across this mass range,  in line with
observational results that show a correlation between virial radius
(i.e. halo mass) and galaxy size \citep[e.g.][]{Kravtsov2013}.
The relative success of the isothermal model (compared to the NFW
model) may suggest that the density profiles are closer to isothermal
spheres at their centers, but we see no strong evidence in the
actual profiles (though see \citealp{Chan2015}, who found that the
total density profiles at the centers of MW-mass FIRE-1 galaxies
are well-fit by an isothermal sphere).

\begin{figure*}
\includegraphics[width=\textwidth]{plots/growth_histories.pdf}
\vspace{-1.5em}
\caption{Evolutionary histories of three representative galaxies;
the entire sample is shown in Appendix~\ref{sec:allgrowth}.  Each
curve is normalized to its maximum value.  The clearest trend, which
holds generically for our sample, is that galaxies that have higher
cold gas fractions and more gas available to form stars at late times
(relative to their mass at early times) form the majority of their stars
in disky configurations.  This follows directly from the fact that
star formation is chaotic and bursty at high redshift, but settles
into an ordered, disk-like configuration after $z\sim1$ (for most
galaxies that will be MW-mass at $z=0$).  We quantify these trends
for the full sample in Figure~\ref{fig:morph_vs_gashistories}.}
\label{fig:growth_hist}
\end{figure*}

Though we adopt all of the halo parameters in the hydrodynamic
simulation in the right panel ($R_{\rm 200}$, $\lambda_\mathrm{Peebles}$,
$c$, $\mathcal{j}_{\rm d}$ and $\mathcal{m}_{\rm d}$), the majority of the changes are driven by
allowing $\mathcal{j}_{\rm d}$ and $\mathcal{m}_{\rm d}$ to vary freely and independently:  even
for our sample of fifteen galaxies, $\mathcal{j}_{\rm d}$, $\mathcal{m}_{\rm d}$, and their ratio
vary by nearly an order of magnitude:  $0.005\lesssim\mathcal{j}_{\rm d}\lesssim0.07$,
$0.04\lesssim\mathcal{m}_{\rm d}\lesssim0.09$, and $0.1\lesssim\mathcal{j}_{\rm d}/\mathcal{m}_{\rm d}\lesssim0.75$.
Galaxies acquire a broad range of the specific angular momentum available
in their hosts, and one must know the true $\mathcal{j}_{\rm d}$ and $\mathcal{m}_{\rm d}$ in order to
even roughly predict the radial extent of a given galaxy with the
\citetalias{MoMaoWhite} model.  We are unable to recover a tight
correlation with a single value of $\mathcal{j}_{\rm d}$ and $\mathcal{m}_{\rm d}$ for all galaxies
(even when $\mathcal{j}_{\rm d}\neq\mathcal{m}_{\rm d}$).
There is some evidence for a correlation between $\mathcal{j}_{\rm d}$ and the
$1~\mathrm{Mpc}$ environment:  the median $\mathcal{j}_{\rm d}$ of the galaxies in Local
Group-like pairs is twice that of the isolated sample.  Accordingly,
six of the seven diskiest galaxies in our sample are in Local Groups.
However, our sample size is too small to make definitive statements.

In our parameter exploration, we have generally found that, of the
properties of the $z=0$ DMO halo, $\lambda$ (or $\lambda_{\rm Peebles}$)
correlates most tightly with morphology ($r_\mathrm{sp} = 0.05$ -- 0.7 for the latter)
though the correlation is weak with a large degree of scatter about the
average relationship:  our largest, most ordered galaxy has an average spin
parameter.  While $\lambda(z=0)$ is relatively stable between the DMO and
baryonic simulations,\footnote{The average fractional difference in our
sample is $\sim1\%$.}  $\lambda_{\rm DMO}$ alone is insufficient to
predict morphologies without alleviating the scatter by multiplying by
the true values of $\mathcal{j}_{\rm d}$ and $\mathcal{m}_{\rm d}$.  Given the difficulty of predicting
the morphology of a galaxy with only the information available about the host
halo in a DMO simulation, we therefore turn our attention to identifying
physical drivers of the morphology in the hydrodynamic simulations.  That is,
we do not attempt to predict morphologies, but rather to explain them through
galactic/halo properties at all redshifts.

\subsection{Gas fraction and accretion history}
\label{ssec:growthhist}

Figures~\ref{fig:growth_hist}~and~\ref{fig:morph_vs_gashistories} represent
the culmination of these searches.  The former, Figure~\ref{fig:growth_hist},
shows the normalized mass accretion histories of three representative
galaxies, \run{Batman}, \run{m12i}, and \run{Juliet} (growth histories for the
full sample are plotted in Appendix~\ref{sec:allgrowth}).  The black curves
indicate the stellar mass within $R^{\mystar}_{90}$,
the blue curves show the total cold gas within $R_\mathrm{vir}$ (where ``cold'' is again defined as $T<10^5$ K),
and the magenta curves indicate the ratio of the cold gas mass to the stellar mass of the galaxy (i.e. the ratio of the black and blue curves without normalizing).
Finally, the cyan and orange curves indicate the total gas mass
within $R_\mathrm{vir}$ and the total halo mass, respectively.  Each curve
is normalized to its maximum value.
We find qualitatively identical results measuring the total gas mass near the galactic center via the same iterative process we adopt for the stars:  the vast majority of the cold gas in the halo at any given time is in the galactic disk.  However, we opt to use the total cold gas mass within the virial radius, $M^\mathrm{gas}_\mathrm{cold}$, because this iterative process can falsely capture hot gas in the halo, as discussed earlier.

Of course, every galaxy has a unique evolutionary history, and our
results suggest that history is instrumental in shaping the $z=0$
galaxy.  However, there are trends that hold generically across our
sample, which are exemplified by the three panels in
Figure~\ref{fig:growth_hist}. First, while the total gas in the halo
closely tracks the total halo mass for all galaxies, the behavior of
the cold gas in the halo, i.e. the fuel for star formation, varies
strongly with $f^\mystar_\mathrm{disk}$.  Galaxies similar to \run{Batman} with low
$f^\mystar_\mathrm{disk}$ tend to reach their maximum cold gas mass at early times
(both in absolute terms and in comparison to the growth of their dark
matter halos) when star formation is chaotic and bursty, and quickly
exhaust (or heat) that gas.  They therefore form more stars with
bulge-like configurations, and stars that are formed in a disk are
subject to greater dynamical disruption from the powerful feedback
events.  Galaxies that reach their maximum cold gas mass at early times
but maintain a relatively large reservoir for star formation until
late times, either through mergers or accretion from the circumgalactic
medium (CGM), form a similar fractions of stars during the bursty
period and at late times ($z\lesssim1$), when the star-forming gas
has settled into a rotation-supported disk, as is the case with
\run{m12i}.  Finally, galaxies such as \run{Juliet} that are
disk-dominated tend to have relatively little gas and form relatively
few stars during the bursty phase.  These trends are also evident
in the gas fractions:  bulge-dominated systems tend to reach gas
fractions $\lesssim0.25$ at or before $z\sim1$, while disk dominated
systems maintain high gas fractions until late times.

\subsection{Galaxy mergers}
\label{ssec:galmergers}

Second, comparing the evolution of \run{Batman} and \run{Juliet}
reveals the varying impacts of mergers on the $z=0$ morphologies.
\run{Batman}, which experiences a double merger at $z\sim2$
($t\sim3~\mathrm{Gyr}$; revealed by the sharp up-tick in $M_\mathrm{vir}$) when
the halo mass is relatively low, has a large amount of cold gas
dumped into the halo.  That gas then forms nearly half of the
$z=0$ stellar mass over the next $\sim1-2~\mathrm{Gyr}$, the majority of
which ends up as a compact, dispersion supported system.  Other
bulge-dominated galaxies in our sample typically experience
similarly large mergers at early times (when the systems have
$M_\mathrm{vir}\ll10^{12}\textnormal{M}_\odot$ and therefore no extended ``hot halos''
of gas; see, e.g., \citealp{Keres2005}). Those mergers then tend
to funnel their gas into the center of the galaxy relatively rapidly
\citep{Barnes1991,Bournaud2011,Zolotov2015}.  Mergers that occur
later (when the hot halo is in place), however, tend to have their
gas gradually stripped off and incorporated into the central galaxy
more gradually.  \run{Juliet}, for example, has a gas-rich halo fall
inside the virial radius at $z\sim1$, but the gas in that subhalo is
slowly stripped off and accreted onto the central disk over the course
of several pericentric passages, feeding an extended star forming disk.

Overall, visual inspection of the movies indicates that large
\emph{galactic} mergers do typically lead to bulges in our sample.
This is particularly true those mergers occur on first infall (i.e.\
with low angular momentum), before the gas in the merging system can
be gradually stripped and mixed with the halo, then more gently added
on to the host (in agreement with the results of \citealp{Sales2012}
regarding morphology as a function of the dominant gas accretion mode).
The prominent bulges of \run{Batman}, \run{m12q}, \run{m12b}, and
\run{Remus}, for example, were all created by such events.  However,
the sizes of the bulges built by these events varies:  \run{Robin}
experiences such a merger at $z\sim2$, but the overall masses were
low at that time, leading to a small bulge relative to the disk
that grows later.

\begin{figure*}
\centering
\includegraphics[width=\textwidth]{plots/morphology_vs_gashistory.pdf}
\caption{The morphologies of our galaxies as a function of several
parameterizations of the gas accretion histories of our galaxies
and their host halos.  In order, the columns plot the spin parameter
$\lambda$ of the gas within $R_\mathrm{vir}$ at the scale factor when half of
stars in the galaxy at $z=0$ formed $a_{\mystar}^{50}$, the average
amount of cold gas in the halo after $z=1$, the scale factor at which
the cold gas in the halo first reaches 75\% of its peak, and the scale
factor at which the halo reaches 50\% of its mass $a_{\rm halo}^{50}$.
The first three, which contain information about the accretion history
and buildup either of the galaxy itself or of material that helps to
build the galaxy, all correlate reasonably tightly with $z=0$ morphology:
the first panel is actually the tightest correlation we have identified.
The final column, however, indicates that the history of the DM is less
meaningful:  the DM accretion history and halo merger history contains
little information about the $z=0$ morphology (also see
\S\ref{ssec:dmopred}).}
\label{fig:morph_vs_gashistories}
\end{figure*}

Because a small fraction of the stellar mass in the central galaxy
is formed ex situ (i.e. brought in by mergers; typically less than
5\%), they do not significantly contribute directly to $f^\mystar_\mathrm{disk}$
\citep[also see][]{AnglesAcazar2017}.  The actual ex situ fraction
is also not correlated with morphology ($r_\mathrm{sp}=-0.3$--0.55), and in the
majority of our sample, the deposited ex situ stars are typically
dispersion supported.  However, a few galaxies in our sample have
accreted stars that contribute to the disk:  three galaxies have
their ex situ circularity distributions peak at $\epsilon\sim0.6$,
and in particular, our two diskiest galaxies have even their accreted
stars on disky orbits with $\epsilon$ peaking at $\sim0.9$ and $1$.

\subsection{Secular evolution and bulges}
\label{ssec:secevol}
Not all bulges are built by mergers, however:  neither \run{m12m},
\run{m12i}, nor \run{Louise} experience a major head-on galactic
merger, but all host dispersion-supported stars today.  The bulge
in \run{m12m} is built by a secular bar-buckling event (Sanderson
et al., in prep.).  Meanwhile, \run{m12i} hosts a compact gas disk
that initially loses angular momentum in a series of mergers, but
then slowly builds up a larger disk at late times.  Therefore, systems
that have undergone direct galactic mergers are more likely to host
a bulge than compared to those evolving just under secular
evolution (internal effects), but the exact morphology depends
on the interplay between the merger history, star formation history,
and angular momentum of the gas that builds the disk.

\subsection{Clump sinking/migration}
\label{ssec:clumps}
Both observations \citep[e.g.][and references therein]{ForsterSchreiber2011}
and simulations \citep[e.g.][]{Mandelker2017} of star-forming, disky galaxies
at $z\sim2$ have found evidence for large ($\sim10^7$--$10^9\textnormal{M}_\odot$) gas clumps
that may migrate to the centers of their host disks to form secular bulges.
However, the galaxies we study here are low enough mass at $z\sim2$
that we simply do not expect or see this channel of bulge formation.
Moreover, we note that \citet{Oklopcic2017} showed that while giant clumps
do form in massive galaxies at $z\sim2$ in the FIRE simulations, there
was no evidence that these clumps have a net inward migration inwards that
build a bulge, even at higher masses than we study here.

\subsection{Misalignments and counter-rotating disks}
\label{ssec:misalignment}
By examining the angular momentum of the material that end up in
the galaxy and halo at turn-around ($z\sim3.5$), \citet{Sales2012}
argued that disk-dominated galaxies are typically formed out of
well-aligned material, while bulge-dominated systems are more likely
to experience misaligned accretion events.  We see some evidence
for this picture in our sample:  \run{m12q}, in particular, is
formed out of the merger of two counter-rotating disks at $z\sim0.8$,
and \run{Batman} and \run{m12b} also experience large, misaligned
galactic mergers.

However, in our sample, this effect manifests primarily through
mergers, and it therefore has either a dramatic impact or a
nearly negligible one:  the fraction of counter-rotating stellar
mass ($\epsilon\leq - 0.5$) at $z=0$ is less than $4\%$ in the
remaining twelve galaxies and, as we show in \S\ref{ssec:formdisky},
the fraction that \emph{forms} counter-rotating is even smaller.
Moreover, \S\ref{ssec:formdisky} demonstrates that the fraction
of stars that form in a bulgy configuration ($\abs{\epsilon<0.5}$)
is relatively smooth across our sample, suggesting a minor (or
relatively constant) contribution from misaligned gas that forms
stars before integrating with the disk.  However, our results do
not preclude the possibility of misaligned accretion contributing
to torquing the disk and shifting stars to lower circularities.
Together with the large scatter in the trend identified by
\citet{Sales2012}, we conclude that our results are in overall
agreement with theirs.

\subsection{Summary:  the evolution of the gas mass and spin}
\label{ssec:driversum}
We quantify these trends in Figure~\ref{fig:morph_vs_gashistories}.  As
in Figure~\ref{fig:mymorh_vs_othermorph}~and~\ref{fig:morph_v_mass},
the black circles show $f^\mystar_\mathrm{disk}$ and the magenta squares indicate
$R^{\mystar}_{90}$.  From left to right, the $x$-axes plot the spin parameter of
the gas in the halo at the scale factor $a_\mystar^{50}$ when half of the
$z=0$ stellar mass had formed,
the average cold gas mass within the halo after $z=1$, the scale factor when $M^\mathrm{gas}_\mathrm{cold}$ first reaches 75\% of its peak,
and the scale factor when the halo mass reaches half of the $z=0$ value,
$a_{\rm halo}^{50}$.  The first three are positively, and relatively strongly,
correlated with morphology:  the spin parameter of the gas at $a_\mystar^{50}$
is actually the tightest (non-morphological) correlation we have identified,
and $\langleM^\mathrm{gas}_\mathrm{cold}(z<1)\rangle$ displays the tightest relationship outside
of other related spin parameters.  In fact, $\langleM^\mathrm{gas}_\mathrm{cold}(z<1)\rangle$ is
even more tightly correlated with morphology than the spin parameter of the
gas in the halo at $z=0$, which has $r_\mathrm{sp} = 0.31$ -- $0.81$.  We find similar
correlations for other descriptions of the gas accretion history of the halo,
such as the scale factor when the total gas mass within $30~\mathrm{kpc}$ first
reaches 75\% of its maximum.

\begin{figure*}
\centering
\includegraphics[width=\textwidth]{plots/morphology_vs_spins.pdf}
\caption{Galactic kinematics and morphology as a function of the
spin parameter, measured at the time (scale factor) when half of
the stars in the galaxy have formed, $a_\mystar^{50}$ (left two
panels, as in the left panel of Figure~\ref{fig:morph_vs_gashistories}),
and at the time (scale factor) when the halo reached half of its
$z=0$ mass, $^{50}_{\rm halo}$ (right two panels).  The relationships
with the spin parameter of the dark matter at $a = a_\mystar^{50}$,
either in the baryonic or DMO run, shows more scatter than with the
gas, but only marginally so.  However, the spin parameters at
$a=a_{\rm halo}^{50}$ (whether gas or DMO) are only weakly correlated
with morphology, at best, emphasizing the difficulty of predicting
galactic morphology given only a DMO simulation.}
\label{fig:spins}
\end{figure*}

Together, Figures~\ref{fig:growth_hist}~and~\ref{fig:morph_vs_gashistories}
suggest that disk-dominated galaxies are formed in systems that maximize
their star forming reservoir at late times (often via fresh gas delivered
by infalling subhalos), and where the gas that will turn into stars at late
times has a high spin.  These conditions often coincide -- gas that
infalls at late times, whether through mergers or smooth accretion, tends
to have a higher impact parameter and therefore more angular momentum than
similar interactions at early times
\citep{White1984,Peirani2004,Keres2009,Stewart2011,Pichon2011,Stewart2013,Lagos2017,Stewart2017}.
This picture is also largely consistent with the results of previous theoretical
and observational works, which have generally found that stellar disks form
inside-out and are composed of young stars, while the oldest stars reside
in the galactic bulge \citep{Kepner1999,Pilkington2012,Howes2015}.  It is
also relatively unsurprising based on the coloring in Figure~\ref{fig:joverjz},
which indicates that the youngest stars in each galaxy have disk-like kinematics.
Unfortunately, it further reinforces the discussion above that it is difficult
to accurately predict the $z=0$ morphology of a galaxy that will form in a
given halo based on a DMO simulation, as the morphology is primarily driven
by the gas dynamics.  The ubiquity of galactic winds and gas recycling in the
FIRE simulations further complicates efforts to connect DMO simulations to the
galactic morphology/kinematics \citep{AnglesAlcazar2014,Muratov2015,AnglesAcazar2017}.

Any individual bulge, meanwhile, can be sourced by either mergers
or secular processes, and both contribute significantly.  However,
the former are more important at early times, while the latter
typically lead to later bulge formation.  In fact, when mergers
happen at later times in our sample, they tend to be smaller,
gas-rich galaxies merging onto the central host and depositing
more gas at larger radii, enhancing the chance of disk survival
\citep[consistent with][]{Hopkins2009a}.  In our limited sample,
however, there is no obvious way to attribute all morphological
trends to ``merger history'' or to ``bar formation.''

\subsection{Predicting morphology from DM-only properties}
\label{ssec:dmopred}

To emphasize the difficulty of using a DMO simulation to
\emph{a priori} estimate the morphology of a galaxy in light
of the tight correlation between $\lambda_\mathrm{gas}$ at
$a_\mystar^{50}$ (which suggests that a similarly tight
correlation might exist for $\lambda_\mathrm{DMO}$ at some
$z>0$), Figure~\ref{fig:spins} shows galactic morphology
against various spin parameters at two scale factors:
$a_\mystar^{50}$ and $a_\mathrm{halo}^{50}$, the half-mass
time of the total halo mass; only the latter is available
in a DMO simulation.  The first panel shows the spin parameter
of the dark matter in the baryonic simulation at $a_\mystar^{50}$.
While it is less tightly correlated with morphology than the
spin parameter of the gas in the halo at the same scale factor
(Figure~\ref{fig:morph_vs_gashistories}), the relationship remains
relatively tight.  The second panel demonstrates that the correlation
between the DM spin (at $a_\mystar^{50}$) and morphology is not
driven by interactions between the baryons and the DM -- the spin
parameter in the DMO simulation at the same scale factor also correlates
with morphology, though again less strongly.\footnote{Though we
have not identified any direct correlations between DMO halo
properties and $a_\mystar^{50}$, the relationship in the second
panel suggests that, if one \emph{could} predict the galaxy
half-mass time from a DMO simulation alone, there may be a path
from the properties of the halo in the DMO simulation to the
galactic morphology.}  However, those correlations have not yet
appeared at the (earlier) $a_\mathrm{halo}^{50}$:  the third
panel shows that the spin parameter of the gas at $a_{\rm halo}^{50}$
is only weakly correlated with morphology, and the final panel
illustrates that the spin parameter in the DMO simulation contains
little information at this time (as it does at $z=0$).  We also
note that $\lambda_{\rm gas}$ is typically $2$--$3$ times the spin
of the dark matter (both at high $z$ and at $z=0$; first pointed
out by \citealp{Stewart2011}), emphasizing the disconnect
between the angular momentum of the baryons (particularly those
that eventually form the galaxy) and the halo.   Moreover,
while there is a reasonably tight correlation between $a_\mystar^{50}$
and $a_{\rm halo,\,DMO}^{50}$ ($r_\mathrm{sp} = 0.4$--0.92), a
direct route from DMO halo properties to galaxy morphology
would require a similar correlation between
$\lambda_{\rm gas}(a = a_\mystar^{50}$) and
$\lambda_{\rm DMO}(a = a_{\rm halo,\,DMO}^{50})$, which we see
no strong evidence for ($r_\mathrm{sp} =-0.22$--0.85).

We also explore trends with the accretion history of the
main branch of the DMO halo in Figure~\ref{fig:dmo_mah}.  The inset
panel shows the scale factor of the last major merger in the DMO
run against the galactic morphology.\footnote{Merger times and mass
accretion histories are drawn from merger trees built with
\texttt{consistent-trees} \citep{ctrees} using \texttt{rockstar}
\citep{rockstar} halo catalogs.} The curves are colored by
$f^\mystar_\mathrm{disk}$; the most bulge-dominated galaxies tend to have
higher masses at early times, but the halos that host the
galaxies with the highest $z=0$ disk fractions in our sample
typically have even higher (normalized) masses at any
$z\gtrsim1$.  This is similar to the result in
Figure~\ref{fig:morph_vs_gashistories}:  the evolution (and
spin parameter) of the halo contains relatively little
information about the galactic morphology compared to
the evolution (and spin parameter) of the galaxy itself.

\begin{figure}
\includegraphics[width=\columnwidth]{plots/dmo_norm_mah_wlastMM.pdf}
\vspace{-1.5em}
\caption{
The normalized mass accretion histories of our host halos in the
DMO simulation.  The inset shows the scale factor of the last
major merger (defined as a mass ratio of $\geq0.3$) in the DMO
simulation against galactic morphology.  While the galaxies with
the largest bulges do tend to reside in halos that form early,
the most disk dominated systems have actually accreted a greater
fraction of their mass by $z\sim1$ ($t\sim6~\mathrm{Gyr}$).  Moreover,
there is effectively no correlation between the timing of the last
major merger and morphology.
}
\label{fig:dmo_mah}
\end{figure}

\subsection{Other}
\label{ssec:other}
In addition to the properties shown in Figures~\ref{fig:morph_v_mass},
~\ref{fig:morph_vs_gashistories},~\ref{fig:spins},~and~\ref{fig:dmo_mah}
and discussed above, we have also checked for correlations with numerous
other parameters of the galaxy, halo, or DMO halo both at $z=0$ and at
higher redshifts, including their growth histories.  Examples of those
that correlate with the $z=0$ morphology, but less strongly than those we
present above, include
properties associated with the star formation history, such as the
amount of time that the galaxy maintains a (200 Myr averaged) star formation
rate (SFR) of at least 50\% of its peak value and the fraction of stars
formed during that time.  Similarly, the actual peak SFR shows a weak
anti-correlation:  relatively constant, extended star formation is
more likely to create a well-ordered disk \citep[as discussed in][]{Muratov2015}.
However, the scale factor when the galaxy reaches its peak SFR is uncorrelated
with morphology today ($r_\mathrm{sp} = -0.33$ -- 0.54). The fraction of specific
angular momentum in the disk, $\mathcal{j}_{\rm d}/\mathcal{m}_{\rm d}$, is also weakly correlated with
$z=0$ morphology, as is the spin of the gas/halo at $z=1$.

Finally, a non-exhaustive list of properties that show no statistically
significant signs of correlation with $f^\mystar_\mathrm{disk}$ or $R^{\mystar}_{90}$ include (along
with their associated bootstrapped 95\% CI on $r_\mathrm{sp}$) includes:
\begin{itemize}
    \item $M^\mystar_\mathrm{galaxy}/M_\mathrm{vir}$ ($r_\mathrm{sp} = -0.49$ -- $0.11$),
    \item the total angular momentum in the DMO halo at $z=0$ ($r_\mathrm{sp} = 0.09$ -- $0.48$),
    \item the NFW scale radius of the DMO halo at $z=0$ ($r_\mathrm{sp} = -0.52$ -- $0.14$),
    \item the $z=0$ shape of the DMO halo at various radii ($r_\mathrm{sp} = 0.14$ -- $0.5$ at 10~kpc and $r_\mathrm{sp} = 0.08$ -- $0.64$ at 300~kpc),
    \item the fraction of $M_\mathrm{vir}$ in bound subhalos at $z=0$ ($r_\mathrm{sp} = -0.18$ -- $0.54$),
    \item the scale factor at which the SFR peaks ($r_\mathrm{sp} = -0.32$ -- $0.52$),
    \item the $z=0$, 100-Myr-averaged SFR ($r_\mathrm{sp} = -0.34$ -- $0.52$) and specific SFR ($r_\mathrm{sp} = -0.27$ -- $0.52$),
    \item the fraction of stellar mass formed after $z = 1$ ($r_\mathrm{sp} = -0.25$ -- $0.44$),

    \item the fraction of halo mass accreted after $z = 1$ ($r_\mathrm{sp} = -0.27$ -- $0.31$),
    \item the fraction of in-situ stars within 30~kpc ($r_\mathrm{sp} = -0.3$ -- $0.55$),
    \item the mass of the stellar halo, whether selected by $z=0$ distance ($r_\mathrm{sp} = -0.41$ -- $0.23$) or formation distance ($r_\mathrm{sp} = -0.58$ -- $0.16$),
    \item the maximum gas mass within $R_\mathrm{vir}$ over cosmic time ($r_\mathrm{sp} = -0.21$ -- $0.44$)
    \item the mean stellar age ($r_\mathrm{sp} = -0.46$ -- $0.23$).
\end{itemize}
The final point appears contradictory to the picture that we
describe above at first glance:  if disks form late, then
one would naively expect the mean stellar age, or $a_\mystar^{50}$,
to correlate with morphology.  However, by close inspection of
Figure~\ref{fig:joverjz} (and as we will show further in
Section~\ref{sec:evolution}), one can see that while the disk of a given
galaxy is (almost) always younger than the bulge of that galaxy,
disks emerge at different times in different galaxies.  For
example, the disk of \run{Romeo} is composed of stars with an
average age of $\sim6~\mathrm{Gyr}$, while \run{m12f}, which hosts a disk
and a bulge, formed its disk much more recently.

\begin{figure*}
\includegraphics[width=\textwidth]{plots/totdisk+negdisk+SFR_vs_time_by_star_disk_frac.pdf}
\vspace{-3em}
\caption{The instantaneous fraction of stars born in either a prograde
or retrograde disk, i.e. with $\abs{\epsilon}\geq0.5$ at formation
(black); only in a counter-rotating disk, i.e. with $\epsilon\leq - 0.5$
at formation (dashed cyan); and the normalized star formation rate (gray
dotted curves).  Most stars with high circularity are formed at late
times, though in \run{Batman} and \run{m12q} most of the young star
formation occurs in a counter-rotating disk.  The three galaxies with
the lowest $f^\mystar_\mathrm{disk}(z=0)$ all experience some level of counter-rotating
star formation; the remainder experience almost none.  Galaxies with
high $z=0$ disk fractions have more prolonged disk-like star formation,
but mergers sometimes destroy existing disks and scramble the correlation.
}
\label{fig:fsdisk_evol}
\end{figure*}

\section{The evolution of the stellar morphology}
\label{sec:evolution}

\subsection{Overview}
As the previous section showed, the $z=0$ morphology is driven
primarily by a combination of the accretion histories, the degree
of rotation support in the halo at the half-mass time of the galaxy,
and the relative amount of mass and angular momentum from the halo
that end up in the disk.  However, the $z=0$ morphology is also
the culmination of star formation in the galaxy, stars being
deposited onto the galaxy through mergers, and dynamical interactions
altering the orbits of existing stars.  In this section, we explore the
birth morphologies of stars and the extent to which their orbits are
shifted to lower circularities over time, and we demonstrate that while
the $z=0$ morphologies do correlate with the spin of the gas that they
are born out of, the full picture depends on the mutual evolution of the
gas kinematics and star formation rate, and the impact of dynamical heating
on the galactic disk.  We do not explicitly investigate the radial or
vertical structure of the disk as a function of time, but we refer the
reader to \citet{Ma2016b} for a detailed discussion of the evolution of
the disk of \run{m12i} simulated with FIRE-1.

Figure~\ref{fig:fsdisk_evol} shows, as a function of time, the
instantaneous fraction of stars forming with circularities
$\abs{\epsilon}\geq0.5$ (measured at the time of formation) and
with $\epsilon\leq0.5$, i.e. in a disk that is counter-rotating
relative to the overall angular momentum axis of the existing
stars in the galaxy, and the normalized star formation rate (SFR).
We define the instantaneous birth disk fraction $f_{\mystar,\,{\rm birth}}^\mathrm{disk}(t)$ from
the first snapshot that each particle appears in, capturing the
kinematics of stars that are at most $\sim20~\mathrm{Myr}$ old.
Circularities, and therefore disk fractions, are defined relative
to the evolving $\hat{z}$ axis of the angular momenta of all the stars
in the galaxy at a given time.  The curves indicate running averages
smoothed over $\sim300~\mathrm{Myr}$, but the qualitative conclusions are
insensitive to the size of this window.  We count stars within $R^{\mystar}_{90}(t)$,
but we find similar results using all stars within a fixed cut of
$30$~physical~kpc.

\begin{figure}
\centering
\includegraphics[width=\columnwidth]{plots/absbirth+birth+negbirth+max.pdf}
\vspace{-1.5em}
\caption{The cumulative fraction of stars born in a disk (i.e. with
$\abs{\epsilon} \geq 0.5$, $\epsilon\geq0.5$, and $\epsilon\leq - 0.5$ at
birth), and the maximum instantaneous fraction of the stellar mass in
the galaxy at any given time with $\epsilon\geq0.5$ (i.e. $f^\mystar_\mathrm{disk}(t)$),
all as a function of the disk fraction today.
The fraction of stars born in counter-rotating disks (open black circles)
is $<4\%$ in all but the most bulge-dominated galaxies.  The spread in maximum
disk fraction and in the birth disk fraction is surprisingly small
($0.5$--$0.9$): though $z=0$ bulge-dominated systems do tend to form fewer
stars with high $\abs{\epsilon}$ overall, and more stars in a counter-rotating
disk, they are primarily differentiated by their subsequent evolution.  Disk
dominated systems at $z=0$ are more likely to be at or near their maximum
disk fractions.
}
\label{fig:birth_v_now}
\end{figure}

\subsection{Most stars form in disky configurations}
\label{ssec:formdisky}

Figure~\ref{fig:fsdisk_evol} illustrates several points about the
evolution of the disk morphology.  First, at late times, most stars
forming in MW-mass galaxies (black curves) do so with disk-like
kinematics. This does not preclude them from forming in bulges,
however, since they can be compact, rotationally-supported
pseudo-bulge components.  Even in our most bulge-dominated system
($f^\mystar_\mathrm{disk}\sim0.2$), the ``birth disk fraction'' is high at late
times -- only \run{m12q} does not have $f_{\mystar,\,{\rm birth}}^\mathrm{disk}\sim1$ at some
point after $t \sim 10$~Gyr.  The three galaxies with the lowest
$f^\mystar_\mathrm{disk}$ at $z=0$ are also the only three to experience a significant
fraction of counter-rotating star formation.  In \run{m12b}, that
star formation eventually builds enough of a disk to flip the overall
angular momentum axis of the galaxy (which occurs at $t\sim8$~Gyr
when the cyan curve goes to zero), but in \run{Batman} and \run{m12q}
it only decreases the $z=0$ disk fraction by adding stars opposite
to the predominant $\hat{z}$.  Therefore, even though SFRs typically
peak around $z\sim1$, and dynamical interactions shift stars to lower
circularity as time passes, MW-mass galaxies usually increase their
disk fractions at late times through fresh star formation.  Though it
is not shown here, the disk size $R^{\mystar}_{90}$ also tends to grow smoothly
after $z\sim1$.

The remainder of the sample demonstrates that the interplay between
the SFR and the fraction of stars forming in the disk as a function
of time is also instrumental to the $z=0$ morphology.  During the
very early of stages of their growth ($t\lesssim2$~Gyr), the hosts
are dwarf-size systems and experience chaotic, bursty star formation
in clumpy, gas-rich dIrr-type progenitor galaxies.  As the gray curves
show, though, star formation rates are typically relatively low at
these early times.  The transition to ordered star formation (which
is strongly correlated with the emergence of an ordered gas disk;
\citealp{Ma2016b,Simons2017,Ceverino2017}) occurs at different times
and at a different rate in each system, but it often coincides with a
peak in the star formation.

Both the timing of the transition and the behavior of the SFR following
it strongly influences the $z=0$ morphology:  galaxies with
$f^\mystar_\mathrm{disk}(z=0)\gtrsim0.7$ shift to ordered star formation relatively early
and maintain a relatively high SFR until $z=0$.  Lower $f^\mystar_\mathrm{disk}$ galaxies
either change over later (e.g. \run{m12z}) or have a relatively low SFR
following the switch (e.g. \run{Remus}).

\subsection{Disruption and disordering of stellar disks}

Disks built by ordered star formation can also be heated and
destroyed.  Figure~\ref{fig:birth_v_now} plots the
disk fraction at $z=0$ against both the cumulative fraction of
stellar mass born in the galaxy with high $\epsilon$ and the
maximum instantaneous fraction of stellar mass in the galaxy at
any given time with high circularities.  The scatter in $f_{\mystar,\,{\rm birth}}^\mathrm{disk}$
is relatively small: all of the galaxies in our sample have
$0.6<f_{\mystar,\,{\rm birth}}^\mathrm{disk}<0.9$.  Accounting for counter-rotating star formation,
all of our systems form $\geq75\%$ of their stars in a disk.  In
other words, most stars form in disky configurations, as argued
above.  Furthermore, counter-rotating young stars (which would be
formed out of retrograde star-forming gas) are typically too rare to
have a significant impact on the galaxy (\S\ref{ssec:misalignment}).
Though we do not show it here, we also note that the fraction of
counter-rotating ($\epsilon\leq - 0.5$) stellar mass at $z=0$ is
extremely small in all but the most bulge-dominated systems.
Moreover, while the maximum counter-rotating fraction at any given
time is $\sim15$--$25\%$ across our sample, these maxima occur at
very early times ($z\gtrsim3$--$4$) when the galaxies were at the
dwarf mass scale.  The exception is \run{m12b}, which builds a
disk that is initially counter-rotating relative to the existing
bulge but becomes large enough to dominate the angular momentum
of the galaxy and flip the overall $j_z$ vector; \run{m12b}
therefore maximizes its counter-rotating fraction immediately
before this transition at $z\sim0.5$.

Because the galaxy masses and the degree of order in the galaxy
build up over time, most of our galaxies have $f^\mystar_\mathrm{disk}(z=0)\simeq
\max\left[f^\mystar_\mathrm{disk}\right]$,  i.e., the majority of our sample is at
its ``most disk-dominated'' today.

\begin{figure*}
\centering
\includegraphics[width=0.95\textwidth]{plots/gas_viz_by_star_disk_frac.jpg}
\caption{Gas column density maps of the galaxies in our sample.  Galaxies
are again sorted by decreasing $f^\mystar_\mathrm{disk}$, but the number in parentheses
indicates the rank (from largest to smallest) that each galaxy has when
sorted by $R_\mathrm{gas}$.  \run{Batman} has a significant $\sim20^\circ$ warp,
likely induced because the $z=0$ gas disk is built from an ongoing merger
that is misaligned with the stars, and \run{m12q} exhausted most of its
gas supply at $z\sim0.1$; the remainder of the MW-mass FIRE-2 galaxies have
thin, rotation supported disks ($f_\mathrm{gas}^\mathrm{disk} \geq 0.9$) at $z=0$.  We therefore
focus on the size of the gas disk, rather than the co-rotation fraction.
The dashed lines indicate the adopted radial and vertical extents of the
gas disks; they are not shown for \run{m12q} where they are $<1~\mathrm{kpc}$.}
\label{fig:gas_viz}
\end{figure*}

However, even bulge-dominated galaxies tended to have relatively
strong disks at earlier times before having them destroyed by
mergers and diluted by misaligned star formation.  At $z\sim1$,
all of \run{Batman}, \run{m12q}, and \run{m12b} had disks that
comprised 50--70\% of their stellar mass at that time.  That is,
while bulge-dominated systems arise from a combination of both
nature and nurture, those in our sample were primarily differentiated
from disky systems by the latter.  Even though they do have
more than twice as much retrograde star formation (relative to
their total stellar mass) as any of the diskier galaxies in our
sample, the difference between their maximum $f^\mystar_\mathrm{disk}$ and their
$z=0$ $f^\mystar_\mathrm{disk}$ is much larger, indicating that they were generally
subject to more disk scrambling than the $z=0$ disk-dominated
galaxies.

\begin{figure*}
\centering
\includegraphics[width=\textwidth]{plots/gasmorph_vs_drivers.pdf}
\caption{The size of the gas disks $R_\mathrm{gas}$ vs the gas mass within
$R_\mathrm{gas}$ and $Z_\mathrm{gas}$, $M^\mathrm{gas}_\mathrm{galaxy}$;
the average mass in $T<10^5$~K gas within the virial radius after $z=1$, $\left\langleM^\mathrm{gas}_\mathrm{cold}(z<1)\right\rangle$;
the ratio
of the shortest to longest principal axes of the stars within $20~\mathrm{kpc}$,
$(c/a)_\mystar(<20~\mathrm{kpc})$; and the radial extent of the stars, $R^{\mystar}_{90}$.
The dashed gray line in the final column is one-to-one, indicating that
the majority of the gas disks extend well beyond the stellar disks.
The points are colored by $f^\mystar_\mathrm{disk}$, which also correlates reasonably
strongly with $R_\mathrm{gas}$.
}
\label{fig:gas_drivers}
\end{figure*}

Stars may also be shifted to lower circularities, while remaining
on disk-like orbits, if the overall angular momentum axis of the
galaxy shifts over time.  Most of our sample is only marginally
impacted by this effect:  the angular momentum axis of our
galaxies changes by $\lesssim35^\circ$ after $z=0.5$ in
all but one of our galaxies.  The exception, moreover, is
\run{m12b}, which, as described above, builds a large enough young
disk around the existing compact, bulgy core at late times
to flip the overall angular momentum axis of the galaxy.

As discussed above, however, the $z=0$ morphology is a very weak
function of mean stellar age:  the most bulge-dominated systems
do tend to be the oldest, but the youngest systems are not necessarily
disk-dominated.  Thus, the length of time over which stellar orbits
can be perturbed is not a primary driver of $z=0$ morphology.  In
other words, while the bulge-dominated systems in our sample do have
their pre-existing stellar disks destroyed by mergers or counter-rotating
star formation, this can happen early or late in cosmic time.

\section{Gas morphologies in MW-mass FIRE-2 galaxies}
\label{sec:gas_morph}

As reflected in \S\ref{sec:evolution} via the stellar circularities
at birth, the star-forming gas in MW-mass galaxies is typically
in a well-ordered disk with the majority of star formation
occurring with $\abs{\epsilon} \gtrsim 0.75$.  That is, regardless
of the instantaneous state of the stars in the galaxy, the short
dynamical memory of the gas leads to thin disks at nearly all times
in massive galaxies.  For a detailed investigation of gas morphologies
across a larger range of host masses in the FIRE-2 simulations, we
refer the reader to \citet{KEB2017}, who examined gas angular momentum
and HI morphology as a function of galaxy mass from the dwarf scale
to the MW scale, and showed that in dwarfs the degree of rotation
support can be much lower.

\subsection{MW-mass galaxies have rotationally supported gas disks}

As demonstrated in Figure~\ref{fig:joverjz}, almost all of the gas
in the galaxies is on circular, disk-like orbits at $z=0$ (with the
exception of \run{m12q}).  Even without accounting for elliptical orbits,
gas rotation curves are consistent with almost complete rotation support
out to roughly $R_\mathrm{gas}$ in all the galaxies except \run{Batman} and
\run{m12q}.  In fact, with the exception of \run{m12q}, all of the galaxies
have $f_\mathrm{gas}^\mathrm{disk} > 0.9$, with nine of the fifteen exceeding $0.98$.  This is
not particularly surprising at these masses, where pressure support for
$T\lesssim10^4$~K gas is very weak.

\subsection{Visual morphologies of gas disks}
Figure~\ref{fig:gas_viz} shows face-on and edge-on projections of
the gas in the FIRE-2 galaxies, again sorted by increasing $f^\mystar_\mathrm{disk}$.
As in Figure~\ref{fig:stellarviz}, the circles and rectangles indicate
$R_\mathrm{gas}$ and $Z_\mathrm{gas}$.  Even with (almost) all of the galaxies having
$f_\mathrm{gas}^\mathrm{disk} > 0.9$, there exists some diversity in the shape of the
disks, and even more diversity in the radial extent.  For example,
\run{m12f} very recently interacted with a gas-rich subhalo, leaving
a marginally disturbed gas disk at $z=0$.
\run{m12q} has effectively no gas remaining at $z=0$, having consumed
the last of its gas disk at $z\sim0.1$.  \run{Batman} has a clear
warp near the center of the disk, likely created because the $z=0$
gas disk is formed out of an ongoing accretion event.
\run{Romulus} and \run{Louise} display similar warps near the edges
of their disks.  \run{Batman} is also the only galaxy with a gas disk
misaligned from the stellar disk by more than $4^\circ$.  This
misalignment presumably survives because the gas is being continually
replenished at $z\sim0$ \citep{vandeVoort2015}, and likely also because
\run{Batman} has a relatively spherical stellar distribution:  the ratio
of the shortest to longest principal axes, $(c/a)$, of the stars within
$10~\mathrm{kpc}$ is $0.72$.\footnote{The remainder of the sample all have
$(c/a)^\mystar(<10~\mathrm{kpc})\lesssim0.5$.}

\subsection{Sizes of gas disks}

Figure~\ref{fig:gas_drivers} explores the radial extent of the gas disks.
The radius of the gas disk is closely tied to the amount of gas in the
galaxy, in broad agreement with the observed relationship between the size
of gas disks and the amount of gas in those disks \citep[e.g.][]{Wang2016},
and potentially in agreement with arguments based on the \citet{Toomre1964}
stability parameter (Schmitz et al., in prep.).

$R_\mathrm{gas}$ is also correlated with the morphology of the
stellar component:  the points in Figure~\ref{fig:gas_drivers}
are colored by $f^\mystar_\mathrm{disk}$ and are generally correlated with
$R^{\mystar}_{90}$, though the gas disks are typically more extended.
To the extent that this is causal, it appears primarily to
owe to the fact that higher late-time gas masses are associated
both with larger $R_\mathrm{gas}$ and diskier galaxies.

Though our sample size is small, and we have yet to identify any
underlying physical drivers, we note galaxies in our paired sample
tend to have higher $R_\mathrm{gas}$ overall.  This is apparent even by eye in
Figure~\ref{fig:gas_viz}:  the numbers in parentheses, which indicate
the rank of $R_\mathrm{gas}$ for each galaxy, show that the five largest gas
disks are all in halos that reside in a Local Group-like environment.
However, with such a small sample size, it is impossible to reject the
null hypothesis that they are drawn from the same distribution and,
without tying $R_\mathrm{gas}$ to a property of the DMO halo, we cannot directly
test this hypothesis with a larger sample.  Neither $R_\mathrm{gas}$ nor the
residuals about a power-law fit of $R_\mathrm{gas}(M^\mathrm{gas}_\mathrm{galaxy})$ strongly correlate
with any of the DMO halo properties that we have checked, including
the $z=0$ spin of the DMO halo ($r_\mathrm{sp} = -0.21$--$0.79$).  We have also
tested whether the \citetalias{MoMaoWhite} accurately predicts the
sizes of \emph{gas} disks at $z=0$ based on the DMO halo, and find
relatively poor correlations between the model predictions and the
actual radial extents ($r_\mathrm{sp} = -0.05$--$0.79$ for the isothermal
potential and $r_\mathrm{sp} = -0.26$--$0.69$ for the NFW model).

\section{Conclusions}
\label{sec:conclusions}

In this work, we examined the kinematics and morphologies
of MW-mass galaxies ($10^{10.5}\lesssimM^\mystar_\mathrm{galaxy}/\textnormal{M}_\odot\lesssim10^{11.5}$)
simulated with the FIRE-2 physics.  Our sample includes fifteen galaxies
with effective stellar radii ranging from $\sim1~\mathrm{kpc}$~--~$17~\mathrm{kpc}$, and
kinematic disk fractions varying from $\sim0.2$~--~$0.8$.  We first
demonstrated that these morphological measures broadly correlate with each
other (though there is appreciable scatter), and that both also correlate
with a variety of other morphological measures.  In particular, $\Sigma_1$
is a reasonably accurate descriptor of the overall morphology
over this narrow mass range at $z=0$.

We then showed that the \citet{MoMaoWhite} model, wherein the baryons
that form the disk are assumed to have the same specific angular momentum
of their host DM halos, produces an estimate for galaxy sizes (and how they
correlate with mass over a large dynamic range) that is accurate that the
order-of-magnitude level, but fails to recover the actual half-mass radii
of our galaxies.  This is due primarily to the scatter in the amount of
specific angular momentum that each galaxy acquires:  $\mathcal{j}_{\rm d}/\mathcal{m}_{\rm d}$ has nearly an
order of magnitude spread overall.  Moreover, there are no obvious trends
between the morphology of a galaxy and either the mass accretion history or
the merger history of the host halo in the DMO simulation:  both our most
bulge-dominated and our most disk-dominated galaxies experience their last
major merger at $z\sim2$--$3$.  It therefore remains difficult to predict
the morphology of a galaxy that would form in a given halo based purely
on the information available from a DMO simulation.

Instead, accurate predictors of morphology within this narrow mass range
are related to the gas accretion and galaxy merger histories.  Systems
that maintain high gas fractions to late times tend to be disk-dominated
at $z=0$ (generally growing inside-out, with $R^{\mystar}_{90}$ increasing over time),
while those that maximize their star forming reservoir early tend to be
bulge-dominated at $z = 0$.  Based primarily on visual inspection of the
movies, the amount of gas in the galaxy over time appears to be driven by
a combination of the impact parameter and timing of galactic mergers, along
with the amount of gas in the halo that cools and accretes onto the galaxy
at late times.  We reiterate that our results apply only at this specific
mass, however:  lower mass galaxies that cannot maintain an ordered gas
disk at late times \citep[e.g.][]{KEB2017} would not necessarily follow
the trends identified here.

We find good correlations between morphology and the spin of the gas in the
halo when the galaxy had formed half of its $z=0$ stellar mass, along with
the average amount of gas available to form stars at late times.  These
quantities also correlate (though less strongly) with one another:  gas that
infalls at later times tends to have more angular momentum.  However, we
find no clear route from the host properties available only from a DMO
simulation to galactic morphology:  neither the DMO mass accretion history,
the half-mass formation time of the halo nor the spin of the dark matter at
the halo half-mass formation time (either in the hydrodynamic or DMO
simulation) correlate significantly with morphology, emphasizing the difficulty
of using DMO simulations to predict morphology.  Nonetheless, our analysis
does not preclude a multivariate relationship between morphology and DMO
properties.  In fact, given the correlation between $\lambda_{\rm DMO}$
at $a_\mystar^{50}$ and the morphology at $z=0$, there are hints that such
a relationship may exist, but we lack the sample size to test for those.

The prediction that the spin of the gas in the halo at the stellar
half-mass formation time (i.e. the angular momentum support of the gas that
contributes to building the galaxy) drives the late-time morphologies
of MW-mass galaxies may eventually be observationally falsifiable.
Wide-field observations with integral field spectroscopy (e.g. with
instruments similar to the Keck Cosmic Web Imager; \citealp{KCWI})
could potentially map out the angular momentum in the cold CGM gas
and ultimately measure the distribution of that angular momentum
across halos.  If the picture laid out here is correct, then the
shapes of that distribution and the distribution of the morphologies
of $z=0$ MW-mass galaxies should broadly agree.

The $z=0$ morphologies can also be viewed as the summation of a Hubble
time of star formation and subsequent heating of those stars (either
from mergers, e.g. \citealp{Toomre1972,Hernquist1992,Quinn1993,Sanders1996},
or from internal interactions, e.g. \citealp{Minchev2006,Saha2010}).
We showed that most stars in MW-mass galaxies formed from gas that was
disky at the time of star formation (i.e.\ with circularity
$\abs{\epsilon} \geq 0.5$).  The most bulge-dominated galaxies at $z=0$
tend to have the lowest fraction of stars born in a prograde disk
(and the highest fraction born in a retrograde one), but they also
show the largest differences between their birth and $z=0$ kinematics.
Therefore, while dispersion supported galaxies arise from a combination
of birth stellar kinematics and subsequent stellar heating that destroys
ordered rotation, our results suggest the latter effect is far more
important.

At late times ($z\lesssim1-2$), nearly all of the stars born in MW-mass
galaxies have disk-like kinematics, such that $f^\mystar_\mathrm{disk}$ always grows
after $z\sim1$.  We do see two exceptions, which actually lower their
disk fractions (slightly) at $z\lesssim0.5$ by forming stars in a
counter-rotating disk, but this is only possible because those galaxies
are already dispersion supported when cold gas is added to the
central galaxy at low redshift.  Moreover, we emphasize that the
counter-rotating disks do not \emph{determine} the bulginess of the
galaxy.  We do not expect ``clump sinking'' to play a significant role
in bulge formation for systems that are MW-mass at $z=0$ (whose
progenitors were dwarfs at high redshift).

The gas in the MW-mass FIRE-2 galaxies, meanwhile, always settles into a
largely rotation-supported disk at late times.  All but one of our galaxies
maintain that disk to $z=0$, either though fresh accretion from merging
satellites or condensation out of the CGM.  The size of the gas disk is
primarily driven by its mass.

Our results generally agree with the results of some previous work on the
formation of galactic disks in hydrodynamic simulations of MW-mass galaxies,
which have found that star formation is chaotic and bursty at high redshift,
with well-ordered gas disks only appearing after $z\sim1$ for galaxies with
MW-masses at $z=0$ (for more/less massive galaxies, the transition occurs
earlier/later; see \citealp{Muratov2015,Feldmann2015a,Simons2017,Hayward2017,Sparre2017,CAFG2017}.)
The supply of the gas available to form that disk, therefore, determines the
amount of stars that form with tangential orbits relative to radial orbits.
In agreement with several authors \citep[e.g.][]{Scannapieco2009,Sales2012,
Rodriguez-Gomez2017}, we find no strong morphological trends with the $z=0$
spin of the DM halo at the MW-mass scale.

While our qualitative results are robust to the mass resolution of the
simulations (Appendix~\ref{sec:resolution}), the quantitative morphology
of a given galaxy does change slightly with resolution.  However, these
changes can typically be understood in terms of the trends that we
identify here (e.g. because a slightly different merger history arises
at different resolutions).  We also caution that half of our sample is
in Local Group-like pairs.  While these are more directly comparable to
the MW and Andromeda galaxies than simulations of isolated MW-mass
hosts, there may be environmental effects that bias our results.  However,
because these effects should enter via properties of the halo or galaxy,
such as the halo spin or mass accretion history, our analysis will automatically
include any changes caused by the 1~Mpc environment.

This work has investigated potential relationships between theoretical measures
of morphology and (potentially unobservable) physical properties of the simulated
galaxies in an attempt to understand the physical driver(s) of morphology in the
simulations, not to compare with observations.  We plan to probe the relationship
between theoretical morphological measures of the FIRE-2 galaxies, like those
presented here, and estimates extracted from mock observations, including the
kinematic distributions \citep[e.g.][]{Zhu2018}, in future work.

\section*{Acknowledgments}

The authors thank Astrid Lamberts, Coral Wheeler, Evan Kirby,
Laura Sales, and Virginia Kilborn for valuable discussions.
We also thank the Santa Cruz Galaxy Formation Workshop, the
Galaxy Formation and Evolution in Southern California
(GalFRESCA) workshop, and the Swinburne-Caltech workshop for
spawning useful discussions that significantly improved the
quality of the manuscript, and we thank Alexander Knebe, Peter
Behroozi, and Oliver Hahn, respectively, for making \texttt{AHF},
\texttt{rockstar} and \texttt{consistent-trees}, and \texttt{MUSIC}
publicly available.

Support for SGK was provided by NASA through Einstein Postdoctoral Fellowship grant number PF5-160136 awarded by the Chandra X-ray Center, which is operated by the Smithsonian Astrophysical Observatory for NASA under contract NAS8-03060.
Support for PFH was provided by an Alfred P. Sloan Research Fellowship, NSF Collaborative Research Grant \#1715847 and CAREER grant \#1455342.
AW was supported by a Caltech-Carnegie Fellowship, in part through the Moore Center for Theoretical Cosmology and Physics at Caltech, and by NASA through grants HST-GO-14734 and HST-AR-15057 from STScI.
RES is supported by an NSF Astronomy \& Astrophysics Postdoctoral Fellowship under grant AST-1400989.
KEB was supported by a Berkeley graduate fellowship, a Hellman award for graduate study, and an NSF Graduate Research Fellowship.
EQ was supported in part by NSF grant AST-1715070 and a Simons Investigator Award from the Simons Foundation.
JSB was supported by NSF grant AST-1518291 and by NASA through HST theory grants (programs AR-13921, AR-13888, and AR-14282.001) awarded by STScI, which is operated by the Association of Universities for Research in Astronomy (AURA), Inc., under NASA contract NAS5-26555.
ZH and CAFG were supported by NSF through grants AST-1412836, AST-1517491, AST-1715216, and CAREER award AST-1652522, and by NASA through grant NNX15AB22G,
and ZH additionally acknowledges support from support from Northwestern University through the ``Reach for the Stars'' program.
FvdV acknowledges support from the Klaus Tschira Foundation.
The Flatiron Institute is supported by the Simons Foundation.
DK acknowledges support from NSF grant AST-1412153, NSF grant AST-1715101 and the Cottrell Scholar Award from the Research Corporation for Science Advancement.
MBK acknowledges support from NSF grant AST-1517226 and from NASA grants NNX17AG29G and HST-AR-13896, HST-AR-14282, HST-AR-14554, HST-GO-12914, and HST-GO-14191 from STScI.

Numerical calculations were run on the Caltech compute cluster ``Wheeler,''
allocations from XSEDE TG-AST130039 and PRAC NSF.1713353 supported by the
NSF, NASA HEC SMD-16-7223 and SMD-16-7592, and High Performance Computing
at Los Alamos National Labs.  This work also made use of \texttt{Astropy},
a community-developed core Python package for Astronomy \citep{Astropy},
\texttt{matplotlib} \citep{Matplotlib}, \texttt{numpy} \citep{numpy},
\texttt{scipy} \citep{scipy}, \texttt{ipython} \citep{ipython}, and
NASA's Astrophysics Data System.

\bibliographystyle{mnras}