Commit 4c9c647e authored by Janik Zikovsky's avatar Janik Zikovsky
Browse files

Refs #2838: Start of a Peak object.

parent d04e3cab
......@@ -8,6 +8,7 @@ set ( SRC_FILES
src/Histogram1D.cpp
src/ManagedDataBlock2D.cpp
src/ManagedWorkspace2D.cpp
src/Peak.cpp
src/PeaksWorkspace.cpp
src/TableColumn.cpp
src/TableWorkspace.cpp
......@@ -32,6 +33,7 @@ set ( INC_FILES
inc/MantidDataObjects/Histogram1D.h
inc/MantidDataObjects/ManagedDataBlock2D.h
inc/MantidDataObjects/ManagedWorkspace2D.h
inc/MantidDataObjects/Peak.h
inc/MantidDataObjects/PeaksWorkspace.h
inc/MantidDataObjects/TableColumn.h
inc/MantidDataObjects/TablePointerColumn.h
......@@ -49,6 +51,7 @@ set ( TEST_FILES
test/LibraryManagerTest.h
test/ManagedDataBlock2DTest.h
test/ManagedWorkspace2DTest.h
test/PeakTest.h
test/PeaksWorkspaceTest.h
test/RefAxisTest.h
test/TableWorkspacePropertyTest.h
......
#ifndef MANTID_DATAOBJECTS_PEAK_H_
#define MANTID_DATAOBJECTS_PEAK_H_
#include "MantidKernel/System.h"
#include "MantidGeometry/Math/Matrix.h"
namespace Mantid
{
namespace DataObjects
{
/** Structure describing a single-crystal peak
*
* @author Janik Zikovsky
* @date 2011-04-15 13:24:07.963491
*/
class Peak
{
public:
Peak();
~Peak();
int getDetectorID() const;
double getFinalEnergy() const;
double getH() const;
double getInitialEnergy() const;
double getIntensity() const;
double getK() const;
double getL() const;
double getSigIntensity() const;
void setDetectorID(int m_DetectorID);
void setFinalEnergy(double m_FinalEnergy);
void setH(double m_H);
void setInitialEnergy(double m_InitialEnergy);
void setIntensity(double m_Intensity);
void setK(double m_K);
void setL(double m_L);
void setSigIntensity(double m_SigIntensity);
Mantid::Geometry::Matrix<double> getOrientationMatrix() const;
void setOrientationMatrix(Mantid::Geometry::Matrix<double> m_OrientationMatrix);
// -- Still to implement --
double getWavelength();
double getDSpacing();
std::string getBankName();
int getRow();
int getCol();
protected:
/// Integrated peak intensity
double m_Intensity;
/// Error (sigma) on peak intensity
double m_SigIntensity;
/// Final energy of the peak
double m_FinalEnergy;
/// Initial Energy of the peak
double m_InitialEnergy;
/// 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;
/// Sample orientation matrix
Mantid::Geometry::Matrix<double> m_OrientationMatrix;
};
} // namespace Mantid
} // namespace DataObjects
#endif /* MANTID_DATAOBJECTS_PEAK_H_ */
#include "MantidDataObjects/Peak.h"
#include "MantidKernel/System.h"
namespace Mantid
{
namespace DataObjects
{
//----------------------------------------------------------------------------------------------
/** Constructor
*/
Peak::Peak()
{
}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
Peak::~Peak()
{
}
int Peak::getDetectorID() const
{
return m_DetectorID;
}
double Peak::getFinalEnergy() const
{
return m_FinalEnergy;
}
double Peak::getH() const
{
return m_H;
}
double Peak::getInitialEnergy() const
{
return m_InitialEnergy;
}
double Peak::getIntensity() const
{
return m_Intensity;
}
double Peak::getK() const
{
return m_K;
}
double Peak::getL() const
{
return m_L;
}
double Peak::getSigIntensity() const
{
return m_SigIntensity;
}
void Peak::setDetectorID(int m_DetectorID)
{
this->m_DetectorID = m_DetectorID;
}
void Peak::setFinalEnergy(double m_FinalEnergy)
{
this->m_FinalEnergy = m_FinalEnergy;
}
void Peak::setH(double m_H)
{
this->m_H = m_H;
}
void Peak::setInitialEnergy(double m_InitialEnergy)
{
this->m_InitialEnergy = m_InitialEnergy;
}
void Peak::setIntensity(double m_Intensity)
{
this->m_Intensity = m_Intensity;
}
void Peak::setK(double m_K)
{
this->m_K = m_K;
}
void Peak::setL(double m_L)
{
this->m_L = m_L;
}
void Peak::setSigIntensity(double m_SigIntensity)
{
this->m_SigIntensity = m_SigIntensity;
}
Mantid::Geometry::Matrix<double> Peak::getOrientationMatrix() const
{
return this->m_OrientationMatrix;
}
void Peak::setOrientationMatrix(Mantid::Geometry::Matrix<double> m_OrientationMatrix)
{
this->m_OrientationMatrix = m_OrientationMatrix;
}
} // namespace Mantid
} // namespace DataObjects
#ifndef MANTID_DATAOBJECTS_PEAKTEST_H_
#define MANTID_DATAOBJECTS_PEAKTEST_H_
#include <cxxtest/TestSuite.h>
#include "MantidKernel/Timer.h"
#include "MantidKernel/System.h"
#include <iostream>
#include <iomanip>
#include "MantidDataObjects/Peak.h"
using namespace Mantid::DataObjects;
class PeakTest : public CxxTest::TestSuite
{
public:
void test_Something()
{
}
};
#endif /* MANTID_DATAOBJECTS_PEAKTEST_H_ */
Markdown is supported
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