CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions
SurveyAlignmentPoints Class Reference

#include <SurveyAlignmentPoints.h>

Inheritance diagram for SurveyAlignmentPoints:
SurveyAlignment

Public Member Functions

 SurveyAlignmentPoints (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 point residuals.

The local residuals for survey points are found for each sensor. The alignment parameters are found using the HIP algorithm.

Date
2007/05/03 20:58:58
Revision
1.3
Author
Chung Khim Lae

Definition at line 18 of file SurveyAlignmentPoints.h.

Constructor & Destructor Documentation

◆ SurveyAlignmentPoints()

SurveyAlignmentPoints::SurveyAlignmentPoints ( const align::Alignables sensors,
const std::vector< align::StructureType > &  levels 
)

Constructor to set the sensors and residual levels in base class.

Definition at line 8 of file SurveyAlignmentPoints.cc.

10  : SurveyAlignment(sensors, levels) {}

Member Function Documentation

◆ findAlignPars()

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

Find the alignment parameters for all sensors.

Implements SurveyAlignment.

Definition at line 12 of file SurveyAlignmentPoints.cc.

12  {
13  unsigned int nSensor = theSensors.size();
14 
15  for (unsigned int i = 0; i < nSensor; ++i) {
16  Alignable* ali = theSensors[i];
17 
18  AlgebraicSymMatrix sumJVJT(6, 0); // 6 by 6 symmetric matrix init to 0
19  AlgebraicVector sumJVe(6, 0); // init to 0
20 
21  for (unsigned int l = 0; l < theLevels.size(); ++l) {
22  SurveyResidual res(*ali, theLevels[l], bias);
23 
24  if (!res.valid())
25  continue;
26 
27  align::LocalVectors residuals = res.pointsResidual();
28 
29  unsigned int nPoints = residuals.size();
30 
31  for (unsigned int j = 0; j < nPoints; ++j) {
32  AlgebraicMatrix J = ali->survey()->derivatives(j);
33  AlgebraicSymMatrix V(3, 1); // identity for now
34  AlgebraicVector e(3); // local residual
35 
36  const align::LocalVector& lr = residuals[j];
37 
38  e(1) = lr.x();
39  e(2) = lr.y();
40  e(3) = lr.z();
41  V /= 1e-4 * 1e-4;
42  sumJVe += J * (V * e);
43  sumJVJT += V.similarity(J);
44  }
45  }
46 
47  int dummy;
48  sumJVJT.invert(dummy); // sumJVJT = sumJVJT^-1
49  sumJVe = -sumJVJT * sumJVe;
50 
51  ali->setAlignmentParameters(new SurveyParameters(ali, sumJVe, sumJVJT));
52  }
53 }

References SurveyDet::derivatives(), MillePedeFileConverter_cfg::e, mps_fire::i, dqmiolumiharvest::j, cmsLHEtoEOSManager::l, Alignable::setAlignmentParameters(), Alignable::survey(), SurveyAlignment::theLevels, SurveyAlignment::theSensors, cms::cuda::V, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Vector3DBase
Definition: Vector3DBase.h:8
cms::cuda::V
cudaStream_t T uint32_t const T *__restrict__ const uint32_t *__restrict__ uint32_t int cudaStream_t V
Definition: HistoContainer.h:99
mps_fire.i
i
Definition: mps_fire.py:355
Alignable::setAlignmentParameters
void setAlignmentParameters(AlignmentParameters *dap)
Set the AlignmentParameters.
Definition: Alignable.cc:123
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
SurveyAlignment::theLevels
const std::vector< align::StructureType > & theLevels
Definition: SurveyAlignment.h:39
Alignable
Definition: Alignable.h:27
align::LocalVectors
std::vector< LocalVector > LocalVectors
Definition: Utilities.h:30
SurveyParameters
Definition: SurveyParameters.h:17
SurveyAlignment::SurveyAlignment
SurveyAlignment(const align::Alignables &sensors, const std::vector< align::StructureType > &levels)
Constructor to set the sensors and residual levels.
Definition: SurveyAlignment.cc:9
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
SurveyDet::derivatives
AlgebraicMatrix derivatives(unsigned int index) const
Definition: SurveyDet.cc:21
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
res
Definition: Electron.h:6
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
SurveyResidual
Definition: SurveyResidual.h:22
SurveyAlignment::theSensors
const align::Alignables & theSensors
Definition: SurveyAlignment.h:38
dummy
Definition: DummySelector.h:38
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
Alignable::survey
const SurveyDet * survey() const
Return survey info.
Definition: Alignable.h:216
jets_cff.levels
levels
Definition: jets_cff.py:23
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37