Definition at line 144 of file MuonAlignmentOutputXML.cc.
150 align::Alignables::const_iterator ideal = ideals.begin();
151 for (align::Alignables::const_iterator alignable = alignables.begin(); alignable != alignables.end(); ++alignable) {
152 if (
m_survey && (*alignable)->survey() ==
nullptr) {
153 throw cms::Exception(
"Alignment") <<
"SurveyDets must all be defined when writing to XML" << std::endl;
169 unsigned int rawId = (*alignable)->geomDetId().rawId();
183 outputFile <<
" <DTLayer wheel=\"" <<
id.wheel() <<
"\" station=\"" <<
id.station() <<
"\" sector=\""
184 <<
id.sector() <<
"\" superlayer=\"" <<
id.superlayer() <<
"\" layer=\"" <<
id.layer() <<
"\" />"
188 outputFile <<
" <DTSuperLayer wheel=\"" <<
id.wheel() <<
"\" station=\"" <<
id.station() <<
"\" sector=\""
189 <<
id.sector() <<
"\" superlayer=\"" <<
id.superlayer() <<
"\" />" << std::endl;
192 outputFile <<
" <DTChamber wheel=\"" <<
id.wheel() <<
"\" station=\"" <<
id.station() <<
"\" sector=\""
193 <<
id.sector() <<
"\" />" << std::endl;
199 outputFile <<
" <DTStation wheel=\"" <<
id.wheel() <<
"\" station=\"" <<
id.station() <<
"\" />"
202 outputFile <<
" <DTWheel wheel=\"" <<
id.wheel() <<
"\" />" << std::endl;
206 throw cms::Exception(
"Alignment") <<
"Unknown DT Alignable StructureType" << std::endl;
221 outputFile <<
" <CSCLayer endcap=\"" <<
id.endcap() <<
"\" station=\"" <<
id.station() <<
"\" ring=\""
222 <<
id.ring() <<
"\" chamber=\"" <<
id.chamber() <<
"\" layer=\"" <<
id.layer() <<
"\" />"
226 outputFile <<
" <CSCChamber endcap=\"" <<
id.endcap() <<
"\" station=\"" <<
id.station() <<
"\" ring=\""
227 <<
id.ring() <<
"\" chamber=\"" <<
id.chamber() <<
"\" />" << std::endl;
231 outputFile <<
" <CSCRing endcap=\"" <<
id.endcap() <<
"\" station=\"" <<
id.station() <<
"\" ring=\""
232 <<
id.ring() <<
"\" />" << std::endl;
234 outputFile <<
" <CSCStation endcap=\"" <<
id.endcap() <<
"\" station=\"" <<
id.station() <<
"\" />"
237 outputFile <<
" <CSCEndcap endcap=\"" <<
id.endcap() <<
"\" />" << std::endl;
239 throw cms::Exception(
"Alignment") <<
"Unknown CSC Alignable StructureType" << std::endl;
249 pos = (*alignable)->survey()->position();
250 rot = (*alignable)->survey()->rotation();
259 if (ideal == ideals.end() || (*ideal)->alignableObjectId() != alignableObjectId ||
260 (*ideal)->id() != (*alignable)->id()) {
261 throw cms::Exception(
"Alignment") <<
"AlignableMuon and ideal_AlignableMuon are out of sync!" << std::endl;
272 bool csc_debug =
false;
273 if (csc_debug && !
DT) {
276 std::cout <<
" investigating " <<
id << std::endl
277 << (*alignable)->globalRotation() << std::endl
283 double phix = atan2(
rot.yz(),
rot.zz());
284 double phiy = asin(-
rot.xz());
285 double phiz = atan2(
rot.xy(),
rot.xx());
287 std::cout <<
"phix=\"" << phix <<
"\" phiy=\"" << phiy <<
"\" phiz=\"" << phiz << std::endl;
290 std::cout <<
"alpha=\"" << eulerAngles(1) <<
"\" beta=\"" << eulerAngles(2) <<
"\" gamma=\""
291 << eulerAngles(3) << std::endl;
293 std::cout <<
"alpha=\"" << eulerAngles(1) <<
"\" beta=\"" << eulerAngles(2) <<
"\" gamma=\""
294 << eulerAngles(3) << std::endl;
296 std::cout <<
"alpha=\"" << eulerAngles(1) <<
"\" beta=\"" << eulerAngles(2) <<
"\" gamma=\""
297 << eulerAngles(3) << std::endl;
302 else if (
m_relativeto == 2 && (*alignable)->mother() !=
nullptr) {
315 outputFile <<
" <setposition relativeto=\"" << str_relativeto <<
"\" "
316 <<
"x=\"" <<
pos.x() <<
"\" y=\"" <<
pos.y() <<
"\" z=\"" <<
pos.z() <<
"\" ";
320 outputFile <<
"alpha=\"" << eulerAngles(1) <<
"\" beta=\"" << eulerAngles(2) <<
"\" gamma=\"" << eulerAngles(3)
321 <<
"\" />" << std::endl;
327 double phix = atan2(
rot.yz(),
rot.zz());
328 double phiy = asin(-
rot.xz());
329 double phiz = atan2(
rot.xy(),
rot.xx());
331 outputFile <<
"phix=\"" << phix <<
"\" phiy=\"" << phiy <<
"\" phiz=\"" << phiz <<
"\" />" << std::endl;
338 <<
" xx=\"" <<
err(0, 0) <<
"\" xy=\"" <<
err(0, 1) <<
"\" xz=\"" <<
err(0, 2) <<
"\" xa=\""
339 <<
err(0, 3) <<
"\" xb=\"" <<
err(0, 4) <<
"\" xc=\"" <<
err(0, 5) <<
"\" yy=\"" <<
err(1, 1)
340 <<
"\" yz=\"" <<
err(1, 2) <<
"\" ya=\"" <<
err(1, 3) <<
"\" yb=\"" <<
err(1, 4) <<
"\" yc=\""
341 <<
err(1, 5) <<
"\" zz=\"" <<
err(2, 2) <<
"\" za=\"" <<
err(2, 3) <<
"\" zb=\"" <<
err(2, 4)
342 <<
"\" zc=\"" <<
err(2, 5) <<
"\" aa=\"" <<
err(3, 3) <<
"\" ab=\"" <<
err(3, 4) <<
"\" ac=\""
343 <<
err(3, 5) <<
"\" bb=\"" <<
err(4, 4) <<
"\" bc=\"" <<
err(4, 5) <<
"\" cc=\"" <<
err(5, 5)
344 <<
"\" />" << std::endl;
347 else if (rawId != 0) {
348 CLHEP::HepSymMatrix
err =
errors[(*alignable)->id()];
350 outputFile <<
" <setape xx=\"" <<
err(1, 1) <<
"\" xy=\"" <<
err(1, 2) <<
"\" xz=\"" <<
err(1, 3) <<
"\" xa=\""
351 <<
err(1, 4) <<
"\" xb=\"" <<
err(1, 5) <<
"\" xc=\"" <<
err(1, 6) <<
"\" yy=\"" <<
err(2, 2)
352 <<
"\" yz=\"" <<
err(2, 3) <<
"\" ya=\"" <<
err(2, 4) <<
"\" yb=\"" <<
err(2, 5) <<
"\" yc=\""
353 <<
err(2, 6) <<
"\" zz=\"" <<
err(3, 3) <<
"\" za=\"" <<
err(3, 4) <<
"\" zb=\"" <<
err(3, 5)
354 <<
"\" zc=\"" <<
err(3, 6) <<
"\" aa=\"" <<
err(4, 4) <<
"\" ab=\"" <<
err(4, 5) <<
"\" ac=\""
355 <<
err(4, 6) <<
"\" bb=\"" <<
err(5, 5) <<
"\" bc=\"" <<
err(5, 6) <<
"\" cc=\"" <<
err(6, 6)
356 <<
"\" />" << std::endl;
359 outputFile <<
"</operation>" << std::endl << std::endl;
364 if (ideal != ideals.end()) {
References align::AlignableCSCChamber, align::AlignableCSCEndcap, align::AlignableCSCRing, align::AlignableCSCStation, align::AlignableDetUnit, align::AlignableDTBarrel, align::AlignableDTChamber, align::AlignableDTStation, align::AlignableDTSuperLayer, align::AlignableDTWheel, cms::cuda::assert(), PV3DBase< T, PVType, FrameType >::basicVector(), relativeConstraints::chamber, makeMuonMisalignmentScenario::components, gather_cfg::cout, GeomDetEnumerators::DT, makeMuonMisalignmentScenario::endcap, submitPVResolutionJobs::err, Exception, triggerObjects_cff::id, AlignableObjectId::idToString(), m_eulerAngles, m_rawIds, m_relativeto, m_suppressCSCChambers, m_suppressCSCEndcaps, m_suppressCSCLayers, m_suppressCSCRings, m_suppressCSCStations, m_suppressDTBarrel, m_suppressDTChambers, m_suppressDTLayers, m_suppressDTStations, m_suppressDTSuperLayers, m_suppressDTWheels, m_survey, download_sqlite_cfg::outputFile, relativeConstraints::ring, makeMuonMisalignmentScenario::rot, relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, align::toAngles(), TkRotation< T >::transposed(), and dqmiodumpindices::typeName.
Referenced by write().