The first trick I have learned is that if I listen to music alone that can be a distraction all its own. I've found that if I listen to music that has a consistent beat and words that I don't try to listen to this helps. I also play a binaural beats track (typically 40hz because this stimulates the alpha brain wave) low in the background of the music.
The second trick is to schedule breaks. This is along the same lines of a Pomodoro sprint, but you should take breaks unless you are on such a good line that it will be lost if you don't complete it. I try to schedule a break every 30 or so minutes. I know that many bosses are opposed to this many breaks but it will make people more efficient and keep them from burning out.
The third and probably most important trick is eating properly. I know this sounds strange but having good food and the right kind is crucial to having that energy and focus that you are looking for. The key is things that your can break down quickly, fruits, simple sugars, and timing them well. If you time your meals just right you will never be hungry and will always be full of energy.
The last and most vital trick is to drink water. You are made of water, and 80% of people are lacking the appropriate amount of water for there body type. The best way I have heard it stated for determining the amount of water to drink is take your weight and that is the number of ounces of water you should drink daily. I know it sounds like alot but it will change the way you feel.
I hope these tips will assist you in becoming better. To your success.