Get total energy from an histogram