Commit 74ff5a61 authored by Whitfield, Ross's avatar Whitfield, Ross
Browse files

Change peak to inherit from BasePeak

parent 22b4f867
......@@ -6,6 +6,7 @@
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include "MantidDataObjects/BasePeak.h"
#include "MantidGeometry/Crystal/IPeak.h"
#include "MantidGeometry/Crystal/PeakShape.h"
#include "MantidGeometry/Instrument.h"
......@@ -30,7 +31,7 @@ namespace DataObjects {
* @author Janik Zikovsky
* @date 2011-04-15 13:24:07.963491
class DLLExport Peak : public Geometry::IPeak {
class DLLExport Peak : public BasePeak {
/// Allow PeakColumn class to directly access members.
friend class PeakColumn;
......@@ -93,27 +94,6 @@ public:
bool findDetector() override;
bool findDetector(const Geometry::InstrumentRayTracer &tracer) override;
int getRunNumber() const override;
void setRunNumber(int m_runNumber) override;
double getMonitorCount() const override;
void setMonitorCount(double m_monitorCount) override;
double getH() const override;
double getK() const override;
double getL() const override;
Mantid::Kernel::V3D getHKL() const override;
bool isIndexed() const override;
Mantid::Kernel::V3D getIntHKL() const override;
Mantid::Kernel::V3D getIntMNP() const override;
void setH(double m_H) override;
void setK(double m_K) override;
void setL(double m_L) override;
void setBankName(std::string m_bankName);
void setHKL(double H, double K, double L) override;
void setHKL(const Mantid::Kernel::V3D &HKL) override;
void setIntHKL(const Kernel::V3D &HKL) override;
void setIntMNP(const Mantid::Kernel::V3D &MNP) override;
void setSamplePos(double samX, double samY, double samZ) override;
void setSamplePos(const Mantid::Kernel::V3D &XYZ) override;
......@@ -129,66 +109,22 @@ public:
setQLabFrame(const Mantid::Kernel::V3D &qLab,
boost::optional<double> detectorDistance = boost::none) override;
void setWavelength(double wavelength) override;
double getWavelength() const override;
double getScattering() const override;
double getAzimuthal() const override;
double getDSpacing() const override;
double getTOF() const override;
double getInitialEnergy() const override;
double getFinalEnergy() const override;
double getEnergyTransfer() const override;
void setInitialEnergy(double m_initialEnergy) override;
void setFinalEnergy(double m_finalEnergy) override;
double getIntensity() const override;
double getSigmaIntensity() const override;
double getIntensityOverSigma() const override;
void setIntensity(double m_intensity) override;
void setSigmaIntensity(double m_sigmaIntensity) override;
double getBinCount() const override;
void setBinCount(double m_binCount) override;
Mantid::Kernel::Matrix<double> getGoniometerMatrix() const override;
void setGoniometerMatrix(
const Mantid::Kernel::Matrix<double> &goniometerMatrix) override;
std::string getBankName() const override;
int getRow() const override;
int getCol() const override;
void setRow(int m_row);
void setCol(int m_col);
void setPeakNumber(int m_peakNumber) override;
int getPeakNumber() const override;
virtual Mantid::Kernel::V3D getDetPos() const override;
virtual Mantid::Kernel::V3D getSamplePos() const override;
double getL1() const override;
double getL2() const override;
double getValueByColName(std::string colName) const;
/// Get the peak shape.
const Mantid::Geometry::PeakShape &getPeakShape() const override;
/// Set the PeakShape
void setPeakShape(Mantid::Geometry::PeakShape *shape);
/// Set the PeakShape
void setPeakShape(Mantid::Geometry::PeakShape_const_sptr shape);
/// Assignment
Peak &operator=(const Peak &other);
/// Get the approximate position of a peak that falls off the detectors
Kernel::V3D getVirtualDetectorPosition(const Kernel::V3D &detectorDir) const;
void setAbsorptionWeightedPathLength(double pathLength) override;
double getAbsorptionWeightedPathLength() const override;
bool findDetector(const Mantid::Kernel::V3D &beam,
const Geometry::InstrumentRayTracer &tracer);
......@@ -199,58 +135,9 @@ private:
/// Detector pointed to
Geometry::IDetector_const_sptr m_det;
/// Name of the parent bank
std::string m_bankName;
/// ID of the detector
int m_detectorID;
/// H of the peak
double m_H;
/// K of the peak
double m_K;
/// L of the peak
double m_L;
/// Integrated peak intensity
double m_intensity;
/// Error (sigma) on peak intensity
double m_sigmaIntensity;
/// Count in the bin at the peak
double m_binCount;
/// Initial energy of neutrons at the peak
double m_initialEnergy;
/// Final energy of the neutrons at peak (normally same as m_InitialEnergy)
double m_finalEnergy;
/// absorption weighted path length (aka t bar)
double m_absorptionWeightedPathLength;
/// Orientation matrix of the goniometer angles.
Mantid::Kernel::Matrix<double> m_GoniometerMatrix;
/// Inverse of the goniometer rotation matrix; used to go from Q in lab frame
/// to Q in sample frame
Mantid::Kernel::Matrix<double> m_InverseGoniometerMatrix;
/// Originating run number for this peak
int m_runNumber;
/// Integrated monitor count over TOF range for this run
double m_monitorCount;
/// Cached row in the detector
int m_row;
/// Cached column in the detector
int m_col;
/// Cached source position
Mantid::Kernel::V3D sourcePos;
/// Cached sample position
......@@ -258,16 +145,9 @@ private:
/// Cached detector position
Mantid::Kernel::V3D detPos;
int m_peakNumber;
Mantid::Kernel::V3D m_intHKL;
Mantid::Kernel::V3D m_intMNP;
/// List of contributing detectors IDs
std::set<int> m_detIDs;
/// Peak shape
Mantid::Geometry::PeakShape_const_sptr m_peakShape;
/// Static logger
static Mantid::Kernel::Logger g_log;
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment