|
|
#include <Alignment/MuonAlignment/interface/MuonAlignmentInputXML.h>
|
void | do_moveglobal (const XERCES_CPP_NAMESPACE::DOMElement *node, std::map< Alignable *, bool > &aliset, std::map< Alignable *, Alignable * > &alitoideal) const |
|
void | do_movelocal (const XERCES_CPP_NAMESPACE::DOMElement *node, std::map< Alignable *, bool > &aliset, std::map< Alignable *, Alignable * > &alitoideal) const |
|
void | do_rotatebeamline (const XERCES_CPP_NAMESPACE::DOMElement *node, std::map< Alignable *, bool > &aliset, std::map< Alignable *, Alignable * > &alitoideal) const |
|
void | do_rotateglobalaxis (const XERCES_CPP_NAMESPACE::DOMElement *node, std::map< Alignable *, bool > &aliset, std::map< Alignable *, Alignable * > &alitoideal) const |
|
void | do_rotatelocal (const XERCES_CPP_NAMESPACE::DOMElement *node, std::map< Alignable *, bool > &aliset, std::map< Alignable *, Alignable * > &alitoideal) const |
|
void | do_setape (const XERCES_CPP_NAMESPACE::DOMElement *node, std::map< Alignable *, bool > &aliset, std::map< Alignable *, Alignable * > &alitoideal) const |
|
void | do_setposition (const XERCES_CPP_NAMESPACE::DOMElement *node, std::map< Alignable *, bool > &aliset, std::map< Alignable *, Alignable * > &alitoideal) const |
|
void | do_setsurveyerr (const XERCES_CPP_NAMESPACE::DOMElement *node, std::map< Alignable *, bool > &aliset, std::map< Alignable *, Alignable * > &alitoideal) const |
|
void | fillAliToIdeal (std::map< Alignable *, Alignable * > &alitoideal, const align::Alignables &alignables, const align::Alignables &ideals) const |
|
Alignable * | getCSCnode (align::StructureType structureType, std::map< unsigned int, Alignable * > &alignableNavigator, const XERCES_CPP_NAMESPACE::DOMElement *node, const AlignableObjectId &) const |
|
Alignable * | getDTnode (align::StructureType structureType, std::map< unsigned int, Alignable * > &alignableNavigator, const XERCES_CPP_NAMESPACE::DOMElement *node, const AlignableObjectId &) const |
|
Alignable * | getNode (std::map< unsigned int, Alignable * > &alignableNavigator, const XERCES_CPP_NAMESPACE::DOMElement *node, const AlignableObjectId &) const |
|
| MuonAlignmentInputXML (const MuonAlignmentInputXML &)=delete |
|
const MuonAlignmentInputXML & | operator= (const MuonAlignmentInputXML &)=delete |
|
double | parseDouble (const XMLCh *str, const char *attribute) const |
|
void | recursiveGetId (std::map< unsigned int, Alignable * > &alignableNavigator, const align::Alignables &alignables) const |
|
void | set_one_position (Alignable *ali, const align::PositionType &pos, const align::RotationType &rot) const |
|
Description: <one line="" class="" summary>="">
Usage: <usage>
Definition at line 33 of file MuonAlignmentInputXML.h.
◆ MuonAlignmentInputXML() [1/2]
XERCES_CPP_NAMESPACE_USE MuonAlignmentInputXML::MuonAlignmentInputXML |
( |
const std::string & |
fileName, |
|
|
std::string |
idealLabel |
|
) |
| |
Definition at line 48 of file MuonAlignmentInputXML.cc.
53 str_name = XMLString::transcode(
"name");
74 str_rawId = XMLString::transcode(
"rawId");
75 str_wheel = XMLString::transcode(
"wheel");
79 str_layer = XMLString::transcode(
"layer");
81 str_ring = XMLString::transcode(
"ring");
83 str_axisx = XMLString::transcode(
"axisx");
84 str_axisy = XMLString::transcode(
"axisy");
85 str_axisz = XMLString::transcode(
"axisz");
86 str_angle = XMLString::transcode(
"angle");
87 str_x = XMLString::transcode(
"x");
88 str_y = XMLString::transcode(
"y");
89 str_z = XMLString::transcode(
"z");
90 str_phix = XMLString::transcode(
"phix");
91 str_phiy = XMLString::transcode(
"phiy");
92 str_phiz = XMLString::transcode(
"phiz");
93 str_alpha = XMLString::transcode(
"alpha");
94 str_beta = XMLString::transcode(
"beta");
95 str_gamma = XMLString::transcode(
"gamma");
96 str_rphi = XMLString::transcode(
"rphi");
97 str_phi = XMLString::transcode(
"phi");
98 str_xx = XMLString::transcode(
"xx");
99 str_xy = XMLString::transcode(
"xy");
100 str_xz = XMLString::transcode(
"xz");
101 str_xa = XMLString::transcode(
"xa");
102 str_xb = XMLString::transcode(
"xb");
103 str_xc = XMLString::transcode(
"xc");
104 str_yy = XMLString::transcode(
"yy");
105 str_yz = XMLString::transcode(
"yz");
106 str_ya = XMLString::transcode(
"ya");
107 str_yb = XMLString::transcode(
"yb");
108 str_yc = XMLString::transcode(
"yc");
109 str_zz = XMLString::transcode(
"zz");
110 str_za = XMLString::transcode(
"za");
111 str_zb = XMLString::transcode(
"zb");
112 str_zc = XMLString::transcode(
"zc");
113 str_aa = XMLString::transcode(
"aa");
114 str_ab = XMLString::transcode(
"ab");
115 str_ac = XMLString::transcode(
"ac");
116 str_bb = XMLString::transcode(
"bb");
117 str_bc = XMLString::transcode(
"bc");
118 str_cc = XMLString::transcode(
"cc");
119 str_none = XMLString::transcode(
"none");
120 str_ideal = XMLString::transcode(
"ideal");
References str_aa, str_ab, str_ac, str_alpha, str_angle, str_axisx, str_axisy, str_axisz, str_bb, str_bc, str_beta, str_cc, str_chamber, str_collection, str_container, str_CSCChamber, str_CSCEndcap, str_CSCLayer, str_CSCRing, str_CSCStation, str_DTBarrel, str_DTChamber, str_DTLayer, str_DTStation, str_DTSuperLayer, str_DTWheel, str_endcap, str_gamma, str_ideal, str_layer, str_moveglobal, str_movelocal, str_name, str_none, str_operation, str_phi, str_phix, str_phiy, str_phiz, str_rawId, str_relativeto, str_ring, str_rotatebeamline, str_rotateglobalaxis, str_rotatelocal, str_rphi, str_sector, str_setape, str_setposition, str_setsurveyerr, str_station, str_superlayer, str_wheel, str_x, str_xa, str_xb, str_xc, str_xx, str_xy, str_xz, str_y, str_ya, str_yb, str_yc, str_yy, str_yz, str_z, str_za, str_zb, str_zc, str_zz, and cms::concurrency::xercesInitialize().
◆ ~MuonAlignmentInputXML()
MuonAlignmentInputXML::~MuonAlignmentInputXML |
( |
| ) |
|
|
override |
Definition at line 129 of file MuonAlignmentInputXML.cc.
References fetchall_from_DQM_v2::release, str_aa, str_ab, str_ac, str_alpha, str_angle, str_axisx, str_axisy, str_axisz, str_bb, str_bc, str_beta, str_cc, str_chamber, str_collection, str_container, str_CSCChamber, str_CSCEndcap, str_CSCLayer, str_CSCRing, str_CSCStation, str_DTBarrel, str_DTChamber, str_DTLayer, str_DTStation, str_DTSuperLayer, str_DTWheel, str_endcap, str_gamma, str_ideal, str_layer, str_moveglobal, str_movelocal, str_name, str_none, str_operation, str_phi, str_phix, str_phiy, str_phiz, str_rawId, str_relativeto, str_ring, str_rotatebeamline, str_rotateglobalaxis, str_rotatelocal, str_rphi, str_sector, str_setape, str_setposition, str_setsurveyerr, str_station, str_superlayer, str_wheel, str_x, str_xa, str_xb, str_xc, str_xx, str_xy, str_xz, str_y, str_ya, str_yb, str_yc, str_yy, str_yz, str_z, str_za, str_zb, str_zc, str_zz, and cms::concurrency::xercesTerminate().
◆ MuonAlignmentInputXML() [2/2]
◆ do_moveglobal()
void MuonAlignmentInputXML::do_moveglobal |
( |
const XERCES_CPP_NAMESPACE::DOMElement * |
node, |
|
|
std::map< Alignable *, bool > & |
aliset, |
|
|
std::map< Alignable *, Alignable * > & |
alitoideal |
|
) |
| const |
|
private |
Definition at line 1141 of file MuonAlignmentInputXML.cc.
1144 DOMAttr *node_x = node->getAttributeNode(
str_x);
1145 DOMAttr *node_y = node->getAttributeNode(
str_y);
1146 DOMAttr *node_z = node->getAttributeNode(
str_z);
1147 if (node_x ==
nullptr)
1148 throw cms::Exception(
"XMLException") <<
"<moveglobal> is missing required \"x\" attribute" << std::endl;
1149 if (node_y ==
nullptr)
1150 throw cms::Exception(
"XMLException") <<
"<moveglobal> is missing required \"y\" attribute" << std::endl;
1151 if (node_z ==
nullptr)
1152 throw cms::Exception(
"XMLException") <<
"<moveglobal> is missing required \"z\" attribute" << std::endl;
1159 for (std::map<Alignable *, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
1168 if (survey !=
nullptr) {
1169 matrix6x6 = survey->
errors();
References SurveyDet::errors(), Exception, Alignable::move(), parseDouble(), Alignable::setSurvey(), str_x, str_y, str_z, Alignable::surface(), Alignable::survey(), x, y, and z.
Referenced by newAlignableMuon().
◆ do_movelocal()
void MuonAlignmentInputXML::do_movelocal |
( |
const XERCES_CPP_NAMESPACE::DOMElement * |
node, |
|
|
std::map< Alignable *, bool > & |
aliset, |
|
|
std::map< Alignable *, Alignable * > & |
alitoideal |
|
) |
| const |
|
private |
Definition at line 1175 of file MuonAlignmentInputXML.cc.
1178 DOMAttr *node_x = node->getAttributeNode(
str_x);
1179 DOMAttr *node_y = node->getAttributeNode(
str_y);
1180 DOMAttr *node_z = node->getAttributeNode(
str_z);
1181 if (node_x ==
nullptr)
1182 throw cms::Exception(
"XMLException") <<
"<movelocal> is missing required \"x\" attribute" << std::endl;
1183 if (node_y ==
nullptr)
1184 throw cms::Exception(
"XMLException") <<
"<movelocal> is missing required \"y\" attribute" << std::endl;
1185 if (node_z ==
nullptr)
1186 throw cms::Exception(
"XMLException") <<
"<movelocal> is missing required \"z\" attribute" << std::endl;
1193 for (std::map<Alignable *, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
1197 ali->
move(globalVector);
1203 if (survey !=
nullptr) {
1204 matrix6x6 = survey->
errors();
References SurveyDet::errors(), Exception, Alignable::move(), parseDouble(), Alignable::setSurvey(), str_x, str_y, str_z, Alignable::surface(), Alignable::survey(), AlignableSurface::toGlobal(), x, y, and z.
Referenced by newAlignableMuon().
◆ do_rotatebeamline()
void MuonAlignmentInputXML::do_rotatebeamline |
( |
const XERCES_CPP_NAMESPACE::DOMElement * |
node, |
|
|
std::map< Alignable *, bool > & |
aliset, |
|
|
std::map< Alignable *, Alignable * > & |
alitoideal |
|
) |
| const |
|
private |
Definition at line 1248 of file MuonAlignmentInputXML.cc.
1251 DOMAttr *node_rphi = node->getAttributeNode(
str_rphi);
1252 DOMAttr *node_phi = node->getAttributeNode(
str_phi);
1253 if (node_rphi ==
nullptr && node_phi ==
nullptr)
1254 throw cms::Exception(
"XMLException") <<
"<rotatebeamline> is missing required \"*phi\" attribute" << std::endl;
1255 if (node_rphi !=
nullptr && node_phi !=
nullptr)
1256 throw cms::Exception(
"XMLException") <<
"<rotatebeamline> can't have both an \"rphi\" and a \"phi\" attribute"
1260 if (node_rphi !=
nullptr) {
1266 for (std::map<Alignable *, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
1272 double phi0 =
pos.phi();
1273 double deltaphi =
value;
1274 if (node_rphi !=
nullptr)
1285 if (survey !=
nullptr) {
1286 matrix6x6 = survey->
errors();
References funct::cos(), SurveyDet::errors(), Exception, Alignable::move(), parseDouble(), CosmicsPD_Skims::radius, Alignable::rotateAroundGlobalZ(), Alignable::setSurvey(), funct::sin(), str_phi, str_rphi, Alignable::surface(), Alignable::survey(), AlignableSurface::toGlobal(), and relativeConstraints::value.
Referenced by newAlignableMuon().
◆ do_rotateglobalaxis()
void MuonAlignmentInputXML::do_rotateglobalaxis |
( |
const XERCES_CPP_NAMESPACE::DOMElement * |
node, |
|
|
std::map< Alignable *, bool > & |
aliset, |
|
|
std::map< Alignable *, Alignable * > & |
alitoideal |
|
) |
| const |
|
private |
Definition at line 1292 of file MuonAlignmentInputXML.cc.
1295 DOMAttr *node_x = node->getAttributeNode(
str_x);
1296 DOMAttr *node_y = node->getAttributeNode(
str_y);
1297 DOMAttr *node_z = node->getAttributeNode(
str_z);
1298 DOMAttr *node_angle = node->getAttributeNode(
str_angle);
1299 if (node_x ==
nullptr)
1300 throw cms::Exception(
"XMLException") <<
"<rotateglobalaxis> is missing required \"x\" attribute" << std::endl;
1301 if (node_y ==
nullptr)
1302 throw cms::Exception(
"XMLException") <<
"<rotateglobalaxis> is missing required \"y\" attribute" << std::endl;
1303 if (node_z ==
nullptr)
1304 throw cms::Exception(
"XMLException") <<
"<rotateglobalaxis> is missing required \"z\" attribute" << std::endl;
1305 if (node_angle ==
nullptr)
1306 throw cms::Exception(
"XMLException") <<
"<rotateglobalaxis> is missing required \"angle\" attribute" << std::endl;
1313 for (std::map<Alignable *, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
1325 double q3 =
sin(
angle / 2.) * cprime;
1331 double pos2z = 2. * (q3 *
q1 -
q0 *
q2) *
pos.x() + 2. * (q3 *
q2 +
q0 *
q1) *
pos.y() +
1334 double movex = pos2x -
pos.x();
1335 double movey = pos2y -
pos.y();
1336 double movez = pos2z -
pos.z();
1343 if (survey !=
nullptr) {
1344 matrix6x6 = survey->
errors();
References angle(), funct::cos(), SurveyDet::errors(), Exception, Alignable::move(), parseDouble(), SiStripMonitorCluster_cfi::q0, q1, q2, Alignable::rotateAroundGlobalAxis(), Alignable::setSurvey(), funct::sin(), mathSSE::sqrt(), str_angle, str_x, str_y, str_z, Alignable::surface(), Alignable::survey(), AlignableSurface::toGlobal(), x, y, and z.
Referenced by newAlignableMuon().
◆ do_rotatelocal()
void MuonAlignmentInputXML::do_rotatelocal |
( |
const XERCES_CPP_NAMESPACE::DOMElement * |
node, |
|
|
std::map< Alignable *, bool > & |
aliset, |
|
|
std::map< Alignable *, Alignable * > & |
alitoideal |
|
) |
| const |
|
private |
Definition at line 1210 of file MuonAlignmentInputXML.cc.
1213 DOMAttr *node_axisx = node->getAttributeNode(
str_axisx);
1214 DOMAttr *node_axisy = node->getAttributeNode(
str_axisy);
1215 DOMAttr *node_axisz = node->getAttributeNode(
str_axisz);
1216 DOMAttr *node_angle = node->getAttributeNode(
str_angle);
1217 if (node_axisx ==
nullptr)
1218 throw cms::Exception(
"XMLException") <<
"<rotatelocal> is missing required \"axisx\" attribute" << std::endl;
1219 if (node_axisy ==
nullptr)
1220 throw cms::Exception(
"XMLException") <<
"<rotatelocal> is missing required \"axisy\" attribute" << std::endl;
1221 if (node_axisz ==
nullptr)
1222 throw cms::Exception(
"XMLException") <<
"<rotatelocal> is missing required \"axisz\" attribute" << std::endl;
1223 if (node_angle ==
nullptr)
1224 throw cms::Exception(
"XMLException") <<
"<rotatelocal> is missing required \"angle\" attribute" << std::endl;
1232 for (std::map<Alignable *, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
1241 if (survey !=
nullptr) {
1242 matrix6x6 = survey->
errors();
References angle(), SurveyDet::errors(), Exception, parseDouble(), Alignable::rotateAroundLocalAxis(), Alignable::setSurvey(), str_angle, str_axisx, str_axisy, str_axisz, Alignable::surface(), Alignable::survey(), x, y, and z.
Referenced by newAlignableMuon().
◆ do_setape()
void MuonAlignmentInputXML::do_setape |
( |
const XERCES_CPP_NAMESPACE::DOMElement * |
node, |
|
|
std::map< Alignable *, bool > & |
aliset, |
|
|
std::map< Alignable *, Alignable * > & |
alitoideal |
|
) |
| const |
|
private |
Definition at line 947 of file MuonAlignmentInputXML.cc.
950 DOMAttr *node_xx = node->getAttributeNode(
str_xx);
951 DOMAttr *node_xy = node->getAttributeNode(
str_xy);
952 DOMAttr *node_xz = node->getAttributeNode(
str_xz);
953 DOMAttr *node_xa = node->getAttributeNode(
str_xa);
954 DOMAttr *node_xb = node->getAttributeNode(
str_xb);
955 DOMAttr *node_xc = node->getAttributeNode(
str_xc);
956 DOMAttr *node_yy = node->getAttributeNode(
str_yy);
957 DOMAttr *node_yz = node->getAttributeNode(
str_yz);
958 DOMAttr *node_ya = node->getAttributeNode(
str_ya);
959 DOMAttr *node_yb = node->getAttributeNode(
str_yb);
960 DOMAttr *node_yc = node->getAttributeNode(
str_yc);
961 DOMAttr *node_zz = node->getAttributeNode(
str_zz);
962 DOMAttr *node_za = node->getAttributeNode(
str_za);
963 DOMAttr *node_zb = node->getAttributeNode(
str_zb);
964 DOMAttr *node_zc = node->getAttributeNode(
str_zc);
965 DOMAttr *node_aa = node->getAttributeNode(
str_aa);
966 DOMAttr *node_ab = node->getAttributeNode(
str_ab);
967 DOMAttr *node_ac = node->getAttributeNode(
str_ac);
968 DOMAttr *node_bb = node->getAttributeNode(
str_bb);
969 DOMAttr *node_bc = node->getAttributeNode(
str_bc);
970 DOMAttr *node_cc = node->getAttributeNode(
str_cc);
972 if (node_xx ==
nullptr)
973 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"xx\" attribute" << std::endl;
974 if (node_xy ==
nullptr)
975 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"xy\" attribute" << std::endl;
976 if (node_xz ==
nullptr)
977 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"xz\" attribute" << std::endl;
978 if (node_xa ==
nullptr)
979 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"xa\" attribute" << std::endl;
980 if (node_xb ==
nullptr)
981 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"xb\" attribute" << std::endl;
982 if (node_xc ==
nullptr)
983 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"xc\" attribute" << std::endl;
984 if (node_yy ==
nullptr)
985 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"yy\" attribute" << std::endl;
986 if (node_yz ==
nullptr)
987 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"yz\" attribute" << std::endl;
988 if (node_ya ==
nullptr)
989 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"ya\" attribute" << std::endl;
990 if (node_yb ==
nullptr)
991 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"yb\" attribute" << std::endl;
992 if (node_yc ==
nullptr)
993 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"yc\" attribute" << std::endl;
994 if (node_zz ==
nullptr)
995 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"zz\" attribute" << std::endl;
996 if (node_za ==
nullptr)
997 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"za\" attribute" << std::endl;
998 if (node_zb ==
nullptr)
999 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"zb\" attribute" << std::endl;
1000 if (node_zc ==
nullptr)
1001 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"zc\" attribute" << std::endl;
1002 if (node_aa ==
nullptr)
1003 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"aa\" attribute" << std::endl;
1004 if (node_ab ==
nullptr)
1005 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"ab\" attribute" << std::endl;
1006 if (node_ac ==
nullptr)
1007 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"ac\" attribute" << std::endl;
1008 if (node_bb ==
nullptr)
1009 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"bb\" attribute" << std::endl;
1010 if (node_bc ==
nullptr)
1011 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"bc\" attribute" << std::endl;
1012 if (node_cc ==
nullptr)
1013 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"cc\" attribute" << std::endl;
1016 matrix6x6(0, 0) =
parseDouble(node_xx->getValue(),
"xx");
1017 matrix6x6(0, 1) =
parseDouble(node_xy->getValue(),
"xy");
1018 matrix6x6(0, 2) =
parseDouble(node_xz->getValue(),
"xz");
1019 matrix6x6(0, 3) =
parseDouble(node_xa->getValue(),
"xa");
1020 matrix6x6(0, 4) =
parseDouble(node_xb->getValue(),
"xb");
1021 matrix6x6(0, 5) =
parseDouble(node_xc->getValue(),
"xc");
1022 matrix6x6(1, 1) =
parseDouble(node_yy->getValue(),
"yy");
1023 matrix6x6(1, 2) =
parseDouble(node_yz->getValue(),
"yz");
1024 matrix6x6(1, 3) =
parseDouble(node_ya->getValue(),
"ya");
1025 matrix6x6(1, 4) =
parseDouble(node_yb->getValue(),
"yb");
1026 matrix6x6(1, 5) =
parseDouble(node_yc->getValue(),
"yc");
1027 matrix6x6(2, 2) =
parseDouble(node_zz->getValue(),
"zz");
1028 matrix6x6(2, 3) =
parseDouble(node_za->getValue(),
"za");
1029 matrix6x6(2, 4) =
parseDouble(node_zb->getValue(),
"zb");
1030 matrix6x6(2, 5) =
parseDouble(node_zc->getValue(),
"zc");
1031 matrix6x6(3, 3) =
parseDouble(node_aa->getValue(),
"aa");
1032 matrix6x6(3, 4) =
parseDouble(node_ab->getValue(),
"ab");
1033 matrix6x6(3, 5) =
parseDouble(node_ac->getValue(),
"ac");
1034 matrix6x6(4, 4) =
parseDouble(node_bb->getValue(),
"bb");
1035 matrix6x6(4, 5) =
parseDouble(node_bc->getValue(),
"bc");
1036 matrix6x6(5, 5) =
parseDouble(node_cc->getValue(),
"cc");
1038 for (std::map<Alignable *, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
References Exception, parseDouble(), str_aa, str_ab, str_ac, str_bb, str_bc, str_cc, str_xa, str_xb, str_xc, str_xx, str_xy, str_xz, str_ya, str_yb, str_yc, str_yy, str_yz, str_za, str_zb, str_zc, and str_zz.
Referenced by newAlignableMuon().
◆ do_setposition()
void MuonAlignmentInputXML::do_setposition |
( |
const XERCES_CPP_NAMESPACE::DOMElement * |
node, |
|
|
std::map< Alignable *, bool > & |
aliset, |
|
|
std::map< Alignable *, Alignable * > & |
alitoideal |
|
) |
| const |
|
private |
Definition at line 742 of file MuonAlignmentInputXML.cc.
745 DOMAttr *node_relativeto = node->getAttributeNode(
str_relativeto);
746 if (node_relativeto ==
nullptr)
747 throw cms::Exception(
"XMLException") <<
"<setposition> is missing required \"relativeto\" attribute" << std::endl;
757 char *message = XMLString::transcode(node_relativeto->getValue());
758 throw cms::Exception(
"XMLException") <<
"relativeto must be \"none\", \"ideal\", or \"container\", not \""
759 << message <<
"\"" << std::endl;
762 for (std::map<Alignable *, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
787 oldrot = oldrot * globalRotation.
transposed();
790 double x = oldpos.
x();
791 double y = oldpos.
y();
792 double z = oldpos.
z();
794 double phix = atan2(oldrot.
yz(), oldrot.
zz());
795 double phiy = asin(-oldrot.
xz());
796 double phiz = atan2(oldrot.
xy(), oldrot.
xx());
799 double alpha = oldEulerAngles(1);
800 double beta = oldEulerAngles(2);
801 double gamma = oldEulerAngles(3);
805 DOMAttr *node_x = node->getAttributeNode(
str_x);
806 DOMAttr *node_y = node->getAttributeNode(
str_y);
807 DOMAttr *node_z = node->getAttributeNode(
str_z);
809 if (node_x !=
nullptr)
811 if (node_y !=
nullptr)
813 if (node_z !=
nullptr)
817 DOMAttr *node_phix = node->getAttributeNode(
str_phix);
818 DOMAttr *node_phiy = node->getAttributeNode(
str_phiy);
819 DOMAttr *node_phiz = node->getAttributeNode(
str_phiz);
820 DOMAttr *node_alpha = node->getAttributeNode(
str_alpha);
821 DOMAttr *node_beta = node->getAttributeNode(
str_beta);
822 DOMAttr *node_gamma = node->getAttributeNode(
str_gamma);
825 bool phixyz = (node_phix !=
nullptr || node_phiy !=
nullptr || node_phiz !=
nullptr);
826 bool alphabetagamma = (node_alpha !=
nullptr || node_beta !=
nullptr || node_gamma !=
nullptr);
827 if (phixyz && alphabetagamma)
829 <<
"<setposition> must either have phix, phiy, and phiz or alpha, beta, and gamma, but not both" << std::endl;
830 if (!phixyz && !alphabetagamma)
831 alphabetagamma =
true;
834 if (node_phix !=
nullptr)
836 if (node_phiy !=
nullptr)
838 if (node_phiz !=
nullptr)
847 rot = rotX * rotY * rotZ;
850 else if (alphabetagamma) {
851 if (node_alpha !=
nullptr)
853 if (node_beta !=
nullptr)
855 if (node_gamma !=
nullptr)
860 eulerAngles(1) =
alpha;
861 eulerAngles(2) =
beta;
862 eulerAngles(3) =
gamma;
890 if (container !=
nullptr) {
References zMuMuMuonUserData::alpha, cms::cuda::assert(), PV3DBase< T, PVType, FrameType >::basicVector(), zMuMuMuonUserData::beta, funct::cos(), equals(), Exception, CustomPhysics_cfi::gamma, Alignable::globalPosition(), Alignable::globalRotation(), Alignable::mother(), parseDouble(), convertToXML_global_cfg::relativeto, makeMuonMisalignmentScenario::rot, set_one_position(), funct::sin(), str_alpha, str_beta, str_container, str_gamma, str_ideal, str_none, str_phix, str_phiy, str_phiz, str_relativeto, str_x, str_y, str_z, align::toAngles(), align::toMatrix(), TkRotation< T >::transposed(), x, PV3DBase< T, PVType, FrameType >::x(), TkRotation< T >::xx(), TkRotation< T >::xy(), TkRotation< T >::xz(), y, PV3DBase< T, PVType, FrameType >::y(), TkRotation< T >::yz(), z, PV3DBase< T, PVType, FrameType >::z(), and TkRotation< T >::zz().
Referenced by newAlignableMuon().
◆ do_setsurveyerr()
void MuonAlignmentInputXML::do_setsurveyerr |
( |
const XERCES_CPP_NAMESPACE::DOMElement * |
node, |
|
|
std::map< Alignable *, bool > & |
aliset, |
|
|
std::map< Alignable *, Alignable * > & |
alitoideal |
|
) |
| const |
|
private |
Definition at line 1044 of file MuonAlignmentInputXML.cc.
1047 DOMAttr *node_xx = node->getAttributeNode(
str_xx);
1048 DOMAttr *node_xy = node->getAttributeNode(
str_xy);
1049 DOMAttr *node_xz = node->getAttributeNode(
str_xz);
1050 DOMAttr *node_xa = node->getAttributeNode(
str_xa);
1051 DOMAttr *node_xb = node->getAttributeNode(
str_xb);
1052 DOMAttr *node_xc = node->getAttributeNode(
str_xc);
1053 DOMAttr *node_yy = node->getAttributeNode(
str_yy);
1054 DOMAttr *node_yz = node->getAttributeNode(
str_yz);
1055 DOMAttr *node_ya = node->getAttributeNode(
str_ya);
1056 DOMAttr *node_yb = node->getAttributeNode(
str_yb);
1057 DOMAttr *node_yc = node->getAttributeNode(
str_yc);
1058 DOMAttr *node_zz = node->getAttributeNode(
str_zz);
1059 DOMAttr *node_za = node->getAttributeNode(
str_za);
1060 DOMAttr *node_zb = node->getAttributeNode(
str_zb);
1061 DOMAttr *node_zc = node->getAttributeNode(
str_zc);
1062 DOMAttr *node_aa = node->getAttributeNode(
str_aa);
1063 DOMAttr *node_ab = node->getAttributeNode(
str_ab);
1064 DOMAttr *node_ac = node->getAttributeNode(
str_ac);
1065 DOMAttr *node_bb = node->getAttributeNode(
str_bb);
1066 DOMAttr *node_bc = node->getAttributeNode(
str_bc);
1067 DOMAttr *node_cc = node->getAttributeNode(
str_cc);
1069 if (node_xx ==
nullptr)
1070 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"xx\" attribute" << std::endl;
1071 if (node_xy ==
nullptr)
1072 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"xy\" attribute" << std::endl;
1073 if (node_xz ==
nullptr)
1074 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"xz\" attribute" << std::endl;
1075 if (node_xa ==
nullptr)
1076 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"xa\" attribute" << std::endl;
1077 if (node_xb ==
nullptr)
1078 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"xb\" attribute" << std::endl;
1079 if (node_xc ==
nullptr)
1080 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"xc\" attribute" << std::endl;
1081 if (node_yy ==
nullptr)
1082 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"yy\" attribute" << std::endl;
1083 if (node_yz ==
nullptr)
1084 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"yz\" attribute" << std::endl;
1085 if (node_ya ==
nullptr)
1086 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"ya\" attribute" << std::endl;
1087 if (node_yb ==
nullptr)
1088 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"yb\" attribute" << std::endl;
1089 if (node_yc ==
nullptr)
1090 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"yc\" attribute" << std::endl;
1091 if (node_zz ==
nullptr)
1092 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"zz\" attribute" << std::endl;
1093 if (node_za ==
nullptr)
1094 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"za\" attribute" << std::endl;
1095 if (node_zb ==
nullptr)
1096 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"zb\" attribute" << std::endl;
1097 if (node_zc ==
nullptr)
1098 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"zc\" attribute" << std::endl;
1099 if (node_aa ==
nullptr)
1100 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"aa\" attribute" << std::endl;
1101 if (node_ab ==
nullptr)
1102 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"ab\" attribute" << std::endl;
1103 if (node_ac ==
nullptr)
1104 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"ac\" attribute" << std::endl;
1105 if (node_bb ==
nullptr)
1106 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"bb\" attribute" << std::endl;
1107 if (node_bc ==
nullptr)
1108 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"bc\" attribute" << std::endl;
1109 if (node_cc ==
nullptr)
1110 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"cc\" attribute" << std::endl;
1113 matrix6x6(0, 0) =
parseDouble(node_xx->getValue(),
"xx");
1114 matrix6x6(0, 1) =
parseDouble(node_xy->getValue(),
"xy");
1115 matrix6x6(0, 2) =
parseDouble(node_xz->getValue(),
"xz");
1116 matrix6x6(0, 3) =
parseDouble(node_xa->getValue(),
"xa");
1117 matrix6x6(0, 4) =
parseDouble(node_xb->getValue(),
"xb");
1118 matrix6x6(0, 5) =
parseDouble(node_xc->getValue(),
"xc");
1119 matrix6x6(1, 1) =
parseDouble(node_yy->getValue(),
"yy");
1120 matrix6x6(1, 2) =
parseDouble(node_yz->getValue(),
"yz");
1121 matrix6x6(1, 3) =
parseDouble(node_ya->getValue(),
"ya");
1122 matrix6x6(1, 4) =
parseDouble(node_yb->getValue(),
"yb");
1123 matrix6x6(1, 5) =
parseDouble(node_yc->getValue(),
"yc");
1124 matrix6x6(2, 2) =
parseDouble(node_zz->getValue(),
"zz");
1125 matrix6x6(2, 3) =
parseDouble(node_za->getValue(),
"za");
1126 matrix6x6(2, 4) =
parseDouble(node_zb->getValue(),
"zb");
1127 matrix6x6(2, 5) =
parseDouble(node_zc->getValue(),
"zc");
1128 matrix6x6(3, 3) =
parseDouble(node_aa->getValue(),
"aa");
1129 matrix6x6(3, 4) =
parseDouble(node_ab->getValue(),
"ab");
1130 matrix6x6(3, 5) =
parseDouble(node_ac->getValue(),
"ac");
1131 matrix6x6(4, 4) =
parseDouble(node_bb->getValue(),
"bb");
1132 matrix6x6(4, 5) =
parseDouble(node_bc->getValue(),
"bc");
1133 matrix6x6(5, 5) =
parseDouble(node_cc->getValue(),
"cc");
1135 for (std::map<Alignable *, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
References Exception, parseDouble(), Alignable::setSurvey(), str_aa, str_ab, str_ac, str_bb, str_bc, str_cc, str_xa, str_xb, str_xc, str_xx, str_xy, str_xz, str_ya, str_yb, str_yc, str_yy, str_yz, str_za, str_zb, str_zc, str_zz, and Alignable::surface().
Referenced by newAlignableMuon().
◆ fillAliToIdeal()
Definition at line 235 of file MuonAlignmentInputXML.cc.
238 align::Alignables::const_iterator alignable = alignables.begin();
239 align::Alignables::const_iterator ideal = ideals.begin();
241 while (alignable != alignables.end() && ideal != ideals.end()) {
242 alitoideal[*alignable] = *ideal;
244 fillAliToIdeal(alitoideal, (*alignable)->components(), (*ideal)->components());
250 if (alignable != alignables.end() || ideal != ideals.end()) {
252 <<
"alignable and ideal-alignable trees are out of sync (this should never happen)";
References Exception.
Referenced by newAlignableMuon().
◆ getCSCnode()
Definition at line 571 of file MuonAlignmentInputXML.cc.
577 DOMAttr *node_rawId = node->getAttributeNode(
str_rawId);
578 if (node_rawId !=
nullptr) {
580 rawId = XMLString::parseInt(node_rawId->getValue());
581 }
catch (
const XMLException &toCatch) {
582 throw cms::Exception(
"XMLException") <<
"Value of \"rawId\" must be an integer" << std::endl;
588 DOMAttr *node_endcap = node->getAttributeNode(
str_endcap);
589 if (node_endcap ==
nullptr)
590 throw cms::Exception(
"XMLException") <<
"CSC node is missing required \"endcap\" attribute" << std::endl;
592 endcap = XMLString::parseInt(node_endcap->getValue());
593 }
catch (
const XMLException &toCatch) {
594 throw cms::Exception(
"XMLException") <<
"Value of \"endcap\" must be an integer" << std::endl;
600 DOMAttr *node_station = node->getAttributeNode(
str_station);
601 if (node_station ==
nullptr)
602 throw cms::Exception(
"XMLException") <<
"CSC node is missing required \"station\" attribute" << std::endl;
604 station = XMLString::parseInt(node_station->getValue());
605 }
catch (
const XMLException &toCatch) {
606 throw cms::Exception(
"XMLException") <<
"Value of \"station\" must be an integer" << std::endl;
610 DOMAttr *node_ring = node->getAttributeNode(
str_ring);
611 if (node_ring ==
nullptr)
612 throw cms::Exception(
"XMLException") <<
"CSC node is missing required \"ring\" attribute" << std::endl;
614 ring = XMLString::parseInt(node_ring->getValue());
615 }
catch (
const XMLException &toCatch) {
616 throw cms::Exception(
"XMLException") <<
"Value of \"ring\" must be an integer" << std::endl;
620 DOMAttr *node_chamber = node->getAttributeNode(
str_chamber);
621 if (node_chamber ==
nullptr)
622 throw cms::Exception(
"XMLException") <<
"CSC node is missing required \"chamber\" attribute" << std::endl;
624 chamber = XMLString::parseInt(node_chamber->getValue());
625 }
catch (
const XMLException &toCatch) {
626 throw cms::Exception(
"XMLException") <<
"Value of \"chamber\" must be an integer" << std::endl;
630 DOMAttr *node_layer = node->getAttributeNode(
str_layer);
631 if (node_layer ==
nullptr)
632 throw cms::Exception(
"XMLException") <<
"CSC node is missing required \"layer\" attribute" << std::endl;
634 layer = XMLString::parseInt(node_layer->getValue());
635 }
catch (
const XMLException &toCatch) {
636 throw cms::Exception(
"XMLException") <<
"Value of \"layer\" must be an integer" << std::endl;
645 rawId = layerId.rawId();
648 Alignable *ali = alignableNavigator[rawId];
650 throw cms::Exception(
"XMLException") <<
"rawId \"" << rawId <<
"\" is not recognized" << std::endl;
655 if (ali ==
nullptr) {
657 <<
"rawId \"" << rawId <<
"\" is not a " << alignableObjectId.
idToString(structureType) << std::endl;
References align::AlignableCSCChamber, align::AlignableCSCEndcap, align::AlignableCSCRing, align::AlignableCSCStation, Alignable::alignableObjectId(), relativeConstraints::chamber, makeMuonMisalignmentScenario::endcap, Exception, AlignableObjectId::idToString(), Alignable::mother(), DetId::rawId(), relativeConstraints::ring, relativeConstraints::station, str_chamber, str_endcap, str_layer, str_rawId, str_ring, and str_station.
Referenced by getNode().
◆ getDTnode()
Definition at line 478 of file MuonAlignmentInputXML.cc.
482 unsigned int rawId = 0;
484 DOMAttr *node_rawId = node->getAttributeNode(
str_rawId);
485 if (node_rawId !=
nullptr) {
487 rawId = XMLString::parseInt(node_rawId->getValue());
488 }
catch (
const XMLException &toCatch) {
489 throw cms::Exception(
"XMLException") <<
"Value of \"rawId\" must be an integer" << std::endl;
496 DOMAttr *node_wheel = node->getAttributeNode(
str_wheel);
497 if (node_wheel ==
nullptr)
498 throw cms::Exception(
"XMLException") <<
"DT node is missing required \"wheel\" attribute" << std::endl;
500 wheel = XMLString::parseInt(node_wheel->getValue());
501 }
catch (
const XMLException &toCatch) {
502 throw cms::Exception(
"XMLException") <<
"Value of \"wheel\" must be an integer" << std::endl;
506 DOMAttr *node_station = node->getAttributeNode(
str_station);
507 if (node_station ==
nullptr)
508 throw cms::Exception(
"XMLException") <<
"DT node is missing required \"station\" attribute" << std::endl;
510 station = XMLString::parseInt(node_station->getValue());
511 }
catch (
const XMLException &toCatch) {
512 throw cms::Exception(
"XMLException") <<
"Value of \"station\" must be an integer" << std::endl;
516 DOMAttr *node_sector = node->getAttributeNode(
str_sector);
517 if (node_sector ==
nullptr)
518 throw cms::Exception(
"XMLException") <<
"DT node is missing required \"sector\" attribute" << std::endl;
520 sector = XMLString::parseInt(node_sector->getValue());
521 }
catch (
const XMLException &toCatch) {
522 throw cms::Exception(
"XMLException") <<
"Value of \"sector\" must be an integer" << std::endl;
526 DOMAttr *node_superlayer = node->getAttributeNode(
str_superlayer);
527 if (node_superlayer ==
nullptr)
529 <<
"DT node is missing required \"superlayer\" attribute" << std::endl;
531 superlayer = XMLString::parseInt(node_superlayer->getValue());
532 }
catch (
const XMLException &toCatch) {
533 throw cms::Exception(
"XMLException") <<
"Value of \"superlayer\" must be an integer" << std::endl;
537 DOMAttr *node_layer = node->getAttributeNode(
str_layer);
538 if (node_layer ==
nullptr)
539 throw cms::Exception(
"XMLException") <<
"DT node is missing required \"layer\" attribute" << std::endl;
541 layer = XMLString::parseInt(node_layer->getValue());
542 }
catch (
const XMLException &toCatch) {
543 throw cms::Exception(
"XMLException") <<
"Value of \"layer\" must be an integer" << std::endl;
553 rawId = layerId.rawId();
556 Alignable *ali = alignableNavigator[rawId];
558 throw cms::Exception(
"XMLException") <<
"rawId \"" << rawId <<
"\" is not recognized" << std::endl;
563 if (ali ==
nullptr) {
565 <<
"rawId \"" << rawId <<
"\" is not a " << alignableObjectId.
idToString(structureType) << std::endl;
References align::AlignableDTBarrel, align::AlignableDTChamber, align::AlignableDTStation, align::AlignableDTSuperLayer, align::AlignableDTWheel, Alignable::alignableObjectId(), Exception, AlignableObjectId::idToString(), Alignable::mother(), DetId::rawId(), relativeConstraints::station, str_layer, str_rawId, str_sector, str_station, str_superlayer, str_wheel, and makeMuonMisalignmentScenario::wheel.
Referenced by getNode().
◆ getNode()
Alignable * MuonAlignmentInputXML::getNode |
( |
std::map< unsigned int, Alignable * > & |
alignableNavigator, |
|
|
const XERCES_CPP_NAMESPACE::DOMElement * |
node, |
|
|
const AlignableObjectId & |
alignableObjectId |
|
) |
| const |
|
private |
Definition at line 449 of file MuonAlignmentInputXML.cc.
References align::AlignableCSCChamber, align::AlignableCSCEndcap, align::AlignableCSCRing, align::AlignableCSCStation, align::AlignableDetUnit, align::AlignableDTBarrel, align::AlignableDTChamber, align::AlignableDTStation, align::AlignableDTSuperLayer, align::AlignableDTWheel, equals(), getCSCnode(), getDTnode(), str_CSCChamber, str_CSCEndcap, str_CSCLayer, str_CSCRing, str_CSCStation, str_DTBarrel, str_DTChamber, str_DTLayer, str_DTStation, str_DTSuperLayer, and str_DTWheel.
Referenced by newAlignableMuon().
◆ newAlignableMuon()
Reimplemented from MuonAlignmentInputMethod.
Definition at line 256 of file MuonAlignmentInputXML.cc.
263 std::map<unsigned int, Alignable *> alignableNavigator;
268 std::map<unsigned int, Alignable *> ideal_alignableNavigator;
269 recursiveGetId(ideal_alignableNavigator, ideal_alignableMuon->DTBarrel());
270 recursiveGetId(ideal_alignableNavigator, ideal_alignableMuon->CSCEndcaps());
274 }
catch (
const XMLException &toCatch) {
275 throw cms::Exception(
"XMLException") <<
"Xerces XML parser threw an exception on initialization." << std::endl;
278 XercesDOMParser *
parser =
new XercesDOMParser();
279 parser->setValidationScheme(XercesDOMParser::Val_Always);
281 XERCES_CPP_NAMESPACE::ErrorHandler *errHandler = (XERCES_CPP_NAMESPACE::ErrorHandler *)(
new HandlerBase());
282 parser->setErrorHandler(errHandler);
286 }
catch (
const XMLException &toCatch) {
287 char *message = XMLString::transcode(toCatch.getMessage());
288 throw cms::Exception(
"XMLException") <<
"Xerces XML parser threw this exception: " << message << std::endl;
289 }
catch (
const DOMException &toCatch) {
290 char *message = XMLString::transcode(toCatch.msg);
291 throw cms::Exception(
"XMLException") <<
"Xerces XML parser threw this exception: " << message << std::endl;
292 }
catch (
const SAXException &toCatch) {
293 char *message = XMLString::transcode(toCatch.getMessage());
294 throw cms::Exception(
"XMLException") <<
"Xerces XML parser threw this exception: " << message << std::endl;
297 DOMDocument *
doc =
parser->getDocument();
298 DOMElement *node_MuonAlignment =
doc->getDocumentElement();
302 std::map<Alignable *, Alignable *> alitoideal;
307 std::map<std::string, std::map<Alignable *, bool> > alicollections;
310 if (
collection->getParentNode() == node_MuonAlignment) {
314 if (node_name ==
nullptr) {
315 throw cms::Exception(
"XMLException") <<
"<collection> requires a name attribute" << std::endl;
317 char *ascii_name = XMLString::transcode(node_name->getValue());
321 std::map<Alignable *, bool> aliset;
322 for (
unsigned int j = 0;
j <
children->getLength();
j++) {
325 if (node->getNodeType() == DOMNode::ELEMENT_NODE) {
326 Alignable *ali =
getNode(alignableNavigator, (DOMElement *)(node), alignableObjectId);
327 if (ali ==
nullptr) {
328 throw cms::Exception(
"XMLException") <<
"<collection> must contain only alignables" << std::endl;
335 alicollections[
name] = aliset;
339 for (
unsigned int i = 0;
i < operations->getLength();
i++) {
340 DOMElement *operation = (DOMElement *)(operations->item(
i));
341 if (operation->getParentNode() != node_MuonAlignment) {
342 throw cms::Exception(
"XMLException") <<
"All operations must be top-level elements" << std::endl;
345 DOMNodeList *
children = operation->getChildNodes();
347 std::map<Alignable *, bool> aliset;
348 std::vector<DOMNode *> nodesToRemove;
349 for (
unsigned int j = 0;
j <
children->getLength();
j++) {
352 if (node->getNodeType() == DOMNode::ELEMENT_NODE) {
353 Alignable *ali =
getNode(alignableNavigator, (DOMElement *)(node), alignableObjectId);
354 if (ali !=
nullptr) {
356 nodesToRemove.push_back(node);
360 DOMAttr *node_name = ((DOMElement *)(node))->getAttributeNode(
str_name);
361 if (node_name ==
nullptr) {
362 throw cms::Exception(
"XMLException") <<
"<collection> requires a name attribute" << std::endl;
364 char *ascii_name = XMLString::transcode(node_name->getValue());
368 std::map<std::string, std::map<Alignable *, bool> >::const_iterator alicollections_iter =
369 alicollections.find(
name);
370 if (alicollections_iter == alicollections.end()) {
372 <<
"<collection name=\"" <<
name <<
"\"> hasn't been defined" << std::endl;
375 for (std::map<Alignable *, bool>::const_iterator aliiter = alicollections_iter->second.begin();
376 aliiter != alicollections_iter->second.end();
378 aliset[aliiter->first] =
true;
381 nodesToRemove.push_back(node);
391 for (std::vector<DOMNode *>::const_iterator node = nodesToRemove.begin(); node != nodesToRemove.end(); ++node) {
392 operation->removeChild(*node);
394 children = operation->getChildNodes();
396 for (
unsigned int j = 0;
j <
children->getLength();
j++) {
398 if (node->getNodeType() == DOMNode::ELEMENT_NODE) {
404 do_setape((DOMElement *)(node), aliset, alitoideal);
432 char *message = XMLString::transcode(node->getNodeName());
433 throw cms::Exception(
"XMLException") <<
"Unrecognized operation: \"" << message <<
"\"" << std::endl;
445 delete ideal_alignableMuon;
446 return alignableMuon;
References align::AlignableMuon, class-composition::children, universalConfigTemplate::collection, oniaPATMuonsWithTrigger_cff::collections, AlignableMuon::CSCEndcaps(), do_moveglobal(), do_movelocal(), do_rotatebeamline(), do_rotateglobalaxis(), do_rotatelocal(), do_setape(), do_setposition(), do_setsurveyerr(), common_cff::doc, AlignableMuon::DTBarrel(), equals(), Exception, fillAliToIdeal(), edm::EventSetup::get(), get, getNode(), mps_fire::i, idealGeometryLabel, dqmiolumiharvest::j, m_fileName, Skims_PA_cff::name, AlignableMuon::objectIdProvider(), writedatasetfile::parser, recursiveGetId(), fetchall_from_DQM_v2::release, str_collection, str_moveglobal, str_movelocal, str_name, str_operation, str_rotatebeamline, str_rotateglobalaxis, str_rotatelocal, str_setape, str_setposition, str_setsurveyerr, AlCaHLTBitMon_QueryRunRegistry::string, cms::concurrency::xercesInitialize(), and cms::concurrency::xercesTerminate().
◆ operator=()
◆ parseDouble()
double MuonAlignmentInputXML::parseDouble |
( |
const XMLCh * |
str, |
|
|
const char * |
attribute |
|
) |
| const |
|
private |
Definition at line 663 of file MuonAlignmentInputXML.cc.
664 unsigned int len = XMLString::stringLen(
str);
665 char *cstr = XMLString::transcode(
str);
666 std::stringstream errmessage;
667 errmessage <<
"Value of \"" << attribute <<
"\" must be a double, not \"" << cstr <<
"\"" << std::endl;
672 if (cstr[
i] ==
'-') {
675 }
else if (cstr[
i] ==
'+')
680 while (cstr[
i] !=
'.' && cstr[
i] !=
'e' && cstr[
i] !=
'E' &&
i < len) {
681 if (cstr[
i] <
'0' || cstr[
i] >
'9') {
691 if (cstr[
i] ==
'.') {
695 while (cstr[
i] !=
'e' && cstr[
i] !=
'E' &&
i < len) {
696 if (cstr[
i] <
'0' || cstr[
i] >
'9') {
701 output += (cstr[
i] -
'0') * place;
707 if (cstr[
i] ==
'e' || cstr[
i] ==
'E') {
711 bool expminus =
false;
712 if (cstr[
i] ==
'-') {
715 }
else if (cstr[
i] ==
'+')
719 if (cstr[
i] <
'0' || cstr[
i] >
'9') {
References Exception, HLT_FULL_cff::exponent, mps_fire::i, reco::HaloData::minus, convertSQLitetoXML_cfg::output, funct::pow(), fetchall_from_DQM_v2::release, and str.
Referenced by do_moveglobal(), do_movelocal(), do_rotatebeamline(), do_rotateglobalaxis(), do_rotatelocal(), do_setape(), do_setposition(), and do_setsurveyerr().
◆ recursiveGetId()
void MuonAlignmentInputXML::recursiveGetId |
( |
std::map< unsigned int, Alignable * > & |
alignableNavigator, |
|
|
const align::Alignables & |
alignables |
|
) |
| const |
|
private |
◆ set_one_position()
Definition at line 905 of file MuonAlignmentInputXML.cc.
941 if (survey !=
nullptr) {
942 matrix6x6 = survey->
errors();
References SurveyDet::errors(), Alignable::globalPosition(), Alignable::globalRotation(), Alignable::move(), TkRotation< T >::multiplyInverse(), align::rectify(), makeMuonMisalignmentScenario::rot, Alignable::rotateInGlobalFrame(), Alignable::setSurvey(), Alignable::surface(), and Alignable::survey().
Referenced by do_setposition().
◆ idealGeometryLabel
std::string MuonAlignmentInputXML::idealGeometryLabel |
|
private |
◆ m_fileName
std::string MuonAlignmentInputXML::m_fileName |
|
private |
◆ str_aa
XMLCh* MuonAlignmentInputXML::str_aa |
|
private |
◆ str_ab
XMLCh* MuonAlignmentInputXML::str_ab |
|
private |
◆ str_ac
XMLCh* MuonAlignmentInputXML::str_ac |
|
private |
◆ str_alpha
XMLCh* MuonAlignmentInputXML::str_alpha |
|
private |
◆ str_angle
XMLCh* MuonAlignmentInputXML::str_angle |
|
private |
◆ str_axisx
XMLCh* MuonAlignmentInputXML::str_axisx |
|
private |
◆ str_axisy
XMLCh* MuonAlignmentInputXML::str_axisy |
|
private |
◆ str_axisz
XMLCh* MuonAlignmentInputXML::str_axisz |
|
private |
◆ str_bb
XMLCh* MuonAlignmentInputXML::str_bb |
|
private |
◆ str_bc
XMLCh* MuonAlignmentInputXML::str_bc |
|
private |
◆ str_beta
XMLCh* MuonAlignmentInputXML::str_beta |
|
private |
◆ str_cc
XMLCh* MuonAlignmentInputXML::str_cc |
|
private |
◆ str_chamber
XMLCh* MuonAlignmentInputXML::str_chamber |
|
private |
◆ str_collection
XMLCh* MuonAlignmentInputXML::str_collection |
|
private |
◆ str_container
XMLCh* MuonAlignmentInputXML::str_container |
|
private |
◆ str_CSCChamber
XMLCh* MuonAlignmentInputXML::str_CSCChamber |
|
private |
◆ str_CSCEndcap
XMLCh* MuonAlignmentInputXML::str_CSCEndcap |
|
private |
◆ str_CSCLayer
XMLCh* MuonAlignmentInputXML::str_CSCLayer |
|
private |
◆ str_CSCRing
XMLCh* MuonAlignmentInputXML::str_CSCRing |
|
private |
◆ str_CSCStation
XMLCh* MuonAlignmentInputXML::str_CSCStation |
|
private |
◆ str_DTBarrel
XMLCh* MuonAlignmentInputXML::str_DTBarrel |
|
private |
◆ str_DTChamber
XMLCh* MuonAlignmentInputXML::str_DTChamber |
|
private |
◆ str_DTLayer
XMLCh* MuonAlignmentInputXML::str_DTLayer |
|
private |
◆ str_DTStation
XMLCh* MuonAlignmentInputXML::str_DTStation |
|
private |
◆ str_DTSuperLayer
XMLCh* MuonAlignmentInputXML::str_DTSuperLayer |
|
private |
◆ str_DTWheel
XMLCh* MuonAlignmentInputXML::str_DTWheel |
|
private |
◆ str_endcap
XMLCh* MuonAlignmentInputXML::str_endcap |
|
private |
◆ str_gamma
XMLCh* MuonAlignmentInputXML::str_gamma |
|
private |
◆ str_ideal
XMLCh* MuonAlignmentInputXML::str_ideal |
|
private |
◆ str_layer
XMLCh* MuonAlignmentInputXML::str_layer |
|
private |
◆ str_moveglobal
XMLCh* MuonAlignmentInputXML::str_moveglobal |
|
private |
◆ str_movelocal
XMLCh* MuonAlignmentInputXML::str_movelocal |
|
private |
◆ str_name
XMLCh* MuonAlignmentInputXML::str_name |
|
private |
◆ str_none
XMLCh* MuonAlignmentInputXML::str_none |
|
private |
◆ str_operation
XMLCh* MuonAlignmentInputXML::str_operation |
|
private |
◆ str_phi
XMLCh* MuonAlignmentInputXML::str_phi |
|
private |
◆ str_phix
XMLCh* MuonAlignmentInputXML::str_phix |
|
private |
◆ str_phiy
XMLCh* MuonAlignmentInputXML::str_phiy |
|
private |
◆ str_phiz
XMLCh* MuonAlignmentInputXML::str_phiz |
|
private |
◆ str_rawId
XMLCh* MuonAlignmentInputXML::str_rawId |
|
private |
◆ str_relativeto
XMLCh* MuonAlignmentInputXML::str_relativeto |
|
private |
◆ str_ring
XMLCh* MuonAlignmentInputXML::str_ring |
|
private |
◆ str_rotatebeamline
XMLCh* MuonAlignmentInputXML::str_rotatebeamline |
|
private |
◆ str_rotateglobalaxis
XMLCh* MuonAlignmentInputXML::str_rotateglobalaxis |
|
private |
◆ str_rotatelocal
XMLCh* MuonAlignmentInputXML::str_rotatelocal |
|
private |
◆ str_rphi
XMLCh* MuonAlignmentInputXML::str_rphi |
|
private |
◆ str_sector
XMLCh* MuonAlignmentInputXML::str_sector |
|
private |
◆ str_setape
XMLCh* MuonAlignmentInputXML::str_setape |
|
private |
◆ str_setposition
XMLCh* MuonAlignmentInputXML::str_setposition |
|
private |
◆ str_setsurveyerr
XMLCh* MuonAlignmentInputXML::str_setsurveyerr |
|
private |
◆ str_station
XMLCh* MuonAlignmentInputXML::str_station |
|
private |
◆ str_superlayer
XMLCh* MuonAlignmentInputXML::str_superlayer |
|
private |
◆ str_wheel
XMLCh* MuonAlignmentInputXML::str_wheel |
|
private |
◆ str_x
XMLCh* MuonAlignmentInputXML::str_x |
|
private |
◆ str_xa
XMLCh* MuonAlignmentInputXML::str_xa |
|
private |
◆ str_xb
XMLCh* MuonAlignmentInputXML::str_xb |
|
private |
◆ str_xc
XMLCh* MuonAlignmentInputXML::str_xc |
|
private |
◆ str_xx
XMLCh* MuonAlignmentInputXML::str_xx |
|
private |
◆ str_xy
XMLCh* MuonAlignmentInputXML::str_xy |
|
private |
◆ str_xz
XMLCh* MuonAlignmentInputXML::str_xz |
|
private |
◆ str_y
XMLCh* MuonAlignmentInputXML::str_y |
|
private |
◆ str_ya
XMLCh* MuonAlignmentInputXML::str_ya |
|
private |
◆ str_yb
XMLCh* MuonAlignmentInputXML::str_yb |
|
private |
◆ str_yc
XMLCh* MuonAlignmentInputXML::str_yc |
|
private |
◆ str_yy
XMLCh* MuonAlignmentInputXML::str_yy |
|
private |
◆ str_yz
XMLCh* MuonAlignmentInputXML::str_yz |
|
private |
◆ str_z
XMLCh* MuonAlignmentInputXML::str_z |
|
private |
◆ str_za
XMLCh* MuonAlignmentInputXML::str_za |
|
private |
◆ str_zb
XMLCh* MuonAlignmentInputXML::str_zb |
|
private |
◆ str_zc
XMLCh* MuonAlignmentInputXML::str_zc |
|
private |
◆ str_zz
XMLCh* MuonAlignmentInputXML::str_zz |
|
private |
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
TkRotation< Scalar > RotationType
alpha
zGenParticlesMatch = cms.InputTag(""),
const align::ErrorMatrix & errors() const
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
Point3DBase< Scalar, GlobalTag > PositionType
virtual void rotateAroundLocalAxis(const LocalVector &axis, Scalar radians)
Rotation around arbitratry local axis.
math::Error< 6 >::type ErrorMatrix
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
virtual void rotateAroundGlobalZ(Scalar radians)
Rotation around global z-axis.
Sin< T >::type sin(const T &t)
void setSurvey(const SurveyDet *)
Set survey info.
Cos< T >::type cos(const T &t)
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
bool equals(const edm::RefToBase< Jet > &j1, const edm::RefToBase< Jet > &j2)
void rectify(RotationType &)
Correct a rotation matrix for rounding errors.
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
align::Alignables DTBarrel()
const AlignableObjectId & objectIdProvider() const
Return muon alignable object ID provider derived from the muon system geometry.
virtual void rotateAroundGlobalAxis(const GlobalVector &axis, Scalar radians)
Rotation around arbitratry global axis.
Constructor of the full muon geometry.
AlgebraicVector EulerAngles
virtual void move(const GlobalVector &displacement)=0
Movement with respect to the global reference frame.
const BasicVectorType & basicVector() const
align::Alignables CSCEndcaps()
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
RotationType toMatrix(const EulerAngles &)
Convert rotation angles about x-, y-, z-axes to matrix.
TkRotation transposed() const
const char * idToString(align::StructureType type) const
Power< A, B >::type pow(const A &a, const B &b)
const PositionType & globalPosition() const
Return the global position of the object.
const SurveyDet * survey() const
Return survey info.
const RotationType & globalRotation() const
Return the global orientation of the object.
Alignable * mother() const
Return pointer to container alignable (if any)