|
|
#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 1143 of file MuonAlignmentInputXML.cc.
1146 DOMAttr *node_x = node->getAttributeNode(
str_x);
1147 DOMAttr *node_y = node->getAttributeNode(
str_y);
1148 DOMAttr *node_z = node->getAttributeNode(
str_z);
1149 if (node_x ==
nullptr)
1150 throw cms::Exception(
"XMLException") <<
"<moveglobal> is missing required \"x\" attribute" << std::endl;
1151 if (node_y ==
nullptr)
1152 throw cms::Exception(
"XMLException") <<
"<moveglobal> is missing required \"y\" attribute" << std::endl;
1153 if (node_z ==
nullptr)
1154 throw cms::Exception(
"XMLException") <<
"<moveglobal> is missing required \"z\" attribute" << std::endl;
1161 for (std::map<Alignable *, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
1170 if (survey !=
nullptr) {
1171 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 1177 of file MuonAlignmentInputXML.cc.
1180 DOMAttr *node_x = node->getAttributeNode(
str_x);
1181 DOMAttr *node_y = node->getAttributeNode(
str_y);
1182 DOMAttr *node_z = node->getAttributeNode(
str_z);
1183 if (node_x ==
nullptr)
1184 throw cms::Exception(
"XMLException") <<
"<movelocal> is missing required \"x\" attribute" << std::endl;
1185 if (node_y ==
nullptr)
1186 throw cms::Exception(
"XMLException") <<
"<movelocal> is missing required \"y\" attribute" << std::endl;
1187 if (node_z ==
nullptr)
1188 throw cms::Exception(
"XMLException") <<
"<movelocal> is missing required \"z\" attribute" << std::endl;
1195 for (std::map<Alignable *, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
1199 ali->
move(globalVector);
1205 if (survey !=
nullptr) {
1206 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 1250 of file MuonAlignmentInputXML.cc.
1253 DOMAttr *node_rphi = node->getAttributeNode(
str_rphi);
1254 DOMAttr *node_phi = node->getAttributeNode(
str_phi);
1255 if (node_rphi ==
nullptr && node_phi ==
nullptr)
1256 throw cms::Exception(
"XMLException") <<
"<rotatebeamline> is missing required \"*phi\" attribute" << std::endl;
1257 if (node_rphi !=
nullptr && node_phi !=
nullptr)
1258 throw cms::Exception(
"XMLException") <<
"<rotatebeamline> can't have both an \"rphi\" and a \"phi\" attribute"
1262 if (node_rphi !=
nullptr) {
1268 for (std::map<Alignable *, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
1274 double phi0 =
pos.phi();
1275 double deltaphi =
value;
1276 if (node_rphi !=
nullptr)
1287 if (survey !=
nullptr) {
1288 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 1294 of file MuonAlignmentInputXML.cc.
1297 DOMAttr *node_x = node->getAttributeNode(
str_x);
1298 DOMAttr *node_y = node->getAttributeNode(
str_y);
1299 DOMAttr *node_z = node->getAttributeNode(
str_z);
1300 DOMAttr *node_angle = node->getAttributeNode(
str_angle);
1301 if (node_x ==
nullptr)
1302 throw cms::Exception(
"XMLException") <<
"<rotateglobalaxis> is missing required \"x\" attribute" << std::endl;
1303 if (node_y ==
nullptr)
1304 throw cms::Exception(
"XMLException") <<
"<rotateglobalaxis> is missing required \"y\" attribute" << std::endl;
1305 if (node_z ==
nullptr)
1306 throw cms::Exception(
"XMLException") <<
"<rotateglobalaxis> is missing required \"z\" attribute" << std::endl;
1307 if (node_angle ==
nullptr)
1308 throw cms::Exception(
"XMLException") <<
"<rotateglobalaxis> is missing required \"angle\" attribute" << std::endl;
1315 for (std::map<Alignable *, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
1327 double q3 =
sin(
angle / 2.) * cprime;
1333 double pos2z = 2. * (q3 *
q1 -
q0 *
q2) *
pos.x() + 2. * (q3 *
q2 +
q0 *
q1) *
pos.y() +
1336 double movex = pos2x -
pos.x();
1337 double movey = pos2y -
pos.y();
1338 double movez = pos2z -
pos.z();
1345 if (survey !=
nullptr) {
1346 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 1212 of file MuonAlignmentInputXML.cc.
1215 DOMAttr *node_axisx = node->getAttributeNode(
str_axisx);
1216 DOMAttr *node_axisy = node->getAttributeNode(
str_axisy);
1217 DOMAttr *node_axisz = node->getAttributeNode(
str_axisz);
1218 DOMAttr *node_angle = node->getAttributeNode(
str_angle);
1219 if (node_axisx ==
nullptr)
1220 throw cms::Exception(
"XMLException") <<
"<rotatelocal> is missing required \"axisx\" attribute" << std::endl;
1221 if (node_axisy ==
nullptr)
1222 throw cms::Exception(
"XMLException") <<
"<rotatelocal> is missing required \"axisy\" attribute" << std::endl;
1223 if (node_axisz ==
nullptr)
1224 throw cms::Exception(
"XMLException") <<
"<rotatelocal> is missing required \"axisz\" attribute" << std::endl;
1225 if (node_angle ==
nullptr)
1226 throw cms::Exception(
"XMLException") <<
"<rotatelocal> is missing required \"angle\" attribute" << std::endl;
1234 for (std::map<Alignable *, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
1243 if (survey !=
nullptr) {
1244 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 949 of file MuonAlignmentInputXML.cc.
952 DOMAttr *node_xx = node->getAttributeNode(
str_xx);
953 DOMAttr *node_xy = node->getAttributeNode(
str_xy);
954 DOMAttr *node_xz = node->getAttributeNode(
str_xz);
955 DOMAttr *node_xa = node->getAttributeNode(
str_xa);
956 DOMAttr *node_xb = node->getAttributeNode(
str_xb);
957 DOMAttr *node_xc = node->getAttributeNode(
str_xc);
958 DOMAttr *node_yy = node->getAttributeNode(
str_yy);
959 DOMAttr *node_yz = node->getAttributeNode(
str_yz);
960 DOMAttr *node_ya = node->getAttributeNode(
str_ya);
961 DOMAttr *node_yb = node->getAttributeNode(
str_yb);
962 DOMAttr *node_yc = node->getAttributeNode(
str_yc);
963 DOMAttr *node_zz = node->getAttributeNode(
str_zz);
964 DOMAttr *node_za = node->getAttributeNode(
str_za);
965 DOMAttr *node_zb = node->getAttributeNode(
str_zb);
966 DOMAttr *node_zc = node->getAttributeNode(
str_zc);
967 DOMAttr *node_aa = node->getAttributeNode(
str_aa);
968 DOMAttr *node_ab = node->getAttributeNode(
str_ab);
969 DOMAttr *node_ac = node->getAttributeNode(
str_ac);
970 DOMAttr *node_bb = node->getAttributeNode(
str_bb);
971 DOMAttr *node_bc = node->getAttributeNode(
str_bc);
972 DOMAttr *node_cc = node->getAttributeNode(
str_cc);
974 if (node_xx ==
nullptr)
975 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"xx\" attribute" << std::endl;
976 if (node_xy ==
nullptr)
977 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"xy\" attribute" << std::endl;
978 if (node_xz ==
nullptr)
979 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"xz\" attribute" << std::endl;
980 if (node_xa ==
nullptr)
981 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"xa\" attribute" << std::endl;
982 if (node_xb ==
nullptr)
983 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"xb\" attribute" << std::endl;
984 if (node_xc ==
nullptr)
985 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"xc\" attribute" << std::endl;
986 if (node_yy ==
nullptr)
987 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"yy\" attribute" << std::endl;
988 if (node_yz ==
nullptr)
989 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"yz\" attribute" << std::endl;
990 if (node_ya ==
nullptr)
991 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"ya\" attribute" << std::endl;
992 if (node_yb ==
nullptr)
993 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"yb\" attribute" << std::endl;
994 if (node_yc ==
nullptr)
995 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"yc\" attribute" << std::endl;
996 if (node_zz ==
nullptr)
997 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"zz\" attribute" << std::endl;
998 if (node_za ==
nullptr)
999 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"za\" attribute" << std::endl;
1000 if (node_zb ==
nullptr)
1001 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"zb\" attribute" << std::endl;
1002 if (node_zc ==
nullptr)
1003 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"zc\" attribute" << std::endl;
1004 if (node_aa ==
nullptr)
1005 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"aa\" attribute" << std::endl;
1006 if (node_ab ==
nullptr)
1007 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"ab\" attribute" << std::endl;
1008 if (node_ac ==
nullptr)
1009 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"ac\" attribute" << std::endl;
1010 if (node_bb ==
nullptr)
1011 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"bb\" attribute" << std::endl;
1012 if (node_bc ==
nullptr)
1013 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"bc\" attribute" << std::endl;
1014 if (node_cc ==
nullptr)
1015 throw cms::Exception(
"XMLException") <<
"<setape> is missing required \"cc\" attribute" << std::endl;
1018 matrix6x6(0, 0) =
parseDouble(node_xx->getValue(),
"xx");
1019 matrix6x6(0, 1) =
parseDouble(node_xy->getValue(),
"xy");
1020 matrix6x6(0, 2) =
parseDouble(node_xz->getValue(),
"xz");
1021 matrix6x6(0, 3) =
parseDouble(node_xa->getValue(),
"xa");
1022 matrix6x6(0, 4) =
parseDouble(node_xb->getValue(),
"xb");
1023 matrix6x6(0, 5) =
parseDouble(node_xc->getValue(),
"xc");
1024 matrix6x6(1, 1) =
parseDouble(node_yy->getValue(),
"yy");
1025 matrix6x6(1, 2) =
parseDouble(node_yz->getValue(),
"yz");
1026 matrix6x6(1, 3) =
parseDouble(node_ya->getValue(),
"ya");
1027 matrix6x6(1, 4) =
parseDouble(node_yb->getValue(),
"yb");
1028 matrix6x6(1, 5) =
parseDouble(node_yc->getValue(),
"yc");
1029 matrix6x6(2, 2) =
parseDouble(node_zz->getValue(),
"zz");
1030 matrix6x6(2, 3) =
parseDouble(node_za->getValue(),
"za");
1031 matrix6x6(2, 4) =
parseDouble(node_zb->getValue(),
"zb");
1032 matrix6x6(2, 5) =
parseDouble(node_zc->getValue(),
"zc");
1033 matrix6x6(3, 3) =
parseDouble(node_aa->getValue(),
"aa");
1034 matrix6x6(3, 4) =
parseDouble(node_ab->getValue(),
"ab");
1035 matrix6x6(3, 5) =
parseDouble(node_ac->getValue(),
"ac");
1036 matrix6x6(4, 4) =
parseDouble(node_bb->getValue(),
"bb");
1037 matrix6x6(4, 5) =
parseDouble(node_bc->getValue(),
"bc");
1038 matrix6x6(5, 5) =
parseDouble(node_cc->getValue(),
"cc");
1040 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 744 of file MuonAlignmentInputXML.cc.
747 DOMAttr *node_relativeto = node->getAttributeNode(
str_relativeto);
748 if (node_relativeto ==
nullptr)
749 throw cms::Exception(
"XMLException") <<
"<setposition> is missing required \"relativeto\" attribute" << std::endl;
759 char *message = XMLString::transcode(node_relativeto->getValue());
760 throw cms::Exception(
"XMLException") <<
"relativeto must be \"none\", \"ideal\", or \"container\", not \""
761 << message <<
"\"" << std::endl;
764 for (std::map<Alignable *, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
789 oldrot = oldrot * globalRotation.
transposed();
792 double x = oldpos.
x();
793 double y = oldpos.
y();
794 double z = oldpos.
z();
796 double phix = atan2(oldrot.
yz(), oldrot.
zz());
797 double phiy = asin(-oldrot.
xz());
798 double phiz = atan2(oldrot.
xy(), oldrot.
xx());
801 double alpha = oldEulerAngles(1);
802 double beta = oldEulerAngles(2);
803 double gamma = oldEulerAngles(3);
807 DOMAttr *node_x = node->getAttributeNode(
str_x);
808 DOMAttr *node_y = node->getAttributeNode(
str_y);
809 DOMAttr *node_z = node->getAttributeNode(
str_z);
811 if (node_x !=
nullptr)
813 if (node_y !=
nullptr)
815 if (node_z !=
nullptr)
819 DOMAttr *node_phix = node->getAttributeNode(
str_phix);
820 DOMAttr *node_phiy = node->getAttributeNode(
str_phiy);
821 DOMAttr *node_phiz = node->getAttributeNode(
str_phiz);
822 DOMAttr *node_alpha = node->getAttributeNode(
str_alpha);
823 DOMAttr *node_beta = node->getAttributeNode(
str_beta);
824 DOMAttr *node_gamma = node->getAttributeNode(
str_gamma);
827 bool phixyz = (node_phix !=
nullptr || node_phiy !=
nullptr || node_phiz !=
nullptr);
828 bool alphabetagamma = (node_alpha !=
nullptr || node_beta !=
nullptr || node_gamma !=
nullptr);
829 if (phixyz && alphabetagamma)
831 <<
"<setposition> must either have phix, phiy, and phiz or alpha, beta, and gamma, but not both" << std::endl;
832 if (!phixyz && !alphabetagamma)
833 alphabetagamma =
true;
836 if (node_phix !=
nullptr)
838 if (node_phiy !=
nullptr)
840 if (node_phiz !=
nullptr)
849 rot = rotX * rotY * rotZ;
852 else if (alphabetagamma) {
853 if (node_alpha !=
nullptr)
855 if (node_beta !=
nullptr)
857 if (node_gamma !=
nullptr)
862 eulerAngles(1) =
alpha;
863 eulerAngles(2) =
beta;
864 eulerAngles(3) =
gamma;
892 if (container !=
nullptr) {
References alpha, cms::cuda::assert(), PV3DBase< T, PVType, FrameType >::basicVector(), HLT_FULL_cff::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 1046 of file MuonAlignmentInputXML.cc.
1049 DOMAttr *node_xx = node->getAttributeNode(
str_xx);
1050 DOMAttr *node_xy = node->getAttributeNode(
str_xy);
1051 DOMAttr *node_xz = node->getAttributeNode(
str_xz);
1052 DOMAttr *node_xa = node->getAttributeNode(
str_xa);
1053 DOMAttr *node_xb = node->getAttributeNode(
str_xb);
1054 DOMAttr *node_xc = node->getAttributeNode(
str_xc);
1055 DOMAttr *node_yy = node->getAttributeNode(
str_yy);
1056 DOMAttr *node_yz = node->getAttributeNode(
str_yz);
1057 DOMAttr *node_ya = node->getAttributeNode(
str_ya);
1058 DOMAttr *node_yb = node->getAttributeNode(
str_yb);
1059 DOMAttr *node_yc = node->getAttributeNode(
str_yc);
1060 DOMAttr *node_zz = node->getAttributeNode(
str_zz);
1061 DOMAttr *node_za = node->getAttributeNode(
str_za);
1062 DOMAttr *node_zb = node->getAttributeNode(
str_zb);
1063 DOMAttr *node_zc = node->getAttributeNode(
str_zc);
1064 DOMAttr *node_aa = node->getAttributeNode(
str_aa);
1065 DOMAttr *node_ab = node->getAttributeNode(
str_ab);
1066 DOMAttr *node_ac = node->getAttributeNode(
str_ac);
1067 DOMAttr *node_bb = node->getAttributeNode(
str_bb);
1068 DOMAttr *node_bc = node->getAttributeNode(
str_bc);
1069 DOMAttr *node_cc = node->getAttributeNode(
str_cc);
1071 if (node_xx ==
nullptr)
1072 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"xx\" attribute" << std::endl;
1073 if (node_xy ==
nullptr)
1074 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"xy\" attribute" << std::endl;
1075 if (node_xz ==
nullptr)
1076 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"xz\" attribute" << std::endl;
1077 if (node_xa ==
nullptr)
1078 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"xa\" attribute" << std::endl;
1079 if (node_xb ==
nullptr)
1080 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"xb\" attribute" << std::endl;
1081 if (node_xc ==
nullptr)
1082 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"xc\" attribute" << std::endl;
1083 if (node_yy ==
nullptr)
1084 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"yy\" attribute" << std::endl;
1085 if (node_yz ==
nullptr)
1086 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"yz\" attribute" << std::endl;
1087 if (node_ya ==
nullptr)
1088 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"ya\" attribute" << std::endl;
1089 if (node_yb ==
nullptr)
1090 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"yb\" attribute" << std::endl;
1091 if (node_yc ==
nullptr)
1092 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"yc\" attribute" << std::endl;
1093 if (node_zz ==
nullptr)
1094 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"zz\" attribute" << std::endl;
1095 if (node_za ==
nullptr)
1096 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"za\" attribute" << std::endl;
1097 if (node_zb ==
nullptr)
1098 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"zb\" attribute" << std::endl;
1099 if (node_zc ==
nullptr)
1100 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"zc\" attribute" << std::endl;
1101 if (node_aa ==
nullptr)
1102 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"aa\" attribute" << std::endl;
1103 if (node_ab ==
nullptr)
1104 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"ab\" attribute" << std::endl;
1105 if (node_ac ==
nullptr)
1106 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"ac\" attribute" << std::endl;
1107 if (node_bb ==
nullptr)
1108 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"bb\" attribute" << std::endl;
1109 if (node_bc ==
nullptr)
1110 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"bc\" attribute" << std::endl;
1111 if (node_cc ==
nullptr)
1112 throw cms::Exception(
"XMLException") <<
"<setsurveyerr> is missing required \"cc\" attribute" << std::endl;
1115 matrix6x6(0, 0) =
parseDouble(node_xx->getValue(),
"xx");
1116 matrix6x6(0, 1) =
parseDouble(node_xy->getValue(),
"xy");
1117 matrix6x6(0, 2) =
parseDouble(node_xz->getValue(),
"xz");
1118 matrix6x6(0, 3) =
parseDouble(node_xa->getValue(),
"xa");
1119 matrix6x6(0, 4) =
parseDouble(node_xb->getValue(),
"xb");
1120 matrix6x6(0, 5) =
parseDouble(node_xc->getValue(),
"xc");
1121 matrix6x6(1, 1) =
parseDouble(node_yy->getValue(),
"yy");
1122 matrix6x6(1, 2) =
parseDouble(node_yz->getValue(),
"yz");
1123 matrix6x6(1, 3) =
parseDouble(node_ya->getValue(),
"ya");
1124 matrix6x6(1, 4) =
parseDouble(node_yb->getValue(),
"yb");
1125 matrix6x6(1, 5) =
parseDouble(node_yc->getValue(),
"yc");
1126 matrix6x6(2, 2) =
parseDouble(node_zz->getValue(),
"zz");
1127 matrix6x6(2, 3) =
parseDouble(node_za->getValue(),
"za");
1128 matrix6x6(2, 4) =
parseDouble(node_zb->getValue(),
"zb");
1129 matrix6x6(2, 5) =
parseDouble(node_zc->getValue(),
"zc");
1130 matrix6x6(3, 3) =
parseDouble(node_aa->getValue(),
"aa");
1131 matrix6x6(3, 4) =
parseDouble(node_ab->getValue(),
"ab");
1132 matrix6x6(3, 5) =
parseDouble(node_ac->getValue(),
"ac");
1133 matrix6x6(4, 4) =
parseDouble(node_bb->getValue(),
"bb");
1134 matrix6x6(4, 5) =
parseDouble(node_bc->getValue(),
"bc");
1135 matrix6x6(5, 5) =
parseDouble(node_cc->getValue(),
"cc");
1137 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 573 of file MuonAlignmentInputXML.cc.
579 DOMAttr *node_rawId = node->getAttributeNode(
str_rawId);
580 if (node_rawId !=
nullptr) {
582 rawId = XMLString::parseInt(node_rawId->getValue());
583 }
catch (
const XMLException &toCatch) {
584 throw cms::Exception(
"XMLException") <<
"Value of \"rawId\" must be an integer" << std::endl;
590 DOMAttr *node_endcap = node->getAttributeNode(
str_endcap);
591 if (node_endcap ==
nullptr)
592 throw cms::Exception(
"XMLException") <<
"CSC node is missing required \"endcap\" attribute" << std::endl;
594 endcap = XMLString::parseInt(node_endcap->getValue());
595 }
catch (
const XMLException &toCatch) {
596 throw cms::Exception(
"XMLException") <<
"Value of \"endcap\" must be an integer" << std::endl;
602 DOMAttr *node_station = node->getAttributeNode(
str_station);
603 if (node_station ==
nullptr)
604 throw cms::Exception(
"XMLException") <<
"CSC node is missing required \"station\" attribute" << std::endl;
606 station = XMLString::parseInt(node_station->getValue());
607 }
catch (
const XMLException &toCatch) {
608 throw cms::Exception(
"XMLException") <<
"Value of \"station\" must be an integer" << std::endl;
612 DOMAttr *node_ring = node->getAttributeNode(
str_ring);
613 if (node_ring ==
nullptr)
614 throw cms::Exception(
"XMLException") <<
"CSC node is missing required \"ring\" attribute" << std::endl;
616 ring = XMLString::parseInt(node_ring->getValue());
617 }
catch (
const XMLException &toCatch) {
618 throw cms::Exception(
"XMLException") <<
"Value of \"ring\" must be an integer" << std::endl;
622 DOMAttr *node_chamber = node->getAttributeNode(
str_chamber);
623 if (node_chamber ==
nullptr)
624 throw cms::Exception(
"XMLException") <<
"CSC node is missing required \"chamber\" attribute" << std::endl;
626 chamber = XMLString::parseInt(node_chamber->getValue());
627 }
catch (
const XMLException &toCatch) {
628 throw cms::Exception(
"XMLException") <<
"Value of \"chamber\" must be an integer" << std::endl;
632 DOMAttr *node_layer = node->getAttributeNode(
str_layer);
633 if (node_layer ==
nullptr)
634 throw cms::Exception(
"XMLException") <<
"CSC node is missing required \"layer\" attribute" << std::endl;
636 layer = XMLString::parseInt(node_layer->getValue());
637 }
catch (
const XMLException &toCatch) {
638 throw cms::Exception(
"XMLException") <<
"Value of \"layer\" must be an integer" << std::endl;
647 rawId = layerId.rawId();
650 Alignable *ali = alignableNavigator[rawId];
652 throw cms::Exception(
"XMLException") <<
"rawId \"" << rawId <<
"\" is not recognized" << std::endl;
657 if (ali ==
nullptr) {
659 <<
"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(), phase1PixelTopology::layer, 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 480 of file MuonAlignmentInputXML.cc.
484 unsigned int rawId = 0;
486 DOMAttr *node_rawId = node->getAttributeNode(
str_rawId);
487 if (node_rawId !=
nullptr) {
489 rawId = XMLString::parseInt(node_rawId->getValue());
490 }
catch (
const XMLException &toCatch) {
491 throw cms::Exception(
"XMLException") <<
"Value of \"rawId\" must be an integer" << std::endl;
498 DOMAttr *node_wheel = node->getAttributeNode(
str_wheel);
499 if (node_wheel ==
nullptr)
500 throw cms::Exception(
"XMLException") <<
"DT node is missing required \"wheel\" attribute" << std::endl;
502 wheel = XMLString::parseInt(node_wheel->getValue());
503 }
catch (
const XMLException &toCatch) {
504 throw cms::Exception(
"XMLException") <<
"Value of \"wheel\" must be an integer" << std::endl;
508 DOMAttr *node_station = node->getAttributeNode(
str_station);
509 if (node_station ==
nullptr)
510 throw cms::Exception(
"XMLException") <<
"DT node is missing required \"station\" attribute" << std::endl;
512 station = XMLString::parseInt(node_station->getValue());
513 }
catch (
const XMLException &toCatch) {
514 throw cms::Exception(
"XMLException") <<
"Value of \"station\" must be an integer" << std::endl;
518 DOMAttr *node_sector = node->getAttributeNode(
str_sector);
519 if (node_sector ==
nullptr)
520 throw cms::Exception(
"XMLException") <<
"DT node is missing required \"sector\" attribute" << std::endl;
522 sector = XMLString::parseInt(node_sector->getValue());
523 }
catch (
const XMLException &toCatch) {
524 throw cms::Exception(
"XMLException") <<
"Value of \"sector\" must be an integer" << std::endl;
528 DOMAttr *node_superlayer = node->getAttributeNode(
str_superlayer);
529 if (node_superlayer ==
nullptr)
531 <<
"DT node is missing required \"superlayer\" attribute" << std::endl;
533 superlayer = XMLString::parseInt(node_superlayer->getValue());
534 }
catch (
const XMLException &toCatch) {
535 throw cms::Exception(
"XMLException") <<
"Value of \"superlayer\" must be an integer" << std::endl;
539 DOMAttr *node_layer = node->getAttributeNode(
str_layer);
540 if (node_layer ==
nullptr)
541 throw cms::Exception(
"XMLException") <<
"DT node is missing required \"layer\" attribute" << std::endl;
543 layer = XMLString::parseInt(node_layer->getValue());
544 }
catch (
const XMLException &toCatch) {
545 throw cms::Exception(
"XMLException") <<
"Value of \"layer\" must be an integer" << std::endl;
555 rawId = layerId.rawId();
558 Alignable *ali = alignableNavigator[rawId];
560 throw cms::Exception(
"XMLException") <<
"rawId \"" << rawId <<
"\" is not recognized" << std::endl;
565 if (ali ==
nullptr) {
567 <<
"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(), phase1PixelTopology::layer, 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 451 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.
265 std::map<unsigned int, Alignable *> alignableNavigator;
270 std::map<unsigned int, Alignable *> ideal_alignableNavigator;
271 recursiveGetId(ideal_alignableNavigator, ideal_alignableMuon->DTBarrel());
272 recursiveGetId(ideal_alignableNavigator, ideal_alignableMuon->CSCEndcaps());
276 }
catch (
const XMLException &toCatch) {
277 throw cms::Exception(
"XMLException") <<
"Xerces XML parser threw an exception on initialization." << std::endl;
280 XercesDOMParser *
parser =
new XercesDOMParser();
281 parser->setValidationScheme(XercesDOMParser::Val_Always);
283 XERCES_CPP_NAMESPACE::ErrorHandler *errHandler = (XERCES_CPP_NAMESPACE::ErrorHandler *)(
new HandlerBase());
284 parser->setErrorHandler(errHandler);
288 }
catch (
const XMLException &toCatch) {
289 char *message = XMLString::transcode(toCatch.getMessage());
290 throw cms::Exception(
"XMLException") <<
"Xerces XML parser threw this exception: " << message << std::endl;
291 }
catch (
const DOMException &toCatch) {
292 char *message = XMLString::transcode(toCatch.msg);
293 throw cms::Exception(
"XMLException") <<
"Xerces XML parser threw this exception: " << message << std::endl;
294 }
catch (
const SAXException &toCatch) {
295 char *message = XMLString::transcode(toCatch.getMessage());
296 throw cms::Exception(
"XMLException") <<
"Xerces XML parser threw this exception: " << message << std::endl;
299 DOMDocument *
doc =
parser->getDocument();
300 DOMElement *node_MuonAlignment =
doc->getDocumentElement();
304 std::map<Alignable *, Alignable *> alitoideal;
309 std::map<std::string, std::map<Alignable *, bool> > alicollections;
312 if (
collection->getParentNode() == node_MuonAlignment) {
316 if (node_name ==
nullptr) {
317 throw cms::Exception(
"XMLException") <<
"<collection> requires a name attribute" << std::endl;
319 char *ascii_name = XMLString::transcode(node_name->getValue());
323 std::map<Alignable *, bool> aliset;
324 for (
unsigned int j = 0;
j <
children->getLength();
j++) {
327 if (node->getNodeType() == DOMNode::ELEMENT_NODE) {
328 Alignable *ali =
getNode(alignableNavigator, (DOMElement *)(node), alignableObjectId);
329 if (ali ==
nullptr) {
330 throw cms::Exception(
"XMLException") <<
"<collection> must contain only alignables" << std::endl;
337 alicollections[
name] = aliset;
341 for (
unsigned int i = 0;
i < operations->getLength();
i++) {
342 DOMElement *operation = (DOMElement *)(operations->item(
i));
343 if (operation->getParentNode() != node_MuonAlignment) {
344 throw cms::Exception(
"XMLException") <<
"All operations must be top-level elements" << std::endl;
347 DOMNodeList *
children = operation->getChildNodes();
349 std::map<Alignable *, bool> aliset;
350 std::vector<DOMNode *> nodesToRemove;
351 for (
unsigned int j = 0;
j <
children->getLength();
j++) {
354 if (node->getNodeType() == DOMNode::ELEMENT_NODE) {
355 Alignable *ali =
getNode(alignableNavigator, (DOMElement *)(node), alignableObjectId);
356 if (ali !=
nullptr) {
358 nodesToRemove.push_back(node);
362 DOMAttr *node_name = ((DOMElement *)(node))->getAttributeNode(
str_name);
363 if (node_name ==
nullptr) {
364 throw cms::Exception(
"XMLException") <<
"<collection> requires a name attribute" << std::endl;
366 char *ascii_name = XMLString::transcode(node_name->getValue());
370 std::map<std::string, std::map<Alignable *, bool> >::const_iterator alicollections_iter =
371 alicollections.find(
name);
372 if (alicollections_iter == alicollections.end()) {
374 <<
"<collection name=\"" <<
name <<
"\"> hasn't been defined" << std::endl;
377 for (std::map<Alignable *, bool>::const_iterator aliiter = alicollections_iter->second.begin();
378 aliiter != alicollections_iter->second.end();
380 aliset[aliiter->first] =
true;
383 nodesToRemove.push_back(node);
393 for (std::vector<DOMNode *>::const_iterator node = nodesToRemove.begin(); node != nodesToRemove.end(); ++node) {
394 operation->removeChild(*node);
396 children = operation->getChildNodes();
398 for (
unsigned int j = 0;
j <
children->getLength();
j++) {
400 if (node->getNodeType() == DOMNode::ELEMENT_NODE) {
406 do_setape((DOMElement *)(node), aliset, alitoideal);
434 char *message = XMLString::transcode(node->getNodeName());
435 throw cms::Exception(
"XMLException") <<
"Unrecognized operation: \"" << message <<
"\"" << std::endl;
447 delete ideal_alignableMuon;
448 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(), gemGeometry_cff::gemGeometry, 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 665 of file MuonAlignmentInputXML.cc.
666 unsigned int len = XMLString::stringLen(
str);
667 char *cstr = XMLString::transcode(
str);
668 std::stringstream errmessage;
669 errmessage <<
"Value of \"" << attribute <<
"\" must be a double, not \"" << cstr <<
"\"" << std::endl;
674 if (cstr[
i] ==
'-') {
677 }
else if (cstr[
i] ==
'+')
682 while (cstr[
i] !=
'.' && cstr[
i] !=
'e' && cstr[
i] !=
'E' &&
i < len) {
683 if (cstr[
i] <
'0' || cstr[
i] >
'9') {
693 if (cstr[
i] ==
'.') {
697 while (cstr[
i] !=
'e' && cstr[
i] !=
'E' &&
i < len) {
698 if (cstr[
i] <
'0' || cstr[
i] >
'9') {
703 output += (cstr[
i] -
'0') * place;
709 if (cstr[
i] ==
'e' || cstr[
i] ==
'E') {
713 bool expminus =
false;
714 if (cstr[
i] ==
'-') {
717 }
else if (cstr[
i] ==
'+')
721 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 907 of file MuonAlignmentInputXML.cc.
943 if (survey !=
nullptr) {
944 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
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.
constexpr std::array< uint8_t, layerIndexSize > layer
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)