Mantid
Loading...
Searching...
No Matches
SCDCalibratePanels.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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
17#include "MantidKernel/Quat.h"
18
19namespace Mantid {
20namespace Crystal {
31public:
34 const std::string name() const override;
36 const std::string summary() const override {
37 return "Panel parameters and L0 are optimized to "
38 "minimize errors between theoretical and actual q values for the "
39 "peaks";
40 }
41
43 int version() const override;
44 const std::vector<std::string> seeAlso() const override { return {"CalculateUMatrix"}; }
45
47 const std::string category() const override;
48
49private:
50 void saveIsawDetCal(std::shared_ptr<Geometry::Instrument> &instrument,
51 boost::container::flat_set<std::string> &AllBankName, double T0, const std::string &filename);
52
54 void findU(const DataObjects::PeaksWorkspace_sptr &peaksWs);
56 void saveNexus(const std::string &outputFile, const API::MatrixWorkspace_sptr &outputWS);
58 void findL1(int nPeaks, const DataObjects::PeaksWorkspace_sptr &peaksWs);
60 void findL2(boost::container::flat_set<std::string> MyBankNames, const DataObjects::PeaksWorkspace_sptr &peaksWs);
62 void findT0(int nPeaks, const DataObjects::PeaksWorkspace_sptr &peaksWs);
63
64 void exec() override;
65
66 void init() override;
67
69
70 double mT0 = 0.0;
71
84 void saveXmlFile(const std::string &FileName, const boost::container::flat_set<std::string> &AllBankNames,
85 const Geometry::Instrument &instrument) const;
86};
87
88} // namespace Crystal
89} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
Class for marking algorithms as deprecated.
SCDCalibratePanels calibrates instrument parameters for Rectangular Detectors.
void saveXmlFile(const std::string &FileName, const boost::container::flat_set< std::string > &AllBankNames, const Geometry::Instrument &instrument) const
Saves the new instrument to an xml file that can be used with the LoadParameterFile Algorithm.
const std::string summary() const override
Summary of algorithms purpose.
void init() override
Virtual method - must be overridden by concrete algorithm.
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
void findT0(int nPeaks, const DataObjects::PeaksWorkspace_sptr &peaksWs)
Function to optimize T0.
void findL2(boost::container::flat_set< std::string > MyBankNames, const DataObjects::PeaksWorkspace_sptr &peaksWs)
Function to optimize L2.
int version() const override
Algorithm's version for identification overriding a virtual method.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
void saveIsawDetCal(std::shared_ptr< Geometry::Instrument > &instrument, boost::container::flat_set< std::string > &AllBankName, double T0, const std::string &filename)
Really this is the operator SaveIsawDetCal but only the results of the given banks are saved.
void findU(const DataObjects::PeaksWorkspace_sptr &peaksWs)
Function to calculate U.
void exec() override
Virtual method - must be overridden by concrete algorithm.
void saveNexus(const std::string &outputFile, const API::MatrixWorkspace_sptr &outputWS)
save workspaces
void findL1(int nPeaks, const DataObjects::PeaksWorkspace_sptr &peaksWs)
Function to optimize L1.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
Base Instrument Class.
Definition Instrument.h:47
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< PeaksWorkspace > PeaksWorkspace_sptr
Typedef for a shared pointer to a peaks workspace.
Helper class which provides the Collimation Length for SANS instruments.