CMS 3D CMS Logo

Public Member Functions | Protected Member Functions

SurveyAlignmentSensor Class Reference

#include <SurveyAlignmentSensor.h>

Inheritance diagram for SurveyAlignmentSensor:
SurveyAlignment

List of all members.

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.

Detailed Description

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.

Date:
2007/10/08 16:38:03
Revision:
1.4
Author:
Chung Khim Lae

Definition at line 18 of file SurveyAlignmentSensor.h.


Constructor & Destructor Documentation

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)
{
}

Member Function Documentation

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) );
  }
}