Mantid
Loading...
Searching...
No Matches
MaskPeaksWorkspace.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2009 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
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidAPI/Algorithm.h"
13#include "MantidCrystal/DllConfig.h"
16
17namespace Mantid {
18namespace Crystal {
25class MANTID_CRYSTAL_DLL MaskPeaksWorkspace final : public API::Algorithm {
26public:
30 const std::string name() const override { return "MaskPeaksWorkspace"; }
32 int version() const override { return 1; }
33 const std::vector<std::string> seeAlso() const override { return {"CreatePeaksWorkspace"}; }
35 const std::string category() const override { return "Crystal\\Peaks"; }
36
38 const std::string summary() const override { return "Masks a peaks workspace."; }
39
40private:
42
43 // Overridden Algorithm methods
44 void init() override;
45 void exec() override;
46 std::size_t getWkspIndex(const detid2index_map &pixel_to_wi, const Geometry::IComponent_const_sptr &comp, const int x,
47 const int y);
48 void getTofRange(double &tofMin, double &tofMax, const double tofPeak, const HistogramData::HistogramX &tof);
49 int findPixelID(const std::string &bankName, int col, int row);
50
52 void retrieveProperties();
53 int m_xMin;
54 int m_xMax;
55 int m_yMin;
56 int m_yMax;
57 double m_tofMin;
58 double m_tofMax;
59};
60
61} // namespace Crystal
62} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Find the offsets for each detector.
double m_tofMin
The start of the box around the peak in tof.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
int m_xMin
The start of the X range for fitting.
int m_yMax
The end of the Y range for fitting.
int version() const override
Algorithm's version for identification overriding a virtual method.
double m_tofMax
The end of the box around the peak in tof.
const std::string summary() const override
Summary of algorithms purpose.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
API::MatrixWorkspace_sptr m_inputW
A pointer to the input workspace.
int m_xMax
The end of the X range for fitting.
int m_yMin
The start of the Y range for fitting.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< const IComponent > IComponent_const_sptr
Typdef of a shared pointer to a const IComponent.
Definition: IComponent.h:161
Helper class which provides the Collimation Length for SANS instruments.
std::unordered_map< detid_t, size_t > detid2index_map
Map with key = detector ID, value = workspace index.