-
Notifications
You must be signed in to change notification settings - Fork 121
/
VesuvioL1ThetaResolution.h
45 lines (37 loc) · 1.57 KB
/
VesuvioL1ThetaResolution.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include "MantidAPI/Algorithm.h"
#include "MantidAlgorithms/DllConfig.h"
#include "MantidGeometry/IComponent.h"
#include "MantidGeometry/IDetector.h"
namespace Mantid {
namespace Algorithms {
/** VesuvioL1ThetaResolution
Calculates the resolution function for L1 and Theta.
*/
class MANTID_ALGORITHMS_DLL VesuvioL1ThetaResolution : public API::Algorithm {
public:
const std::string name() const override;
int version() const override;
const std::string category() const override;
const std::string summary() const override;
private:
void init() override;
void exec() override;
void loadInstrument();
void calculateDetector(const Mantid::Geometry::IDetector &detector, std::function<double()> &flatRandomVariateGen,
std::vector<double> &l1Values, std::vector<double> &thetaValues);
Mantid::API::MatrixWorkspace_sptr processDistribution(Mantid::API::MatrixWorkspace_sptr ws, const double binWidth);
Mantid::API::MatrixWorkspace_sptr m_instWorkspace;
Mantid::Geometry::IComponent_const_sptr m_sample;
Mantid::API::MatrixWorkspace_sptr m_outputWorkspace;
Mantid::API::MatrixWorkspace_sptr m_l1DistributionWs;
Mantid::API::MatrixWorkspace_sptr m_thetaDistributionWs;
};
} // namespace Algorithms
} // namespace Mantid