Mantid
|
Geometry::DetectorInfo is an intermediate step towards a DetectorInfo that is part of Instrument-2.0. More...
#include <DetectorInfo.h>
Public Member Functions | |
double | azimuthal (const size_t index) const |
double | azimuthal (const std::pair< size_t, size_t > &index) const |
DetectorInfoIterator< DetectorInfo > | begin () |
const DetectorInfoIterator< const DetectorInfo > | cbegin () const |
const DetectorInfoIterator< const DetectorInfo > | cend () const |
void | clearMaskFlags () |
Sets all mask flags to false (unmasked). More... | |
const Geometry::IDetector & | detector (const size_t index) const |
Return a const reference to the detector with given index. More... | |
const std::vector< detid_t > & | detectorIDs () const |
Returns a sorted vector of all detector IDs. More... | |
DetectorInfo (const DetectorInfo &other) | |
Copy constructor. More... | |
DetectorInfo (std::unique_ptr< Beamline::DetectorInfo > detectorInfo, std::shared_ptr< const Geometry::Instrument > instrument, std::shared_ptr< const std::vector< detid_t > > detectorIds, std::shared_ptr< const std::unordered_map< detid_t, size_t > > detIdToIndexMap) | |
Construct DetectorInfo based on an Instrument. More... | |
double | difcUncalibrated (const size_t index) const |
std::tuple< double, double, double > | diffractometerConstants (const size_t index, std::vector< detid_t > &calibratedDets, std::vector< detid_t > &uncalibratedDets) const |
DetectorInfoIterator< DetectorInfo > | end () |
std::pair< double, double > | geographicalAngles (const size_t index) const |
std::pair< double, double > | geographicalAngles (const std::pair< size_t, size_t > &index) const |
bool | hasMaskedDetectors () const |
Returns true if there are masked detectors. More... | |
size_t | indexOf (const detid_t id) const |
Returns the index of the detector with the given detector ID. More... | |
bool | isEquivalent (const DetectorInfo &other) const |
Returns true if the content of this is equivalent to the content of other. More... | |
bool | isMasked (const size_t index) const |
Returns true if the detector is masked. More... | |
bool | isMasked (const std::pair< size_t, size_t > &index) const |
Returns true if the detector is masked. More... | |
bool | isMonitor (const size_t index) const |
Returns true if the detector is a monitor. More... | |
bool | isMonitor (const std::pair< size_t, size_t > &index) const |
Returns true if the detector is a monitor. More... | |
bool | isScanning () const |
Returns true if the beamline has scanning detectors. More... | |
double | l1 () const |
Returns L1 (distance from source to sample). More... | |
double | l2 (const size_t index) const |
Returns L2 (distance from sample to spectrum). More... | |
double | l2 (const std::pair< size_t, size_t > &index) const |
Returns L2 (distance from sample to spectrum). More... | |
DetectorInfo & | operator= (const DetectorInfo &rhs) |
Assigns the contents of the non-wrapping part of rhs to this. More... | |
Kernel::V3D | position (const size_t index) const |
Returns the position of the detector with given index. More... | |
Kernel::V3D | position (const std::pair< size_t, size_t > &index) const |
Returns the position of the detector with given index. More... | |
Kernel::Quat | rotation (const size_t index) const |
Returns the rotation of the detector with given index. More... | |
Kernel::Quat | rotation (const std::pair< size_t, size_t > &index) const |
Returns the rotation of the detector with given index. More... | |
Kernel::V3D | samplePosition () const |
Returns the sample position. More... | |
size_t | scanCount () const |
Returns the scan count of the detector with given detector index. More... | |
const std::vector< std::pair< Types::Core::DateAndTime, Types::Core::DateAndTime > > | scanIntervals () const |
Returns the scan interval of the detector with given index. More... | |
size_t | scanSize () const |
void | setMasked (const size_t index, bool masked) |
Set the mask flag of the detector with given index. Not thread safe. More... | |
void | setMasked (const std::pair< size_t, size_t > &index, bool masked) |
Set the mask flag of the detector with given index. Not thread safe. More... | |
void | setPosition (const size_t index, const Kernel::V3D &position) |
Set the absolute position of the detector with given index. Not thread safe. More... | |
void | setPosition (const std::pair< size_t, size_t > &index, const Kernel::V3D &position) |
Set the absolute position of the detector with given index. Not thread safe. More... | |
void | setRotation (const size_t index, const Kernel::Quat &rotation) |
Set the absolute rotation of the detector with given index. Not thread safe. More... | |
void | setRotation (const std::pair< size_t, size_t > &index, const Kernel::Quat &rotation) |
Set the absolute rotation of the detector with given index. Not thread safe. More... | |
double | signedTwoTheta (const size_t index) const |
Returns signed 2 theta (signed scattering angle w.r.t. to beam direction). More... | |
double | signedTwoTheta (const std::pair< size_t, size_t > &index) const |
Returns signed 2 theta (signed scattering angle w.r.t. to beam direction). More... | |
size_t | size () const |
Returns the size of the DetectorInfo, i.e., the number of detectors in the instrument. More... | |
Kernel::V3D | sourcePosition () const |
Returns the source position. More... | |
double | twoTheta (const size_t index) const |
Returns 2 theta (scattering angle w.r.t. to beam direction). More... | |
double | twoTheta (const std::pair< size_t, size_t > &index) const |
Returns 2 theta (scattering angle w.r.t. to beam direction). More... | |
~DetectorInfo () | |
Private Member Functions | |
void | clearPositionDependentParameters (const size_t index) |
const Geometry::IDetector & | getDetector (const size_t index) const |
std::shared_ptr< const Geometry::IDetector > | getDetectorPtr (const size_t index) const |
Helper used by SpectrumInfo. More... | |
Private Attributes | |
std::shared_ptr< const std::vector< detid_t > > | m_detectorIDs |
std::unique_ptr< Beamline::DetectorInfo > | m_detectorInfo |
Pointer to the actual DetectorInfo object (non-wrapping part). More... | |
std::shared_ptr< const std::unordered_map< detid_t, size_t > > | m_detIDToIndex |
std::shared_ptr< const Geometry::Instrument > | m_instrument |
std::vector< std::shared_ptr< const Geometry::IDetector > > | m_lastDetector |
std::vector< size_t > | m_lastIndex |
Friends | |
class | API::SpectrumInfo |
class | Instrument |
Geometry::DetectorInfo is an intermediate step towards a DetectorInfo that is part of Instrument-2.0.
The aim is to provide a nearly identical interface such that we can start refactoring existing code before the full-blown implementation of Instrument-2.0 is available.
DetectorInfo provides easy access to commonly used parameters of individual detectors, such as mask and monitor flags, L1, L2, and 2-theta.
This class is thread safe for read operations (const access) with OpenMP BUT NOT WITH ANY OTHER THREADING LIBRARY such as Poco threads or Intel TBB. There are no thread-safety guarantees for write operations (non-const access). Reads concurrent with writes or concurrent writes are not allowed.
Definition at line 49 of file DetectorInfo.h.
Mantid::Geometry::DetectorInfo::DetectorInfo | ( | std::unique_ptr< Beamline::DetectorInfo > | detectorInfo, |
std::shared_ptr< const Geometry::Instrument > | instrument, | ||
std::shared_ptr< const std::vector< detid_t > > | detectorIds, | ||
std::shared_ptr< const std::unordered_map< detid_t, size_t > > | detIdToIndexMap | ||
) |
Construct DetectorInfo based on an Instrument.
The Instrument reference instrument
must be the parameterized instrument obtained from a workspace. Detector ID -> index map provided as constructor argument.
Definition at line 26 of file DetectorInfo.cpp.
References m_detectorIDs, m_detIDToIndex, and m_instrument.
Mantid::Geometry::DetectorInfo::DetectorInfo | ( | const DetectorInfo & | other | ) |
Copy constructor.
Use with EXTREME CARE.
Public copy should not be used since proper links between DetectorInfo and ComponentInfo must be set up.
Definition at line 48 of file DetectorInfo.cpp.
|
default |
double Mantid::Geometry::DetectorInfo::azimuthal | ( | const size_t | index | ) | const |
Definition at line 209 of file DetectorInfo.cpp.
References index, isMonitor(), m_instrument, Mantid::Kernel::normalize(), position, samplePosition(), and sourcePosition().
Referenced by export_DetectorInfo().
double Mantid::Geometry::DetectorInfo::azimuthal | ( | const std::pair< size_t, size_t > & | index | ) | const |
Definition at line 240 of file DetectorInfo.cpp.
References index, isMonitor(), m_instrument, Mantid::Kernel::normalize(), position, samplePosition(), and sourcePosition().
DetectorInfoIt Mantid::Geometry::DetectorInfo::begin | ( | ) |
Definition at line 451 of file DetectorInfo.cpp.
References size().
const DetectorInfoConstIt Mantid::Geometry::DetectorInfo::cbegin | ( | ) | const |
Definition at line 429 of file DetectorInfo.cpp.
References size().
const DetectorInfoConstIt Mantid::Geometry::DetectorInfo::cend | ( | ) | const |
Definition at line 431 of file DetectorInfo.cpp.
References size().
void Mantid::Geometry::DetectorInfo::clearMaskFlags | ( | ) |
Sets all mask flags to false (unmasked).
Not thread safe.
This method was introduced to help with refactoring and may be removed in the future.
Definition at line 353 of file DetectorInfo.cpp.
References m_detectorInfo, and size().
Referenced by Mantid::DataObjects::MaskWorkspace::clearMask(), and export_DetectorInfo().
|
private |
Definition at line 373 of file DetectorInfo.cpp.
References index, m_detectorIDs, and m_instrument.
Referenced by setPosition().
const Geometry::IDetector & Mantid::Geometry::DetectorInfo::detector | ( | const size_t | index | ) | const |
Return a const reference to the detector with given index.
Definition at line 392 of file DetectorInfo.cpp.
References getDetector(), and index.
Referenced by Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::calculateE1(), Mantid::MDAlgorithms::IntegrateEllipsoidsV1::calculateE1(), Mantid::MDAlgorithms::IntegrateEllipsoidsV2::calculateE1(), Mantid::MDAlgorithms::IntegratePeaksMD2::calculateE1(), Mantid::API::DetectorSearcher::checkInteceptWithNeighbours(), Mantid::Algorithms::ConvertSpectrumAxis2::getEfixed(), Mantid::Algorithms::SolidAngleHelpers::GenericShape::solidAngle(), and Mantid::DataHandling::LoadDetectorInfo::updateParameterMap().
const std::vector< detid_t > & Mantid::Geometry::DetectorInfo::detectorIDs | ( | ) | const |
Returns a sorted vector of all detector IDs.
Definition at line 404 of file DetectorInfo.cpp.
References m_detectorIDs.
Referenced by Mantid::DataHandling::bankOffsets(), export_DetectorInfo(), Mantid::Algorithms::CreateLogTimeCorrection::generateCorrectionTable(), Mantid::Algorithms::ConvertSpectrumAxis2::getEfixed(), operator=(), Mantid::Algorithms::SparseWorkspace::SparseWorkspace(), and Mantid::Algorithms::CreateLogTimeCorrection::writeCorrectionToFile().
double Mantid::Geometry::DetectorInfo::difcUncalibrated | ( | const size_t | index | ) | const |
Definition at line 297 of file DetectorInfo.cpp.
References index, l1(), Mantid::Kernel::l2, Mantid::Kernel::Units::tofToDSpacingFactor(), and Mantid::Kernel::twoTheta.
Referenced by diffractometerConstants().
std::tuple< double, double, double > Mantid::Geometry::DetectorInfo::diffractometerConstants | ( | const size_t | index, |
std::vector< detid_t > & | calibratedDets, | ||
std::vector< detid_t > & | uncalibratedDets | ||
) | const |
Definition at line 271 of file DetectorInfo.cpp.
References Mantid::Kernel::difa, Mantid::Kernel::difc, difcUncalibrated(), index, m_detectorIDs, m_instrument, and Mantid::Kernel::tzero.
Referenced by Mantid::API::SpectrumInfo::diffractometerConstants().
DetectorInfoIt Mantid::Geometry::DetectorInfo::end | ( | ) |
Definition at line 454 of file DetectorInfo.cpp.
References size().
std::pair< double, double > Mantid::Geometry::DetectorInfo::geographicalAngles | ( | const size_t | index | ) | const |
Definition at line 301 of file DetectorInfo.cpp.
References index, m_instrument, position, and samplePosition().
Referenced by Mantid::API::SpectrumInfo::geographicalAngles().
std::pair< double, double > Mantid::Geometry::DetectorInfo::geographicalAngles | ( | const std::pair< size_t, size_t > & | index | ) | const |
Definition at line 312 of file DetectorInfo.cpp.
References index, m_instrument, position, and samplePosition().
|
private |
Definition at line 433 of file DetectorInfo.cpp.
References index, m_detectorIDs, m_instrument, m_lastDetector, m_lastIndex, and PARALLEL_THREAD_NUMBER.
Referenced by detector(), and getDetectorPtr().
|
private |
Helper used by SpectrumInfo.
Definition at line 444 of file DetectorInfo.cpp.
References getDetector(), index, m_lastDetector, and PARALLEL_THREAD_NUMBER.
Referenced by Mantid::API::SpectrumInfo::getDetector().
bool Mantid::Geometry::DetectorInfo::hasMaskedDetectors | ( | ) | const |
Returns true if there are masked detectors.
Definition at line 101 of file DetectorInfo.cpp.
References m_detectorInfo.
Referenced by export_DetectorInfo().
std::size_t Mantid::Geometry::DetectorInfo::indexOf | ( | const detid_t | id | ) | const |
Returns the index of the detector with the given detector ID.
This will throw an out of range exception if the detector does not exist.
Definition at line 406 of file DetectorInfo.cpp.
References m_detIDToIndex.
Referenced by Mantid::Crystal::SaveIsawPeaks::bankMasked(), Mantid::API::ExperimentInfo::cacheDefaultDetectorGrouping(), Mantid::Algorithms::ConvertDiffCal::exec(), export_DetectorInfo(), Mantid::DataObjects::MaskWorkspace::isMasked(), Mantid::API::DetectorSearcher::searchUsingInstrumentRayTracing(), and Mantid::API::ExperimentInfo::setDetectorGrouping().
bool Mantid::Geometry::DetectorInfo::isEquivalent | ( | const DetectorInfo & | other | ) | const |
Returns true if the content of this is equivalent to the content of other.
Here "equivalent" implies equality of all member, except for positions and rotations, which are treated specially:
Definition at line 77 of file DetectorInfo.cpp.
References m_detectorInfo.
Referenced by export_DetectorInfo().
bool Mantid::Geometry::DetectorInfo::isMasked | ( | const size_t | index | ) | const |
Returns true if the detector is masked.
Definition at line 95 of file DetectorInfo.cpp.
References index, and m_detectorInfo.
Referenced by Mantid::Crystal::SaveIsawPeaks::bankMasked(), Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::calculateE1(), Mantid::MDAlgorithms::IntegrateEllipsoidsV1::calculateE1(), Mantid::MDAlgorithms::IntegrateEllipsoidsV2::calculateE1(), Mantid::MDAlgorithms::IntegratePeaksMD2::calculateE1(), Mantid::API::DetectorSearcher::createDetectorCache(), Mantid::Algorithms::ConvertDiffCal::exec(), export_DetectorInfo(), Mantid::DataObjects::MaskWorkspace::isMasked(), and Mantid::API::DetectorSearcher::searchUsingInstrumentRayTracing().
bool Mantid::Geometry::DetectorInfo::isMasked | ( | const std::pair< size_t, size_t > & | index | ) | const |
Returns true if the detector is masked.
Definition at line 98 of file DetectorInfo.cpp.
References index, and m_detectorInfo.
bool Mantid::Geometry::DetectorInfo::isMonitor | ( | const size_t | index | ) | const |
Returns true if the detector is a monitor.
Definition at line 89 of file DetectorInfo.cpp.
References index, and m_detectorInfo.
Referenced by azimuthal(), Mantid::DataObjects::ScanningWorkspaceBuilder::buildRelativeRotationsForScans(), Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::calculateE1(), Mantid::MDAlgorithms::IntegrateEllipsoidsV1::calculateE1(), Mantid::MDAlgorithms::IntegrateEllipsoidsV2::calculateE1(), Mantid::MDAlgorithms::IntegratePeaksMD2::calculateE1(), Mantid::API::DetectorSearcher::createDetectorCache(), export_DetectorInfo(), Mantid::Algorithms::CreateLogTimeCorrection::generateCorrectionTable(), l2(), Mantid::API::DetectorSearcher::searchUsingInstrumentRayTracing(), Mantid::DataHandling::UpdateInstrumentFromFile::setDetectorPosition(), signedTwoTheta(), twoTheta(), and Mantid::Algorithms::CreateLogTimeCorrection::writeCorrectionToFile().
bool Mantid::Geometry::DetectorInfo::isMonitor | ( | const std::pair< size_t, size_t > & | index | ) | const |
Returns true if the detector is a monitor.
Definition at line 92 of file DetectorInfo.cpp.
References index, and m_detectorInfo.
bool Mantid::Geometry::DetectorInfo::isScanning | ( | ) | const |
Returns true if the beamline has scanning detectors.
Definition at line 86 of file DetectorInfo.cpp.
References m_detectorInfo.
Referenced by Mantid::API::SpectrumInfo::diffractometerConstants().
double Mantid::Geometry::DetectorInfo::l1 | ( | ) | const |
Returns L1 (distance from source to sample).
Definition at line 401 of file DetectorInfo.cpp.
References m_detectorInfo.
Referenced by Mantid::Algorithms::CreateLogTimeCorrection::calculateCorrections(), difcUncalibrated(), export_DetectorInfo(), Mantid::API::SpectrumInfo::l1(), l2(), and Mantid::Algorithms::CreateLogTimeCorrection::logGeometryInformation().
double Mantid::Geometry::DetectorInfo::l2 | ( | const size_t | index | ) | const |
Returns L2 (distance from sample to spectrum).
For monitors this is defined such that L1+L2 = source-detector distance, i.e., for a monitor in the beamline between source and sample L2 is negative.
Definition at line 108 of file DetectorInfo.cpp.
References index, isMonitor(), l1(), position, samplePosition(), and sourcePosition().
Referenced by Mantid::Algorithms::CreateLogTimeCorrection::calculateCorrections(), export_DetectorInfo(), Mantid::Algorithms::CreateLogTimeCorrection::generateCorrectionTable(), Mantid::Algorithms::SolidAngleHelpers::Rectangle::solidAngle(), Mantid::Algorithms::SolidAngleHelpers::Tube::solidAngle(), and Mantid::Algorithms::SolidAngleHelpers::Wing::solidAngle().
double Mantid::Geometry::DetectorInfo::l2 | ( | const std::pair< size_t, size_t > & | index | ) | const |
Returns L2 (distance from sample to spectrum).
For monitors this is defined such that L1+L2 = source-detector distance, i.e., for a monitor in the beamline between source and sample L2 is negative.
Definition at line 120 of file DetectorInfo.cpp.
References index, isMonitor(), l1(), position, samplePosition(), and sourcePosition().
DetectorInfo & Mantid::Geometry::DetectorInfo::operator= | ( | const DetectorInfo & | rhs | ) |
Assigns the contents of the non-wrapping part of rhs
to this.
Definition at line 54 of file DetectorInfo.cpp.
References detectorIDs(), m_detectorInfo, and rhs.
Kernel::V3D Mantid::Geometry::DetectorInfo::position | ( | const size_t | index | ) | const |
Returns the position of the detector with given index.
Definition at line 324 of file DetectorInfo.cpp.
References index, m_detectorInfo, and Mantid::Kernel::toV3D().
Referenced by Mantid::DataObjects::ScanningWorkspaceBuilder::buildRelativeRotationsForScans(), Mantid::API::DetectorSearcher::createDetectorCache(), export_DetectorInfo(), Mantid::Algorithms::SolidAngleHelpers::AlphaAngleCalculator::getAlpha(), Mantid::Algorithms::SolidAngleHelpers::Rectangle::solidAngle(), and Mantid::Algorithms::SolidAngleHelpers::Wing::solidAngle().
Kernel::V3D Mantid::Geometry::DetectorInfo::position | ( | const std::pair< size_t, size_t > & | index | ) | const |
Returns the position of the detector with given index.
Definition at line 327 of file DetectorInfo.cpp.
References index, m_detectorInfo, and Mantid::Kernel::toV3D().
Kernel::Quat Mantid::Geometry::DetectorInfo::rotation | ( | const size_t | index | ) | const |
Returns the rotation of the detector with given index.
Definition at line 332 of file DetectorInfo.cpp.
References index, m_detectorInfo, and Mantid::Kernel::toQuat().
Referenced by Mantid::DataObjects::ScanningWorkspaceBuilder::buildRelativeRotationsForScans(), and export_DetectorInfo().
Kernel::Quat Mantid::Geometry::DetectorInfo::rotation | ( | const std::pair< size_t, size_t > & | index | ) | const |
Returns the rotation of the detector with given index.
Definition at line 337 of file DetectorInfo.cpp.
References index, m_detectorInfo, and Mantid::Kernel::toQuat().
Kernel::V3D Mantid::Geometry::DetectorInfo::samplePosition | ( | ) | const |
Returns the sample position.
Definition at line 398 of file DetectorInfo.cpp.
References m_detectorInfo, and Mantid::Kernel::toV3D().
Referenced by azimuthal(), Mantid::API::DetectorSearcher::checkInteceptWithNeighbours(), geographicalAngles(), l2(), Mantid::Algorithms::CreateLogTimeCorrection::logGeometryInformation(), Mantid::API::SpectrumInfo::samplePosition(), signedTwoTheta(), and twoTheta().
size_t Mantid::Geometry::DetectorInfo::scanCount | ( | ) | const |
Returns the scan count of the detector with given detector index.
Definition at line 418 of file DetectorInfo.cpp.
References m_detectorInfo.
Referenced by Mantid::DataObjects::ScanningWorkspaceBuilder::buildRelativeRotationsForScans(), and Mantid::Algorithms::MergeRuns::buildScanIntervals().
const std::vector< std::pair< Types::Core::DateAndTime, Types::Core::DateAndTime > > Mantid::Geometry::DetectorInfo::scanIntervals | ( | ) | const |
Returns the scan interval of the detector with given index.
The interval start and end values would typically correspond to nanoseconds since 1990, as in Types::Core::DateAndTime.
Definition at line 424 of file DetectorInfo.cpp.
References m_detectorInfo.
Referenced by Mantid::Algorithms::MergeRuns::buildScanIntervals().
size_t Mantid::Geometry::DetectorInfo::scanSize | ( | ) | const |
References Mantid::Kernel::l2, and Mantid::Kernel::twoTheta.
void Mantid::Geometry::DetectorInfo::setMasked | ( | const size_t | index, |
bool | masked | ||
) |
Set the mask flag of the detector with given index. Not thread safe.
Definition at line 342 of file DetectorInfo.cpp.
References index, and m_detectorInfo.
Referenced by export_DetectorInfo(), Mantid::API::ExperimentInfo::populateWithParameter(), Mantid::API::ExperimentInfo::readParameterMap(), and Mantid::API::SpectrumInfo::setMasked().
void Mantid::Geometry::DetectorInfo::setMasked | ( | const std::pair< size_t, size_t > & | index, |
bool | masked | ||
) |
Set the mask flag of the detector with given index. Not thread safe.
Definition at line 345 of file DetectorInfo.cpp.
References index, and m_detectorInfo.
void Mantid::Geometry::DetectorInfo::setPosition | ( | const size_t | index, |
const Kernel::V3D & | position | ||
) |
Set the absolute position of the detector with given index. Not thread safe.
Definition at line 359 of file DetectorInfo.cpp.
References clearPositionDependentParameters(), index, m_detectorInfo, position, and Mantid::Kernel::toVector3d().
Referenced by Mantid::DataObjects::ScanningWorkspaceBuilder::buildPositions(), Mantid::DataObjects::ScanningWorkspaceBuilder::buildRelativeRotationsForScans(), Mantid::DataHandling::UpdateInstrumentFromFile::setDetectorPosition(), and Mantid::DataHandling::LoadDetectorInfo::updateParameterMap().
void Mantid::Geometry::DetectorInfo::setPosition | ( | const std::pair< size_t, size_t > & | index, |
const Kernel::V3D & | position | ||
) |
Set the absolute position of the detector with given index. Not thread safe.
Definition at line 366 of file DetectorInfo.cpp.
References clearPositionDependentParameters(), index, m_detectorInfo, position, and Mantid::Kernel::toVector3d().
void Mantid::Geometry::DetectorInfo::setRotation | ( | const size_t | index, |
const Kernel::Quat & | rotation | ||
) |
Set the absolute rotation of the detector with given index. Not thread safe.
Definition at line 382 of file DetectorInfo.cpp.
References index, m_detectorInfo, rotation, and Mantid::Kernel::toQuaterniond().
Referenced by Mantid::DataObjects::ScanningWorkspaceBuilder::buildRelativeRotationsForScans(), and Mantid::DataObjects::ScanningWorkspaceBuilder::buildRotations().
void Mantid::Geometry::DetectorInfo::setRotation | ( | const std::pair< size_t, size_t > & | index, |
const Kernel::Quat & | rotation | ||
) |
Set the absolute rotation of the detector with given index. Not thread safe.
Definition at line 387 of file DetectorInfo.cpp.
References index, m_detectorInfo, rotation, and Mantid::Kernel::toQuaterniond().
double Mantid::Geometry::DetectorInfo::signedTwoTheta | ( | const size_t | index | ) | const |
Returns signed 2 theta (signed scattering angle w.r.t. to beam direction).
Definition at line 160 of file DetectorInfo.cpp.
References index, isMonitor(), m_instrument, position, samplePosition(), and sourcePosition().
double Mantid::Geometry::DetectorInfo::signedTwoTheta | ( | const std::pair< size_t, size_t > & | index | ) | const |
Returns signed 2 theta (signed scattering angle w.r.t. to beam direction).
Definition at line 185 of file DetectorInfo.cpp.
References index, isMonitor(), m_instrument, position, samplePosition(), and sourcePosition().
size_t Mantid::Geometry::DetectorInfo::size | ( | ) | const |
Returns the size of the DetectorInfo, i.e., the number of detectors in the instrument.
Definition at line 83 of file DetectorInfo.cpp.
References m_detectorIDs.
Referenced by begin(), Mantid::DataObjects::ScanningWorkspaceBuilder::buildRelativeRotationsForScans(), Mantid::Algorithms::CreateLogTimeCorrection::calculateCorrections(), Mantid::MDAlgorithms::IntegrateEllipsoidsTwoStep::calculateE1(), Mantid::MDAlgorithms::IntegrateEllipsoidsV1::calculateE1(), Mantid::MDAlgorithms::IntegrateEllipsoidsV2::calculateE1(), Mantid::MDAlgorithms::IntegratePeaksMD2::calculateE1(), cbegin(), cend(), clearMaskFlags(), Mantid::API::DetectorSearcher::createDetectorCache(), end(), export_DetectorInfo(), Mantid::Algorithms::CreateLogTimeCorrection::generateCorrectionTable(), and Mantid::Algorithms::CreateLogTimeCorrection::logGeometryInformation().
Kernel::V3D Mantid::Geometry::DetectorInfo::sourcePosition | ( | ) | const |
Returns the source position.
Definition at line 395 of file DetectorInfo.cpp.
References m_detectorInfo, and Mantid::Kernel::toV3D().
Referenced by azimuthal(), l2(), Mantid::Algorithms::CreateLogTimeCorrection::logGeometryInformation(), signedTwoTheta(), Mantid::API::SpectrumInfo::sourcePosition(), and twoTheta().
double Mantid::Geometry::DetectorInfo::twoTheta | ( | const size_t | index | ) | const |
Returns 2 theta (scattering angle w.r.t. to beam direction).
Definition at line 128 of file DetectorInfo.cpp.
References index, isMonitor(), position, samplePosition(), and sourcePosition().
Referenced by export_DetectorInfo().
double Mantid::Geometry::DetectorInfo::twoTheta | ( | const std::pair< size_t, size_t > & | index | ) | const |
Returns 2 theta (scattering angle w.r.t. to beam direction).
Definition at line 144 of file DetectorInfo.cpp.
References index, isMonitor(), position, samplePosition(), and sourcePosition().
|
friend |
Definition at line 113 of file DetectorInfo.h.
|
friend |
Definition at line 114 of file DetectorInfo.h.
|
private |
Definition at line 130 of file DetectorInfo.h.
Referenced by clearPositionDependentParameters(), detectorIDs(), DetectorInfo(), diffractometerConstants(), getDetector(), and size().
|
private |
Pointer to the actual DetectorInfo object (non-wrapping part).
Definition at line 127 of file DetectorInfo.h.
Referenced by clearMaskFlags(), hasMaskedDetectors(), isEquivalent(), isMasked(), isMonitor(), isScanning(), l1(), operator=(), position(), rotation(), samplePosition(), scanCount(), scanIntervals(), setMasked(), setPosition(), setRotation(), and sourcePosition().
|
private |
Definition at line 131 of file DetectorInfo.h.
Referenced by DetectorInfo(), and indexOf().
|
private |
Definition at line 129 of file DetectorInfo.h.
Referenced by azimuthal(), clearPositionDependentParameters(), DetectorInfo(), diffractometerConstants(), geographicalAngles(), getDetector(), and signedTwoTheta().
|
mutableprivate |
Definition at line 133 of file DetectorInfo.h.
Referenced by getDetector(), and getDetectorPtr().
|
mutableprivate |
Definition at line 134 of file DetectorInfo.h.
Referenced by getDetector().