On a side question, I know that if a married Anglican priest converts to Catholicism, they can remain married. Can that priest still climb the ecclesiastical ranks?
A side question: How much do we know about the personal lives of popes? What sources do we pull this information from? My first thought on reading this question was that obviously a pope would never admit to such a thing in public and it's unlikely to show up in an official record, but it occurs to me I don't actually know how much information historians have on older popes.
A question of clarification: do you mean sexually active while Pope, or actually a virgin? The requirement as usually stated is that a Catholic priest should be celibate, not a virgin. I'm fairly sure this means that a widower could become a priest. A perhaps more interesting case is if a man has intercourse outside marriage, and then confesses it and obtains forgiveness. Would this prevent them becoming ordained subsequently? I'd be interested to know if the church canons say anything on this.