00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "FWCore/Framework/interface/ESHandle.h"
00016
00017
00018 #include <xercesc/parsers/XercesDOMParser.hpp>
00019 #include <xercesc/dom/DOM.hpp>
00020 #include <xercesc/sax/HandlerBase.hpp>
00021 #include <xercesc/util/XMLString.hpp>
00022 #include <xercesc/util/PlatformUtils.hpp>
00023 using namespace xercesc_2_7;
00024
00025
00026 #include "Alignment/MuonAlignment/interface/MuonAlignmentInputXML.h"
00027 #include "Alignment/CommonAlignment/interface/StructureType.h"
00028 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
00029 #include "DataFormats/MuonDetId/interface/DTLayerId.h"
00030 #include "Alignment/CommonAlignment/interface/SurveyDet.h"
00031 #include "DataFormats/TrackingRecHit/interface/AlignmentPositionError.h"
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 MuonAlignmentInputXML::MuonAlignmentInputXML(std::string fileName)
00045 : m_fileName(fileName)
00046 {
00047 str_operation = XMLString::transcode("operation");
00048 str_collection = XMLString::transcode("collection");
00049 str_name = XMLString::transcode("name");
00050 str_DTBarrel = XMLString::transcode("DTBarrel");
00051 str_DTWheel = XMLString::transcode("DTWheel");
00052 str_DTStation = XMLString::transcode("DTStation");
00053 str_DTChamber = XMLString::transcode("DTChamber");
00054 str_DTSuperLayer = XMLString::transcode("DTSuperLayer");
00055 str_DTLayer = XMLString::transcode("DTLayer");
00056 str_CSCEndcap = XMLString::transcode("CSCEndcap");
00057 str_CSCStation = XMLString::transcode("CSCStation");
00058 str_CSCRing = XMLString::transcode("CSCRing");
00059 str_CSCChamber = XMLString::transcode("CSCChamber");
00060 str_CSCLayer = XMLString::transcode("CSCLayer");
00061 str_setposition = XMLString::transcode("setposition");
00062 str_setape = XMLString::transcode("setape");
00063 str_setsurveyerr = XMLString::transcode("setsurveyerr");
00064 str_moveglobal = XMLString::transcode("moveglobal");
00065 str_rotatelocal = XMLString::transcode("rotatelocal");
00066 str_relativeto = XMLString::transcode("relativeto");
00067 str_rawId = XMLString::transcode("rawId");
00068 str_wheel = XMLString::transcode("wheel");
00069 str_station = XMLString::transcode("station");
00070 str_sector = XMLString::transcode("sector");
00071 str_superlayer = XMLString::transcode("superlayer");
00072 str_layer = XMLString::transcode("layer");
00073 str_endcap = XMLString::transcode("endcap");
00074 str_ring = XMLString::transcode("ring");
00075 str_chamber = XMLString::transcode("chamber");
00076 str_axisx = XMLString::transcode("axisx");
00077 str_axisy = XMLString::transcode("axisy");
00078 str_axisz = XMLString::transcode("axisz");
00079 str_angle = XMLString::transcode("angle");
00080 str_x = XMLString::transcode("x");
00081 str_y = XMLString::transcode("y");
00082 str_z = XMLString::transcode("z");
00083 str_phix = XMLString::transcode("phix");
00084 str_phiy = XMLString::transcode("phiy");
00085 str_phiz = XMLString::transcode("phiz");
00086 str_alpha = XMLString::transcode("alpha");
00087 str_beta = XMLString::transcode("beta");
00088 str_gamma = XMLString::transcode("gamma");
00089 str_xx = XMLString::transcode("xx");
00090 str_xy = XMLString::transcode("xy");
00091 str_xz = XMLString::transcode("xz");
00092 str_xa = XMLString::transcode("xa");
00093 str_xb = XMLString::transcode("xb");
00094 str_xc = XMLString::transcode("xc");
00095 str_yy = XMLString::transcode("yy");
00096 str_yz = XMLString::transcode("yz");
00097 str_ya = XMLString::transcode("ya");
00098 str_yb = XMLString::transcode("yb");
00099 str_yc = XMLString::transcode("yc");
00100 str_zz = XMLString::transcode("zz");
00101 str_za = XMLString::transcode("za");
00102 str_zb = XMLString::transcode("zb");
00103 str_zc = XMLString::transcode("zc");
00104 str_aa = XMLString::transcode("aa");
00105 str_ab = XMLString::transcode("ab");
00106 str_ac = XMLString::transcode("ac");
00107 str_bb = XMLString::transcode("bb");
00108 str_bc = XMLString::transcode("bc");
00109 str_cc = XMLString::transcode("cc");
00110 str_none = XMLString::transcode("none");
00111 str_ideal = XMLString::transcode("ideal");
00112 str_container = XMLString::transcode("container");
00113 }
00114
00115
00116
00117
00118
00119
00120 MuonAlignmentInputXML::~MuonAlignmentInputXML() {
00121 XMLString::release(&str_operation);
00122 XMLString::release(&str_collection);
00123 XMLString::release(&str_name);
00124 XMLString::release(&str_DTBarrel);
00125 XMLString::release(&str_DTWheel);
00126 XMLString::release(&str_DTStation);
00127 XMLString::release(&str_DTChamber);
00128 XMLString::release(&str_DTSuperLayer);
00129 XMLString::release(&str_DTLayer);
00130 XMLString::release(&str_CSCEndcap);
00131 XMLString::release(&str_CSCStation);
00132 XMLString::release(&str_CSCRing);
00133 XMLString::release(&str_CSCChamber);
00134 XMLString::release(&str_CSCLayer);
00135 XMLString::release(&str_setposition);
00136 XMLString::release(&str_setape);
00137 XMLString::release(&str_setsurveyerr);
00138 XMLString::release(&str_moveglobal);
00139 XMLString::release(&str_rotatelocal);
00140 XMLString::release(&str_relativeto);
00141 XMLString::release(&str_rawId);
00142 XMLString::release(&str_wheel);
00143 XMLString::release(&str_station);
00144 XMLString::release(&str_sector);
00145 XMLString::release(&str_superlayer);
00146 XMLString::release(&str_layer);
00147 XMLString::release(&str_endcap);
00148 XMLString::release(&str_ring);
00149 XMLString::release(&str_chamber);
00150 XMLString::release(&str_axisx);
00151 XMLString::release(&str_axisy);
00152 XMLString::release(&str_axisz);
00153 XMLString::release(&str_angle);
00154 XMLString::release(&str_x);
00155 XMLString::release(&str_y);
00156 XMLString::release(&str_z);
00157 XMLString::release(&str_phix);
00158 XMLString::release(&str_phiy);
00159 XMLString::release(&str_phiz);
00160 XMLString::release(&str_alpha);
00161 XMLString::release(&str_beta);
00162 XMLString::release(&str_gamma);
00163 XMLString::release(&str_xx);
00164 XMLString::release(&str_xy);
00165 XMLString::release(&str_xz);
00166 XMLString::release(&str_xa);
00167 XMLString::release(&str_xb);
00168 XMLString::release(&str_xc);
00169 XMLString::release(&str_yy);
00170 XMLString::release(&str_yz);
00171 XMLString::release(&str_ya);
00172 XMLString::release(&str_yb);
00173 XMLString::release(&str_yc);
00174 XMLString::release(&str_zz);
00175 XMLString::release(&str_za);
00176 XMLString::release(&str_zb);
00177 XMLString::release(&str_zc);
00178 XMLString::release(&str_aa);
00179 XMLString::release(&str_ab);
00180 XMLString::release(&str_ac);
00181 XMLString::release(&str_bb);
00182 XMLString::release(&str_bc);
00183 XMLString::release(&str_cc);
00184 XMLString::release(&str_none);
00185 XMLString::release(&str_ideal);
00186 XMLString::release(&str_container);
00187 }
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205 void MuonAlignmentInputXML::recursiveGetId(std::map<unsigned int, Alignable*> &alignableNavigator, const std::vector<Alignable*> &alignables) const {
00206 for (std::vector<Alignable*>::const_iterator ali = alignables.begin(); ali != alignables.end(); ++ali) {
00207 if ((*ali)->alignableObjectId() == align::AlignableDetUnit) {
00208 alignableNavigator[(*ali)->geomDetId().rawId()] = *ali;
00209 }
00210 recursiveGetId(alignableNavigator, (*ali)->components());
00211 }
00212 }
00213
00214 void MuonAlignmentInputXML::fillAliToIdeal(std::map<Alignable*, Alignable*> &alitoideal, const std::vector<Alignable*> alignables, const std::vector<Alignable*> ideals) const {
00215 std::vector<Alignable*>::const_iterator alignable = alignables.begin();
00216 std::vector<Alignable*>::const_iterator ideal = ideals.begin();
00217
00218 while (alignable != alignables.end() && ideal != ideals.end()) {
00219 alitoideal[*alignable] = *ideal;
00220
00221 fillAliToIdeal(alitoideal, (*alignable)->components(), (*ideal)->components());
00222
00223 ++alignable;
00224 ++ideal;
00225 }
00226
00227 if (alignable != alignables.end() || ideal != ideals.end()) {
00228 throw cms::Exception("Alignment") << "alignable and ideal-alignable trees are out of sync (this should never happen)";
00229 }
00230 }
00231
00232 AlignableMuon *MuonAlignmentInputXML::newAlignableMuon(const edm::EventSetup& iSetup) const {
00233 boost::shared_ptr<DTGeometry> dtGeometry = idealDTGeometry(iSetup);
00234 boost::shared_ptr<CSCGeometry> cscGeometry = idealCSCGeometry(iSetup);
00235
00236 AlignableMuon *alignableMuon = new AlignableMuon(&(*dtGeometry), &(*cscGeometry));
00237 std::map<unsigned int, Alignable*> alignableNavigator;
00238 recursiveGetId(alignableNavigator, alignableMuon->DTBarrel());
00239 recursiveGetId(alignableNavigator, alignableMuon->CSCEndcaps());
00240
00241 AlignableMuon *ideal_alignableMuon = new AlignableMuon(&(*dtGeometry), &(*cscGeometry));
00242 std::map<unsigned int, Alignable*> ideal_alignableNavigator;
00243 recursiveGetId(ideal_alignableNavigator, ideal_alignableMuon->DTBarrel());
00244 recursiveGetId(ideal_alignableNavigator, ideal_alignableMuon->CSCEndcaps());
00245
00246 try {
00247 XMLPlatformUtils::Initialize();
00248 }
00249 catch (const XMLException &toCatch) {
00250 throw cms::Exception("XMLException") << "Xerces XML parser threw an exception on initialization." << std::endl;
00251 }
00252
00253 XercesDOMParser *parser = new XercesDOMParser();
00254 parser->setValidationScheme(XercesDOMParser::Val_Always);
00255
00256 ErrorHandler *errHandler = (ErrorHandler*)(new HandlerBase());
00257 parser->setErrorHandler(errHandler);
00258
00259 try {
00260 parser->parse(m_fileName.c_str());
00261 }
00262 catch (const XMLException &toCatch) {
00263 char *message = XMLString::transcode(toCatch.getMessage());
00264 throw cms::Exception("XMLException") << "Xerces XML parser threw this exception: " << message << std::endl;
00265 }
00266 catch (const DOMException &toCatch) {
00267 char *message = XMLString::transcode(toCatch.msg);
00268 throw cms::Exception("XMLException") << "Xerces XML parser threw this exception: " << message << std::endl;
00269 }
00270 catch (const SAXException &toCatch) {
00271 char *message = XMLString::transcode(toCatch.getMessage());
00272 throw cms::Exception("XMLException") << "Xerces XML parser threw this exception: " << message << std::endl;
00273 }
00274 catch (...) {
00275 throw cms::Exception("XMLException") << "Xerces XML parser threw an unknown exception" << std::endl;
00276 }
00277
00278 DOMDocument *doc = parser->getDocument();
00279 DOMElement *node_MuonAlignment = doc->getDocumentElement();
00280 DOMNodeList *collections = doc->getElementsByTagName(str_collection);
00281 DOMNodeList *operations = doc->getElementsByTagName(str_operation);
00282
00283 std::map<Alignable*, Alignable*> alitoideal;
00284 fillAliToIdeal(alitoideal, alignableMuon->DTBarrel(), ideal_alignableMuon->DTBarrel());
00285 fillAliToIdeal(alitoideal, alignableMuon->CSCEndcaps(), ideal_alignableMuon->CSCEndcaps());
00286
00287 std::map<std::string, std::map<Alignable*, bool> > alicollections;
00288 for (unsigned int i = 0; i < collections->getLength(); i++) {
00289 DOMElement *collection = (DOMElement*)(collections->item(i));
00290 if (collection->getParentNode() == node_MuonAlignment) {
00291 DOMNodeList *children = collection->getChildNodes();
00292
00293 DOMAttr *node_name = collection->getAttributeNode(str_name);
00294 if (node_name == NULL) {
00295 throw cms::Exception("XMLException") << "<collection> requires a name attribute" << std::endl;
00296 }
00297 char *ascii_name = XMLString::transcode(node_name->getValue());
00298 std::string name(ascii_name);
00299 XMLString::release(&ascii_name);
00300
00301 std::map<Alignable*, bool> aliset;
00302 for (unsigned int j = 0; j < children->getLength(); j++) {
00303 DOMNode *node = children->item(j);
00304
00305 if (node->getNodeType() == DOMNode::ELEMENT_NODE) {
00306 Alignable *ali = getNode(alignableNavigator, (DOMElement*)(node));
00307 if (ali == NULL) {
00308 throw cms::Exception("XMLException") << "<collection> must contain only alignables" << std::endl;
00309 }
00310
00311 aliset[ali] = true;
00312 }
00313 }
00314
00315 alicollections[name] = aliset;
00316 }
00317 }
00318
00319 for (unsigned int i = 0; i < operations->getLength(); i++) {
00320 DOMElement *operation = (DOMElement*)(operations->item(i));
00321 if (operation->getParentNode() != node_MuonAlignment) {
00322 throw cms::Exception("XMLException") << "All operations must be top-level elements" << std::endl;
00323 }
00324
00325 DOMNodeList *children = operation->getChildNodes();
00326
00327 std::map<Alignable*, bool> aliset;
00328 std::vector<DOMNode*> nodesToRemove;
00329 for (unsigned int j = 0; j < children->getLength(); j++) {
00330 DOMNode *node = children->item(j);
00331
00332 if (node->getNodeType() == DOMNode::ELEMENT_NODE) {
00333 Alignable *ali = getNode(alignableNavigator, (DOMElement*)(node));
00334 if (ali != NULL) {
00335 aliset[ali] = true;
00336 nodesToRemove.push_back(node);
00337 }
00338
00339 else if (XMLString::equals(node->getNodeName(), str_collection)) {
00340 DOMAttr *node_name = ((DOMElement*)(node))->getAttributeNode(str_name);
00341 if (node_name == NULL) {
00342 throw cms::Exception("XMLException") << "<collection> requires a name attribute" << std::endl;
00343 }
00344 char *ascii_name = XMLString::transcode(node_name->getValue());
00345 std::string name(ascii_name);
00346 XMLString::release(&ascii_name);
00347
00348 std::map<std::string, std::map<Alignable*, bool> >::const_iterator alicollections_iter = alicollections.find(name);
00349 if (alicollections_iter == alicollections.end()) {
00350 throw cms::Exception("XMLException") << "<collection name=\"" << name << "\"> hasn't been defined" << std::endl;
00351 }
00352
00353 for (std::map<Alignable*, bool>::const_iterator aliiter = alicollections_iter->second.begin();
00354 aliiter != alicollections_iter->second.end();
00355 ++aliiter) {
00356 aliset[aliiter->first] = true;
00357 }
00358
00359 nodesToRemove.push_back(node);
00360 }
00361
00362 else {}
00363
00364 }
00365 }
00366
00367
00368 for (std::vector<DOMNode*>::const_iterator node = nodesToRemove.begin(); node != nodesToRemove.end(); ++node) {
00369 operation->removeChild(*node);
00370 }
00371 children = operation->getChildNodes();
00372
00373 for (unsigned int j = 0; j < children->getLength(); j++) {
00374 DOMNode *node = children->item(j);
00375 if (node->getNodeType() == DOMNode::ELEMENT_NODE) {
00376
00377 if (XMLString::equals(node->getNodeName(), str_setposition)) {
00378 do_setposition((DOMElement*)(node), aliset, alitoideal);
00379 }
00380
00381 else if (XMLString::equals(node->getNodeName(), str_setape)) {
00382 do_setape((DOMElement*)(node), aliset, alitoideal);
00383 }
00384
00385 else if (XMLString::equals(node->getNodeName(), str_setsurveyerr)) {
00386 do_setsurveyerr((DOMElement*)(node), aliset, alitoideal);
00387 }
00388
00389 else if (XMLString::equals(node->getNodeName(), str_moveglobal)) {
00390 do_moveglobal((DOMElement*)(node), aliset, alitoideal);
00391 }
00392
00393 else if (XMLString::equals(node->getNodeName(), str_rotatelocal)) {
00394 do_rotatelocal((DOMElement*)(node), aliset, alitoideal);
00395 }
00396
00397 else {
00398 char *message = XMLString::transcode(node->getNodeName());
00399 throw cms::Exception("XMLException") << "Unrecognized operation: \"" << message << "\"" << std::endl;
00400 }
00401
00402 }
00403 }
00404 }
00405
00406 delete parser;
00407 delete errHandler;
00408
00409 XMLPlatformUtils::Terminate();
00410
00411 delete ideal_alignableMuon;
00412 return alignableMuon;
00413 }
00414
00415 Alignable *MuonAlignmentInputXML::getNode(std::map<unsigned int, Alignable*> &alignableNavigator, const xercesc_2_7::DOMElement *node) const {
00416 if (XMLString::equals(node->getNodeName(), str_DTBarrel)) return getDTnode(align::AlignableDTBarrel, alignableNavigator, node);
00417 else if (XMLString::equals(node->getNodeName(), str_DTWheel)) return getDTnode(align::AlignableDTWheel, alignableNavigator, node);
00418 else if (XMLString::equals(node->getNodeName(), str_DTStation)) return getDTnode(align::AlignableDTStation, alignableNavigator, node);
00419 else if (XMLString::equals(node->getNodeName(), str_DTChamber)) return getDTnode(align::AlignableDTChamber, alignableNavigator, node);
00420 else if (XMLString::equals(node->getNodeName(), str_DTSuperLayer)) return getDTnode(align::AlignableDTSuperLayer, alignableNavigator, node);
00421 else if (XMLString::equals(node->getNodeName(), str_DTLayer)) return getDTnode(align::AlignableDetUnit, alignableNavigator, node);
00422 else if (XMLString::equals(node->getNodeName(), str_CSCEndcap)) return getCSCnode(align::AlignableCSCEndcap, alignableNavigator, node);
00423 else if (XMLString::equals(node->getNodeName(), str_CSCStation)) return getCSCnode(align::AlignableCSCStation, alignableNavigator, node);
00424 else if (XMLString::equals(node->getNodeName(), str_CSCRing)) return getCSCnode(align::AlignableCSCRing, alignableNavigator, node);
00425 else if (XMLString::equals(node->getNodeName(), str_CSCChamber)) return getCSCnode(align::AlignableCSCChamber, alignableNavigator, node);
00426 else if (XMLString::equals(node->getNodeName(), str_CSCLayer)) return getCSCnode(align::AlignableDetUnit, alignableNavigator, node);
00427 else return NULL;
00428 }
00429
00430 Alignable *MuonAlignmentInputXML::getDTnode(align::StructureType structureType, std::map<unsigned int, Alignable*> &alignableNavigator, const xercesc_2_7::DOMElement *node) const {
00431 unsigned int rawId;
00432
00433 DOMAttr *node_rawId = node->getAttributeNode(str_rawId);
00434 if (node_rawId != NULL) {
00435 try {
00436 rawId = XMLString::parseInt(node_rawId->getValue());
00437 }
00438 catch (const XMLException &toCatch) {
00439 throw cms::Exception("XMLException") << "Value of \"rawId\" must be an integer" << std::endl;
00440 }
00441 }
00442 else {
00443 int wheel, station, sector, superlayer, layer;
00444 wheel = station = sector = superlayer = layer = 1;
00445
00446 if (structureType != align::AlignableDTBarrel) {
00447 DOMAttr *node_wheel = node->getAttributeNode(str_wheel);
00448 if (node_wheel == NULL) throw cms::Exception("XMLException") << "DT node is missing required \"wheel\" attribute" << std::endl;
00449 try {
00450 wheel = XMLString::parseInt(node_wheel->getValue());
00451 }
00452 catch (const XMLException &toCatch) {
00453 throw cms::Exception("XMLException") << "Value of \"wheel\" must be an integer" << std::endl;
00454 }
00455
00456 if (structureType != align::AlignableDTWheel) {
00457 DOMAttr *node_station = node->getAttributeNode(str_station);
00458 if (node_station == NULL) throw cms::Exception("XMLException") << "DT node is missing required \"station\" attribute" << std::endl;
00459 try {
00460 station = XMLString::parseInt(node_station->getValue());
00461 }
00462 catch (const XMLException &toCatch) {
00463 throw cms::Exception("XMLException") << "Value of \"station\" must be an integer" << std::endl;
00464 }
00465
00466 if (structureType != align::AlignableDTStation) {
00467 DOMAttr *node_sector = node->getAttributeNode(str_sector);
00468 if (node_sector == NULL) throw cms::Exception("XMLException") << "DT node is missing required \"sector\" attribute" << std::endl;
00469 try {
00470 sector = XMLString::parseInt(node_sector->getValue());
00471 }
00472 catch (const XMLException &toCatch) {
00473 throw cms::Exception("XMLException") << "Value of \"sector\" must be an integer" << std::endl;
00474 }
00475
00476 if (structureType != align::AlignableDTChamber) {
00477 DOMAttr *node_superlayer = node->getAttributeNode(str_superlayer);
00478 if (node_superlayer == NULL) throw cms::Exception("XMLException") << "DT node is missing required \"superlayer\" attribute" << std::endl;
00479 try {
00480 superlayer = XMLString::parseInt(node_superlayer->getValue());
00481 }
00482 catch (const XMLException &toCatch) {
00483 throw cms::Exception("XMLException") << "Value of \"superlayer\" must be an integer" << std::endl;
00484 }
00485
00486 if (structureType != align::AlignableDTSuperLayer) {
00487 DOMAttr *node_layer = node->getAttributeNode(str_layer);
00488 if (node_layer == NULL) throw cms::Exception("XMLException") << "DT node is missing required \"layer\" attribute" << std::endl;
00489 try {
00490 layer = XMLString::parseInt(node_layer->getValue());
00491 }
00492 catch (const XMLException &toCatch) {
00493 throw cms::Exception("XMLException") << "Value of \"layer\" must be an integer" << std::endl;
00494 }
00495
00496 }
00497 }
00498 }
00499 }
00500 }
00501
00502 DTLayerId layerId(wheel, station, sector, superlayer, layer);
00503 rawId = layerId.rawId();
00504 }
00505
00506 Alignable *ali = alignableNavigator[rawId];
00507 assert(ali);
00508
00509 while (ali->alignableObjectId() != structureType) {
00510 ali = ali->mother();
00511 assert(ali);
00512 }
00513 return ali;
00514 }
00515
00516 Alignable *MuonAlignmentInputXML::getCSCnode(align::StructureType structureType, std::map<unsigned int, Alignable*> &alignableNavigator, const xercesc_2_7::DOMElement *node) const {
00517 unsigned int rawId;
00518
00519 DOMAttr *node_rawId = node->getAttributeNode(str_rawId);
00520 if (node_rawId != NULL) {
00521 try {
00522 rawId = XMLString::parseInt(node_rawId->getValue());
00523 }
00524 catch (const XMLException &toCatch) {
00525 throw cms::Exception("XMLException") << "Value of \"rawId\" must be an integer" << std::endl;
00526 }
00527 }
00528 else {
00529 int endcap, station, ring, chamber, layer;
00530 endcap = station = ring = chamber = layer = 1;
00531
00532 DOMAttr *node_endcap = node->getAttributeNode(str_endcap);
00533 if (node_endcap == NULL) throw cms::Exception("XMLException") << "CSC node is missing required \"endcap\" attribute" << std::endl;
00534 try {
00535 endcap = XMLString::parseInt(node_endcap->getValue());
00536 }
00537 catch (const XMLException &toCatch) {
00538 throw cms::Exception("XMLException") << "Value of \"endcap\" must be an integer" << std::endl;
00539 }
00540 if (endcap == -1) endcap = 2;
00541
00542 if (structureType != align::AlignableCSCEndcap) {
00543 DOMAttr *node_station = node->getAttributeNode(str_station);
00544 if (node_station == NULL) throw cms::Exception("XMLException") << "CSC node is missing required \"station\" attribute" << std::endl;
00545 try {
00546 station = XMLString::parseInt(node_station->getValue());
00547 }
00548 catch (const XMLException &toCatch) {
00549 throw cms::Exception("XMLException") << "Value of \"station\" must be an integer" << std::endl;
00550 }
00551
00552 if (structureType != align::AlignableCSCStation) {
00553 DOMAttr *node_ring = node->getAttributeNode(str_ring);
00554 if (node_ring == NULL) throw cms::Exception("XMLException") << "CSC node is missing required \"ring\" attribute" << std::endl;
00555 try {
00556 ring = XMLString::parseInt(node_ring->getValue());
00557 }
00558 catch (const XMLException &toCatch) {
00559 throw cms::Exception("XMLException") << "Value of \"ring\" must be an integer" << std::endl;
00560 }
00561
00562 if (structureType != align::AlignableCSCRing) {
00563 DOMAttr *node_chamber = node->getAttributeNode(str_chamber);
00564 if (node_chamber == NULL) throw cms::Exception("XMLException") << "CSC node is missing required \"chamber\" attribute" << std::endl;
00565 try {
00566 chamber = XMLString::parseInt(node_chamber->getValue());
00567 }
00568 catch (const XMLException &toCatch) {
00569 throw cms::Exception("XMLException") << "Value of \"chamber\" must be an integer" << std::endl;
00570 }
00571
00572 if (structureType != align::AlignableCSCChamber) {
00573 DOMAttr *node_layer = node->getAttributeNode(str_layer);
00574 if (node_layer == NULL) throw cms::Exception("XMLException") << "CSC node is missing required \"layer\" attribute" << std::endl;
00575 try {
00576 layer = XMLString::parseInt(node_layer->getValue());
00577 }
00578 catch (const XMLException &toCatch) {
00579 throw cms::Exception("XMLException") << "Value of \"layer\" must be an integer" << std::endl;
00580 }
00581
00582 }
00583 }
00584 }
00585 }
00586
00587 CSCDetId layerId(endcap, station, ring, chamber, layer);
00588 rawId = layerId.rawId();
00589 }
00590
00591 Alignable *ali = alignableNavigator[rawId];
00592 assert(ali);
00593
00594 while (ali->alignableObjectId() != structureType) {
00595 ali = ali->mother();
00596 assert(ali);
00597 }
00598 return ali;
00599 }
00600
00601 double MuonAlignmentInputXML::parseDouble(const XMLCh *str, const char *attribute) const {
00602 unsigned int len = XMLString::stringLen(str);
00603 char *cstr = XMLString::transcode(str);
00604 std::stringstream errmessage;
00605 errmessage << "Value of \"" << attribute << "\" must be a double, not \"" << cstr << "\"" << std::endl;
00606
00607 unsigned int i = 0;
00608
00609 bool minus = false;
00610 if (cstr[i] == '-') {
00611 minus = true;
00612 i++;
00613 }
00614 else if (cstr[i] == '+') i++;
00615
00616 double output = 0.;
00617
00618 while (cstr[i] != '.' && cstr[i] != 'e' && cstr[i] != 'E' && i < len) {
00619 if (cstr[i] < '0' || cstr[i] > '9') {
00620 XMLString::release(&cstr);
00621 throw cms::Exception("XMLException") << errmessage.str();
00622 }
00623
00624 output *= 10;
00625 output += cstr[i] - '0';
00626 i++;
00627 }
00628
00629 if (cstr[i] == '.') {
00630 double place = 0.1;
00631 i++;
00632
00633 while (cstr[i] != 'e' && cstr[i] != 'E' && i < len) {
00634 if (cstr[i] < '0' || cstr[i] > '9') {
00635 XMLString::release(&cstr);
00636 throw cms::Exception("XMLException") << errmessage.str();
00637 }
00638
00639 output += (cstr[i] - '0') * place;
00640 place /= 10.;
00641 i++;
00642 }
00643 }
00644
00645 if (cstr[i] == 'e' || cstr[i] == 'E') {
00646 i++;
00647
00648 int exponent = 0;
00649 bool expminus = false;
00650 if (cstr[i] == '-') {
00651 expminus = true;
00652 i++;
00653 }
00654 else if (cstr[i] == '+') i++;
00655
00656 while (i < len) {
00657 if (cstr[i] < '0' || cstr[i] > '9') {
00658 XMLString::release(&cstr);
00659 throw cms::Exception("XMLException") << errmessage.str();
00660 }
00661
00662 exponent *= 10;
00663 exponent += cstr[i] - '0';
00664 i++;
00665 }
00666
00667 if (expminus) exponent *= -1;
00668
00669 output *= pow(10., exponent);
00670 }
00671
00672 if (minus) output *= -1.;
00673
00674 XMLString::release(&cstr);
00675 return output;
00676 }
00677
00678 void MuonAlignmentInputXML::do_setposition(const xercesc_2_7::DOMElement *node, std::map<Alignable*, bool> &aliset, std::map<Alignable*, Alignable*> &alitoideal) const {
00679 DOMAttr *node_x = node->getAttributeNode(str_x);
00680 DOMAttr *node_y = node->getAttributeNode(str_y);
00681 DOMAttr *node_z = node->getAttributeNode(str_z);
00682 if (node_x == NULL) throw cms::Exception("XMLException") << "<setposition> is missing required \"x\" attribute" << std::endl;
00683 if (node_y == NULL) throw cms::Exception("XMLException") << "<setposition> is missing required \"y\" attribute" << std::endl;
00684 if (node_z == NULL) throw cms::Exception("XMLException") << "<setposition> is missing required \"z\" attribute" << std::endl;
00685
00686 double x = parseDouble(node_x->getValue(), "x");
00687 double y = parseDouble(node_y->getValue(), "y");
00688 double z = parseDouble(node_z->getValue(), "z");
00689 align::PositionType pos(x, y, z);
00690
00691 DOMAttr *node_phix = node->getAttributeNode(str_phix);
00692 DOMAttr *node_phiy = node->getAttributeNode(str_phiy);
00693 DOMAttr *node_phiz = node->getAttributeNode(str_phiz);
00694 DOMAttr *node_alpha = node->getAttributeNode(str_alpha);
00695 DOMAttr *node_beta = node->getAttributeNode(str_beta);
00696 DOMAttr *node_gamma = node->getAttributeNode(str_gamma);
00697
00698 align::RotationType rot;
00699
00700 if (node_phix != NULL && node_phiy != NULL && node_phiz != NULL) {
00701 if (node_alpha != NULL || node_beta != NULL || node_gamma != NULL) {
00702 throw cms::Exception("XMLException") << "<setposition> must either have phix, phiy, and phiz or alpha, beta, and gamma, but not both" << std::endl;
00703 }
00704
00705 double phix = parseDouble(node_phix->getValue(), "phix");
00706 double phiy = parseDouble(node_phiy->getValue(), "phiy");
00707 double phiz = parseDouble(node_phiz->getValue(), "phiz");
00708
00709
00710
00711 align::RotationType rotX( 1., 0., 0.,
00712 0., cos(phix), sin(phix),
00713 0., -sin(phix), cos(phix));
00714 align::RotationType rotY( cos(phiy), 0., -sin(phiy),
00715 0., 1., 0.,
00716 sin(phiy), 0., cos(phiy));
00717 align::RotationType rotZ( cos(phiz), sin(phiz), 0.,
00718 -sin(phiz), cos(phiz), 0.,
00719 0., 0., 1.);
00720
00721 rot = rotX * rotY * rotZ;
00722 }
00723
00724 else if (node_alpha != NULL && node_beta != NULL && node_gamma != NULL) {
00725 if (node_phix != NULL || node_phiy != NULL || node_phiz != NULL) {
00726 throw cms::Exception("XMLException") << "<setposition> must either have phix, phiy, and phiz or alpha, beta, and gamma, but not both" << std::endl;
00727 }
00728
00729
00730 align::EulerAngles eulerAngles(3);
00731 eulerAngles(1) = parseDouble(node_alpha->getValue(), "alpha");
00732 eulerAngles(2) = parseDouble(node_beta->getValue(), "beta");
00733 eulerAngles(3) = parseDouble(node_gamma->getValue(), "gamma");
00734 rot = align::RotationType(align::toMatrix(eulerAngles));
00735 }
00736
00737 else {
00738 throw cms::Exception("XMLException") << "<setposition> must either have phix, phiy, and phiz or alpha, beta, and gamma" << std::endl;
00739 }
00740
00741 DOMAttr *node_relativeto = node->getAttributeNode(str_relativeto);
00742 if (node_relativeto == NULL) throw cms::Exception("XMLException") << "<setposition> is missing required \"relativeto\" attribute" << std::endl;
00743 if (XMLString::equals(node_relativeto->getValue(), str_none)) {
00744 for (std::map<Alignable*, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
00745
00746 set_one_position(aliiter->first, pos, rot);
00747
00748 }
00749 }
00750
00751 else if (XMLString::equals(node_relativeto->getValue(), str_ideal)) {
00752 for (std::map<Alignable*, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
00753 Alignable *ali = aliiter->first;
00754 Alignable *ideal = alitoideal[ali];
00755
00756 align::PositionType idealPosition = ideal->globalPosition();
00757 align::RotationType idealRotation = ideal->globalRotation();
00758 align::PositionType newpos = align::PositionType(idealRotation.transposed() * pos.basicVector() + idealPosition.basicVector());
00759 align::RotationType newrot = rot * idealRotation;
00760
00761 set_one_position(ali, newpos, newrot);
00762
00763 }
00764 }
00765
00766 else if (XMLString::equals(node_relativeto->getValue(), str_container)) {
00767 for (std::map<Alignable*, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
00768 Alignable *ali = aliiter->first;
00769 Alignable *container = ali->mother();
00770
00771 if (container != NULL) {
00772 align::PositionType globalPosition = container->globalPosition();
00773 align::RotationType globalRotation = container->globalRotation();
00774 align::PositionType newpos = align::PositionType(globalRotation.transposed() * pos.basicVector() + globalPosition.basicVector());
00775 align::RotationType newrot = rot * globalRotation;
00776 set_one_position(ali, newpos, newrot);
00777 }
00778 else {
00779 set_one_position(ali, pos, rot);
00780 }
00781
00782 }
00783 }
00784
00785 else {
00786 char *message = XMLString::transcode(node_relativeto->getValue());
00787 throw cms::Exception("XMLException") << "relativeto must be \"none\", \"ideal\", or \"container\", not \"" << message << "\"" << std::endl;
00788 }
00789 }
00790
00791 void MuonAlignmentInputXML::set_one_position(Alignable *ali, const align::PositionType &pos, const align::RotationType &rot) const {
00792 const align::PositionType& oldpos = ali->globalPosition();
00793 const align::RotationType& oldrot = ali->globalRotation();
00794
00795
00796 align::GlobalVector posDiff = pos - oldpos;
00797 align::RotationType rotDiff = oldrot.multiplyInverse(rot);
00798 align::rectify(rotDiff);
00799 ali->move(posDiff);
00800 ali->rotateInGlobalFrame(rotDiff);
00801
00802
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812
00813
00814
00815
00816
00817
00818
00819
00820
00821 align::ErrorMatrix matrix6x6 = ROOT::Math::SMatrixIdentity();
00822 matrix6x6 *= 1000.;
00823
00824 const SurveyDet *survey = ali->survey();
00825 if (survey != NULL) {
00826 matrix6x6 = survey->errors();
00827 }
00828 ali->setSurvey(new SurveyDet(ali->surface(), matrix6x6));
00829 }
00830
00831 void MuonAlignmentInputXML::do_setape(const xercesc_2_7::DOMElement *node, std::map<Alignable*, bool> &aliset, std::map<Alignable*, Alignable*> &alitoideal) const {
00832 DOMAttr *node_xx = node->getAttributeNode(str_xx);
00833 DOMAttr *node_xy = node->getAttributeNode(str_xy);
00834 DOMAttr *node_xz = node->getAttributeNode(str_xz);
00835 DOMAttr *node_yy = node->getAttributeNode(str_yy);
00836 DOMAttr *node_yz = node->getAttributeNode(str_yz);
00837 DOMAttr *node_zz = node->getAttributeNode(str_zz);
00838
00839 if (node_xx == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"xx\" attribute" << std::endl;
00840 if (node_xy == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"xy\" attribute" << std::endl;
00841 if (node_xz == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"xz\" attribute" << std::endl;
00842 if (node_yy == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"yy\" attribute" << std::endl;
00843 if (node_yz == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"yz\" attribute" << std::endl;
00844 if (node_zz == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"zz\" attribute" << std::endl;
00845
00846 CLHEP::HepSymMatrix matrix3x3(3);
00847 matrix3x3(1,1) = parseDouble(node_xx->getValue(), "xx");
00848 matrix3x3(1,2) = parseDouble(node_xy->getValue(), "xy");
00849 matrix3x3(1,3) = parseDouble(node_xz->getValue(), "xz");
00850 matrix3x3(2,2) = parseDouble(node_yy->getValue(), "yy");
00851 matrix3x3(2,3) = parseDouble(node_yz->getValue(), "yz");
00852 matrix3x3(3,3) = parseDouble(node_zz->getValue(), "zz");
00853
00854 for (std::map<Alignable*, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
00855 aliiter->first->setAlignmentPositionError(AlignmentPositionError(matrix3x3));
00856 }
00857 }
00858
00859 void MuonAlignmentInputXML::do_setsurveyerr(const xercesc_2_7::DOMElement *node, std::map<Alignable*, bool> &aliset, std::map<Alignable*, Alignable*> &alitoideal) const {
00860 DOMAttr *node_xx = node->getAttributeNode(str_xx);
00861 DOMAttr *node_xy = node->getAttributeNode(str_xy);
00862 DOMAttr *node_xz = node->getAttributeNode(str_xz);
00863 DOMAttr *node_xa = node->getAttributeNode(str_xa);
00864 DOMAttr *node_xb = node->getAttributeNode(str_xb);
00865 DOMAttr *node_xc = node->getAttributeNode(str_xc);
00866 DOMAttr *node_yy = node->getAttributeNode(str_yy);
00867 DOMAttr *node_yz = node->getAttributeNode(str_yz);
00868 DOMAttr *node_ya = node->getAttributeNode(str_ya);
00869 DOMAttr *node_yb = node->getAttributeNode(str_yb);
00870 DOMAttr *node_yc = node->getAttributeNode(str_yc);
00871 DOMAttr *node_zz = node->getAttributeNode(str_zz);
00872 DOMAttr *node_za = node->getAttributeNode(str_za);
00873 DOMAttr *node_zb = node->getAttributeNode(str_zb);
00874 DOMAttr *node_zc = node->getAttributeNode(str_zc);
00875 DOMAttr *node_aa = node->getAttributeNode(str_aa);
00876 DOMAttr *node_ab = node->getAttributeNode(str_ab);
00877 DOMAttr *node_ac = node->getAttributeNode(str_ac);
00878 DOMAttr *node_bb = node->getAttributeNode(str_bb);
00879 DOMAttr *node_bc = node->getAttributeNode(str_bc);
00880 DOMAttr *node_cc = node->getAttributeNode(str_cc);
00881
00882 if (node_xx == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"xx\" attribute" << std::endl;
00883 if (node_xy == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"xy\" attribute" << std::endl;
00884 if (node_xz == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"xz\" attribute" << std::endl;
00885 if (node_xa == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"xa\" attribute" << std::endl;
00886 if (node_xb == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"xb\" attribute" << std::endl;
00887 if (node_xc == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"xc\" attribute" << std::endl;
00888 if (node_yy == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"yy\" attribute" << std::endl;
00889 if (node_yz == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"yz\" attribute" << std::endl;
00890 if (node_ya == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"ya\" attribute" << std::endl;
00891 if (node_yb == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"yb\" attribute" << std::endl;
00892 if (node_yc == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"yc\" attribute" << std::endl;
00893 if (node_zz == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"zz\" attribute" << std::endl;
00894 if (node_za == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"za\" attribute" << std::endl;
00895 if (node_zb == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"zb\" attribute" << std::endl;
00896 if (node_zc == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"zc\" attribute" << std::endl;
00897 if (node_aa == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"aa\" attribute" << std::endl;
00898 if (node_ab == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"ab\" attribute" << std::endl;
00899 if (node_ac == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"ac\" attribute" << std::endl;
00900 if (node_bb == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"bb\" attribute" << std::endl;
00901 if (node_bc == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"bc\" attribute" << std::endl;
00902 if (node_cc == NULL) throw cms::Exception("XMLException") << "<setape> is missing required \"cc\" attribute" << std::endl;
00903
00904 align::ErrorMatrix matrix6x6;
00905 matrix6x6(0,0) = parseDouble(node_xx->getValue(), "xx");
00906 matrix6x6(0,1) = parseDouble(node_xy->getValue(), "xy");
00907 matrix6x6(0,2) = parseDouble(node_xz->getValue(), "xz");
00908 matrix6x6(0,3) = parseDouble(node_xa->getValue(), "xa");
00909 matrix6x6(0,4) = parseDouble(node_xb->getValue(), "xb");
00910 matrix6x6(0,5) = parseDouble(node_xc->getValue(), "xc");
00911 matrix6x6(1,1) = parseDouble(node_yy->getValue(), "yy");
00912 matrix6x6(1,2) = parseDouble(node_yz->getValue(), "yz");
00913 matrix6x6(1,3) = parseDouble(node_ya->getValue(), "ya");
00914 matrix6x6(1,4) = parseDouble(node_yb->getValue(), "yb");
00915 matrix6x6(1,5) = parseDouble(node_yc->getValue(), "yc");
00916 matrix6x6(2,2) = parseDouble(node_zz->getValue(), "zz");
00917 matrix6x6(2,3) = parseDouble(node_za->getValue(), "za");
00918 matrix6x6(2,4) = parseDouble(node_zb->getValue(), "zb");
00919 matrix6x6(2,5) = parseDouble(node_zc->getValue(), "zc");
00920 matrix6x6(3,3) = parseDouble(node_aa->getValue(), "aa");
00921 matrix6x6(3,4) = parseDouble(node_ab->getValue(), "ab");
00922 matrix6x6(3,5) = parseDouble(node_ac->getValue(), "ac");
00923 matrix6x6(4,4) = parseDouble(node_bb->getValue(), "bb");
00924 matrix6x6(4,5) = parseDouble(node_bc->getValue(), "bc");
00925 matrix6x6(5,5) = parseDouble(node_cc->getValue(), "cc");
00926
00927 for (std::map<Alignable*, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
00928 Alignable *ali = aliiter->first;
00929 ali->setSurvey(new SurveyDet(ali->surface(), matrix6x6));
00930 }
00931 }
00932
00933 void MuonAlignmentInputXML::do_moveglobal(const xercesc_2_7::DOMElement *node, std::map<Alignable*, bool> &aliset, std::map<Alignable*, Alignable*> &alitoideal) const {
00934 DOMAttr *node_x = node->getAttributeNode(str_x);
00935 DOMAttr *node_y = node->getAttributeNode(str_y);
00936 DOMAttr *node_z = node->getAttributeNode(str_z);
00937 if (node_x == NULL) throw cms::Exception("XMLException") << "<moveglobal> is missing required \"x\" attribute" << std::endl;
00938 if (node_y == NULL) throw cms::Exception("XMLException") << "<moveglobal> is missing required \"y\" attribute" << std::endl;
00939 if (node_z == NULL) throw cms::Exception("XMLException") << "<moveglobal> is missing required \"z\" attribute" << std::endl;
00940
00941 double x = parseDouble(node_x->getValue(), "x");
00942 double y = parseDouble(node_y->getValue(), "y");
00943 double z = parseDouble(node_z->getValue(), "z");
00944 GlobalVector vect(x, y, z);
00945
00946 for (std::map<Alignable*, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
00947 Alignable *ali = aliiter->first;
00948
00949 ali->move(vect);
00950
00951 align::ErrorMatrix matrix6x6 = ROOT::Math::SMatrixIdentity();
00952 matrix6x6 *= 1000.;
00953
00954 const SurveyDet *survey = ali->survey();
00955 if (survey != NULL) {
00956 matrix6x6 = survey->errors();
00957 }
00958 ali->setSurvey(new SurveyDet(ali->surface(), matrix6x6));
00959 }
00960 }
00961
00962 void MuonAlignmentInputXML::do_rotatelocal(const xercesc_2_7::DOMElement *node, std::map<Alignable*, bool> &aliset, std::map<Alignable*, Alignable*> &alitoideal) const {
00963 DOMAttr *node_axisx = node->getAttributeNode(str_axisx);
00964 DOMAttr *node_axisy = node->getAttributeNode(str_axisy);
00965 DOMAttr *node_axisz = node->getAttributeNode(str_axisz);
00966 DOMAttr *node_angle = node->getAttributeNode(str_angle);
00967 if (node_axisx == NULL) throw cms::Exception("XMLException") << "<moveglobal> is missing required \"axisx\" attribute" << std::endl;
00968 if (node_axisy == NULL) throw cms::Exception("XMLException") << "<moveglobal> is missing required \"axisy\" attribute" << std::endl;
00969 if (node_axisz == NULL) throw cms::Exception("XMLException") << "<moveglobal> is missing required \"axisz\" attribute" << std::endl;
00970 if (node_angle == NULL) throw cms::Exception("XMLException") << "<moveglobal> is missing required \"angle\" attribute" << std::endl;
00971
00972 double x = parseDouble(node_axisx->getValue(), "x");
00973 double y = parseDouble(node_axisy->getValue(), "y");
00974 double z = parseDouble(node_axisz->getValue(), "z");
00975 double angle = parseDouble(node_angle->getValue(), "angle");
00976 LocalVector vect(x, y, z);
00977
00978 for (std::map<Alignable*, bool>::const_iterator aliiter = aliset.begin(); aliiter != aliset.end(); ++aliiter) {
00979 Alignable *ali = aliiter->first;
00980
00981 ali->rotateAroundLocalAxis(vect, angle);
00982
00983 align::ErrorMatrix matrix6x6 = ROOT::Math::SMatrixIdentity();
00984 matrix6x6 *= 1000.;
00985
00986 const SurveyDet *survey = ali->survey();
00987 if (survey != NULL) {
00988 matrix6x6 = survey->errors();
00989 }
00990 ali->setSurvey(new SurveyDet(ali->surface(), matrix6x6));
00991 }
00992 }
00993
00994
00995
00996
00997
00998
00999
01000