Yes. As a result from eating chocolate, your brain produces serotonin, which helps elevate moods and can also contribute to increased focus.
There was a Newsweek article on the benefits of chocolate, and it listed some information about this (see link below).
Hope this helps!

