You will need Peaks Workspace with indexed peaks from multiple orientations.
SCDCalibratePanels is the prime algorithm that performs this calibration. Take a look the description and workflow sections of the algorithm documentation for more details. If you set a value for DetCalFilename then it will output a DetCal file for LoadIsawDetCal.
After calibration, you can save the workspace to Nexus (or Nexus processed) and get it back by loading in a later Mantid session. You can copy the calibration to another workspace using the same instrument by means of the CopyInstrumentParameters algorithm. To do so select the workspace, which you have calibrated as the InputWorkspace and the workspace you want to copy the calibration to, the OutputWorkspace.
Category: Calibration