-
Notifications
You must be signed in to change notification settings - Fork 122
/
RemoveLowResTOF.h
54 lines (48 loc) · 1.85 KB
/
RemoveLowResTOF.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
// 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/DistributedAlgorithm.h"
#include "MantidAlgorithms/DllConfig.h"
#include "MantidDataObjects/EventWorkspace.h"
#include "MantidGeometry/IComponent.h"
namespace Mantid {
namespace Algorithms {
class MANTID_ALGORITHMS_DLL RemoveLowResTOF : public API::DistributedAlgorithm {
public:
RemoveLowResTOF();
const std::string name() const override;
int version() const override;
const std::string category() const override;
/// Summary of algorithms purpose
const std::string summary() const override { return "Removes low resolution Time of Flight data."; }
private:
void init() override;
void exec() override;
void execEvent(const API::SpectrumInfo &spectrumInfo);
/// Pointer to the input workspace
API::MatrixWorkspace_const_sptr m_inputWS;
/// Pointer to the input event workspace
DataObjects::EventWorkspace_const_sptr m_inputEvWS;
double calcTofMin(const std::size_t, const API::SpectrumInfo &spectrumInfo);
void getTminData(const bool);
/// The reference value for DIFC to filter with
double m_DIFCref;
/// Mystery variable that I'm not sure what it is for
double m_K;
/// The start of the time-of-flight frame
double m_Tmin;
/// The minimum wavelength accessible in the frame
double m_wavelengthMin;
/// The number of spectra in the workspace
std::size_t m_numberOfSpectra;
/// Progress reporting
std::unique_ptr<API::Progress> m_progress = nullptr;
/// Flag to generate low resolution TOF workspace
bool m_outputLowResTOF;
};
} // namespace Algorithms
} // namespace Mantid