Port of the full TrackingAnalysis/Cosmics package from CVS.