  A new generation of high-resolution hypernuclear gamma$-spectroscopy
experiments with high-purity germanium detectors (HPGe) are presently designed
at the FINUDA spectrometer at DAPhiNE, the Frascati phi-factory, and at PANDA,
the antiproton proton hadron spectrometer at the future FAIR facility. Both,
the FINUDA and PANDA spectrometers are built around the target region covering
a large solid angle. To maximise the detection efficiency the HPGe detectors
have to be located near the target, and therefore they have to be operated in
strong magnetic fields B ~ 1 T. The performance of HPGe detectors in such an
environment has not been well investigated so far. In the present work VEGA and
EUROBALL Cluster HPGe detectors were tested in the field provided by the ALADiN
magnet at GSI. No significant degradation of the energy resolution was found,
and a change in the rise time distribution of the pulses from preamplifiers was
observed. A correlation between rise time and pulse height was observed and is
used to correct the measured energy, recovering the energy resolution almost
completely. Moreover, no problems in the electronics due to the magnetic field
were observed.
