-
Notifications
You must be signed in to change notification settings - Fork 122
/
MonitorEfficiencyCorUser.h
59 lines (50 loc) · 1.97 KB
/
MonitorEfficiencyCorUser.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2018 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 "MantidKernel/cow_ptr.h"
namespace Mantid {
namespace HistogramData {
class HistogramX;
class HistogramY;
class HistogramE;
} // namespace HistogramData
namespace Algorithms {
class MANTID_ALGORITHMS_DLL MonitorEfficiencyCorUser : public API::Algorithm {
public:
/// Algorithm's name
const std::string name() const override { return "MonitorEfficiencyCorUser"; }
/// Summary of algorithms purpose
const std::string summary() const override {
return "This algorithm normalises the counts by the monitor counts with "
"additional efficiency correction according to the formula set in "
"the instrument parameters file.";
}
/// Algorithm's version
int version() const override { return 1; }
const std::vector<std::string> seeAlso() const override { return {"NormaliseToMonitor"}; }
/// Algorithm's category for identification
const std::string category() const override { return "CorrectionFunctions\\NormalisationCorrections"; }
private:
/// Initialisation code
void init() override;
/// Execution code
void exec() override;
double calculateFormulaValue(const std::string &, double);
std::string getValFromInstrumentDef(const std::string &);
/// The user selected (input) workspace
API::MatrixWorkspace_const_sptr m_inputWS;
/// The output workspace, maybe the same as the input one
API::MatrixWorkspace_sptr m_outputWS;
/// stores the incident energy of the neutrons
double m_Ei = 0.0;
/// stores the total count of neutrons from the monitor
double m_monitorCounts = 0;
};
} // namespace Algorithms
} // namespace Mantid