Performance of a prototype of the CMS central detector