Mantid
Loading...
Searching...
No Matches
ConvertToDetectorFaceMD.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2012 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
15#include "MantidMDAlgorithms/DllConfig.h"
16
17namespace Mantid {
18namespace MDAlgorithms {
19
25class MANTID_MDALGORITHMS_DLL ConvertToDetectorFaceMD : public API::BoxControllerSettingsAlgorithm {
26public:
27 const std::string name() const override;
29 const std::string summary() const override {
30 return "Convert a MatrixWorkspace containing to a MD workspace for viewing "
31 "the detector face.";
32 }
33
34 int version() const override;
35 const std::vector<std::string> seeAlso() const override { return {"ConvertToMD"}; }
36 const std::string category() const override;
37
38private:
39 void init() override;
40 void exec() override;
41
42 std::map<int, Geometry::RectangularDetector_const_sptr> getBanks();
43
44 template <class T, class MDE, size_t nd>
45 void convertEventList(std::shared_ptr<Mantid::DataObjects::MDEventWorkspace<MDE, nd>> outWS, size_t workspaceIndex,
46 coord_t x, coord_t y, coord_t bankNum, uint16_t expInfoIndex, uint16_t goniometerIndex,
47 int32_t detectorID);
48
51
53 int m_numXPixels = 0;
55 int m_numYPixels = 0;
56
57 // Map between the detector ID and the workspace index
58 std::vector<size_t> m_detID_to_WI;
59 detid_t m_detID_to_WI_offset = 0;
60};
61
62} // namespace MDAlgorithms
63} // namespace Mantid
An abstract algorithm sub-class for algorithms that define properties for BoxController settings.
Templated class for the multi-dimensional event workspace.
Convert a MatrixWorkspace containing to a MD workspace for viewing the detector face.
Mantid::DataObjects::EventWorkspace_sptr in_ws
The input event workspace.
const std::string summary() const override
Summary of algorithms purpose.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
std::shared_ptr< EventWorkspace > EventWorkspace_sptr
shared pointer to the EventWorkspace class
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
int32_t detid_t
Typedef for a detector ID.
Definition: SpectrumInfo.h:21