  A general recipe to define, via Noether theorem, the Hamiltonian in any
natural field theory is suggested. It is based on a Regge-Teitelboim-like
approach applied to the variation of Noether conserved quantities. The
Hamiltonian for General Relativity in presence of non-orthogonal boundaries is
analysed and the energy is defined as the on-shell value of the Hamiltonian.
The role played by boundary conditions in the formalism is outlined and the
quasilocal internal energy is defined by imposing metric Dirichlet boundary
conditions. A (conditioned) agreement with previous definitions is proved. A
correspondence with Brown-York original formulation of the first principle of
black hole thermodynamics is finally established.
