A calibration method for phoswich detectors