test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions
SurveyAlignmentSensor Class Reference

#include <SurveyAlignmentSensor.h>

Inheritance diagram for SurveyAlignmentSensor:
SurveyAlignment

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. More...
 
- Public Member Functions inherited from SurveyAlignment
void iterate (unsigned int nIteration, const std::string &fileName, bool bias=false)
 Run the iteration: find residuals, write to output, shift sensors. More...
 
 SurveyAlignment (const align::Alignables &sensors, const std::vector< align::StructureType > &levels)
 Constructor to set the sensors and residual levels. More...
 
virtual ~SurveyAlignment ()
 

Protected Member Functions

virtual void findAlignPars (bool bias=false)
 Find the alignment parameters for all sensors. More...
 
- Protected Member Functions inherited from SurveyAlignment
virtual void shiftSensors ()
 Apply the alignment parameters to all sensors. More...
 

Additional Inherited Members

- Protected Attributes inherited from SurveyAlignment
const std::vector
< align::StructureType > & 
theLevels
 
const align::AlignablestheSensors
 

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/05/03 20:58:58
Revision:
1.3
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.

8  :
9  SurveyAlignment(sensors, levels)
10 {
11 }
SurveyAlignment(const align::Alignables &sensors, const std::vector< align::StructureType > &levels)
Constructor to set the sensors and residual levels.

Member Function Documentation

void SurveyAlignmentSensor::findAlignPars ( bool  bias = false)
protectedvirtual

Find the alignment parameters for all sensors.

Implements SurveyAlignment.

Definition at line 13 of file SurveyAlignmentSensor.cc.

References i, SurveyResidual::inverseCovariance(), cmsLHEtoEOSManager::l, SurveyResidual::sensorResidual(), Alignable::setAlignmentParameters(), SurveyAlignment::theLevels, SurveyAlignment::theSensors, and SurveyResidual::valid().

14 {
15  unsigned int nSensor = theSensors.size();
16 
17  for (unsigned int i = 0; i < nSensor; ++i)
18  {
19  Alignable* ali = theSensors[i];
20 
21  AlgebraicVector par(6, 0);
22  AlgebraicSymMatrix cov(6, 0);
23 
24  for (unsigned int l = 0; l < theLevels.size(); ++l)
25  {
26  SurveyResidual res(*ali, theLevels[l], bias);
27 
28  if ( !res.valid() ) continue;
29 
30  AlgebraicSymMatrix invCov = res.inverseCovariance();
31 
32  par += invCov * res.sensorResidual();
33  cov += invCov;
34  }
35 
36  int dummy;
37  cov.invert(dummy); // cov = cov^-1
38  par = -cov * par;
39 
40  ali->setAlignmentParameters( new SurveyParameters(ali, par, cov) );
41  }
42 }
int i
Definition: DBlmapReader.cc:9
const align::Alignables & theSensors
const std::vector< align::StructureType > & theLevels
void setAlignmentParameters(AlignmentParameters *dap)
Set the AlignmentParameters.
Definition: Alignable.cc:110
CLHEP::HepVector AlgebraicVector
CLHEP::HepSymMatrix AlgebraicSymMatrix