  The thermal Sunyaev-Zel'dovich (tSZ) effect directly measures the thermal
pressure of free electrons integrated along the line of sight and thus contains
valuable information on the thermal history of the universe. However, the
redshift information is entangled in the projection along the line of sight.
This projection effect severely degrades the power of the tSZ effect to
reconstruct the thermal history. We investigate the tSZ tomography technique to
recover this otherwise lost redshift information by cross correlating the tSZ
effect with galaxies of known redshifts, or alternatively with matter
distribution reconstructed from weak lensing tomography. We investigate in
detail the 3D distribution of the gas thermal pressure and its relation with
the matter distribution, through our adiabatic hydrodynamic simulation and the
one with additional gastrophysics including radiative cooling, star formation
and supernova feedback. (1) We find a strong correlation between the gas
pressure and matter distribution, with a typical cross correlation coefficient
r ~ 0.7 at k . 3h/Mpc and z < 2. This tight correlation will enable robust
cross correlation measurement between SZ surveys such as Planck, ACT and SPT
and lensing surveys such as DES and LSST, at ~20-100{\sigma} level. (2) We
propose a tomography technique to convert the measured cross correlation into
the contribution from gas in each redshift bin to the tSZ power spectrum.
Uncertainties in gastrophysics may affect the reconstruction at ~ 2% level, due
to the ~ 1% impact of gastrophysics on r, found in our simulations. However, we
find that the same gastrophysics affects the tSZ power spectrum at ~ 40% level,
so it is robust to infer the gastrophysics from the reconstructed redshift
resolved contribution.
