Mantid
Loading...
Searching...
No Matches
LoadILLReflectometry.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2014 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 "MantidDataHandling/DllConfig.h"
14#include "MantidTypes/Core/DateAndTime.h"
15
16namespace Mantid {
17namespace DataHandling {
18
21class MANTID_DATAHANDLING_DLL LoadILLReflectometry : public API::IFileLoader<Kernel::NexusDescriptor> {
22public:
25 int confidence(Kernel::NexusDescriptor &descriptor) const override;
27 const std::string name() const override { return "LoadILLReflectometry"; }
29 int version() const override { return 1; }
30 const std::vector<std::string> seeAlso() const override { return {"LoadNexus"}; }
32 const std::string category() const override { return "DataHandling\\Nexus;ILL\\Reflectometry"; }
34 const std::string summary() const override {
35 return "Loads an ILL reflectometry Nexus file (instrument D17 or "
36 "FIGARO).";
37 }
38 double doubleFromRun(const std::string &entryName) const;
39
40private:
42 enum class Supported { D17, FIGARO };
43 void init() override;
44 void exec() override;
45 double sampleDetectorDistance() const;
46 double sourceSampleDistance() const;
47 void sampleHorizontalOffset();
48 void sampleAngle(const NeXus::NXEntry &entry);
49 void initWorkspace(const std::vector<std::vector<int>> &monitorsData);
50 void initNames(const NeXus::NXEntry &entry);
51 void initPixelWidth();
52 void loadDataDetails(const NeXus::NXEntry &entry);
53 std::vector<double> getXValues();
54 void convertTofToWavelength();
55 double reflectometryPeak();
56 void loadData(const NeXus::NXEntry &entry, const std::vector<std::vector<int>> &monitorsData,
57 const std::vector<double> &xVals);
58 void loadNexusEntriesIntoProperties();
59 std::vector<int> loadSingleMonitor(const NeXus::NXEntry &entry, const std::string &monitor_data);
60 std::vector<std::vector<int>> loadMonitors(const NeXus::NXEntry &entry);
61 void loadInstrument();
64 double detectorRotation();
65 void placeDetector();
66 void placeSlits();
67 void placeSource();
68 double collimationAngle() const;
69 double offsetAngle(const double peakCentre, const double detectorCentre, const double detectorDistance) const;
70 Supported m_instrument{Supported::D17};
71 size_t m_acqMode{1};
72 size_t m_numberOfChannels{0};
73 size_t m_numberOfHistograms{0};
74 std::string m_sampleAngleName;
75 std::string m_offsetFrom;
76 std::string m_chopper1Name;
77 std::string m_chopper2Name;
78 double m_tofDelay{0.0};
79 double m_channelWidth{0.0};
80 double m_detectorDistance{0.0};
81 double m_pixelWidth{0.0};
82 double m_sampleZOffset{0.0};
83 double m_sourceDistance{0.0};
84 double m_sampleAngle{0.0};
85 Mantid::Types::Core::DateAndTime m_startTime;
87};
88
89} // namespace DataHandling
90} // namespace Mantid
Defines an interface to an algorithm that loads a file so that it can take part in the automatic sele...
Definition: IFileLoader.h:19
LoadILLReflectometry : Loads an ILL reflectometry Nexus data file.
int version() const override
Algorithm's version for identification.
const std::string category() const override
Algorithm's category for search and find.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
Mantid::Types::Core::DateAndTime m_startTime
const std::string name() const override
Algorithm's name for identification.
const std::string summary() const override
Algorithm's summary.
Supported
ID tags for supported instruments.
Defines a wrapper around a file whose internal structure can be accessed using the NeXus API.
Implements NXentry Nexus class.
Definition: NexusClasses.h:898
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.