74 align::LocalVector lvector( displacements.at(0), displacements.at(1), displacements.at(2));
78 theAlignable->
move( gvector );
95 align::GlobalVector gvector( displacements.at(0), displacements.at(1), displacements.at(2));
98 theAlignable->
move( gvector );
110 for (align::Alignables::const_iterator alignable = alignables.begin(); alignable != alignables.end(); ++alignable) {
112 theList.push_back(*alignable);
119 for (align::Alignables::const_iterator alignable = alignables.begin(); alignable != alignables.end(); ++alignable) {
120 unsigned int rawId = (*alignable)->geomDetId().rawId();
122 theMap[rawId] = *alignable;
131 for (align::Alignables::const_iterator alignable = alignables.begin(); alignable != alignables.end(); ++alignable) {
132 theMap[std::pair<align::StructureType, align::ID>((*alignable)->alignableObjectId(), (*alignable)->id())] = *alignable;
140 std::map<align::ID, Alignable*> alignableMap;
147 std::vector<AlignTransformErrorExtended> alignmentErrors;
148 std::copy(dtAlignmentErrorsExtended->m_alignError.begin(), dtAlignmentErrorsExtended->m_alignError.end(), std::back_inserter(alignmentErrors));
151 for (std::vector<AlignTransformErrorExtended>::const_iterator alignmentError = alignmentErrors.begin();
152 alignmentError != alignmentErrors.end();
155 CLHEP::HepSymMatrix matrix6x6new = alignmentError->matrix();
157 for (
int i = 0;
i < 6;
i++) {
158 for (
int j = 0; j < 6; j++) {
159 matrix6x6(
i, j) = matrix6x6new(
i + 1, j + 1);
166 Alignable *alignable = alignableMap[alignmentError->rawId()];
178 std::map<std::pair<align::StructureType, align::ID>,
Alignable*> alignableStructureMap;
182 for (
std::map<std::pair<align::StructureType, align::ID>,
Alignable*>::const_iterator iter = alignableStructureMap.begin();
183 iter != alignableStructureMap.end();
185 if (iter->second->survey() ==
nullptr) {
193 iter->second->setSurvey(
new SurveyDet(iter->second->surface(), matrix6x6));
201 if (alignable->
survey() !=
nullptr) {
216 for (
int i = 0;
i < 6;
i++) {
217 for (
int j = 0; j <=
i; j++) {
218 matrix6x6new(
i, j) = matrix6x6(
i, j);
228 for (align::Alignables::const_iterator
comp = components.begin();
comp != components.end(); ++
comp) {
248 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
257 for (align::Alignables::const_iterator alignable = alignableList.begin(); alignable != alignableList.end(); ++alignable) {
262 CLHEP::HepRotation(CLHEP::HepRep3x3(rot.
xx(), rot.
xy(), rot.
xz(),
263 rot.
yx(), rot.
yy(), rot.
yz(),
264 rot.
zx(), rot.
zy(), rot.
zz())),
266 SurveyError error((*alignable)->alignableObjectId(), (*alignable)->id(), (*alignable)->survey()->errors());
281 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
290 for (align::Alignables::const_iterator alignable = alignableList.begin(); alignable != alignableList.end(); ++alignable) {
295 CLHEP::HepRotation(CLHEP::HepRep3x3(rot.
xx(), rot.
xy(), rot.
xz(),
296 rot.
yx(), rot.
yy(), rot.
yz(),
297 rot.
zx(), rot.
zy(), rot.
zz())),
299 SurveyError error((*alignable)->alignableObjectId(), (*alignable)->id(), (*alignable)->survey()->errors());
319 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
334 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
AlignableNavigator * theAlignableNavigator
std::string theCSCErrorRecordName
void write(AlignableMuon *alignableMuon, const edm::EventSetup &iSetup) const
virtual void rotateAroundLocalZ(Scalar radians)
Rotation around local z-axis.
void copyAlignmentToSurvey(double shiftErr, double angleErr)
align::Alignables DTBarrel()
const SurveyDet * survey() const
Return survey info.
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
const RotationType & globalRotation() const
Return the global orientation of the object.
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
const align::ErrorMatrix & errors() const
void copySurveyToAlignment()
virtual const Alignables & components() const =0
Return vector of all direct components.
std::vector< AlignTransform > m_align
MuonAlignment(const edm::EventSetup &iSetup)
static std::string const input
std::string theDTAlignRecordName
virtual void rotateAroundGlobalZ(Scalar radians)
Rotation around global z-axis.
const align::RotationType & rotation() const
const align::PositionType & position() const
void recursiveCopySurveyToAlignment(Alignable *alignable)
Alignments * dtAlignments()
Get DT alignments sorted by DetId.
align::Alignables CSCEndcaps()
std::string theDTSurveyRecordName
std::vector< Scalar > Scalars
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
std::string theCSCSurveyErrorRecordName
virtual void setAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown)=0
Set the alignment position error - if (!propagateDown) do not affect daughters.
AlignableMuon * theAlignableMuon
AlignmentErrorsExtended * cscAlignmentErrorsExtended()
Get CSC alignment errors sorted by DetId.
GlobalErrorBaseExtended< double, ErrorMatrixTag > GlobalErrorExtended
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
std::string theCSCSurveyRecordName
std::string theDTSurveyErrorRecordName
void fillGapsInSurvey(double shiftErr, double angleErr)
virtual void rotateAroundGlobalX(Scalar radians)
Rotation around global x-axis.
void recursiveList(const align::Alignables &alignables, align::Alignables &theList)
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
std::vector< AlignTransformErrorExtended > m_alignError
void setSurvey(const SurveyDet *)
Set survey info.
Alignments * cscAlignments()
Get CSC alignments sorted by DetId.
virtual void rotateAroundLocalY(Scalar radians)
Rotation around local y-axis.
void moveAlignableLocalCoord(DetId &, align::Scalars &, align::Scalars &)
virtual void rotateAroundGlobalY(Scalar radians)
Rotation around global y-axis.
AlignmentErrorsExtended * dtAlignmentErrorsExtended()
Get DT alignment errors sorted by DetId.
std::vector< Alignable * > Alignables
void moveAlignableGlobalCoord(DetId &, align::Scalars &, align::Scalars &)
std::string theCSCAlignRecordName
cond::Time_t currentTime() const
virtual void rotateAroundLocalX(Scalar radians)
Rotation around local x-axis.
TkRotation transposed() const
void recursiveMap(const align::Alignables &alignables, std::map< align::ID, Alignable * > &theMap)
std::string theDTErrorRecordName
void recursiveStructureMap(const align::Alignables &alignables, std::map< std::pair< align::StructureType, align::ID >, Alignable * > &theMap)
const PositionType & globalPosition() const
Return the global position of the object.
void writeXML(const edm::ParameterSet &iConfig, const edm::EventSetup &iSetup)
math::Error< 6 >::type ErrorMatrix
std::vector< SurveyError > m_surveyErrors
align::Scalars displacements
AlignableDetOrUnitPtr alignableFromDetId(const DetId &detid)
Returns AlignableDetOrUnitPtr corresponding to given DetId.