14 const std::vector<unsigned int>& weightByIdVector) {
17 if (refAli->
id() != curAli->
id()) {
18 throw cms::Exception(
"Geometry Error") <<
"[AlignTools] Error, Alignables do not match";
36 alignableCM.
x() - pointsCM.
x(), alignableCM.
y() - pointsCM.
y(), alignableCM.
z() - pointsCM.
z());
41 for (
unsigned int k = 0;
k < refVs.size(); ++
k) {
63 deltaRW(1) = theRprime.x();
64 deltaRW(2) = theRprime.y();
65 deltaRW(3) = theRprime.z();
70 deltaRW(7) = theLocalRprime.
x();
71 deltaRW(8) = theLocalRprime.
y();
72 deltaRW(9) = theLocalRprime.
z();
73 deltaRW(10) = theLocalW(1);
74 deltaRW(11) = theLocalW(2);
75 deltaRW(12) = theLocalW(3);
100 const std::vector<unsigned int>& weightByIdVector) {
103 if (
copy !=
"SELF") {
105 unsigned int nComp =
comp.size();
106 for (
unsigned int i = 0;
i < nComp; ++
i)
110 for (
unsigned int i = 0;
i < nComp; ++
i)
117 bool createPointsForDetUnit =
true;
120 if (createPointsForDetUnit) {
127 for (
unsigned int j = 0;
j < points.size(); ++
j) {
129 Vs->push_back(
dummy);
134 bool createPointsForDetUnit =
true;
137 if (createPointsForDetUnit) {
144 for (
unsigned int j = 0;
j < points.size(); ++
j) {
146 Vs->push_back(
dummy);
154 const std::vector<unsigned int>& weightByIdVector) {
155 bool foundId =
false;
157 unsigned int sizeVector = weightByIdVector.size();
159 for (
unsigned int i = 0;
i < sizeVector; ++
i) {
160 unsigned int listId = weightByIdVector[
i];
162 if (listId == aliId) {
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
Alignable * mother() const
Return pointer to container alignable (if any)
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
AlgebraicVector diffAlignables(Alignable *refAli, Alignable *curAli, const std::string &weightBy, bool weightById, const std::vector< unsigned int > &weightByIdVector)
GlobalVector diffR(const GlobalVectors ¤t, const GlobalVectors &nominal)
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
void createPoints(GlobalVectors *Vs, Alignable *ali, const std::string &weightBy, bool weightById, const std::vector< unsigned int > &weightByIdVector)
RotationType diffRot(const GlobalVectors ¤t, const GlobalVectors &nominal)
std::vector< GlobalPoint > GlobalPoints
const PositionType & globalPosition() const
Return the global position of the object.
const SurveyDet * survey() const
Return survey info.
bool readModuleList(unsigned int, unsigned int, const std::vector< unsigned int > &)
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
virtual const Alignables & components() const =0
Return vector of all direct components.
GlobalVector centerOfMass(const GlobalVectors &theVs)
Find the CM of a set of points.
CLHEP::HepVector AlgebraicVector
align::ID id() const
Return the ID of Alignable, i.e. DetId of 'first' component GeomDet(Unit).
AlgebraicVector EulerAngles
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
void setSurvey(const SurveyDet *)
Set survey info.
std::vector< GlobalVector > GlobalVectors
align::RotationType toLocal(const align::RotationType &) const
Return in local frame a rotation given in global frame.
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
const align::LocalPoints & localPoints() const
math::Error< 6 >::type ErrorMatrix
void moveAlignable(Alignable *ali, AlgebraicVector diff)
Moves the alignable by the AlgebraicVector.