Masses attached to pinions, camshafts ordriving shafts for auxiliary equipment