A novel technique for the characterization of a HPGe detector response based on pulse shape comparison