21 : theAlignRecordName(
"TrackerAlignmentRcd"), theErrorRecordName(
"TrackerAlignmentErrorExtendedRcd") {
43 for (align::Alignables::const_iterator iter = thePixelEndCapsAlignables.begin();
44 iter != thePixelEndCapsAlignables.end();
47 int id = (*iter)->geomDetId().rawId();
52 align::LocalVector lvector(local_displacements.at(0), local_displacements.at(1), local_displacements.at(2));
56 (*iter)->move(gvector);
59 (*iter)->rotateAroundLocalX(local_rotations.at(0));
60 (*iter)->rotateAroundLocalY(local_rotations.at(1));
61 (*iter)->rotateAroundLocalZ(local_rotations.at(2));
72 for (align::Alignables::const_iterator iter = theEndCapsAlignables.begin(); iter != theEndCapsAlignables.end();
75 int id = (*iter)->geomDetId().rawId();
80 align::LocalVector lvector(local_displacements.at(0), local_displacements.at(1), local_displacements.at(2));
84 (*iter)->move(gvector);
87 (*iter)->rotateAroundLocalX(local_rotations.at(0));
88 (*iter)->rotateAroundLocalY(local_rotations.at(1));
89 (*iter)->rotateAroundLocalZ(local_rotations.at(2));
100 for (align::Alignables::const_iterator iter = thePixelHalfBarrelsAlignables.begin();
101 iter != thePixelHalfBarrelsAlignables.end();
104 int id = (*iter)->geomDetId().rawId();
109 align::LocalVector lvector(local_displacements.at(0), local_displacements.at(1), local_displacements.at(2));
113 (*iter)->move(gvector);
116 (*iter)->rotateAroundLocalX(local_rotations.at(0));
117 (*iter)->rotateAroundLocalY(local_rotations.at(1));
118 (*iter)->rotateAroundLocalZ(local_rotations.at(2));
129 for (align::Alignables::const_iterator iter = theOuterHalfBarrelsAlignables.begin();
130 iter != theOuterHalfBarrelsAlignables.end();
133 int id = (*iter)->geomDetId().rawId();
138 align::LocalVector lvector(local_displacements.at(0), local_displacements.at(1), local_displacements.at(2));
142 (*iter)->move(gvector);
145 (*iter)->rotateAroundLocalX(local_rotations.at(0));
146 (*iter)->rotateAroundLocalY(local_rotations.at(1));
147 (*iter)->rotateAroundLocalZ(local_rotations.at(2));
158 for (align::Alignables::const_iterator iter = theInnerHalfBarrelsAlignables.begin();
159 iter != theInnerHalfBarrelsAlignables.end();
162 int id = (*iter)->geomDetId().rawId();
167 align::LocalVector lvector(local_displacements.at(0), local_displacements.at(1), local_displacements.at(2));
171 (*iter)->move(gvector);
174 (*iter)->rotateAroundLocalX(local_rotations.at(0));
175 (*iter)->rotateAroundLocalY(local_rotations.at(1));
176 (*iter)->rotateAroundLocalZ(local_rotations.at(2));
187 for (align::Alignables::const_iterator iter = theTIDsAlignables.begin(); iter != theTIDsAlignables.end(); ++iter) {
189 int id = (*iter)->geomDetId().rawId();
194 align::LocalVector lvector(local_displacements.at(0), local_displacements.at(1), local_displacements.at(2));
198 (*iter)->move(gvector);
201 (*iter)->rotateAroundLocalX(local_rotations.at(0));
202 (*iter)->rotateAroundLocalY(local_rotations.at(1));
203 (*iter)->rotateAroundLocalZ(local_rotations.at(2));
217 for (align::Alignables::const_iterator iter = theTIBTIDAlignables.begin(); iter != theTIBTIDAlignables.end();
220 int id = (*iter)->geomDetId().rawId();
225 align::GlobalVector gvector(globalDisplacements.at(0), globalDisplacements.at(1), globalDisplacements.at(2));
226 (*iter)->move(gvector);
231 (*iter)->rotateInGlobalFrame(theResultRotation);
233 (*iter)->rotateInGlobalFrame(backwardRotation);
245 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
Alignables & pixelHalfBarrelGeomDets()
Return pixel barrel GeomDets.
void moveAlignableTIDs(int rawId, const align::Scalars &localDisplacements, const align::Scalars &localRotations)
void moveAlignablePixelEndCaps(int rawId, const align::Scalars &localDisplacements, const align::Scalars &localRotations)
void moveAlignableInnerHalfBarrels(int rawId, const align::Scalars &localDisplacements, const align::Scalars &localRotations)
void moveAlignablePixelHalfBarrels(int rawId, const align::Scalars &localDisplacements, const align::Scalars &localRotations)
std::string theAlignRecordName
Alignables TIBTIDGeomDets()
Return inner barrel and TID GeomDets together.
Alignables & innerBarrelGeomDets()
Return inner barrel GeomDets.
std::vector< Scalar > Scalars
Alignables & TIDGeomDets()
Return TID GeomDets.
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
TrackerAlignment(const edm::EventSetup &setup)
void moveAlignableOuterHalfBarrels(int rawId, const align::Scalars &localDisplacements, const align::Scalars &localRotations)
void moveAlignableTIBTIDs(int rawId, const align::Scalars &globalDisplacements, const align::RotationType &backwardRotation, const align::RotationType &forwardRotation, bool toAndFro)
std::string theErrorRecordName
Alignables & endcapGeomDets()
Return endcap GeomDets.
Alignables & pixelEndcapGeomDets()
Return pixel endcap GeomDets.
Alignables & outerBarrelGeomDets()
Return outer barrel GeomDets.
void moveAlignableEndCaps(int rawId, const align::Scalars &localDisplacements, const align::Scalars &localRotations)
std::vector< Alignable * > Alignables
Alignments * alignments() const override
Return alignments, sorted by DetId.
cond::Time_t currentTime() const
AlignmentErrorsExtended * alignmentErrors() const override
Return alignment errors, sorted by DetId.
TkRotation transposed() const
AlignableTracker * theAlignableTracker
T const * product() const