Mantid
Loading...
Searching...
No Matches
EQSANSTofStructure.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidAPI/Algorithm.h"
14#include "MantidAlgorithms/DllConfig.h"
16
17namespace Mantid {
18namespace Algorithms {
29// Pulse widge (micro sec per angstrom)
30const double PULSEWIDTH = 20.0;
31// Chopper phase offset (micro sec)
32const double CHOPPER_PHASE_OFFSET[2][4] = {{9507., 9471., 9829.7, 9584.3}, {19024., 18820., 19714., 19360.}};
33// Chopper angles (degree)
34const double CHOPPER_ANGLE[4] = {129.605, 179.989, 230.010, 230.007};
35// Chopper location (mm)
36const double CHOPPER_LOCATION[4] = {5700., 7800., 9497., 9507.};
37
38class MANTID_ALGORITHMS_DLL EQSANSTofStructure final : public API::Algorithm {
39public:
43 const std::string name() const override { return "EQSANSTofStructure"; }
45 const std::string summary() const override {
46 return "Corrects the TOF of raw EQSANS data. This algorithm needs to be "
47 "run once on every data set.";
48 }
49
51 int version() const override { return (1); }
53 const std::string category() const override { return "SANS"; }
54
55private:
57 void init() override;
59 void exec() override;
60 // void execEvent(Mantid::DataObjects::EventWorkspace_sptr inputWS, bool
61 // frame_skipping);
62 void execEvent(const Mantid::DataObjects::EventWorkspace_sptr &inputWS, double threshold, double frame_offset,
63 double tof_frame_width, double tmp_frame_width, bool frame_skipping);
64
66 double getTofOffset(const DataObjects::EventWorkspace_const_sptr &inputWS, bool frame_skipping);
67 double frame_tof0;
71};
72
73} // namespace Algorithms
74} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
int version() const override
Algorithm's version.
const std::string summary() const override
Summary of algorithms purpose.
const std::string category() const override
Algorithm's category for identification.
const std::string name() const override
Algorithm's name.
const double PULSEWIDTH
Apply correction to EQSANS data to account for its TOF structure.
const double CHOPPER_LOCATION[4]
const double CHOPPER_PHASE_OFFSET[2][4]
const double CHOPPER_ANGLE[4]
std::shared_ptr< const EventWorkspace > EventWorkspace_const_sptr
shared pointer to a const Workspace2D
std::shared_ptr< EventWorkspace > EventWorkspace_sptr
shared pointer to the EventWorkspace class
Helper class which provides the Collimation Length for SANS instruments.