Background recognition in Ge detectors by pulse shape analysis