The gravitational Hamiltonian, action, entropy and surface terms

Abstract
We give a derivation of the gravitational Hamiltonian starting from the Einstein - Hilbert action, keeping track of all surface terms. This derivation can be applied to any spacetime that asymptotically approaches a static background solution. The surface term that arises in the Hamiltonian can be taken as the definition of the `total energy', even for spacetimes that are not asymptotically flat. (In the asymptotically flat case, it agrees with the usual ADM energy.) We also discuss the relation between the Euclidean action and the Hamiltonian when there are horizons of infinite area (e.g. acceleration horizons) as well as the usual finite area black hole horizons. Acceleration horizons seem to be more analogous to extreme than nonextreme black holes, since we find evidence that their horizon area is not related to the total entropy.