CMS 3D CMS Logo

SurveyAlignmentSensor.cc
Go to the documentation of this file.
4 
6 
8  const std::vector<align::StructureType>& levels)
9  : SurveyAlignment(sensors, levels) {}
10 
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 }
mps_fire.i
i
Definition: mps_fire.py:355
Alignable::setAlignmentParameters
void setAlignmentParameters(AlignmentParameters *dap)
Set the AlignmentParameters.
Definition: Alignable.cc:123
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: SurveyAlignmentSensor.cc:7
SurveyAlignment::theLevels
const std::vector< align::StructureType > & theLevels
Definition: SurveyAlignment.h:39
Alignable
Definition: Alignable.h:27
SurveyParameters
Definition: SurveyParameters.h:17
SurveyParameters.h
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
SurveyResidual.h
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
res
Definition: Electron.h:6
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
align::Alignables
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
SurveyResidual
Definition: SurveyResidual.h:22
SurveyAlignment::theSensors
const align::Alignables & theSensors
Definition: SurveyAlignment.h:38
Alignable.h
SurveyAlignmentSensor.h
SurveyAlignmentSensor::findAlignPars
void findAlignPars(bool bias=false) override
Find the alignment parameters for all sensors.
Definition: SurveyAlignmentSensor.cc:11
dummy
Definition: DummySelector.h:38
SurveyAlignment
Definition: SurveyAlignment.h:16
jets_cff.levels
levels
Definition: jets_cff.py:23