There is nothing tidy about the way we nominate our candidates for president. The marathon process is expensive, exhausting and not always enlightening. It's been said that anyone crazy enough to go through it isn't fit to be president.

This year's fight for the Democratic nomination was a classic example, a contest virtually conceded to Walter Mondale at the beginning of 1984, then, with barely a wink of the eye, conceded to Sen. Gary Hart after the Colorado senator upset Mondale in New Hampshire's primary and the Maine caucuses. Mondale eventually prevailed on the final day of the primary season, but not until after several more twists that weren't in the original script.

"So You Want to Be President," a PBS documentary that airs at 8 tonight on "Frontline With Judy Woodruff," is an ambitious effort to capture the running drama. It is a story in two parts: a primer on the convoluted process and an insider's look at the Hart for President campaign, from the loneliest days of 1983, when only Hart and a few dedicated followers believed he would be anything other than an asterisk, to the headiest days in March, when he appeared ready to send Mondale back to Minnestoa, to the unraveling and finally the frustration of his defeat.

Nowhere is that frustration clearer than at the moment Hart's advisers learn of his offhand remark disparaging the state of New Jersey, made at a California fund-raiser less than 10 days before the final day of primaries.

Paul Maslin, who works with pollster and Hart adviser Patrick Caddell, gets the word by phone just as he and Hart's media consultant, Raymond Strother, are cutting the ads for the New Jersey campaign. Maslin, devastated by what he is hearing on the phone, relays the comment to Strother.

"He said what?" Strother asks, looking stunned.

"If this becomes a story, we're dead in New Jersey," Maslin says.

Of course it became a story and in the end, Mondale's big New Jersey victory saved his candidacy on June 5. But you know it will end that way just from looking at Strother's face as he lies back on a sofa and turns his head to the ceiling.

The PBS crew that trailed along with Hart found that its diligence paid off in other ways. You see a somewhat distracted Hart, pumping iron on the night of his upset victory in Ohio as his aides try to decide what to tell the press about the night's voting. You see one of Hart's schedulers trying to tell an overly enthusiastic advance person somewhere out in America that under no circumstances is Hart going to show up at an event to auction off pigs. "He doesn't like pigs," says the scheduler. You see Hart's advisers praising the candidate for his performance in the Atlanta debate, now remembered only for Mondale's devastating "Where's the Beef?" line to Hart.

And for sheer moxie, there is a wonderful scene of Don Montgomery, Hart's finance chairman in Texas, pumping on his exercise bicycle while talking on a telephone headset, trading dollars for access. "I think we can probably, definitely, put you with the candidate if you can raise $5,000," Montgomery says, his legs and arms moving hypnotically on the bike. "We're going to send a runner over right now to pick up the $1,000."

At one point in the documentary, Hart tells an interviewer his campaign has an Oriental quality. "It is Oriental in the sense that our strengths are always our weakness," he says.

The same might be applied to the documentary. The camera is both a strength and a weakness.

For example, the documentary alludes to the deep divisions within the Hart campaign -- top advisers were at war with one another (especially with Caddell) from mid-March until late April, but it is a story that even a crew that had access to the inside of the campaign could not tell adequately.

There are also some significant gaps. The week leading up to Hart's victory in New Hampshire, as dramatic a few days for Hart as there was in the whole year, is barely mentioned. The bitter New York primary fight, where Mondale's victory put him back out front in the race, is simply ignored.

Those were turning points in the battle, and it would have been nice to have seen Hart close-up as he is seen elsewhere in the program.

During the Illinois primary in March, as the Hart campaign struggles with growing pains and a political calendar that stuffed too much into the first month of the primary season, an exasperated staff member mutters to the camera: "It's no way to elect a president." For Gary Hart, that turned out to be true -- as this documentary makes clear. Walter Mondale might have a different view.