Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
7e4dfc72
Unverified
Commit
7e4dfc72
authored
Mar 09, 2021
by
Whitfield, Ross
Committed by
GitHub
Mar 09, 2021
Browse files
Merge pull request #30854 from rosswhitfield/LeanPeak
New LeanElasticPeak class
parents
f63ad262
54813629
Changes
10
Hide whitespace changes
Inline
Side-by-side
Framework/DataObjects/CMakeLists.txt
View file @
7e4dfc72
...
...
@@ -28,6 +28,8 @@ set(SRC_FILES
src/NoShape.cpp
src/OffsetsWorkspace.cpp
src/Peak.cpp
src/LeanElasticPeak.cpp
src/BasePeak.cpp
src/PeakColumn.cpp
src/PeakNoShapeFactory.cpp
src/PeakShapeBase.cpp
...
...
@@ -108,6 +110,8 @@ set(INC_FILES
inc/MantidDataObjects/NoShape.h
inc/MantidDataObjects/OffsetsWorkspace.h
inc/MantidDataObjects/Peak.h
inc/MantidDataObjects/LeanElasticPeak.h
inc/MantidDataObjects/BasePeak.h
inc/MantidDataObjects/PeakColumn.h
inc/MantidDataObjects/PeakNoShapeFactory.h
inc/MantidDataObjects/PeakShapeBase.h
...
...
@@ -175,6 +179,7 @@ set(TEST_FILES
PeakShapeSphericalFactoryTest.h
PeakShapeSphericalTest.h
PeakTest.h
LeanElasticPeakTest.h
PeaksWorkspaceTest.h
RebinnedOutputTest.h
RefAxisTest.h
...
...
Framework/DataObjects/inc/MantidDataObjects/BasePeak.h
0 → 100644
View file @
7e4dfc72
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include
"MantidGeometry/Crystal/IPeak.h"
#include
"MantidGeometry/Crystal/PeakShape.h"
#include
"MantidGeometry/Instrument.h"
#include
"MantidKernel/Logger.h"
#include
"MantidKernel/Matrix.h"
#include
"MantidKernel/PhysicalConstants.h"
#include
"MantidKernel/System.h"
#include
"MantidKernel/V3D.h"
#include
<boost/optional.hpp>
#include
<memory>
namespace
Mantid
{
namespace
Geometry
{
class
InstrumentRayTracer
;
}
namespace
DataObjects
{
/** Structure describing a single-crystal peak. This is a partial
* implementation of IPeak and should contain everything that is common
* to Peak and LeanPeak.
*
*/
class
DLLExport
BasePeak
:
public
Geometry
::
IPeak
{
public:
/// Allow PeakColumn class to directly access members.
friend
class
PeakColumn
;
BasePeak
();
BasePeak
(
const
Mantid
::
Kernel
::
Matrix
<
double
>
&
goniometer
);
/// Copy constructor
BasePeak
(
const
BasePeak
&
other
);
// MSVC 2015/17 can build with noexcept = default however
// intellisense still incorrectly reports this as an error despite compiling.
// https://connect.microsoft.com/VisualStudio/feedback/details/1795240/visual-c-2015-default-move-constructor-and-noexcept-keyw
// ord-bug For that reason we still use the supplied default which should be
// noexcept once the above is fixed we can remove this workaround
#if defined(_MSC_VER) && _MSC_VER <= 1910
BasePeak
(
BasePeak
&&
)
=
default
;
BasePeak
&
operator
=
(
BasePeak
&&
)
=
default
;
#else
BasePeak
(
BasePeak
&&
)
noexcept
=
default
;
BasePeak
&
operator
=
(
BasePeak
&&
)
noexcept
=
default
;
#endif
// Construct a peak from a reference to the interface
explicit
BasePeak
(
const
Geometry
::
IPeak
&
ipeak
);
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
;
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
;
Mantid
::
Kernel
::
Matrix
<
double
>
getInverseGoniometerMatrix
()
const
;
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
;
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
BasePeak
&
operator
=
(
const
BasePeak
&
other
);
void
setAbsorptionWeightedPathLength
(
double
pathLength
)
override
;
double
getAbsorptionWeightedPathLength
()
const
override
;
protected:
double
calculateWavelengthFromQLab
(
const
Mantid
::
Kernel
::
V3D
qLab
);
// ki-kf for Inelastic convention; kf-ki for Crystallography convention
std
::
string
convention
;
private:
/// Name of the parent bank
std
::
string
m_bankName
;
/// 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
;
/// 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
;
int
m_peakNumber
;
Mantid
::
Kernel
::
V3D
m_intHKL
;
Mantid
::
Kernel
::
V3D
m_intMNP
;
/// Peak shape
Mantid
::
Geometry
::
PeakShape_const_sptr
m_peakShape
;
/// Static logger
static
Mantid
::
Kernel
::
Logger
g_log
;
};
}
// namespace DataObjects
}
// namespace Mantid
Framework/DataObjects/inc/MantidDataObjects/LeanElasticPeak.h
0 → 100644
View file @
7e4dfc72
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include
"MantidDataObjects/BasePeak.h"
#include
"MantidGeometry/Crystal/IPeak.h"
#include
"MantidGeometry/Instrument/ReferenceFrame.h"
#include
"MantidKernel/Logger.h"
#include
"MantidKernel/Matrix.h"
#include
"MantidKernel/PhysicalConstants.h"
#include
"MantidKernel/System.h"
#include
"MantidKernel/V3D.h"
#include
<boost/optional.hpp>
#include
<memory>
namespace
Mantid
{
namespace
DataObjects
{
/** Structure describing a single-crystal peak. This is a version of
* Peak that doesn't require the instrument and also assuming elastic
* scattering. The peak is described only by the Q-sample
* position. Optionally if the wavelength and goniometer is provided
* other properties can be calculated.
*
*/
class
DLLExport
LeanElasticPeak
:
public
BasePeak
{
public:
/// Allow PeakColumn class to directly access members.
friend
class
PeakColumn
;
LeanElasticPeak
();
LeanElasticPeak
(
const
Mantid
::
Kernel
::
V3D
&
QSampleFrame
);
LeanElasticPeak
(
const
Mantid
::
Kernel
::
V3D
&
QSampleFrame
,
const
Mantid
::
Kernel
::
Matrix
<
double
>
&
goniometer
,
boost
::
optional
<
std
::
shared_ptr
<
Geometry
::
ReferenceFrame
>>
refFrame
=
boost
::
none
);
LeanElasticPeak
(
const
Mantid
::
Kernel
::
V3D
&
QSampleFrame
,
double
wavelength
);
/// Copy constructor
LeanElasticPeak
(
const
LeanElasticPeak
&
other
);
// MSVC 2015/17 can build with noexcept = default however
// intellisense still incorrectly reports this as an error despite compiling.
// https://connect.microsoft.com/VisualStudio/feedback/details/1795240/visual-c-2015-default-move-constructor-and-noexcept-keyword-bug
// For that reason we still use the supplied default which should be noexcept
// once the above is fixed we can remove this workaround
#if defined(_MSC_VER) && _MSC_VER <= 1910
LeanElasticPeak
(
LeanElasticPeak
&&
)
=
default
;
LeanElasticPeak
&
operator
=
(
LeanElasticPeak
&&
)
=
default
;
#else
LeanElasticPeak
(
LeanElasticPeak
&&
)
noexcept
=
default
;
LeanElasticPeak
&
operator
=
(
LeanElasticPeak
&&
)
noexcept
=
default
;
#endif
// Construct a peak from a reference to the interface
explicit
LeanElasticPeak
(
const
Geometry
::
IPeak
&
ipeak
);
void
setDetectorID
(
int
)
override
;
int
getDetectorID
()
const
override
;
void
setInstrument
(
const
Geometry
::
Instrument_const_sptr
&
)
override
;
Geometry
::
IDetector_const_sptr
getDetector
()
const
override
;
Geometry
::
Instrument_const_sptr
getInstrument
()
const
override
;
std
::
shared_ptr
<
const
Geometry
::
ReferenceFrame
>
getReferenceFrame
()
const
override
;
bool
findDetector
()
override
;
bool
findDetector
(
const
Geometry
::
InstrumentRayTracer
&
)
override
;
void
setSamplePos
(
double
,
double
,
double
)
override
;
void
setSamplePos
(
const
Mantid
::
Kernel
::
V3D
&
)
override
;
Mantid
::
Kernel
::
V3D
getQLabFrame
()
const
override
;
Mantid
::
Kernel
::
V3D
getQSampleFrame
()
const
override
;
Mantid
::
Kernel
::
V3D
getDetectorPosition
()
const
override
;
Mantid
::
Kernel
::
V3D
getDetectorPositionNoCheck
()
const
override
;
void
setQSampleFrame
(
const
Mantid
::
Kernel
::
V3D
&
QSampleFrame
,
boost
::
optional
<
double
>
=
boost
::
none
)
override
;
void
setQSampleFrame
(
const
Mantid
::
Kernel
::
V3D
&
QSampleFrame
,
const
Mantid
::
Kernel
::
Matrix
<
double
>
&
goniometer
);
void
setQLabFrame
(
const
Mantid
::
Kernel
::
V3D
&
qLab
,
boost
::
optional
<
double
>
=
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
;
virtual
Mantid
::
Kernel
::
V3D
getDetPos
()
const
override
;
virtual
Mantid
::
Kernel
::
V3D
getSamplePos
()
const
override
;
double
getL1
()
const
override
;
double
getL2
()
const
override
;
/// Assignment
LeanElasticPeak
&
operator
=
(
const
LeanElasticPeak
&
other
);
private:
void
setReferenceFrame
(
std
::
shared_ptr
<
Geometry
::
ReferenceFrame
>
frame
);
/// Q_sample vector
Mantid
::
Kernel
::
V3D
m_Qsample
;
/// Wavelength of neutrons at the peak
double
m_wavelength
;
std
::
shared_ptr
<
Geometry
::
ReferenceFrame
>
m_refFrame
;
/// Static logger
static
Mantid
::
Kernel
::
Logger
g_log
;
};
}
// namespace DataObjects
}
// namespace Mantid
Framework/DataObjects/inc/MantidDataObjects/Peak.h
View file @
7e4dfc72
...
...
@@ -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"
...
...
@@ -25,12 +26,13 @@ class InstrumentRayTracer;
namespace
DataObjects
{
/** Structure describing a single-crystal peak
/** Structure describing a single-crystal peak. The peak is described
* by the physical detector position (determined either from detector
* infomation or calculated from Q-lab) and inital/final energy
* (calculated from Q-lab or provided wavelength)
*
* @author Janik Zikovsky
* @date 2011-04-15 13:24:07.963491
*/
class
DLLExport
Peak
:
public
Geometry
::
I
Peak
{
class
DLLExport
Peak
:
public
Base
Peak
{
public:
/// Allow PeakColumn class to directly access members.
friend
class
PeakColumn
;
...
...
@@ -65,12 +67,6 @@ public:
#if defined(_MSC_VER) && _MSC_VER <= 1910
Peak
(
Peak
&&
)
=
default
;
Peak
&
operator
=
(
Peak
&&
)
=
default
;
#elif ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ <= 8))
// The noexcept default declaration was fixed in GCC 4.9.0
// so for versions 4.8.x and below use default only
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53903
Peak
(
Peak
&&
)
=
default
;
Peak
&
operator
=
(
Peak
&&
)
=
default
;
#else
Peak
(
Peak
&&
)
noexcept
=
default
;
Peak
&
operator
=
(
Peak
&&
)
noexcept
=
default
;
...
...
@@ -89,31 +85,12 @@ public:
void
setInstrument
(
const
Geometry
::
Instrument_const_sptr
&
inst
)
override
;
Geometry
::
IDetector_const_sptr
getDetector
()
const
override
;
Geometry
::
Instrument_const_sptr
getInstrument
()
const
override
;
std
::
shared_ptr
<
const
Geometry
::
ReferenceFrame
>
getReferenceFrame
()
const
override
;
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
;
...
...
@@ -142,53 +119,17 @@ public:
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
;
private:
bool
findDetector
(
const
Mantid
::
Kernel
::
V3D
&
beam
,
const
Geometry
::
InstrumentRayTracer
&
tracer
);
...
...
@@ -199,58 +140,15 @@ 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,21 +156,11 @@ 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
;
// ki-kf for Inelastic convention; kf-ki for Crystallography convention
std
::
string
convention
;
};
}
// namespace DataObjects
...
...
Framework/DataObjects/src/BasePeak.cpp
0 → 100644
View file @
7e4dfc72
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#include
"MantidDataObjects/BasePeak.h"
#include
"MantidDataObjects/NoShape.h"
#include
"MantidGeometry/Instrument/RectangularDetector.h"
#include
"MantidGeometry/Instrument/ReferenceFrame.h"
#include
"MantidGeometry/Objects/InstrumentRayTracer.h"
#include
"MantidGeometry/Surfaces/LineIntersectVisit.h"
#include
"MantidKernel/ConfigService.h"
#include
"MantidKernel/Exception.h"
#include
"MantidKernel/Strings.h"
#include
"boost/make_shared.hpp"
#include
<algorithm>
#include
<cctype>
#include
<string>
#include
<utility>
using
namespace
Mantid
;
using
namespace
Mantid
::
Kernel
;
using
namespace
Mantid
::
Geometry
;
namespace
Mantid
{
namespace
DataObjects
{
//----------------------------------------------------------------------------------------------
/** Default constructor */
BasePeak
::
BasePeak
()
:
m_H
(
0
),
m_K
(
0
),
m_L
(
0
),
m_intensity
(
0
),
m_sigmaIntensity
(
0
),
m_binCount
(
0
),
m_absorptionWeightedPathLength
(
0
),
m_GoniometerMatrix
(
3
,
3
,
true
),
m_InverseGoniometerMatrix
(
3
,
3
,
true
),
m_runNumber
(
0
),
m_monitorCount
(
0
),
m_row
(
-
1
),
m_col
(
-
1
),
m_peakNumber
(
0
),
m_intHKL
(
V3D
(
0
,
0
,
0
)),
m_intMNP
(
V3D
(
0
,
0
,
0
)),
m_peakShape
(
std
::
make_shared
<
NoShape
>
())
{
convention
=
Kernel
::
ConfigService
::
Instance
().
getString
(
"Q.convention"
);
}
//----------------------------------------------------------------------------------------------
/** Constructor including goniometer
*
* @param goniometer :: a 3x3 rotation matrix
*/
BasePeak
::
BasePeak
(
const
Mantid
::
Kernel
::
Matrix
<
double
>
&
goniometer
)
:
m_H
(
0
),
m_K
(
0
),
m_L
(
0
),
m_intensity
(
0
),
m_sigmaIntensity
(
0
),
m_binCount
(
0
),
m_absorptionWeightedPathLength
(
0
),
m_GoniometerMatrix
(
goniometer
),
m_InverseGoniometerMatrix
(
goniometer
),
m_runNumber
(
0
),
m_monitorCount
(
0
),
m_row
(
-
1
),
m_col
(
-
1
),
m_peakNumber
(
0
),
m_intHKL
(
V3D
(
0
,
0
,
0
)),
m_intMNP
(
V3D
(
0
,
0
,
0
)),
m_peakShape
(
std
::
make_shared
<
NoShape
>
())
{
convention
=
Kernel
::
ConfigService
::
Instance
().
getString
(
"Q.convention"
);
if
(
fabs
(
m_InverseGoniometerMatrix
.
Invert
())
<
1e-8
)