A spatial density analysis technique for the automatic classification of 4 pi detector data