How does one get these definitions of the energy momentum tensor? I was just reading a book - Mirror Symmetry by Clay Mathematics Institute, and on Page 402 of the book, the writer says that energy momentum tensor is defined classically by $$\delta S = -\frac{1}{4 \pi} \int \sqrt{h} d^2 x \delta h^{\mu\nu}T_{\mu\nu}$$ and quantum mechanically by $$\delta_h \langle O\rangle = \left\langle O \frac{1}{4\pi} \int \sqrt{h} d^2 x \delta h^{\mu\nu}T_{\mu\nu}\right\rangle$$
Here is my question: I know that by Einstein-Hilbert action one can get $T_{\mu\nu} = 2  \frac{\delta \mathcal{L}}{\delta h^{\mu\nu}} $. But how can I get the exact form of $\delta S$ as above? Or $\delta_h\langle O\rangle$.
 A: Let $W$ be any $d$-dimensional pseudo-Riemannian manifold with metric $h_{ab}$ and let $S(W)$ be any action defined on $W$.  The energy-momentum tensor is usually defined by (up to a scalar multiple anyways; it seems in your case the definition is modified by a factor of $-4\pi$):
$$
T_{ab}:=\frac{1}{\sqrt{|h|}}\frac{\delta S}{\delta h^{ab}},
$$
where $h:=\det (h_{ab})$.  By definition, under a variation of the action with respect to the metric,
$$
\delta S=\int _W\mathrm{d}^d\sigma \, \delta h^{ab}\frac{\delta S}{\delta h^{ab}}
$$
(this is the definition of the variational derivative).  Simply plugging in the definition of $T_{ab}$, we obtain
$$
\delta S=\int _W\mathrm{d}^d\sigma \sqrt{|h|}T_{ab}\delta h^{ab}.
$$
As mentioned before, everybody has a different convention on what scalar multiple they should put in front of the definition of the energy-momentum tensor, but as you can see, this is the form your book lists up to a constant.
What might not be obvious, however, is why we make this definition.  This is a good definition for a couple of reasons.  First of all, in many cases (but not all!), it agrees with the so-called Noetherian energy-momentum tensor, that is, the one you obtain by computing the conserved currents that arise from invariance under translations.  In the cases where it does not agree with the Noetherian definition, $T_{ab}$ defined in this way tends to have better properties.  For example, in QED in flat space-time the Noetherian energy-momentum tensor should not be gauge invariant, whereas this definition will be.  Similarly in this case, the Noetherian energy-momentum tensor should not be symmetric, whereas this definition will be (it is clear from the definition).  Moreover, the Noetherian definition doesn't make sense in curved space-time:  what does it mean to "translate" coordinates on a sphere, for example?  However, the definition given above always makes sense.  Finally, this is the definition that yields Einstein's equation from the Einstein-Hilbert action.
I know Wald's book on General Relativity contains more details on this in one of his appendices (Appendix E Lagrangian and Hamiltonian Formulations of General Relativity), although certainly there are other sources out there as well.
