-
Notifications
You must be signed in to change notification settings - Fork 122
/
MonitorEfficiencyCorUser.h
56 lines (46 loc) · 1.63 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
#ifndef MANTID_ALGORITHMS_MONITOREFFICIENCYCORUSER_H_
#define MANTID_ALGORITHMS_MONITOREFFICIENCYCORUSER_H_
#include "MantidAPI/Algorithm.h"
#include "MantidKernel/cow_ptr.h"
namespace Mantid {
namespace HistogramData {
class HistogramX;
class HistogramY;
class HistogramE;
}
namespace Algorithms {
class DLLExport 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; }
/// 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
int m_monitorCounts = 0;
};
} // namespace Algorithms
} // namespace Mantid
#endif /*MONITOREFFICIENCYCORUSER_H_*/