Mantid
|
Templated super-class of a multi-dimensional event "box". More...
#include <MDBoxBase.h>
Public Types | |
using | sptr = std::shared_ptr< MDBoxBase< MDE, nd > > |
Convenience typedef for a shared pointer to a this type of class. More... | |
Public Member Functions | |
virtual size_t | addEvent (const MDE &point)=0 |
Add a single event. More... | |
virtual size_t | addEvents (const std::vector< MDE > &events) |
virtual size_t | addEventsUnsafe (const std::vector< MDE > &events) |
virtual size_t | addEventUnsafe (const MDE &point)=0 |
Add a single event, with no mutex locking. More... | |
virtual void | calculateGridCaches () |
void | calcVolume () override |
Compute the volume of the box by simply multiplying each dimension range. More... | |
virtual void | centerpointBin (MDBin< MDE, nd > &bin, bool *fullyContained) const =0 |
Perform centerpoint binning of events. More... | |
void | centroidSphere (Mantid::API::CoordTransform &radiusTransform, const coord_t radiusSquared, coord_t *centroid, signal_t &signal) const override=0 |
Find the centroid around a sphere. More... | |
virtual void | generalBin (MDBin< MDE, nd > &bin, Mantid::Geometry::MDImplicitFunction &function) const =0 |
General binning method for any shape. More... | |
const IMDNode * | getBoxAtCoord (const coord_t *) override |
Returns the lowest-level box at the given coordinates. More... | |
Mantid::API::BoxController * | getBoxController () const override |
Mantid::API::BoxController * | getBoxController () override |
coord_t | getBoxSize (size_t d) |
For testing: return the internal-stored size of each box in each dimension. More... | |
void | getCenter (coord_t *const center) const override |
Get the center of the box. More... | |
unsigned int | getCoordType () const override |
uint32_t | getDepth () const override |
For testing, mostly: return the recursion depth of this box. More... | |
signal_t | getError () const override |
Returns the integrated error from all points within. More... | |
signal_t | getErrorSquared () const override |
Returns the integrated error squared from all points within. More... | |
virtual signal_t | getErrorSquaredNormalized () const |
Returns the integrated error squared from all points within, normalized for the cell volume. More... | |
virtual std::vector< MDE > * | getEventsCopy ()=0 |
Return a copy of contained events. More... | |
void | getEventsData (std::vector< coord_t > &, size_t &nColumns) const override |
The method to convert events in a box into a table of coodrinates/signal/errors casted into coord_t type Used to conver events into plain data array. More... | |
std::string | getEventType () const override |
Mantid::Geometry::MDDimensionExtents< coord_t > & | getExtents (size_t dim) override |
Get the extents for this box. More... | |
std::string | getExtentsStr () const |
Returns the extents as a string, for convenience. More... | |
size_t | getID () const override |
coord_t | getInverseVolume () const override |
Return the inverse of the volume of the cell. More... | |
const IMDNode * | getParent () const override |
Return a pointer to the parent box (const) More... | |
IMDNode * | getParent () override |
Return a pointer to the parent box. More... | |
signal_t | getSignal () const override |
Returns the integrated signal from all points within. More... | |
signal_t | getSignalNormalized () const override |
Returns the integrated signal from all points within, normalized for the cell volume. More... | |
virtual signal_t | getTotalWeight () const |
Returns the total weight of all events within. More... | |
std::vector< Mantid::Kernel::VMD > | getVertexes () const override |
std::unique_ptr< coord_t[]> | getVertexesArray (size_t &numVertices) const override |
std::unique_ptr< coord_t[]> | getVertexesArray (size_t &numVertices, const size_t outDimensions, const bool *maskDim) const override |
coord_t | getVolume () const |
Return the volume of the cell. More... | |
void | integrateCylinder (Mantid::API::CoordTransform &radiusTransform, const coord_t radius, const coord_t length, signal_t &signal, signal_t &errorSquared, std::vector< signal_t > &signal_fit) const override=0 |
Cylinder (peak) integration. More... | |
void | integrateSphere (Mantid::API::CoordTransform &radiusTransform, const coord_t radiusSquared, signal_t &signal, signal_t &errorSquared, const coord_t innerRadiusSquared=0.0, const bool useOnePercentBackgroundCorrection=true) const override=0 |
Sphere (peak) integration. More... | |
bool | isLeaf () const override final |
Is this node a leaf: getNumChildren() == 0. More... | |
MDBoxBase (const MDBoxBase< MDE, nd > &box, Mantid::API::BoxController *const otherBC) | |
MDBoxBase (Mantid::API::BoxController *const boxController, const uint32_t depth, const size_t boxID, const std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > &extentsVector) | |
MDBoxBase (Mantid::API::BoxController *const boxController=nullptr, const uint32_t depth=0, const size_t boxID=UNDEF_SIZET) | |
void | setDepth (uint32_t depth) |
For testing, mostly: set the recursion depth of this box. More... | |
void | setErrorSquared (const signal_t ErrorSquared) override |
Sets the integrated error squared from all points within (mostly used for testing) More... | |
void | setEventsData (const std::vector< coord_t > &) override |
The method to convert the table of data into vector of events Used to convert from a vector of values (2D table in Fortran representation (by rows) into box events. More... | |
void | setExtents (double min[nd], double max[nd]) |
Set the extents of this box. More... | |
void | setExtents (size_t dim, double min, double max) |
Set the extents of this box. More... | |
void | setID (const size_t &newID) override |
sets the special id, which specify the position of this node in the chain linearly ordered nodes More... | |
void | setInverseVolume (const coord_t invVolume) override |
Sets the inverse of the volume of the cell. More... | |
void | setParent (IMDNode *parent) override |
Return a pointer to the parent box. More... | |
void | setSignal (const signal_t signal) override |
Sets the integrated signal from all points within (mostly used for testing) More... | |
virtual void | setTotalWeight (const signal_t total) |
Sets the total weight from all points within (mostly used for testing) More... | |
void | transformDimensions (std::vector< double > &scaling, std::vector< double > &offset) override |
Public Member Functions inherited from Mantid::API::IMDNode | |
virtual void | buildAndAddEvent (const signal_t Signal, const signal_t errorSq, const std::vector< coord_t > &point, uint16_t expInfoIndex, uint16_t goniometerIndex, uint32_t detectorId)=0 |
Add a single event defined by its components. More... | |
virtual size_t | buildAndAddEvents (const std::vector< signal_t > &sigErrSq, const std::vector< coord_t > &Coord, const std::vector< uint16_t > &expInfoIndex, const std::vector< uint16_t > &goniometerIndex, const std::vector< uint32_t > &detectorId)=0 |
Add several events from the vector of event parameters. More... | |
virtual void | buildAndAddEventUnsafe (const signal_t Signal, const signal_t errorSq, const std::vector< coord_t > &point, uint16_t expInfoIndex, uint16_t goniometerIndex, uint32_t detectorId)=0 |
Add a single event, with no mutex locking. More... | |
virtual void | calculateCentroid (coord_t *) const =0 |
Calculate the centroid of this box and all sub-boxes. More... | |
virtual void | calculateCentroid (coord_t *, const int) const =0 |
Calculate the centroid of this box and all sub-boxes. More... | |
virtual void | calcVolume ()=0 |
virtual void | centroidSphere (Mantid::API::CoordTransform &radiusTransform, const coord_t radiusSquared, coord_t *centroid, signal_t &signal) const =0 |
Find the centroid of all events contained within by doing a weighted average of their coordinates. More... | |
virtual void | clear ()=0 |
Clear all contained data including precalculated averages. More... | |
virtual void | clearDataFromMemory ()=0 |
drop event data from memory but keep averages More... | |
virtual void | clearFileBacked (bool loadFileData)=0 |
if node was fileBacked, the method clears file-backed information More... | |
virtual const IMDNode * | getBoxAtCoord (const coord_t *)=0 |
virtual Mantid::API::BoxController * | getBoxController () const =0 |
get box controller More... | |
virtual Mantid::API::BoxController * | getBoxController ()=0 |
virtual void | getBoxes (std::vector< IMDNode * > &boxes, size_t maxDepth, bool leafOnly)=0 |
Fill a vector with all the boxes who are the childred of this one up to a certain depth. More... | |
virtual void | getBoxes (std::vector< IMDNode * > &boxes, size_t maxDepth, bool leafOnly, Mantid::Geometry::MDImplicitFunction *function)=0 |
Fill a vector with all the boxes who are the childred of this one up to a certain depth and selected by the function. More... | |
virtual void | getBoxes (std::vector< IMDNode * > &outBoxes, const std::function< bool(IMDNode *)> &cond)=0 |
Fill a vector with all the boxes who are satisfying the condition. More... | |
virtual void | getCenter (coord_t *const) const =0 |
virtual coord_t * | getCentroid () const =0 |
Get the centroid of this box and all sub-boxes. More... | |
virtual IMDNode * | getChild (size_t index)=0 |
Return the indexth child MDBoxBase. More... | |
virtual unsigned int | getCoordType () const =0 |
virtual size_t | getDataInMemorySize () const =0 |
get size of the data located in memory, it is equivalent to getNPoints above for memory based workspace but may be different for file based one ; More... | |
virtual uint32_t | getDepth () const =0 |
virtual signal_t | getError () const =0 |
virtual signal_t | getErrorSquared () const =0 |
virtual void | getEventsData (std::vector< coord_t > &coordTable, size_t &nColumns) const =0 |
The method to convert events in a box into a table of coodrinates/signal/errors casted into coord_t type Used to save events from plain binary file. More... | |
virtual std::string | getEventType () const =0 |
virtual Mantid::Geometry::MDDimensionExtents< coord_t > & | getExtents (size_t dim)=0 |
virtual size_t | getID () const =0 |
virtual coord_t | getInverseVolume () const =0 |
virtual Kernel::ISaveable * | getISaveable () const =0 |
Return the pointer to the sconst tructure responsible for saving the box on disk if the workspace occupies too much memory. More... | |
virtual Kernel::ISaveable * | getISaveable ()=0 |
Return the pointer to the structure responsible for saving the box on disk if the workspace occupies too much memory. More... | |
virtual bool | getIsMasked () const =0 |
Getter for the masking. More... | |
virtual uint64_t | getNPoints () const =0 |
Get total number of points both in memory and on file if present;. More... | |
virtual size_t | getNumChildren () const =0 |
Get the # of children MDBoxBase'es (non-recursive) More... | |
virtual size_t | getNumDims () const =0 |
Get number of dimensions, the box with this interface has. More... | |
virtual size_t | getNumMDBoxes () const =0 |
Get the total # of unsplit MDBoxes contained. More... | |
virtual const IMDNode * | getParent () const =0 |
Return a pointer to the parent box (const) More... | |
virtual IMDNode * | getParent ()=0 |
Return a pointer to the parent box. More... | |
virtual signal_t | getSignal () const =0 |
virtual signal_t | getSignalByNEvents () const |
virtual signal_t | getSignalNormalized () const =0 |
virtual uint64_t | getTotalDataSize () const =0 |
virtual std::vector< Mantid::Kernel::VMD > | getVertexes () const =0 |
virtual std::unique_ptr< coord_t[]> | getVertexesArray (size_t &numVertices) const =0 |
virtual std::unique_ptr< coord_t[]> | getVertexesArray (size_t &numVertices, const size_t outDimensions, const bool *maskDim) const =0 |
virtual void | integrateCylinder (Mantid::API::CoordTransform &radiusTransform, const coord_t radius, const coord_t length, signal_t &signal, signal_t &errorSquared, std::vector< signal_t > &signal_fit) const =0 |
Cylinder (peak) integration The CoordTransform object could be used for more cylinder reduces the dimensions to two values. More... | |
virtual void | integrateSphere (Mantid::API::CoordTransform &radiusTransform, const coord_t radiusSquared, signal_t &signal, signal_t &errorSquared, const coord_t innerRadiusSquared=0.0, const bool useOnePercentBackgroundCorrection=true) const =0 |
Sphere (peak) integration The CoordTransform object could be used for more complex shapes, e.g. More... | |
virtual bool | isBox () const =0 |
virtual bool | isLeaf () const =0 |
Is this node a leaf: getNumChildren() == 0. More... | |
virtual void | loadAndAddFrom (API::IBoxControllerIO *const, uint64_t, size_t)=0 |
Load the additional box data of specified size from the disk location provided using the class, respoinsible for the file IO and append them to the box. More... | |
virtual void | loadAndAddFrom (API::IBoxControllerIO *const, uint64_t, size_t, std::vector< coord_t > &)=0 |
Load the additional box data of specified size from the disk location provided using the class, respoinsible for the file IO and append them to the box. More... | |
virtual void | mask ()=0 |
Setter for masking the box. More... | |
virtual void | refreshCache (Kernel::ThreadScheduler *=nullptr)=0 |
Recalculate signal etc. More... | |
virtual void | reserveMemoryForLoad (uint64_t)=0 |
virtual void | saveAt (API::IBoxControllerIO *const, uint64_t) const =0 |
Save the box at specific disk position using the class, respoinsible for the file IO. More... | |
virtual void | setChildren (const std::vector< IMDNode * > &boxes, const size_t indexStart, const size_t indexEnd)=0 |
Sets the children from a vector of children. More... | |
virtual void | setErrorSquared (const signal_t)=0 |
virtual void | setEventsData (const std::vector< coord_t > &coordTable)=0 |
The method to convert the table of data into vector of events Used to load events from plain binary file. More... | |
virtual void | setFileBacked ()=0 |
initiate the structure responsible for swapping the box on HDD if out of memory with default parameters (it does not know its place on HDD and was not saved). More... | |
virtual void | setFileBacked (const uint64_t, const size_t, const bool)=0 |
initiate the structure responsible for swapping the box on HDD if out of memory. More... | |
virtual void | setID (const size_t &newID)=0 |
sets the special id, which specify the position of this node in the chain linearly ordered nodes More... | |
virtual void | setInverseVolume (const coord_t)=0 |
virtual void | setParent (IMDNode *parent)=0 |
Return a pointer to the parent box. More... | |
virtual void | setSignal (const signal_t)=0 |
virtual void | splitAllIfNeeded (Mantid::Kernel::ThreadScheduler *=nullptr)=0 |
Split sub-boxes, if this is possible and neede for this box. More... | |
virtual void | transformDimensions (std::vector< double > &scaling, std::vector< double > &offset)=0 |
virtual void | unmask ()=0 |
Setter for unmasking the box. More... | |
virtual | ~IMDNode ()=default |
This is an interface to MDBox or MDGridBox of an MDWorkspace. More... | |
Protected Member Functions | |
template<typename EventIterator > | |
void | calcCaches (const EventIterator &begin, const EventIterator &end) |
Calculates caches if the events are known. More... | |
Protected Attributes | |
Mantid::Geometry::MDDimensionExtents< coord_t > | extents [nd] |
Array of MDDimensionStats giving the extents and other stats on the box dimensions. More... | |
Mantid::API::BoxController *const | m_BoxController |
The box splitting controller, shared with all boxes in the hierarchy. More... | |
coord_t | m_centroid [nd] |
std::mutex | m_dataMutex |
Mutex for modifying the event list or box averages. More... | |
uint32_t | m_depth |
Recursion depth. More... | |
signal_t | m_errorSquared |
Cached total error (squared) from all points within. More... | |
size_t | m_fileID |
The id which specify location of this box in a linear chain of ordered boxes (e.g. More... | |
coord_t | m_inverseVolume |
Inverse of the volume of the cell, to be used for normalized signal. More... | |
Mantid::API::IMDNode * | m_parent |
Pointer to the parent of this box. NULL if no parent. More... | |
signal_t | m_signal |
Cached total signal from all points within. More... | |
signal_t | m_totalWeight |
Cached total weight of all events Set when refreshCache() is called. More... | |
Private Member Functions | |
MDBoxBase (const MDBoxBase< MDE, nd > &box) | |
Additional Inherited Members | |
Static Public Member Functions inherited from Mantid::API::IMDNode | |
static bool | CompareFilePosition (const IMDNode *const a, const IMDNode *const b) |
Helper method for sorting MDBoxBasees by file position. More... | |
static void | sortObjByID (std::vector< IMDNode * > &boxes) |
Static method for sorting a list of MDBoxBase pointers by their file position, ascending. More... | |
Templated super-class of a multi-dimensional event "box".
To be subclassed by MDBox<> and MDGridBox<>
A box is a container of MDEvents within a certain range of values within the nd dimensions. This range defines a n-dimensional "box" or rectangular prism.
nd | :: the number of dimensions that each MDLeanEvent will be tracking. an int > 0. |
Definition at line 50 of file MDBoxBase.h.
using Mantid::DataObjects::MDBoxBase::sptr = std::shared_ptr<MDBoxBase<MDE, nd> > |
Convenience typedef for a shared pointer to a this type of class.
Definition at line 358 of file MDBoxBase.h.
Mantid::DataObjects::MDBoxBase::MDBoxBase | ( | Mantid::API::BoxController *const | boxController = nullptr , |
const uint32_t | depth = 0 , |
||
const size_t | boxID = UNDEF_SIZET |
||
) |
Mantid::DataObjects::MDBoxBase::MDBoxBase | ( | Mantid::API::BoxController *const | boxController, |
const uint32_t | depth, | ||
const size_t | boxID, | ||
const std::vector< Mantid::Geometry::MDDimensionExtents< coord_t > > & | extentsVector | ||
) |
Mantid::DataObjects::MDBoxBase::MDBoxBase | ( | const MDBoxBase< MDE, nd > & | box, |
Mantid::API::BoxController *const | otherBC | ||
) |
|
private |
|
pure virtual |
Add a single event.
Implemented in Mantid::DataObjects::MDGridBox, and Mantid::DataObjects::MDBox.
Referenced by Mantid::MDAlgorithms::ConvertToDiffractionMDWorkspace::convertEventList(), Mantid::MDAlgorithms::MergeMD::doPlus(), and Mantid::MDAlgorithms::SliceMD::slice().
|
virtual |
Reimplemented in Mantid::DataObjects::MDBox.
Referenced by Mantid::MDAlgorithms::MinusMD::doMinus(), and Mantid::MDAlgorithms::PlusMD::doPlus().
|
virtual |
Reimplemented in Mantid::DataObjects::MDBox.
|
pure virtual |
Add a single event, with no mutex locking.
Implemented in Mantid::DataObjects::MDGridBox, and Mantid::DataObjects::MDBox.
|
protected |
Calculates caches if the events are known.
EventIterator | :: iterator which points to event in some collection |
begin | :: iterator to start |
end | :: iterator before end (not included) |
Weight processing
Definition at line 368 of file MDBoxBase.h.
References Mantid::Geometry::d.
|
inlinevirtual |
Reimplemented in Mantid::DataObjects::MDGridBox.
Definition at line 307 of file MDBoxBase.h.
|
inlineoverridevirtual |
Compute the volume of the box by simply multiplying each dimension range.
Call this after setExtents() is set for all dimensions. This is saved for getSignalNormalized()
Floating point multiplication is much faster than division, so cache 1/volume.
Implements Mantid::API::IMDNode.
Definition at line 219 of file MDBoxBase.h.
References Mantid::Geometry::d.
|
pure virtual |
Perform centerpoint binning of events.
bin | :: MDBin object giving the limits of events to accept. |
fullyContained | :: optional bool array sized [nd] of which dimensions are known to be fully contained (for MDSplitBox) |
Implemented in Mantid::DataObjects::MDBox, and Mantid::DataObjects::MDGridBox.
|
overridepure virtual |
Find the centroid around a sphere.
Implements Mantid::API::IMDNode.
Implemented in Mantid::DataObjects::MDBox, and Mantid::DataObjects::MDGridBox.
Referenced by Mantid::MDAlgorithms::CentroidPeaksMD::integrate(), and Mantid::MDAlgorithms::CentroidPeaksMD2::integrate().
|
pure virtual |
General binning method for any shape.
Implemented in Mantid::DataObjects::MDGridBox, and Mantid::DataObjects::MDBox.
|
inlineoverridevirtual |
Returns the lowest-level box at the given coordinates.
Implements Mantid::API::IMDNode.
Definition at line 87 of file MDBoxBase.h.
|
inlineoverridevirtual |
Implements Mantid::API::IMDNode.
Definition at line 140 of file MDBoxBase.h.
Referenced by Mantid::MDAlgorithms::MinusMD::doMinus(), and Mantid::MDAlgorithms::PlusMD::doPlus().
|
inlineoverridevirtual |
Implements Mantid::API::IMDNode.
Definition at line 142 of file MDBoxBase.h.
|
inline |
For testing: return the internal-stored size of each box in each dimension.
Definition at line 203 of file MDBoxBase.h.
References Mantid::Geometry::d.
Referenced by Mantid::MDAlgorithms::CompareMDWorkspaces::compare2Boxes().
|
inlineoverridevirtual |
Get the center of the box.
center | :: bare array of size[nd] that will get set with the mid-point of each dimension. |
Implements Mantid::API::IMDNode.
Definition at line 210 of file MDBoxBase.h.
References Mantid::Geometry::d.
Referenced by Mantid::MDAlgorithms::IntegratePeaksMD2::findEllipsoid().
|
inlineoverridevirtual |
Implements Mantid::API::IMDNode.
Definition at line 65 of file MDBoxBase.h.
|
inlineoverridevirtual |
For testing, mostly: return the recursion depth of this box.
0 is the top-level box, 1 is one deeper, etc.
Implements Mantid::API::IMDNode.
Definition at line 286 of file MDBoxBase.h.
|
inlineoverridevirtual |
Returns the integrated error from all points within.
Implements Mantid::API::IMDNode.
Definition at line 237 of file MDBoxBase.h.
|
inlineoverridevirtual |
Returns the integrated error squared from all points within.
Implements Mantid::API::IMDNode.
Definition at line 242 of file MDBoxBase.h.
Referenced by Mantid::MDAlgorithms::BinMD::binMDBox().
|
inlinevirtual |
Returns the integrated error squared from all points within, normalized for the cell volume.
Definition at line 280 of file MDBoxBase.h.
|
pure virtual |
Return a copy of contained events.
Implemented in Mantid::DataObjects::MDBox, and Mantid::DataObjects::MDGridBox.
|
inlineoverridevirtual |
The method to convert events in a box into a table of coodrinates/signal/errors casted into coord_t type Used to conver events into plain data array.
Does nothing for GridBox
Implements Mantid::API::IMDNode.
Definition at line 94 of file MDBoxBase.h.
|
inlineoverridevirtual |
Implements Mantid::API::IMDNode.
Definition at line 62 of file MDBoxBase.h.
|
inlineoverridevirtual |
Get the extents for this box.
Implements Mantid::API::IMDNode.
Definition at line 184 of file MDBoxBase.h.
|
inline |
Returns the extents as a string, for convenience.
Definition at line 188 of file MDBoxBase.h.
References Mantid::Geometry::d.
|
inlineoverridevirtual |
Implements Mantid::API::IMDNode.
Definition at line 71 of file MDBoxBase.h.
|
inlineoverridevirtual |
Return the inverse of the volume of the cell.
Implements Mantid::API::IMDNode.
Definition at line 300 of file MDBoxBase.h.
|
inlineoverridevirtual |
Return a pointer to the parent box (const)
Implements Mantid::API::IMDNode.
Definition at line 84 of file MDBoxBase.h.
|
inlineoverridevirtual |
Return a pointer to the parent box.
Implements Mantid::API::IMDNode.
Definition at line 81 of file MDBoxBase.h.
|
inlineoverridevirtual |
Returns the integrated signal from all points within.
Implements Mantid::API::IMDNode.
Definition at line 232 of file MDBoxBase.h.
Referenced by Mantid::MDAlgorithms::BinMD::binMDBox().
|
inlineoverridevirtual |
Returns the integrated signal from all points within, normalized for the cell volume.
Implements Mantid::API::IMDNode.
Definition at line 274 of file MDBoxBase.h.
Referenced by Mantid::MDAlgorithms::FindPeaksMD::findPeaks().
|
inlinevirtual |
Returns the total weight of all events within.
Typically this is equal to the number of events (weight of 1 per event)
Definition at line 248 of file MDBoxBase.h.
|
overridevirtual |
Implements Mantid::API::IMDNode.
|
overridevirtual |
Implements Mantid::API::IMDNode.
Referenced by Mantid::MDAlgorithms::BinMD::binMDBox().
|
overridevirtual |
Implements Mantid::API::IMDNode.
|
inline |
Return the volume of the cell.
Definition at line 296 of file MDBoxBase.h.
|
overridepure virtual |
Cylinder (peak) integration.
Implements Mantid::API::IMDNode.
Implemented in Mantid::DataObjects::MDBox, and Mantid::DataObjects::MDGridBox.
Referenced by Mantid::MDAlgorithms::IntegratePeaksMD::integrate(), and Mantid::MDAlgorithms::IntegratePeaksMD2::integrate().
|
overridepure virtual |
Sphere (peak) integration.
Implements Mantid::API::IMDNode.
Implemented in Mantid::DataObjects::MDBox, and Mantid::DataObjects::MDGridBox.
Referenced by Mantid::MDAlgorithms::IntegratePeaksMD::integrate(), and Mantid::MDAlgorithms::IntegratePeaksMD2::integrate().
|
inlinefinaloverridevirtual |
Is this node a leaf: getNumChildren() == 0.
Implements Mantid::API::IMDNode.
Definition at line 67 of file MDBoxBase.h.
|
inline |
For testing, mostly: set the recursion depth of this box.
SHOULD NOT BE CALLED OUTSIDE OF TESTS!
depth | :: split recursion depth |
Definition at line 292 of file MDBoxBase.h.
|
inlineoverridevirtual |
Sets the integrated error squared from all points within (mostly used for testing)
ErrorSquared | :: new squared error. |
Implements Mantid::API::IMDNode.
Definition at line 262 of file MDBoxBase.h.
|
inlineoverridevirtual |
The method to convert the table of data into vector of events Used to convert from a vector of values (2D table in Fortran representation (by rows) into box events.
Does nothing for GridBox (may be temporary) – can be combined with build and add events
Implements Mantid::API::IMDNode.
Definition at line 100 of file MDBoxBase.h.
|
inline |
Set the extents of this box.
min | :: min edge of the dimension |
max | :: max edge of the dimension |
Definition at line 175 of file MDBoxBase.h.
|
inline |
Set the extents of this box.
dim | :: index of dimension |
min | :: min edge of the dimension |
max | :: max edge of the dimension |
Dangerous function with side effects as volume and possibly other box statistics has to be recalculated after this excecuted. has not done so because of productivity reasons;
Definition at line 163 of file MDBoxBase.h.
Referenced by Mantid::DataObjects::MDEventsTestHelper::makeMDBox1(), and Mantid::DataObjects::MDEventsTestHelper::makeMDBox3().
|
inlineoverridevirtual |
sets the special id, which specify the position of this node in the chain linearly ordered nodes
Implements Mantid::API::IMDNode.
Definition at line 74 of file MDBoxBase.h.
|
inlineoverridevirtual |
Sets the inverse of the volume of the cell.
invVolume | :: value to set. |
Implements Mantid::API::IMDNode.
Definition at line 305 of file MDBoxBase.h.
|
inlineoverridevirtual |
Return a pointer to the parent box.
Implements Mantid::API::IMDNode.
Definition at line 78 of file MDBoxBase.h.
|
inlineoverridevirtual |
Sets the integrated signal from all points within (mostly used for testing)
signal | :: new Signal amount. |
Implements Mantid::API::IMDNode.
Definition at line 255 of file MDBoxBase.h.
|
inlinevirtual |
Sets the total weight from all points within (mostly used for testing)
total | :: new weight amount. |
Definition at line 268 of file MDBoxBase.h.
|
overridevirtual |
Implements Mantid::API::IMDNode.
Referenced by Mantid::MDAlgorithms::TransformMD::doTransform().
|
protected |
Array of MDDimensionStats giving the extents and other stats on the box dimensions.
Definition at line 320 of file MDBoxBase.h.
|
protected |
The box splitting controller, shared with all boxes in the hierarchy.
Definition at line 336 of file MDBoxBase.h.
|
mutableprotected |
Definition at line 322 of file MDBoxBase.h.
|
protected |
Mutex for modifying the event list or box averages.
Definition at line 351 of file MDBoxBase.h.
|
protected |
Recursion depth.
Definition at line 342 of file MDBoxBase.h.
|
mutableprotected |
Cached total error (squared) from all points within.
Set when refreshCache() is called.
Definition at line 329 of file MDBoxBase.h.
|
protected |
The id which specify location of this box in a linear chain of ordered boxes (e.g.
on file). Calculated algorithmically
Definition at line 349 of file MDBoxBase.h.
|
protected |
Inverse of the volume of the cell, to be used for normalized signal.
Definition at line 339 of file MDBoxBase.h.
|
protected |
Pointer to the parent of this box. NULL if no parent.
Definition at line 345 of file MDBoxBase.h.
|
mutableprotected |
Cached total signal from all points within.
Set when refreshCache() is called.
Definition at line 325 of file MDBoxBase.h.
|
mutableprotected |
Cached total weight of all events Set when refreshCache() is called.
Definition at line 333 of file MDBoxBase.h.