10#include "MantidCrystal/DllConfig.h"
14#include <boost/container/flat_set.hpp>
39 const std::string
name()
const override {
return "SCDCalibratePanels"; }
42 const std::string
summary()
const override {
43 return "Panel parameters and L1 are optimized to "
44 "minimize errors between theoretical and actual q values for the "
49 int version()
const override {
return 2; }
52 const std::string
category()
const override {
return "Crystal\\Corrections"; }
55 const std::vector<std::string>
seeAlso()
const override {
return {
"CalculateUMatrix"}; }
65 std::map<std::string, std::string> validateInputs()
override;
90 const bool &docalibsize,
const double &sizesearchradius,
const bool &fixdetxyratio);
97 const std::string &bankname,
const std::string &outputwsn);
104 void adjustComponent(
double dx,
double dy,
double dz,
double drx,
double dry,
double drz,
double scalex,
112 void saveXmlFile(
const std::string &FileName,
const boost::container::flat_set<std::string> &AllBankNames,
116 void saveIsawDetCal(
const std::string &filename, boost::container::flat_set<std::string> &AllBankName,
117 std::shared_ptr<Geometry::Instrument> &instrument,
double T0);
129 std::pair<double, double> getRectangularDetectorScaleFactors(std::shared_ptr<Geometry::Instrument> &instrument,
130 const std::string &bankname,
134 double m_a, m_b, m_c, m_alpha, m_beta, m_gamma;
136 bool LOGCHILDALG{
true};
137 int maxFitIterations{500};
138 const int MINIMUM_PEAKS_PER_BANK{6};
139 std::string mCalibBankName{
""};
140 const double PI{3.1415926535897932384626433832795028841971693993751058209};
141 static constexpr double Tolerance = std::numeric_limits<double>::epsilon();
144 const std::vector<std::string> calibrationTableColumnNames{
145 "ComponentName",
"Xposition",
"Yposition",
"Zposition",
"XdirectionCosine",
146 "YdirectionCosine",
"ZdirectionCosine",
"RotationAngle",
"ScaleX",
"ScaleY"};
147 const std::vector<std::string> calibrationTableColumnTypes{
"str",
"double",
"double",
"double",
"double",
148 "double",
"double",
"double",
"double",
"double"};
Base class from which all concrete algorithm classes should be derived.
SCDCalibratePanels2 : Using input peakworkspace with indexation results to calibrate each individual ...
Mantid::API::ITableWorkspace_sptr mCaliTable
double m_a
unique vars for a given instance of calibration
const std::vector< std::string > seeAlso() const override
Extra help info.
boost::container::flat_set< std::string > m_BankNames
int version() const override
Algorithm's version, overriding a virtual method.
const std::string category() const override
Algorithm's category, overriding a virtual method.
const std::string name() const override
Algorithm's name for identification.
const std::string summary() const override
Summary of algorithm's purpose.
std::shared_ptr< IPeaksWorkspace > IPeaksWorkspace_sptr
shared pointer to Mantid::API::IPeaksWorkspace
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
constexpr double Tolerance
Standard tolerance value.
Helper class which provides the Collimation Length for SANS instruments.
Generate a tableworkspace to store the calibration results.
adjust instrument component position and orientation
: detector size scale at y-direction