Hi.. Unprotected sex can result in infections which can also cause pain.. may be this would be the cause.. It could also be a psychological pain happening because of the stress you going through.. Only an examination can give a proper explanation.. So i guess, if you still having the pain, get to see a doctor...