#include <SurveyAlignmentSensor.h>
Public Member Functions | |
SurveyAlignmentSensor (const align::Alignables &sensors, const std::vector< align::StructureType > &levels) | |
Constructor to set the sensors and residual levels in base class. | |
Protected Member Functions | |
virtual void | findAlignPars (bool bias=false) |
Find the alignment parameters for all sensors. |
Survey alignment using sensor residual.
The residual (dRx, dRy, dRz, dWx, dWy, dWz) is found for each sensor. The sensor shifted by this amount during each iteration.
Definition at line 18 of file SurveyAlignmentSensor.h.
SurveyAlignmentSensor::SurveyAlignmentSensor | ( | const align::Alignables & | sensors, |
const std::vector< align::StructureType > & | levels | ||
) |
Constructor to set the sensors and residual levels in base class.
Definition at line 7 of file SurveyAlignmentSensor.cc.
: SurveyAlignment(sensors, levels) { }
void SurveyAlignmentSensor::findAlignPars | ( | bool | bias = false | ) | [protected, virtual] |
Find the alignment parameters for all sensors.
Implements SurveyAlignment.
Definition at line 13 of file SurveyAlignmentSensor.cc.
References i, SurveyResidual::inverseCovariance(), prof2calltree::l, SurveyResidual::sensorResidual(), Alignable::setAlignmentParameters(), SurveyAlignment::theLevels, SurveyAlignment::theSensors, and SurveyResidual::valid().
{ unsigned int nSensor = theSensors.size(); for (unsigned int i = 0; i < nSensor; ++i) { Alignable* ali = theSensors[i]; AlgebraicVector par(6, 0); AlgebraicSymMatrix cov(6, 0); for (unsigned int l = 0; l < theLevels.size(); ++l) { SurveyResidual res(*ali, theLevels[l], bias); if ( !res.valid() ) continue; AlgebraicSymMatrix invCov = res.inverseCovariance(); par += invCov * res.sensorResidual(); cov += invCov; } int dummy; cov.invert(dummy); // cov = cov^-1 par = -cov * par; ali->setAlignmentParameters( new SurveyParameters(ali, par, cov) ); } }