CMS 3D CMS Logo

AlignableSurface.cc
Go to the documentation of this file.
2 
4 
5 using namespace align;
6 
8  : GloballyPositioned<Scalar>(surface.position(), surface.rotation()),
9  theWidth(surface.bounds().width()),
10  theLength(surface.bounds().length()) {}
11 
13  : GloballyPositioned<Scalar>(pos, rot), theWidth(Scalar()), theLength(Scalar()) {}
14 
16  GlobalPoints globalPoints;
17 
18  unsigned int nPoint = localPoints.size();
19 
20  globalPoints.reserve(nPoint);
21 
22  for (unsigned int j = 0; j < nPoint; ++j) {
23  globalPoints.push_back(toGlobal(localPoints[j]));
24  }
25 
26  return globalPoints;
27 }
28 
30  return rotation().multiplyInverse(rot * rotation());
31 }
32 
33 EulerAngles AlignableSurface::toGlobal(const EulerAngles& angles) const { return toAngles(toGlobal(toMatrix(angles))); }
34 
36  return rotation() * rot * rotation().transposed();
37 }
38 
39 EulerAngles AlignableSurface::toLocal(const EulerAngles& angles) const { return toAngles(toLocal(toMatrix(angles))); }
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
double Scalar
Definition: Definitions.h:25
AlignableSurface(const Plane &surface)
Constructor to set surface from geometry.
std::vector< GlobalPoint > GlobalPoints
Definition: Utilities.h:27
TkRotation transposed() const
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
Definition: Utilities.cc:8
AlgebraicVector EulerAngles
Definition: Definitions.h:34
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
align::RotationType toLocal(const align::RotationType &) const
Return in local frame a rotation given in global frame.
static int position[264][3]
Definition: ReadPGInfo.cc:289
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
Definition: Utilities.cc:34
const RotationType & rotation() const
std::vector< LocalPoint > LocalPoints
Definition: Utilities.h:29