How to obtain the free energy of the canonical ensemble in Euclidean general relativity?

If the gravitational field couples with matter fields, such as a charged scalar field, I know the partition function of the grand canonical ensemble naturally relates to the path-integral expression of gravitational field, how about the canonical ensemble?

Besides the Gibbons-Hawking term, do we need to consider another boundary term to build the partition function of the canonical ensemble? What features are this extra boundary term demanded and why are they ?

I hope someone can give an instructive and brief description on this topic. Thank you in advance.

-
If I understand correctly the Gibbons-Hawking paper, formula (3.4), page 15, the equivalent "chemical potentials" are here the angular velocity $\Omega$ and the electrostatic field $\Phi$, while the equivalent "particle numbers" are the angular momentum $J$ and the charge $Q$. So, speaking of canonical ensemble (so without constant chemical potentials), corresponds to null (or non-constant) $\Omega$ or $\Phi$, but constant temperature $T$ – Trimok Jul 29 '13 at 17:30
Thanks for your comment. To the canonical ensemble, the particle number(or particle density) can be taken as constant and the chemical potential can vary with different temperature, as you pointed to. The formula (3.3) in the paper you mentioned above is the partition function in canonical ensemble in Gibbons & Hawking's veiwpoint at that time. However They were wrong, because under their setting-up, the spacetime is instable and the black hole has a negative heat capacity. – Zoe Rowa Jul 30 '13 at 8:55
From their paper we can obtain the relation between energy of spacetime and entropy: $$S(E) = 4\pi E^2$$ and $$\frac{\partial S}{\partial E} = \frac{1}{T} = 8 \pi E$$ The two formulas shows the black hole would grow without bound and get cooler. – Zoe Rowa Jul 30 '13 at 8:58
I suppose that the grand-canonical ensemble is the most general and useful pattern. Why do you say "They were wrong..." It is true that the black hole has a negative heat capacity and get cooler when it gains (mass) energy, as indicated by your formulae. – Trimok Jul 30 '13 at 9:10
I am reading some papers by Brown & York, e.g this. I am considering the case in asymptotically AdS spacetime, how to deal with the boundary term in this circumstance ? – Zoe Rowa Jul 30 '13 at 9:11