Americans may have many fantasies about movie stars and musicians, but when they ponder potential presidents, sex is generally the last thing on their minds.

Sometimes, though, the issue is inescapable — as with Herman Cain and Newt Gingrich. We can’t avoid it.

It’s hardly a new consideration.

Thomas Jefferson survived stories of illicit affairs to win re-election easily in 1804. Some presidents, including Franklin Roosevelt and John Kennedy, were not model husbands, but their lapses occurred out of public view. Those who knew didn’t tell until much later.

In 1987 things changed in a big way, when former Colorado Sen. Gary Hart, a candidate for the Democratic presidential nomination, was asked about rumors of philandering.

Hart invited journalists to “put a tail on me,” suggesting he had nothing to hide. Actually, he did. When the married Hart’s affair with a fetching blonde came to light, his campaign was doomed.

In 1992, Arkansas Gov. Bill Clinton, hit by allegations of an extramarital affair, went on TV to deny it but admitted “causing pain in my marriage.” That deft, Clintonesque ploy defused the issue enough for him to win the Democratic nomination and the presidency. But his dalliance with a White House intern, and his efforts to hide it, got him impeached.

So what difference does infidelity make to the electorate? Some voters will say it’s a deal-breaker. Some will say it is not, that a candidate’s strengths may outweigh it.

That’s of little comfort to Cain, who suspended his campaign on Saturday. He has been hit by charges that he sexually harassed women as head of the National Restaurant Association and had a long-term extramarital affair. His campaign couldn’t survive them.

That’s partly because he already had committed major gaffes on foreign affairs, indicating he was in way over his head. It’s also because he was accused of exploiting his position to take advantage of subordinates — a firing offense in most workplaces.

Moreover, his vigorous denials in the face of accusations by several women led many people to conclude he was a calculating liar. And that may have been most damaging of all.

The claim that Cain’s alleged affair was going on until this year no doubt counted against him with many people. For some, youthful (or brief) indiscretions are less worrisome than recent (or prolonged) philandering.

Newt Gingrich is counting on that. He has admitted cheating on his first two wives — lapses that he suggested came from an excess of patriotism: “There’s no question at times of my life, partially driven by how passionately I felt about this country, that I worked far too hard and things happened in my life that were not appropriate.”

After a religious conversion, he is hoping for redemption from voters.

His hijinks are old enough that they’d be easier for voters to excuse. But Gingrich has another problem: His former mistress is now his wife.

Americans have tolerated an unfaithful president before. But an unfaithful president and a home-wrecking first lady? That’s a new one.

Voters will take the sexual transgressions of politicians into account in evaluating them, and most probably don’t have a simple formula for that job.

They understand that the nation has elected far more sinners than saints.

They understand that, from time to time, politicians lie.

But as Cain is discovering, when voters question if a candidate is fundamentally honest with them, they’re likely to end the affair.

Editorial by the Chicago Tribune distributed by McClatchy-Tribune Information Service