Conceptual question Einstein-Hilbert action and QFT in curved spacetime I have a conceptual question regarding the Einstein Hilbert action and QFT in curved spacetimes, both of which I am just about to learn in more depth.
To derive Einstein's equation from an action principle one starts with the Einstein Hilbert action
$ S_{EH} = \int \sqrt{g} \, (R - 2 \Lambda)\tag{1} $
and applies the variational principle $\delta S = 0$ w.r.t to the metric.
On the other hand to describe e.g. a QFT in curved spacetime, one has for the simplest case of a massive scalar:
$ S_M = \int \sqrt{g} ( \frac{1}{2} \partial^{\mu} \phi \partial_{\mu} \phi - \frac{1}{2} m^2 \phi^2) \tag{2}$
My question now are:

*

*How do these two actions relate to each other, if it all? Specifically, why don't we include the Ricci scalar and the cosmological constant into the scalar action?

*When we consider more "complicated" gravity action such as Einstein Maxwell we include the field strength tensor $F^{\mu \nu}$ and have among others as solutions for the metric Reissner-Nordström black holes. How does this field strength tensor relate to the one that needed when placing e.g. a Yang Mills theory onto this background? Would we have another field strength tensor "$F^{\mu \nu}_1$" (coming form the YM) dynamically described by $ S = \int \sqrt{g} ( -\frac{1}{4} F^{\mu \nu}_1 F_{1 \mu \nu})$, s.t. the former field strength tensor is "hidden" in the solution $g^{\mu \nu}$ onto which we place the QFT?

I hope that the questions are not to obscure and appreciate any clarification!
 A: The Einstein-Hilbert action (1) describes empty spacetime. The action (2) describes matter. So if you want to describe a scalar in general relativity you need to consider $S_{EH} + S_M$. Similarly if you want to include electromagnetism you need to add $S_{EM} = \int \sqrt{g} (-\frac{1}{4} F_{\mu\nu} F^{\mu\nu})$.
A: I think that your question is about backreaction.
One can perfectly have an action like
$$S = \int d^4x\sqrt{-g}\left(R-2\Lambda -\frac{1}{2}\partial^{\mu}\phi\partial_{\mu}\phi - V(\phi)\right)$$
Then by variation with respect to the metric one can obtain
$$G_{\mu\nu} + g_{
\mu\nu}\Lambda= T_{\mu\nu} = 2\left(\partial_{\mu}\phi\partial_{\nu}\phi - \frac{1}{2}g_{\mu\nu}\partial^{\xi}\phi\partial_{\xi}\phi - g_{\mu\nu}V(\phi)\right) \tag{1}$$
The scalar field in this case has an impact on the geomerty of spacetime (it backreacts), since it enters the energy momentum tensor and matter and geometry describe a spacetime lets say $\phi$ is the inflaton field. Now, if one wants to study quantum effects of a scalar field in this particular spacetime, one considers a new scalar field $\Phi$ that acts as a perturbation of the obtained spacetime, i.e it does not enter the energy momentum tensor. The dynamics of the scalar field $\Phi$ do encode the spacetime information, since its equation of motion will be
$$\Box \Phi = 0,$$
where the $\Box$ is taken with respect to the metric obtained from (1).
A: 1. Relation between the actions
The scalar action you wrote is the one for a minimally coupled field. One could use the more general action (I'm working with the $-+++$ convention and the $+++$ MTW convention for the curvature signs)
$$S = - \frac{1}{2} \int (\partial_\mu \phi \partial^\mu \phi + m^2 \phi^2 + \xi R \phi^2) \sqrt{-g} \mathrm{d}^4 x, \tag{1}$$
where $R$ is the Ricci scalar and $\xi$ is a coupling constant. This action leads to the equations of motion
$$\nabla_\mu\nabla^\mu \phi - m^2 \phi - \xi R \phi = 0.$$
This generalization is interesting, for example, when you want to consider a conformally invariant field, which is obtained by setting $m=0$ and $\xi = \frac{1}{6}$ (in $d=4$, in more generality you'd have $\xi = \frac{d-2}{4(d-1)}$).
It is worth mentioning that, in QFTCS, the metric and curvature that go into the action of Eq. (1) are assumed to minimize the Einstein–Hilbert action (or the EH action plus some matter terms) independently. That is, the metric is often taken to be a solution of the Einstein equations and one quantizes a scalar field over that classical, fixed background. Considering the backreaction of the scalar field stress-energy on the background metric is a more difficult problem and, when it is considered, one starts talking for example of Semiclassical Gravity.
2. Relation between classical and quantum Yang–Mills
In principle they don't need to relate. You'll quantize a field upon a classical gravitational background which was obtained by using a classical electromagnetic field. If you want to quantize the electromagnetic field on a Reissner–Nordström spacetime, for example, I'd guess you'd probably split the electromagnetic field in a background, classical field $\bar{A}_\mu$ and quantum fluctuations $\hat{A}_\mu$. The total field would be $A_\mu = \bar{A}_\mu + \hat{A}_\mu$, where $\bar{A}_\mu$ is the classical electromagnetic field of the RN solution and $\hat{A}_\mu$ are the quantized fluctuations.
If the classical field and the quantized field are completely different fields (for example, you're quantizing a non-abelian Yang–Mills field on Reissner–Nordström), then they have no relation to each other in principle.
There is a catch which can make things harder. For example, if you're quantizing a charged scalar field on Reissner–Nordström. That is, this time the classical field describing the metric also interacts with the quantum field. Here are the approaches I see as possible:

*

*Treat the electromagnetic field as classic: in this case, the electromagnetic field will change the Klein–Gordon equation, but I don't see any immediate reason to why the constructions in Wald's book, for example, would fail. Actually, I think it would amount to adding a potential to the Klein–Gordon equation, which was already treated in his 1975 paper On Particle Creation by Black Holes. However, I don't recall if that paper also considers potentials that are not compactly supported on spacetime.

*Split the electromagnetic field in classical background and quantum fluctuations: in this case, the quantum fields are quantized in the manner I described in the previous item, but you'll also have to consider the coupling in their interactions. I'm not very used to dealing with interacting fields, but I believe that can be done, e.g., with a path-integral approach. The background metric is dealt with as usual and the background electromagnetic field becomes essentially an external potential (as in the previous item).

