CMS 3D CMS Logo

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

void findAlignPars (bool bias=false) override
 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::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.

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

Member Function Documentation

◆ findAlignPars()

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

Find the alignment parameters for all sensors.

Implements SurveyAlignment.

Definition at line 11 of file SurveyAlignmentSensor.cc.

References mps_fire::i, cmsLHEtoEOSManager::l, Alignable::setAlignmentParameters(), SurveyAlignment::theLevels, and SurveyAlignment::theSensors.

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