Can I take a pregnancy test right after sex and while still ovulating?

Really worried! 
Thanks guys :)