Mantid
Loading...
Searching...
No Matches
SetScalingPSD.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 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
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidAPI/Algorithm.h"
13#include "MantidDataHandling/DllConfig.h"
15
16namespace Mantid {
17
18namespace Geometry {
19class IComponent;
20}
21
22namespace DataHandling {
44class MANTID_DATAHANDLING_DLL SetScalingPSD final : public API::Algorithm {
45public:
49 const std::string name() const override { return "SetScalingPSD"; };
51 const std::string summary() const override {
52 return "For an instrument with Position Sensitive Detectors (PSDs) the "
53 "'engineering' positions of individual detectors may not match the "
54 "true areas where neutrons are detected. This algorithm reads data "
55 "on the calibrated location of the detectors and adjusts the "
56 "parametrized instrument geometry accordingly.";
57 }
58
60 int version() const override { return 1; };
62 const std::string category() const override { return "CorrectionFunctions\\InstrumentCorrections"; }
63
64private:
66 void init() override;
67
69 void exec() override;
70
72 std::string m_filename;
75 bool processScalingFile(const std::string &scalingFile, std::vector<Kernel::V3D> &truePos);
77 // void runMoveInstrumentComp(const int& detIndex, const Kernel::V3D& shift);
78
80 void movePos(API::MatrixWorkspace_sptr &WS, std::map<int, Kernel::V3D> &posMap, std::map<int, double> &scaleMap);
82 void getDetPositionsFromRaw(const std::string &rawfile, std::vector<int> &detID, std::vector<Kernel::V3D> &pos);
83};
84
85} // namespace DataHandling
86} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
Read the scaling information from a file (e.g.
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.
std::string m_filename
The name and path of the input file.
API::MatrixWorkspace_sptr m_workspace
Pointer to the workspace.
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.
int m_scalingOption
An integer option controlling the scaling method.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.