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
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

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 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 ( 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.

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

Member Function Documentation

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

Find the alignment parameters for all sensors.

Implements SurveyAlignment.

Definition at line 14 of file SurveyAlignmentPoints.cc.

References SurveyDet::derivatives(), alignCSCRings::e, i, j, prof2calltree::l, SurveyResidual::pointsResidual(), Alignable::setAlignmentParameters(), Alignable::survey(), SurveyAlignment::theLevels, SurveyAlignment::theSensors, SurveyResidual::valid(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

15 {
16  unsigned int nSensor = theSensors.size();
17 
18  for (unsigned int i = 0; i < nSensor; ++i)
19  {
20  Alignable* ali = theSensors[i];
21 
22  AlgebraicSymMatrix sumJVJT(6, 0); // 6 by 6 symmetric matrix init to 0
23  AlgebraicVector sumJVe(6, 0); // init to 0
24 
25  for (unsigned int l = 0; l < theLevels.size(); ++l)
26  {
27  SurveyResidual res(*ali, theLevels[l], bias);
28 
29  if ( !res.valid() ) continue;
30 
31  align::LocalVectors residuals = res.pointsResidual();
32 
33  unsigned int nPoints = residuals.size();
34 
35  for (unsigned int j = 0; j < nPoints; ++j)
36  {
37  AlgebraicMatrix J = ali->survey()->derivatives(j);
38  AlgebraicSymMatrix V(3, 1); // identity for now
39  AlgebraicVector e(3); // local residual
40 
41  const align::LocalVector& lr = residuals[j];
42 
43  e(1) = lr.x(); e(2) = lr.y(); e(3) = lr.z();
44  V /= 1e-4 * 1e-4;
45  sumJVe += J * (V * e);
46  sumJVJT += V.similarity(J);
47  }
48  }
49 
50  int dummy;
51  sumJVJT.invert(dummy); // sumJVJT = sumJVJT^-1
52  sumJVe = -sumJVJT * sumJVe;
53 
54  ali->setAlignmentParameters( new SurveyParameters(ali, sumJVe, sumJVJT) );
55  }
56 }
int i
Definition: DBlmapReader.cc:9
const align::Alignables & theSensors
const std::vector< align::StructureType > & theLevels
const SurveyDet * survey() const
Return survey info.
Definition: Alignable.h:205
std::vector< LocalVector > LocalVectors
Definition: Utilities.h:26
T y() const
Definition: PV3DBase.h:63
AlgebraicMatrix derivatives(unsigned int index) const
Definition: SurveyDet.cc:24
void setAlignmentParameters(AlignmentParameters *dap)
Set the AlignmentParameters.
Definition: Alignable.cc:81
CLHEP::HepMatrix AlgebraicMatrix
T z() const
Definition: PV3DBase.h:64
int j
Definition: DBlmapReader.cc:9
CLHEP::HepVector AlgebraicVector
CLHEP::HepSymMatrix AlgebraicSymMatrix
T x() const
Definition: PV3DBase.h:62