Calibration of the Belle II aerogel ring imaging detector