Magnetic field dependence of the energy resolution of silicon surface- barrier detectors