Code migrated from http://cvs.web.cern.ch/cvs/cgi-bin/viewcvs.cgi/UserCode/Devdatta/BTagValidation/