Mantid
Loading...
Searching...
No Matches
CreateLogTimeCorrection.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2013 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
11#include "MantidAlgorithms/DllConfig.h"
14#include <vector>
15
16namespace Mantid {
17namespace Geometry {
18class DetectorInfo;
19}
20namespace Algorithms {
21
31class MANTID_ALGORITHMS_DLL CreateLogTimeCorrection final : public API::Algorithm {
32public:
33 const std::string name() const override { return "CreateLogTimeCorrection"; }
35 const std::string summary() const override {
36 return "Create log time correction table. Correction for each pixel is "
37 "based on L1 and L2.";
38 }
39
40 int version() const override { return 1; }
41 const std::vector<std::string> seeAlso() const override { return {"ChangePulsetime", "ShiftLogTime"}; }
42 const std::string category() const override { return "Events\\EventFiltering"; }
43
44private:
46 void init() override;
48 void exec() override;
49
51 void logGeometryInformation(const Geometry::DetectorInfo &detectorInfo) const;
52
55 std::vector<double> calculateCorrections(const Geometry::DetectorInfo &detectorInfo) const;
56
58 DataObjects::TableWorkspace_sptr generateCorrectionTable(const Geometry::DetectorInfo &detectorInfo,
59 const std::vector<double> &corrections) const;
60
62 void writeCorrectionToFile(const std::string &filename, const Geometry::DetectorInfo &detectorInfo,
63 const std::vector<double> &corrections) const;
64};
65
66} // namespace Algorithms
67} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
CreateLogTimeCorrection : Create correction file and workspace to correct event time against recorded...
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
int version() const override
function to return a version of the algorithm, must be overridden in all algorithms
const std::string summary() const override
Summary of algorithms purpose.
const std::string category() const override
function to return a category of the algorithm.
Geometry::DetectorInfo is an intermediate step towards a DetectorInfo that is part of Instrument-2....
Definition: DetectorInfo.h:49
std::shared_ptr< TableWorkspace > TableWorkspace_sptr
shared pointer to Mantid::DataObjects::TableWorkspace
Helper class which provides the Collimation Length for SANS instruments.