  We explore the distribution of cool (~$10^4$K) gas around galaxies and its
dependence on galaxy properties. By cross-correlating about 50,000 MgII
absorbers with millions of sources from the SDSS (optical), WISE (IR), and
GALEX (UV) surveys we effectively extract about 2,000 galaxy-absorber pairs at
z~0.5 and probe relations between absorption strength and galaxy type, impact
parameter and azimuthal angle. We find that cool gas traced by MgII absorbers
exists around both star-forming and passive galaxies with a similar incidence
rate on scales greater than 100 kpc but each galaxy type exhibits a different
behavior on smaller scales: MgII equivalent width does not correlate with the
presence of passive galaxies whereas stronger MgII absorbers tend to be found
in the vicinity of star-forming galaxies. This effect is preferentially seen
along the minor axis of these galaxies, suggesting that some of the gas is
associated with outflowing material. In contrast, the distribution of cool gas
around passive galaxies is consistent with being isotropic on the same scales.
We quantify the average excess MgII equivalent width $<\delta W_{0}^{\rm
MgII}>$ as a function of galaxy properties and find $<\delta W_0^{\rm
MgII}>\propto SFR^{1.2}, sSFR^{0.5}$ and $M_\ast^{0.4}$ for star-forming
galaxies. This work demonstrates that the dichotomy between star-forming and
passive galaxies is reflected in the CGM traced by low-ionized gas. We also
measure the covering fraction of MgII absorption and find it to be about 2-10
times higher for star-forming galaxies than passive ones within 50 kpc. We
estimate the amount of neutral gas in the halo of $<\log M_\ast/{\rm
M_\odot}>$~10.8 galaxies to be a few x$10^9 \rm M_\odot$ for both types of
galaxies. Finally, we find that correlations between absorbers and sources
detected in the UV and IR lead to physical trends consistent with those
measured in the optical.
