|
Mantid
|
#include <WorkspaceBoundingBox.h>
Public Member Functions | |
| bool | centerOfMassWithinBeamCenter () |
| This only has effect if the integral is ignoring the beam center as a whole. | |
| double | distanceFromPrevious () const |
| void | findNewCenterPosition () |
| double | getCenterX () const |
| double | getCenterY () const |
| void | prepareCenterCalculation () |
| Copy the current center to the previous and update the x/y range for overall integration. | |
| WorkspaceBoundingBox (const API::MatrixWorkspace_const_sptr &workspace, const double integrationRadius, const double beamRadius, const bool ignoreDirectBeam, const double cenX, const double cenY) | |
| ~WorkspaceBoundingBox () | |
Private Member Functions | |
| double | calculateRadiusX () const |
| double | calculateRadiusY () const |
| double | countsValue (const std::size_t index) const |
| bool | includeInIntegration (const Kernel::V3D &position) |
| bool | includeInIntegration (const std::size_t index) |
| Checks to see if spectrum at index should be included in the integration. | |
| void | initOverallRangeAndFindFirstCenter () |
| bool | isValidIndex (const std::size_t index) const |
| Performs checks on the spectrum located at index to determine if it is acceptable to be operated on. | |
| void | normalizePosition (const double totalCounts) |
| Perform normalization on x/y coords over given values. | |
| Kernel::V3D | position (const std::size_t index) const |
| void | resetIntermediatePosition () |
| void | setBounds (const double xMin, const double xMax, const double yMin, const double yMax) |
| Update the symmetric (in x and y separately) range of space that is symmetric around the beam center. | |
| void | setCenterPrev (const double x, const double y) |
| bool | symmetricRegionContainsPoint (double x, double y) |
| Checks if a given x/y coord is within the bounding box. | |
| void | updateMinMax (const std::size_t index) |
| Compare current mins and maxs to the coordinates of the spectrum at index expnd mins and maxs to include this spectrum. | |
| double | updatePositionAndReturnCount (const std::size_t index) |
| Sets member variables x/y to new x/y based on spectrum info and historgram data at the given index. | |
Private Attributes | |
| double | m_beamRadiusSq |
| double | m_centerXPosCurr {0} |
| double | m_centerXPosPrev {0} |
| double | m_centerYPosCurr {0} |
| double | m_centerYPosPrev {0} |
| bool | m_ignoreDirectBeam |
| double | m_integrationRadiusSq |
| std::size_t | m_numSpectra |
| const API::SpectrumInfo * | m_spectrumInfo |
| API::MatrixWorkspace_const_sptr | m_workspace |
| double | m_xBoxMax {0} |
| double | m_xBoxMin {0} |
| double | m_xPosMax {0} |
| double | m_xPosMin {0} |
| double | m_yBoxMax {0} |
| double | m_yBoxMin {0} |
| double | m_yPosMax {0} |
| double | m_yPosMin {0} |
Definition at line 25 of file WorkspaceBoundingBox.h.
| Mantid::Algorithms::WorkspaceBoundingBox::WorkspaceBoundingBox | ( | const API::MatrixWorkspace_const_sptr & | workspace, |
| const double | integrationRadius, | ||
| const double | beamRadius, | ||
| const bool | ignoreDirectBeam, | ||
| const double | cenX, | ||
| const double | cenY | ||
| ) |
Definition at line 10 of file WorkspaceBoundingBox.cpp.
References initOverallRangeAndFindFirstCenter(), m_numSpectra, m_spectrumInfo, m_workspace, setCenterPrev(), and workspace.
|
default |
|
private |
Definition at line 207 of file WorkspaceBoundingBox.cpp.
References m_centerXPosCurr, m_xPosMax, and m_xPosMin.
Referenced by centerOfMassWithinBeamCenter(), and prepareCenterCalculation().
|
private |
Definition at line 211 of file WorkspaceBoundingBox.cpp.
References m_centerYPosCurr, m_yPosMax, and m_yPosMin.
Referenced by centerOfMassWithinBeamCenter(), and prepareCenterCalculation().
| bool Mantid::Algorithms::WorkspaceBoundingBox::centerOfMassWithinBeamCenter | ( | ) |
This only has effect if the integral is ignoring the beam center as a whole.
Definition at line 184 of file WorkspaceBoundingBox.cpp.
References calculateRadiusX(), calculateRadiusY(), m_beamRadiusSq, and m_ignoreDirectBeam.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
|
private |
Definition at line 73 of file WorkspaceBoundingBox.cpp.
References index, and m_workspace.
Referenced by isValidIndex(), and updatePositionAndReturnCount().
| double Mantid::Algorithms::WorkspaceBoundingBox::distanceFromPrevious | ( | ) | const |
Definition at line 175 of file WorkspaceBoundingBox.cpp.
References m_centerXPosCurr, m_centerXPosPrev, m_centerYPosCurr, and m_centerYPosPrev.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
| void Mantid::Algorithms::WorkspaceBoundingBox::findNewCenterPosition | ( | ) |
Definition at line 54 of file WorkspaceBoundingBox.cpp.
References includeInIntegration(), isValidIndex(), m_numSpectra, m_workspace, normalizePosition(), resetIntermediatePosition(), symmetricRegionContainsPoint(), updatePositionAndReturnCount(), Mantid::Kernel::V3D::X(), and Mantid::Kernel::V3D::Y().
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
|
inline |
Definition at line 31 of file WorkspaceBoundingBox.h.
References m_centerXPosPrev.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
|
inline |
Definition at line 32 of file WorkspaceBoundingBox.h.
References m_centerYPosPrev.
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
|
private |
Definition at line 162 of file WorkspaceBoundingBox.cpp.
References m_beamRadiusSq, m_centerXPosPrev, m_centerYPosPrev, m_ignoreDirectBeam, m_integrationRadiusSq, and position.
|
private |
Checks to see if spectrum at index should be included in the integration.
| index | :: index of spectrum data |
Definition at line 158 of file WorkspaceBoundingBox.cpp.
References includeInIntegration(), and position.
Referenced by findNewCenterPosition(), includeInIntegration(), and initOverallRangeAndFindFirstCenter().
|
private |
Definition at line 35 of file WorkspaceBoundingBox.cpp.
References includeInIntegration(), isValidIndex(), m_numSpectra, normalizePosition(), resetIntermediatePosition(), updateMinMax(), and updatePositionAndReturnCount().
Referenced by WorkspaceBoundingBox().
|
private |
Performs checks on the spectrum located at index to determine if it is acceptable to be operated on.
| index | :: index of spectrum data |
Definition at line 103 of file WorkspaceBoundingBox.cpp.
References countsValue(), Mantid::Algorithms::g_log, Mantid::API::SpectrumInfo::hasDetectors(), index, Mantid::API::SpectrumInfo::isMonitor(), m_spectrumInfo, and Mantid::Kernel::Logger::warning().
Referenced by findNewCenterPosition(), and initOverallRangeAndFindFirstCenter().
|
private |
Perform normalization on x/y coords over given values.
Definition at line 218 of file WorkspaceBoundingBox.cpp.
References m_centerXPosCurr, and m_centerYPosCurr.
Referenced by findNewCenterPosition(), and initOverallRangeAndFindFirstCenter().
|
private |
Definition at line 27 of file WorkspaceBoundingBox.cpp.
References index, m_spectrumInfo, and Mantid::API::SpectrumInfo::position().
| void Mantid::Algorithms::WorkspaceBoundingBox::prepareCenterCalculation | ( | ) |
Copy the current center to the previous and update the x/y range for overall integration.
Definition at line 198 of file WorkspaceBoundingBox.cpp.
References calculateRadiusX(), calculateRadiusY(), m_centerXPosCurr, m_centerYPosCurr, setBounds(), and setCenterPrev().
Referenced by Mantid::Algorithms::FindCenterOfMassPosition2::findCenterOfMass().
|
private |
Definition at line 77 of file WorkspaceBoundingBox.cpp.
References m_centerXPosCurr, and m_centerYPosCurr.
Referenced by findNewCenterPosition(), and initOverallRangeAndFindFirstCenter().
|
private |
Update the symmetric (in x and y separately) range of space that is symmetric around the beam center.
Definition at line 90 of file WorkspaceBoundingBox.cpp.
References m_xBoxMax, m_xBoxMin, m_yBoxMax, and m_yBoxMin.
Referenced by prepareCenterCalculation().
|
private |
Definition at line 82 of file WorkspaceBoundingBox.cpp.
References m_centerXPosPrev, m_centerYPosPrev, Mantid::Geometry::x, and Mantid::Geometry::y.
Referenced by prepareCenterCalculation(), and WorkspaceBoundingBox().
|
private |
Checks if a given x/y coord is within the bounding box.
| x | :: x coordinate |
| y | :: y coordinate |
Definition at line 229 of file WorkspaceBoundingBox.cpp.
References m_xBoxMax, m_xBoxMin, m_yBoxMin, and Mantid::Geometry::x.
Referenced by findNewCenterPosition().
|
private |
Compare current mins and maxs to the coordinates of the spectrum at index expnd mins and maxs to include this spectrum.
| index | :: index of spectrum data |
Definition at line 143 of file WorkspaceBoundingBox.cpp.
References m_xPosMax, m_xPosMin, m_yPosMax, m_yPosMin, position, Mantid::Geometry::x, and Mantid::Geometry::y.
Referenced by initOverallRangeAndFindFirstCenter().
|
private |
Sets member variables x/y to new x/y based on spectrum info and historgram data at the given index.
| index | :: index of spectrum data |
Definition at line 128 of file WorkspaceBoundingBox.cpp.
References countsValue(), m_centerXPosCurr, m_centerYPosCurr, and position.
Referenced by findNewCenterPosition(), and initOverallRangeAndFindFirstCenter().
|
private |
Definition at line 61 of file WorkspaceBoundingBox.h.
Referenced by centerOfMassWithinBeamCenter(), and includeInIntegration().
|
private |
Definition at line 63 of file WorkspaceBoundingBox.h.
Referenced by calculateRadiusX(), distanceFromPrevious(), normalizePosition(), prepareCenterCalculation(), resetIntermediatePosition(), and updatePositionAndReturnCount().
|
private |
Definition at line 65 of file WorkspaceBoundingBox.h.
Referenced by distanceFromPrevious(), getCenterX(), includeInIntegration(), and setCenterPrev().
|
private |
Definition at line 64 of file WorkspaceBoundingBox.h.
Referenced by calculateRadiusY(), distanceFromPrevious(), normalizePosition(), prepareCenterCalculation(), resetIntermediatePosition(), and updatePositionAndReturnCount().
|
private |
Definition at line 66 of file WorkspaceBoundingBox.h.
Referenced by distanceFromPrevious(), getCenterY(), includeInIntegration(), and setCenterPrev().
|
private |
Definition at line 62 of file WorkspaceBoundingBox.h.
Referenced by centerOfMassWithinBeamCenter(), and includeInIntegration().
|
private |
Definition at line 60 of file WorkspaceBoundingBox.h.
Referenced by includeInIntegration().
|
private |
Definition at line 59 of file WorkspaceBoundingBox.h.
Referenced by findNewCenterPosition(), initOverallRangeAndFindFirstCenter(), and WorkspaceBoundingBox().
|
private |
Definition at line 58 of file WorkspaceBoundingBox.h.
Referenced by isValidIndex(), position(), and WorkspaceBoundingBox().
|
private |
Definition at line 57 of file WorkspaceBoundingBox.h.
Referenced by countsValue(), findNewCenterPosition(), and WorkspaceBoundingBox().
|
private |
Definition at line 74 of file WorkspaceBoundingBox.h.
Referenced by setBounds(), and symmetricRegionContainsPoint().
|
private |
Definition at line 73 of file WorkspaceBoundingBox.h.
Referenced by setBounds(), and symmetricRegionContainsPoint().
|
private |
Definition at line 69 of file WorkspaceBoundingBox.h.
Referenced by calculateRadiusX(), and updateMinMax().
|
private |
Definition at line 68 of file WorkspaceBoundingBox.h.
Referenced by calculateRadiusX(), and updateMinMax().
|
private |
Definition at line 76 of file WorkspaceBoundingBox.h.
Referenced by setBounds().
|
private |
Definition at line 75 of file WorkspaceBoundingBox.h.
Referenced by setBounds(), and symmetricRegionContainsPoint().
|
private |
Definition at line 71 of file WorkspaceBoundingBox.h.
Referenced by calculateRadiusY(), and updateMinMax().
|
private |
Definition at line 70 of file WorkspaceBoundingBox.h.
Referenced by calculateRadiusY(), and updateMinMax().