  A description is provided of the software algorithms developed for the CMS
tracker both for reconstructing charged-particle trajectories in proton-proton
interactions and for using the resulting tracks to estimate the positions of
the LHC luminous region and individual primary-interaction vertices. Despite
the very hostile environment at the LHC, the performance obtained with these
algorithms is found to be excellent. For ttbar events under typical 2011 pileup
conditions, the average track-reconstruction efficiency for promptly-produced
charged particles with transverse momenta of pt > 0.9 GeV is 94% for
pseudorapidities of abs(eta) < 0.9 and 85% for 0.9 < abs(eta) < 2.5. The
inefficiency is caused mainly by hadrons that undergo nuclear interactions in
the tracker material. For isolated muons, the corresponding efficiencies are
essentially 100%. For isolated muons of pt = 100 GeV emitted at abs(eta) < 1.4,
the resolutions are approximately 2.8% in pt, and respectively, 10 microns and
30 microns in the transverse and longitudinal impact parameters. The position
resolution achieved for reconstructed primary vertices that correspond to
interesting pp collisions is 10-12 microns in each of the three spatial
dimensions. The tracking and vertexing software is fast and flexible, and
easily adaptable to other functions, such as fast tracking for the trigger, or
dedicated tracking for electrons that takes into account bremsstrahlung.
