46 : dtGeometry_(dtGeometry), cscGeometry_(cscGeometry), gemGeometry_(
gemGeometry) {
71 theAlignable->
move(gvector);
89 theAlignable->
move(gvector);
100 for (align::Alignables::const_iterator alignable = alignables.begin(); alignable != alignables.end(); ++alignable) {
109 for (align::Alignables::const_iterator alignable = alignables.begin(); alignable != alignables.end(); ++alignable) {
110 unsigned int rawId = (*alignable)->geomDetId().rawId();
112 theMap[
rawId] = *alignable;
122 for (align::Alignables::const_iterator alignable = alignables.begin(); alignable != alignables.end(); ++alignable) {
123 theMap[std::pair<align::StructureType, align::ID>((*alignable)->alignableObjectId(), (*alignable)->id())] =
132 std::map<align::ID, Alignable*> alignableMap;
141 std::vector<AlignTransformErrorExtended> alignmentErrors;
142 std::copy(dtAlignmentErrorsExtended->m_alignError.begin(),
143 dtAlignmentErrorsExtended->m_alignError.end(),
144 std::back_inserter(alignmentErrors));
147 std::back_inserter(alignmentErrors));
150 std::back_inserter(alignmentErrors));
152 for (std::vector<AlignTransformErrorExtended>::const_iterator alignmentError = alignmentErrors.begin();
153 alignmentError != alignmentErrors.end();
156 CLHEP::HepSymMatrix matrix6x6new = alignmentError->matrix();
158 for (
int i = 0;
i < 6;
i++) {
159 for (
int j = 0;
j < 6;
j++) {
160 matrix6x6(
i,
j) = matrix6x6new(
i + 1,
j + 1);
167 Alignable* alignable = alignableMap[alignmentError->rawId()];
179 std::map<std::pair<align::StructureType, align::ID>,
Alignable*> alignableStructureMap;
183 for (
std::map<std::pair<align::StructureType, align::ID>,
Alignable*>::const_iterator iter =
184 alignableStructureMap.begin();
185 iter != alignableStructureMap.end();
187 if (iter->second->survey() ==
nullptr) {
195 iter->second->setSurvey(
new SurveyDet(iter->second->surface(), matrix6x6));
203 if (alignable->
survey() !=
nullptr) {
218 for (
int i = 0;
i < 6;
i++) {
219 for (
int j = 0;
j <=
i;
j++) {
220 matrix6x6new(
i,
j) = matrix6x6(
i,
j);
251 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
260 for (align::Alignables::const_iterator alignable = alignableList.begin(); alignable != alignableList.end();
266 CLHEP::HepRotation(CLHEP::HepRep3x3(
269 SurveyError error((*alignable)->alignableObjectId(), (*alignable)->id(), (*alignable)->survey()->errors());
271 dtAlignments.m_align.push_back(
value);
272 dtSurveyErrors.m_surveyErrors.push_back(
error);
284 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
293 for (align::Alignables::const_iterator alignable = alignableList.begin(); alignable != alignableList.end();
299 CLHEP::HepRotation(CLHEP::HepRep3x3(
302 SurveyError error((*alignable)->alignableObjectId(), (*alignable)->id(), (*alignable)->survey()->errors());
304 cscAlignments.m_align.push_back(
value);
305 cscSurveyErrors.m_surveyErrors.push_back(
error);
322 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
338 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
354 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
AlignableNavigator * theAlignableNavigator
std::string theCSCErrorRecordName
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
virtual void rotateAroundLocalZ(Scalar radians)
Rotation around local z-axis.
void copyAlignmentToSurvey(double shiftErr, double angleErr)
align::Alignables DTBarrel()
const align::ErrorMatrix & errors() const
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
void copySurveyToAlignment()
std::string theGEMAlignRecordName
void write(AlignableMuon *alignableMuon) const
static std::string const input
std::string theDTAlignRecordName
virtual void rotateAroundGlobalZ(Scalar radians)
Rotation around global z-axis.
void recursiveCopySurveyToAlignment(Alignable *alignable)
TkRotation transposed() const
std::string theGEMErrorRecordName
const PositionType & globalPosition() const
Return the global position of the object.
Alignments * dtAlignments()
Get DT alignments sorted by DetId.
const align::RotationType & rotation() const
align::Alignables CSCEndcaps()
std::string theDTSurveyRecordName
const SurveyDet * survey() const
Return survey info.
cond::Time_t currentTime() const
void writeXML(const edm::ParameterSet &iConfig, const DTGeometry *dtGeometryXML, const CSCGeometry *cscGeometryXML, const GEMGeometry *gemGeometryXML)
std::vector< Scalar > Scalars
const DTGeometry * dtGeometry_
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
const align::PositionType & position() const
virtual const Alignables & components() const =0
Return vector of all direct components.
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
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
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 recursiveStructureMap(const align::Alignables &alignables, std::map< std::pair< align::StructureType, align::ID >, Alignable *> &theMap)
void setSurvey(const SurveyDet *)
Set survey info.
Alignments * cscAlignments()
Get CSC alignments sorted by DetId.
Alignments * gemAlignments()
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.
AlignmentErrorsExtended * gemAlignmentErrorsExtended()
std::vector< Alignable * > Alignables
align::Alignables GEMEndcaps()
void moveAlignableGlobalCoord(DetId &, align::Scalars &, align::Scalars &)
std::string theCSCAlignRecordName
const GEMGeometry * gemGeometry_
virtual void rotateAroundLocalX(Scalar radians)
Rotation around local x-axis.
std::string theDTErrorRecordName
const RotationType & globalRotation() const
Return the global orientation of the object.
math::Error< 6 >::type ErrorMatrix
const CSCGeometry * cscGeometry_
align::Scalars displacements
AlignableDetOrUnitPtr alignableFromDetId(const DetId &detid)
Returns AlignableDetOrUnitPtr corresponding to given DetId.
void recursiveMap(const align::Alignables &alignables, std::map< align::ID, Alignable *> &theMap)
MuonAlignment(const DTGeometry *dtGeometry, const CSCGeometry *cscGeometry, const GEMGeometry *gemGeometry)