test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SurveyAlignmentSensor.cc
Go to the documentation of this file.
4 
6 
8  const std::vector<align::StructureType>& levels):
9  SurveyAlignment(sensors, levels)
10 {
11 }
12 
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 
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
SurveyAlignmentSensor(const align::Alignables &sensors, const std::vector< align::StructureType > &levels)
Constructor to set the sensors and residual levels in base class.
void setAlignmentParameters(AlignmentParameters *dap)
Set the AlignmentParameters.
Definition: Alignable.cc:81
CLHEP::HepVector AlgebraicVector
AlgebraicSymMatrix inverseCovariance() const
Get inverse of survey covariance wrt given structure type in constructor.
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
AlgebraicVector sensorResidual() const
virtual void findAlignPars(bool bias=false)
Find the alignment parameters for all sensors.
CLHEP::HepSymMatrix AlgebraicSymMatrix
bool valid() const