My solution for the tutorial course in http://ippog.web.cern.ch/resources/2012/cms-hep-tutorial