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
16#include "MantidKernel/Quat.h"
17
18namespace Mantid {
19namespace Crystal {
30public:
31 const std::string name() const override;
33 const std::string summary() const override {
34 return "Panel parameters and L0 are optimized to "
35 "minimize errors between theoretical and actual q values for the "
36 "peaks";
37 }
38
40 int version() const override;
41 const std::vector<std::string> seeAlso() const override { return {"CalculateUMatrix"}; }
42
44 const std::string category() const override;
45
46private:
47 void saveIsawDetCal(std::shared_ptr<Geometry::Instrument> &instrument,
48 boost::container::flat_set<std::string> &AllBankName, double T0, const std::string &filename);
49
51 void findU(const DataObjects::PeaksWorkspace_sptr &peaksWs);
53 void saveNexus(const std::string &outputFile, const API::MatrixWorkspace_sptr &outputWS);
55 void findL1(int nPeaks, const DataObjects::PeaksWorkspace_sptr &peaksWs);
57 void findL2(boost::container::flat_set<std::string> MyBankNames, const DataObjects::PeaksWorkspace_sptr &peaksWs);
59 void findT0(int nPeaks, const DataObjects::PeaksWorkspace_sptr &peaksWs);
60
61 void exec() override;
62
63 void init() override;
64
66
67 double mT0 = 0.0;
68
81 void saveXmlFile(const std::string &FileName, const boost::container::flat_set<std::string> &AllBankNames,
82 const Geometry::Instrument &instrument) const;
83};
84
85} // namespace Crystal
86} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
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.
API::ITableWorkspace_sptr Result
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.