  We map the stellar structure of the Galactic thick disk and halo by applying
color-magnitude diagram (CMD) fitting to photometric data from the SEGUE
survey, allowing, for the first time, a comprehensive analysis of their
structure at both high and low latitudes using uniform SDSS photometry.
Incorporating photometry of all relevant stars simultaneously, CMD fitting
bypasses the need to choose single tracer populations. Using old stellar
populations of differing metallicities as templates we obtain a sparse 3D map
of the stellar mass distribution at |Z|>1 kpc. Fitting a smooth Milky Way model
comprising exponential thin and thick disks and an axisymmetric power-law halo
allows us to constrain the structural parameters of the thick disk and halo.
The thick-disk scale height and length are well constrained at 0.75+-0.07 kpc
and 4.1+-0.4 kpc, respectively. We find a stellar halo flattening within ~25
kpc of c/a=0.88+-0.03 and a power-law index of 2.75+-0.07 (for 7<R_{GC}<~30
kpc). The model fits yield thick-disk and stellar halo densities at the solar
location of rho_{thick,sun}=10^{-2.3+-0.1} M_sun pc^{-3} and
rho_{halo,sun}=10^{-4.20+-0.05} M_sun pc^{-3}, averaging over any
substructures. Our analysis provides the first clear in situ evidence for a
radial metallicity gradient in the Milky Way's stellar halo: within R<~15 kpc
the stellar halo has a mean metallicity of [Fe/H]=-1.6, which shifts to
[Fe/H]=-2.2 at larger radii. Subtraction of the best-fit smooth and symmetric
model from the overall density maps reveals a wealth of substructures at all
latitudes, some attributable to known streams and overdensities, and some new.
A simple warp cannot account for the low latitude substructure, as
overdensities occur simultaneously above and below the Galactic plane.
(abridged)
