Code for electron calibration in CMS