Tracking and alignment in the CMS detector