Mantid
Loading...
Searching...
No Matches
MDNorm.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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
13
14namespace Mantid {
15namespace MDAlgorithms {
16
20class MANTID_MDALGORITHMS_DLL MDNorm final : public MDNormBase {
21public:
22 MDNorm();
23 const std::string name() const override;
24 int version() const override;
25 const std::string category() const override;
26 const std::string summary() const override;
27 const std::vector<std::string> seeAlso() const override {
28 return {"CropWorkspaceForMDNorm", "MDNormSCD", "MDNormDirectSC", "RecalculateTrajectoriesExtents",
29 "ConvertHFIRSCDtoMDE"};
30 }
31
32private:
33 void init() override;
34 void exec() override;
35 void validateBinningForTemporaryDataWorkspace(const std::map<std::string, std::string> &,
37 std::map<std::string, std::string> validateInputs() override final;
38 std::string QDimensionName(std::vector<double> projection);
39 std::string QDimensionNameQSample(int i);
40 std::map<std::string, std::string> getBinParameters();
41 void createBackgroundNormalizationWS(const DataObjects::MDHistoWorkspace &dataWS);
42
44 DataObjects::MDHistoWorkspace_sptr binInputWS(const std::vector<Geometry::SymmetryOperation> &symmetryOps);
45
49 DataObjects::MDHistoWorkspace_sptr binMDEventWorkspace(const API::IMDEventWorkspace_sptr &ws,
50 const std::string &temporaryWSPropertyName,
51 const std::string &outputWSPropertyName,
52 const std::vector<Geometry::SymmetryOperation> &symmetryOps,
53 const std::map<std::string, std::string> &parameters);
54
56 DataObjects::MDHistoWorkspace_sptr binBackgroundWS(const std::vector<Geometry::SymmetryOperation> &symmetryOps);
57
59 DataObjects::MDHistoWorkspace_sptr
60 binMonoSCDNormalizationWS(const std::vector<Geometry::SymmetryOperation> &symmetryOps);
61
63 Mantid::Kernel::DblMatrix buildSymmetryMatrix(const Geometry::SymmetryOperation &so);
64 void determineBasisVector(const size_t &qindex, const std::string &value, const Kernel::DblMatrix &Qtransform,
65 std::vector<double> &projection, std::stringstream &basisVector,
66 std::vector<size_t> &qDimensionIndices);
67 inline void setQUnit(const std::vector<size_t> &qDimensionIndices,
68 const Mantid::DataObjects::MDHistoWorkspace_sptr &outputMDHWS);
69
70 std::vector<coord_t> getValuesFromOtherDimensions(bool &skipNormalization, uint16_t expInfoIndex = 0) const;
71
73 const std::string &outputwsname, const double &startProgress,
74 const double &endProgress);
75
77 bool m_isRLU;
79 std::vector<double> m_Q0Basis{1., 0., 0.}, m_Q1Basis{0., 1., 0.}, m_Q2Basis{0., 0., 1.};
85};
86
87} // namespace MDAlgorithms
88} // namespace Mantid
std::string name
Definition Run.cpp:60
const std::vector< double > & rhs
double value
The value of the point.
Definition FitMW.cpp:51
Crystallographic symmetry operations are composed of a rotational component, which is represented by ...
Base class for the three MDNorm, MDNormDirectSC and MDNormSCD algorithms with the common normalizatio...
Definition MDNormBase.h:32
MDNormalization : Bin single crystal diffraction or direct geometry inelastic data and calculate the ...
Definition MDNorm.h:20
size_t m_numSymmOps
number of symmetry operations
Definition MDNorm.h:81
bool m_monochromatic
Flag indicating a pre-computed MonoSCDNormalizationWorkspace was provided (monochromatic single cryst...
Definition MDNorm.h:84
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
Definition MDNorm.h:27
std::shared_ptr< IMDEventWorkspace > IMDEventWorkspace_sptr
Shared pointer to Mantid::API::IMDEventWorkspace.
std::shared_ptr< IMDHistoWorkspace > IMDHistoWorkspace_sptr
shared pointer to Mantid::API::IMDHistoWorkspace
std::shared_ptr< IMDWorkspace > IMDWorkspace_sptr
Shared pointer to the IMDWorkspace base class.
std::shared_ptr< MDHistoWorkspace > MDHistoWorkspace_sptr
A shared pointer to a MDHistoWorkspace.
Helper class which provides the Collimation Length for SANS instruments.
float coord_t
Typedef for the data type to use for coordinate axes in MD objects such as MDBox, MDEventWorkspace,...
Definition MDTypes.h:27
STL namespace.