Mantid
Loading...
Searching...
No Matches
LoadIsawDetCal.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
11#include "MantidDataHandling/DllConfig.h"
14
15namespace Mantid {
16namespace Geometry {
17class ComponentInfo;
18}
19namespace API {
20class DetectorInfo;
21}
22namespace DataHandling {
29class MANTID_DATAHANDLING_DLL LoadIsawDetCal final : public API::Algorithm {
30public:
32 const std::string name() const override { return "LoadIsawDetCal"; }
34 const std::string summary() const override {
35 return "Since ISAW already has the capability to calibrate the instrument "
36 "using single crystal peaks, this algorithm leverages this in "
37 "mantid. It loads in a detcal file from ISAW and moves all of the "
38 "detector panels accordingly. The target instruments for this "
39 "feature are SNAP and TOPAZ.";
40 }
41
43 int version() const override { return 1; }
44 const std::vector<std::string> seeAlso() const override { return {"SaveIsawDetCal"}; }
46 const std::string category() const override { return "Diffraction\\DataHandling;DataHandling\\Isaw"; }
47
49 std::map<std::string, std::string> validateInputs() override;
50
51private:
52 const double CM_TO_M = 0.01;
53
55 std::string componentName;
56 double scaleX;
57 double scaleY;
58 };
59
60 // Overridden Algorithm methods
61 void init() override;
62 void exec() override;
63
65 void center(const double x, const double y, const double z, const std::string &detname, const API::Workspace_sptr &ws,
66 Geometry::ComponentInfo &componentInfo);
67
68 Geometry::Instrument_sptr getCheckInst(const API::Workspace_sptr &ws);
69 std::vector<std::string> getFilenames();
70
71 void doRotation(Kernel::V3D rX, Kernel::V3D rY, Geometry::ComponentInfo &componentInfo,
72 const std::shared_ptr<const Geometry::IComponent> &comp, bool doWishCorrection = false);
73 void applyScalings(API::Workspace_sptr &ws, const std::vector<ComponentScaling> &rectangularDetectorScalings);
74};
75
76} // namespace DataHandling
77} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Find the offsets for each detector.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
int version() const override
Algorithm's version for identification overriding a virtual method.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
const std::string summary() const override
Summary of algorithms purpose.
ComponentInfo : Provides a component centric view on to the instrument.
Definition: ComponentInfo.h:40
Class for 3D vectors.
Definition: V3D.h:34
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
Definition: Workspace_fwd.h:20
std::shared_ptr< Instrument > Instrument_sptr
Shared pointer to an instrument object.
Helper class which provides the Collimation Length for SANS instruments.