-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/feature/9389_correct_positions_r…
…efl'
- Loading branch information
Showing
5 changed files
with
840 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#ifndef MANTID_ALGORITHMS_SPECULARREFLECTIONPOSITIONCORRECT_H_ | ||
#define MANTID_ALGORITHMS_SPECULARREFLECTIONPOSITIONCORRECT_H_ | ||
|
||
#include "MantidKernel/System.h" | ||
#include "MantidAPI/Algorithm.h" | ||
#include "MantidAPI/MatrixWorkspace.h" | ||
#include "MantidGeometry/Instrument.h" | ||
#include "MantidGeometry/IComponent.h" | ||
#include "MantidGeometry/IDetector.h" | ||
|
||
namespace Mantid | ||
{ | ||
namespace Algorithms | ||
{ | ||
|
||
/** SpecularReflectionPositionCorrect : Algorithm to perform vertical position corrections based on the specular reflection condition. | ||
Copyright © 2014 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory | ||
This file is part of Mantid. | ||
Mantid is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
Mantid is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
File change history is stored at: <https://github.com/mantidproject/mantid> | ||
Code Documentation is available at: <http://doxygen.mantidproject.org> | ||
*/ | ||
class DLLExport SpecularReflectionPositionCorrect: public API::Algorithm | ||
{ | ||
public: | ||
SpecularReflectionPositionCorrect(); | ||
virtual ~SpecularReflectionPositionCorrect(); | ||
|
||
virtual const std::string name() const; | ||
virtual int version() const; | ||
virtual const std::string category() const; | ||
|
||
private: | ||
virtual void initDocs(); | ||
void init(); | ||
void exec(); | ||
|
||
/// Get the surface sample component | ||
Mantid::Geometry::IComponent_const_sptr getSurfaceSampleComponent( | ||
Mantid::Geometry::Instrument_const_sptr inst); | ||
|
||
/// Get the detector component | ||
Mantid::Geometry::IComponent_const_sptr getDetectorComponent( | ||
Mantid::API::MatrixWorkspace_sptr workspace, const bool isPointDetector); | ||
|
||
/// Correct detector positions. | ||
void correctPosition(API::MatrixWorkspace_sptr toCorrect, const double& twoThetaInDeg, | ||
Geometry::IComponent_const_sptr sample, Geometry::IComponent_const_sptr detector); | ||
|
||
/// Does the property have a default value. | ||
bool isPropertyDefault(const std::string& propertyName) const; | ||
|
||
/// Move detectors. | ||
void moveDetectors(API::MatrixWorkspace_sptr toCorrect, Geometry::IComponent_const_sptr detector, Geometry::IComponent_const_sptr sample, const double& upOffset, const double& acrossOffset, const Mantid::Kernel::V3D& detectorPosition); | ||
}; | ||
|
||
} // namespace Algorithms | ||
} // namespace Mantid | ||
|
||
#endif /* MANTID_ALGORITHMS_SPECULARREFLECTIONPOSITIONCORRECT_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.