  In this work, we extend the analysis of Brown and York to find the quasilocal
energy in a spherical box in the Schwarzschild spacetime. Quasilocal energy is
the value of the Hamiltonian that generates unit magnitude proper-time
translations on the box orthogonal to the spatial hypersurfaces foliating the
Schwarzschild spacetime. We call this Hamiltonian the Brown-York Hamiltonian.
We find different classes of foliations that correspond to time-evolution by
the Brown-York Hamiltonian. We show that although the Brown-York expression for
the quasilocal energy is correct, one needs to supplement their derivation with
an extra set of boundary conditions on the interior end of the spatial
hypersurfaces inside the hole in order to obtain it from an action principle.
Replacing this set of boundary conditions with another set yields the
Louko-Whiting Hamiltonian, which corresponds to time-evolution of spatial
hypersurfaces in a different foliation of the Schwarzschild spacetime. We argue
that in the thermodynamical picture, the Brown-York Hamiltonian corresponds to
the internal energy whereas the Louko-Whiting Hamiltonian corresponds to the
Helmholtz free energy of the system. Unlike what has been the usual route to
black hole thermodynamics in the past, this observation immediately allows us
to obtain the partition function of such a system without resorting to any kind
of Euclideanization of either the Hamiltonian or the action. In the process, we
obtain some interesting insights into the geometrical nature of black hole
thermodynamics.
