Newer
Older
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
Lynch, Vickie
committed
#include "MantidAPI/Algorithm.h"
#include "MantidGeometry/IComponent.h"
namespace Geometry {
class ComponentInfo;
}
namespace API {
class DetectorInfo;
}
Lynch, Vickie
committed
/**
Find the offsets for each detector
@author Vickie Lynch, SNS, ORNL
@date 12/02/2010
*/
class DLLExport LoadIsawDetCal : public API::Algorithm {
Lynch, Vickie
committed
public:
/// Algorithm's name for identification overriding a virtual method
const std::string name() const override { return "LoadIsawDetCal"; }
const std::string summary() const override {
return "Since ISAW already has the capability to calibrate the instrument "
"using single crystal peaks, this algorithm leverages this in "
"mantid. It loads in a detcal file from ISAW and moves all of the "
"detector panels accordingly. The target instruments for this "
"feature are SNAP and TOPAZ.";
}
Lynch, Vickie
committed
/// Algorithm's version for identification overriding a virtual method
int version() const override { return 1; }
const std::vector<std::string> seeAlso() const override {
Lynch, Vickie
committed
/// Algorithm's category for identification overriding a virtual method
const std::string category() const override {
return "Diffraction\\DataHandling;DataHandling\\Isaw";
/// @copydoc Algorithm::validateInputs()
std::map<std::string, std::string> validateInputs() override;
Lynch, Vickie
committed
private:
const double CM_TO_M = 0.01;
struct ComponentScaling {
double scaleX;
double scaleY;
};
Lynch, Vickie
committed
// Overridden Algorithm methods
void init() override;
void exec() override;
/// Set the center of the supplied detector name
void center(const double x, const double y, const double z,
const std::string &detname, API::Workspace_sptr ws,
Geometry::Instrument_sptr getCheckInst(API::Workspace_sptr ws);
std::vector<std::string> getFilenames();
void doRotation(Kernel::V3D rX, Kernel::V3D rY,
bool doWishCorrection = false);
void applyScalings(
const std::vector<ComponentScaling> &rectangularDetectorScalings);
Lynch, Vickie
committed
};
Lynch, Vickie
committed
} // namespace Mantid