Well PHB page 85;
When you HIT [...], you CAN [...]
So you cant announce it before you hit, because you only get to choose to expend the spell slot after you hit. Which is nice, since you wont waste spell slots. After you tell the DM what you rolled to hit, and the DM tells you if you hit or...