  Context: XMM-Newton was launched on 10 December 1999 and has been operational
since early 2000. One of the instruments onboard XMM-Newton is the reflection
grating spectrometer (RGS). Two identical RGS instruments are available, with
each RGS combining a reflection grating assembly (RGA) and a camera with CCDs
to record the spectra. Aims: We describe the calibration and in-orbit
performance of the RGS instrument. By combining the preflight calibration with
appropriate inflight calibration data including the changes in detector
performance over time, we aim at profound knowledge about the accuracy in the
calibration. This will be crucial for any correct scientific interpretation of
spectral features for a wide variety of objects. Methods: Ground calibrations
alone are not able to fully characterize the instrument. Dedicated inflight
measurements and constant monitoring are essential for a full understanding of
the instrument and the variations of the instrument response over time.
Physical models of the instrument are tuned to agree with calibration
measurements and are the basis from which the actual instrument response can be
interpolated over the full parameter space. Results: Uncertainties in the
instrument response have been reduced to < 10% for the effective area and < 6
mA for the wavelength scale (in the range from 8 A to 34 A. The remaining
systematic uncertainty in the detection of weak absorption features has been
estimated to be 1.5%. Conclusions: Based on a large set of inflight calibration
data and comparison with other instruments onboard XMM-Newton, the calibration
accuracy of the RGS instrument has been improved considerably over the
preflight calibrations.
