IPeak.h 4.53 KB
Newer Older
1
2
3
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4
5
//   NScD Oak Ridge National Laboratory, European Spallation Source,
//   Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6
// SPDX - License - Identifier: GPL - 3.0 +
7
#pragma once
8

LamarMoore's avatar
LamarMoore committed
9
#include "MantidGeometry/Crystal/PeakShape.h"
Owen Arnold's avatar
Owen Arnold committed
10
#include "MantidGeometry/DllConfig.h"
11
12
13
#include "MantidGeometry/Instrument.h"
#include "MantidKernel/Matrix.h"
#include "MantidKernel/PhysicalConstants.h"
LamarMoore's avatar
LamarMoore committed
14
#include "MantidKernel/V3D.h"
15
#include <boost/optional.hpp>
16

17
namespace Mantid {
Owen Arnold's avatar
Owen Arnold committed
18
namespace Geometry {
19
class InstrumentRayTracer;
20
21
22
23
24
25

/** Structure describing a single-crystal peak
 *
 * @author Janik Zikovsky
 * @date 2011-04-15 13:24:07.963491
 */
Owen Arnold's avatar
Owen Arnold committed
26
class MANTID_GEOMETRY_DLL IPeak {
27
public:
28
  virtual ~IPeak() = default;
29

30
  virtual void setInstrument(const Geometry::Instrument_const_sptr &inst) = 0;
31
32
33
34
35

  virtual int getDetectorID() const = 0;
  virtual void setDetectorID(int m_DetectorID) = 0;
  virtual Geometry::IDetector_const_sptr getDetector() const = 0;
  virtual Geometry::Instrument_const_sptr getInstrument() const = 0;
36
37
  virtual std::shared_ptr<const Geometry::ReferenceFrame>
  getReferenceFrame() const = 0;
38
39
40
41
42
43
44
45
46
47
48

  virtual int getRunNumber() const = 0;
  virtual void setRunNumber(int m_RunNumber) = 0;

  virtual double getMonitorCount() const = 0;
  virtual void setMonitorCount(double m_MonitorCount) = 0;

  virtual double getH() const = 0;
  virtual double getK() const = 0;
  virtual double getL() const = 0;
  virtual Mantid::Kernel::V3D getHKL() const = 0;
49
  virtual bool isIndexed() const = 0;
Lynch, Vickie's avatar
Lynch, Vickie committed
50
  virtual Mantid::Kernel::V3D getIntHKL() const = 0;
51
52
53
54
  virtual void setH(double m_H) = 0;
  virtual void setK(double m_K) = 0;
  virtual void setL(double m_L) = 0;
  virtual void setHKL(double H, double K, double L) = 0;
55
  virtual void setHKL(const Mantid::Kernel::V3D &HKL) = 0;
56
  virtual void setIntHKL(const Mantid::Kernel::V3D &HKL) = 0;
57
58
  virtual void setSamplePos(double samX, double samY, double samZ) = 0;
  virtual void setSamplePos(const Mantid::Kernel::V3D &XYZ) = 0;
Sullivan, Brendan T's avatar
Sullivan, Brendan T committed
59
  virtual Mantid::Kernel::V3D getSamplePos() const = 0;
60
61
62
63
64
  virtual Mantid::Kernel::V3D getDetectorPosition() const = 0;
  virtual Mantid::Kernel::V3D getDetectorPositionNoCheck() const = 0;

  virtual Mantid::Kernel::V3D getQLabFrame() const = 0;
  virtual Mantid::Kernel::V3D getQSampleFrame() const = 0;
65
  /*
66
  virtual bool findDetector() = 0;
67
  virtual bool findDetector(const InstrumentRayTracer &tracer) = 0;
68
  */
Hahn, Steven's avatar
Hahn, Steven committed
69
70
71
72
  virtual void setQSampleFrame(const Mantid::Kernel::V3D &QSampleFrame,
                               boost::optional<double> detectorDistance) = 0;
  virtual void setQLabFrame(const Mantid::Kernel::V3D &QLabFrame,
                            boost::optional<double> detectorDistance) = 0;
73
74
75
76

  virtual void setWavelength(double wavelength) = 0;
  virtual double getWavelength() const = 0;
  virtual double getScattering() const = 0;
77
  virtual double getAzimuthal() const = 0;
78
79
80
81
82
  virtual double getDSpacing() const = 0;
  virtual double getTOF() const = 0;

  virtual double getInitialEnergy() const = 0;
  virtual double getFinalEnergy() const = 0;
83
  virtual double getEnergyTransfer() const = 0;
84
85
86
87
88
  virtual void setInitialEnergy(double m_InitialEnergy) = 0;
  virtual void setFinalEnergy(double m_FinalEnergy) = 0;

  virtual double getIntensity() const = 0;
  virtual double getSigmaIntensity() const = 0;
89
  virtual double getIntensityOverSigma() const = 0;
90
91
92
93
94
95
  virtual void setIntensity(double m_Intensity) = 0;
  virtual void setSigmaIntensity(double m_SigmaIntensity) = 0;

  virtual double getBinCount() const = 0;
  virtual void setBinCount(double m_BinCount) = 0;

96
97
  virtual int getPeakNumber() const = 0;
  virtual void setPeakNumber(int m_PeakNumber) = 0;
98

99
  virtual Mantid::Kernel::V3D getIntMNP() const = 0;
100
  virtual void setIntMNP(const Mantid::Kernel::V3D &MNP) = 0;
101

102
  virtual Mantid::Kernel::Matrix<double> getGoniometerMatrix() const = 0;
103
104
  virtual void setGoniometerMatrix(
      const Mantid::Kernel::Matrix<double> &m_GoniometerMatrix) = 0;
105
106
107
108
109
110
111
112

  virtual std::string getBankName() const = 0;
  virtual int getRow() const = 0;
  virtual int getCol() const = 0;

  virtual Mantid::Kernel::V3D getDetPos() const = 0;
  virtual double getL1() const = 0;
  virtual double getL2() const = 0;
113

114
  virtual const Mantid::Geometry::PeakShape &getPeakShape() const = 0;
115
116
117

  virtual void setAbsorptionWeightedPathLength(double pathLength) = 0;
  virtual double getAbsorptionWeightedPathLength() const = 0;
118
};
119

120
121
using IPeak_uptr = std::unique_ptr<IPeak>;

LamarMoore's avatar
LamarMoore committed
122
} // namespace Geometry
123
} // namespace Mantid