Analysis code for single top fiducial cross-section measurement at CMS