  We derive expressions for the total Hamiltonian energy of gravitating systems
in higher dimensional theories in terms of the Riemann tensor, allowing a
cosmological constant $\Lambda \in \mathbb{R}$. Our analysis covers
asymptotically anti-de Sitter spacetimes, asymptotically flat spacetimes, as
well as Kaluza-Klein asymptotically flat spacetimes. We show that the Komar
mass equals the ADM mass in asymptotically flat space-times in all dimensions,
generalising the four-dimensional result of Beig, and that this is not true
anymore with Kaluza-Klein asymptotics. We show that the Hamiltonian mass does
not necessarily coincide with the ADM mass in Kaluza-Klein asymptotically flat
space-times, and that the Witten positivity argument provides a lower bound for
the Hamiltonian mass, and not for the ADM mass, in terms of the electric
charge. We illustrate our results on the Rasheed Kaluza-Klein vacuum metrics,
which we study in some detail, pointing out restrictions that arise from the
requirement of regularity, seemingly unnoticed so far in the literature.
