Mantid
Loading...
Searching...
No Matches
IntegrateEllipsoidsV2.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
14#include "MantidMDAlgorithms/DllConfig.h"
19
20namespace Mantid {
21namespace Geometry {
22class DetectorInfo;
23}
24namespace MDAlgorithms {
25// Note: this relies on several MD specific interfaces, so it needs to be defined
26// in MDAlgorithms despite it not actually operating on MDWorkspaces
27
28class MANTID_MDALGORITHMS_DLL IntegrateEllipsoidsV2 final : public API::Algorithm {
29public:
30 static void initInstance(API::Algorithm &alg);
31 const std::string name() const override { return "IntegrateEllipsoids"; }
32
33 const std::string summary() const override {
34 return "Integrate Single Crystal Diffraction Bragg peaks using 3D "
35 "ellipsoids.";
36 }
37
38 int version() const override { return 2; }
39
40 const std::vector<std::string> seeAlso() const override { return {"IntegrateEllipsoidsTwoStep"}; }
41 const std::string category() const override { return "Crystal\\Integration"; }
42
43private:
45 void init() override;
47 void exec() override;
49 std::map<std::string, std::string> validateInputs() override;
50
57 void qListFromEventWS(IntegrateQLabEvents &integrator, API::Progress &prog, DataObjects::EventWorkspace_sptr &wksp);
58
65 void qListFromHistoWS(IntegrateQLabEvents &integrator, API::Progress &prog, DataObjects::Workspace2D_sptr &wksp);
66
68 void calculateE1(const Geometry::DetectorInfo &detectorInfo);
69
71 void outputAxisProfiles(std::vector<double> &principalaxis1, std::vector<double> &principalaxis2,
72 std::vector<double> &principalaxis3, const double &cutoffIsigI, const int &numSigmas,
73 std::vector<DataObjects::Peak> &peaks, IntegrateQLabEvents &integrator);
74
76 void outputProfileWS(const std::vector<double> &principalaxis1, const std::vector<double> &principalaxis2,
77 const std::vector<double> &principalaxis3, const std::string &wsname);
78
80 void integratePeaksCutoffISigI(const double &meanMax, const double &stdMax, std::vector<double> &principalaxis1,
81 std::vector<double> &principalaxis2, std::vector<double> &principalaxis3,
82 const int &numSigmas, std::vector<DataObjects::Peak> &peaks,
83 IntegrateQLabEvents &integrator_satellite);
84
85 void runMaskDetectors(const Mantid::DataObjects::PeaksWorkspace_sptr &peakWS, const std::string &property,
86 const std::string &values);
87
89 void pairBraggSatellitePeaks(const size_t &n_peaks, std::vector<DataObjects::Peak> &peaks,
90 std::map<size_t, std::vector<DataObjects::Peak *>> &satellitePeakMap,
91 std::vector<size_t> &satellitePeaks);
92
94 void removeSharedBackground(std::map<size_t, std::vector<DataObjects::Peak *>> &satellitePeakMap,
95 std::map<size_t, std::pair<double, double>> &cachedBraggBackground);
96
98 std::vector<Kernel::V3D> E1Vec;
99
101
106
111 void initTargetWSDescr(API::MatrixWorkspace_sptr &wksp);
112};
113
114} // namespace MDAlgorithms
115} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Helper class for reporting progress from algorithms.
Definition: Progress.h:25
Geometry::DetectorInfo is an intermediate step towards a DetectorInfo that is part of Instrument-2....
Definition: DetectorInfo.h:49
int version() const override
function to return a version of the algorithm, must be overridden in all algorithms
const std::string category() const override
function to return a category of the algorithm.
const std::string summary() const override
function returns a summary message that will be displayed in the default GUI, and in the help.
double m_satellitePeakRadius
peak radius for satellite peaks
std::vector< Kernel::V3D > E1Vec
save for all detector pixels
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
double m_braggPeakRadius
peak radius for Bragg peaks
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
This is a low-level class to construct a map with lists of events near each peak Q-vector in the lab ...
helper class describes the properties of target MD workspace, which should be obtained as the result ...
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< Workspace2D > Workspace2D_sptr
shared pointer to Mantid::DataObjects::Workspace2D
std::shared_ptr< PeaksWorkspace > PeaksWorkspace_sptr
Typedef for a shared pointer to a peaks workspace.
std::shared_ptr< EventWorkspace > EventWorkspace_sptr
shared pointer to the EventWorkspace class
Helper class which provides the Collimation Length for SANS instruments.