Categorizing Cycling Climbs

How are the mountain stages at the TDF and other races categorized? Is there a standard such as 10 KM at a 5% grade = Cat 2 or something to that affect or is determined some other way?

The categorizations also take into account the position within the stage of the climb, and the difficulty of the stage to that point. A Cat 1 climb in the middle of a stage might be an HC climb at the end of a long stage with many 1/HC climbs.

There is no plug-and-grind standard for the climbs.