Mantid
Loading...
Searching...
No Matches
MDNormDirectSC.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2014 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
11
12namespace Mantid {
13namespace DataObjects {
14class EventWorkspace;
15}
16namespace MDAlgorithms {
17
20class MANTID_MDALGORITHMS_DLL MDNormDirectSC : public SlicingAlgorithm {
21public:
23
24 const std::string name() const override;
25 int version() const override;
26 const std::vector<std::string> seeAlso() const override { return {"MDNormSCD", "MDNormSCDPreprocessIncoherent"}; }
27 const std::string category() const override;
28 const std::string summary() const override;
29
30private:
31 void init() override;
32 void exec() override;
33
34 void cacheInputs();
35 std::string inputEnergyMode() const;
36
38 void createNormalizationWS(const DataObjects::MDHistoWorkspace &dataWS);
39 std::vector<coord_t> getValuesFromOtherDimensions(bool &skipNormalization, uint16_t expInfoIndex = 0) const;
40 Kernel::Matrix<coord_t> findIntergratedDimensions(const std::vector<coord_t> &otherDimValues,
41 bool &skipNormalization);
42 void cacheDimensionXValues();
43 void calculateNormalization(const std::vector<coord_t> &otherValues, const Kernel::Matrix<coord_t> &affineTrans,
44 uint16_t expInfoIndex);
45
46 void calculateIntersections(std::vector<std::array<double, 4>> &intersections, const double theta, const double phi);
47
53 coord_t m_hmin, m_hmax, m_kmin, m_kmax, m_lmin, m_lmax, m_dEmin, m_dEmax;
55 double m_Ei, m_ki, m_kfmin, m_kfmax;
57 bool m_hIntegrated, m_kIntegrated, m_lIntegrated, m_dEIntegrated;
61 size_t m_hIdx, m_kIdx, m_lIdx, m_eIdx;
63 std::vector<double> m_hX, m_kX, m_lX, m_eX;
69 std::string convention;
71 bool m_accumulate{false};
74};
75
76} // namespace MDAlgorithms
77} // namespace Mantid
Numerical Matrix class.
Definition: Matrix.h:42
Class for 3D vectors.
Definition: V3D.h:34
MDNormSCD : Generate MD normalization for single crystal diffraction.
Mantid::Kernel::DblMatrix m_rubw
(2*PiRUBW)^-1
API::IMDEventWorkspace_sptr m_inputWS
Input workspace.
double m_Ei
cached values for incident energy and momentum, final momentum min/max
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
Kernel::V3D m_samplePos
Sample position.
Kernel::V3D m_beamDir
Beam direction.
DataObjects::MDHistoWorkspace_sptr m_normWS
Normalization workspace.
uint16_t m_numExptInfos
number of experiment infos
std::string convention
ki-kf for Inelastic convention; kf-ki for Crystallography convention
Abstract Algorithm class that will be used by: BinMD and SliceMD and shares code for getting a slice ...
std::shared_ptr< IMDEventWorkspace > IMDEventWorkspace_sptr
Shared pointer to Mantid::API::IMDEventWorkspace.
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