Skip to content

Commit

Permalink
refs #8095 Comments and Doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Oct 10, 2013
1 parent d3f0dc8 commit 6efb23d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
Expand Up @@ -183,7 +183,7 @@ namespace Mantid
void load_plain(std::ifstream &stream,std::vector<double> &Data,FileTypeDescriptor const &FILE_TYPE);
};

/**Small helper class used to precalculate the detectors parameters */
/**Small helper class-holder used to precalculate the detectors parameters in spherical coordinate system */
class DetParameters
{
public:
Expand Down
28 changes: 19 additions & 9 deletions Code/Mantid/Framework/DataHandling/src/FindDetectorsPar.cpp
Expand Up @@ -100,8 +100,7 @@ void FindDetectorsPar::init()

}

void
FindDetectorsPar::exec()
void FindDetectorsPar::exec()
{

// Get the input workspace
Expand Down Expand Up @@ -184,7 +183,7 @@ FindDetectorsPar::exec()

}

// functions defines the ouptput table with parameters
/// fills in the ouptput table workspace with calculated values
void FindDetectorsPar::setOutputTable()
{
std::string output = getProperty("OutputParTable");
Expand Down Expand Up @@ -225,7 +224,10 @@ void FindDetectorsPar::setOutputTable()
// Constant for converting Radians to Degrees
const double rad2deg = 180.0 / M_PI;

/// method to cacluate the detectors parameters and add them to the average detector
/** method to cacluate the detectors parameters and add them to the detectors averages
*@param spDet -- shared pointer to the Mantid Detector
*@param Observer -- sample position or the centre of the polar system of coordinates to calculate detector's parameters.
*/
void AvrgDetector::addDetInfo(const Geometry::IDetector_const_sptr &spDet,const Kernel::V3D &Observer)
{
m_nComponents++;
Expand All @@ -247,11 +249,11 @@ void AvrgDetector::addDetInfo(const Geometry::IDetector_const_sptr &spDet,const
Geometry::BoundingBox bbox;
std::vector<Kernel::V3D> coord(3);

Kernel::V3D er(0,1,0),e_th,ez(0,0,1); //ez along beamline, which is always oz; (can be amended)
Kernel::V3D er(0,1,0),e_th,ez(0,0,1); //ez along beamline, which is always oz;
if(dist2Det)er = toDet/dist2Det; // direction to the detector
Kernel::V3D e_tg = er.cross_prod(ez); // tangential to the ring and anticloakwise;
e_tg.normalize();
// make orthogonal
// make orthogonal -- projections are calculated in this coordinate system
ez = e_tg.cross_prod(er);

coord[0]=er; // new X
Expand Down Expand Up @@ -290,7 +292,9 @@ void AvrgDetector::addDetInfo(const Geometry::IDetector_const_sptr &spDet,const

}


/** Method processes accumulated averages and return them in preexistent avrgDet class
@returns avrgDet -- the detector with averaged parameters
*/
void AvrgDetector::returnAvrgDetPar(DetParameters &avrgDet)
{

Expand All @@ -305,7 +309,13 @@ void AvrgDetector::returnAvrgDetPar(DetParameters &avrgDet)
avrgDet.polarWidth=(m_PolarMax-m_PolarMin);

}
/** Method calculates averaged polar coordinates of the detector's group (which may consist of one detector)
*@param spDet -- shared pointer to the Mantid Detector
*@param Observer -- sample position or the centre of the polar system of coordinates to calculate detector's parameters.
*@param Detector -- return Detector class containing averaged polar coordinates of the detector or detector's group in
spherical coordinate system with centre at Observer
*/
void FindDetectorsPar::calcDetPar(const Geometry::IDetector_const_sptr &spDet,const Kernel::V3D &Observer,
DetParameters &Detector)
{
Expand Down Expand Up @@ -342,7 +352,8 @@ void FindDetectorsPar::calcDetPar(const Geometry::IDetector_const_sptr &spDet,co
detSum.returnAvrgDetPar(Detector);

}

/**Method to convert vector of Detector's classes into vectors of doubles with all correspondent information
also drops non-existent detectors and monitors */
void FindDetectorsPar::extractAndLinearize(const std::vector<DetParameters> &detPar)
{
size_t nDetectors;
Expand Down Expand Up @@ -381,7 +392,6 @@ void FindDetectorsPar::extractAndLinearize(const std::vector<DetParameters> &det
this->secondaryFlightpath.resize(nDetectors);
this->detID.resize(nDetectors);


}

//
Expand Down

0 comments on commit 6efb23d

Please sign in to comment.