A thick CdTe position sensitive spectrometer for a wide field telescope for hard X and soft gamma ray astronomy