Mantid
Loading...
Searching...
No Matches
CentroidPeaks.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
10#include "MantidCrystal/DllConfig.h"
13
14namespace Mantid {
15namespace Crystal {
16
23class MANTID_CRYSTAL_DLL CentroidPeaks final : public API::Algorithm {
24public:
26 const std::string name() const override { return "CentroidPeaks"; };
28 const std::string summary() const override {
29 return "Find the centroid of single-crystal peaks in a 2D Workspace, in "
30 "order to refine their positions.";
31 }
32
34 int version() const override { return 1; };
35 const std::vector<std::string> seeAlso() const override { return {"CentroidPeaksMD", "PeakIntegration"}; }
37 const std::string category() const override { return "Crystal\\Peaks"; }
38
39private:
41 void init() override;
43 void exec() override;
44 void integrate();
45 void integrateEvent();
46 int findPixelID(const std::string &bankName, int col, int row);
47 void removeEdgePeaks(Mantid::DataObjects::PeaksWorkspace &peakWS);
48 void sizeBanks(const std::string &bankName, int &nCols, int &nRows);
50
55};
56
57} // namespace Crystal
58} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Find the centroid of single-crystal peaks in a 2D Workspace, in order to refine their positions.
Definition: CentroidPeaks.h:23
int version() const override
Algorithm's version for identification.
Definition: CentroidPeaks.h:34
const std::string name() const override
Algorithm's name for identification.
Definition: CentroidPeaks.h:26
const std::string category() const override
Algorithm's category for identification.
Definition: CentroidPeaks.h:37
API::MatrixWorkspace_sptr inWS
Input 2D Workspace.
Definition: CentroidPeaks.h:52
Mantid::detid2index_map wi_to_detid_map
Definition: CentroidPeaks.h:54
Geometry::Instrument_const_sptr inst
Definition: CentroidPeaks.h:49
const std::string summary() const override
Summary of algorithms purpose.
Definition: CentroidPeaks.h:28
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: CentroidPeaks.h:35
DataObjects::EventWorkspace_const_sptr eventW
Definition: CentroidPeaks.h:53
The class PeaksWorkspace stores information about a set of SCD peaks.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< const EventWorkspace > EventWorkspace_const_sptr
shared pointer to a const Workspace2D
std::shared_ptr< const Instrument > Instrument_const_sptr
Shared pointer to an const instrument object.
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.