Mantid
Loading...
Searching...
No Matches
PeakIntegration.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 PeakIntegration final : public API::Algorithm {
26public:
28 const std::string name() const override { return "PeakIntegration"; }
30 int version() const override { return 1; }
31 const std::vector<std::string> seeAlso() const override { return {"IntegratePeakTimeSlices", "CentroidPeaks"}; }
33 const std::string category() const override { return "Crystal\\Integration"; }
35 const std::string summary() const override { return "Integrate single crystal peaks using IkedaCarpenter fit TOF"; }
36
37private:
40 // Overridden Algorithm methods
41 void init() override;
42 void exec() override;
44 void fitSpectra(const int s, double TOFPeakd, double &I, double &sigI);
46 void retrieveProperties();
47 int fitneighbours(int ipeak, const std::string &det_name, int x0, int y0, int idet, double qspan,
48 DataObjects::PeaksWorkspace_sptr &Peaks, const detid2index_map &pixel_to_wi);
49
50 bool m_IC = false;
51};
52
53} // namespace Crystal
54} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Find the offsets for each detector.
const std::string summary() const override
Summary of algorithms purpose.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
API::MatrixWorkspace_sptr outputW
A pointer to the output workspace.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
int version() const override
Algorithm's version for identification overriding a virtual method.
API::MatrixWorkspace_sptr inputW
A pointer to the input workspace.
void fitSpectra(const int s, double TOFPeakd, double &I, double &sigI)
Call Gaussian as a Child Algorithm to fit the peak in a spectrum.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< PeaksWorkspace > PeaksWorkspace_sptr
Typedef for a shared pointer to a peaks workspace.
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.