91 const xercesc::DOMNamedNodeMap*
const attributes
92 = booleanElement->getAttributes();
93 XMLSize_t attributeCount = attributes->getLength();
95 for (XMLSize_t attribute_index=0;
96 attribute_index<attributeCount; attribute_index++)
98 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
100 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
103 const xercesc::DOMAttr*
const attribute
104 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
117 for (xercesc::DOMNode* iter = booleanElement->getFirstChild();
118 iter != 0;iter = iter->getNextSibling())
120 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
122 const xercesc::DOMElement*
const child
123 =
dynamic_cast<xercesc::DOMElement*
>(iter);
132 if (tag==
"first") { first =
RefRead(child); }
else
133 if (tag==
"second") { scnd =
RefRead(child); }
else
134 if (tag==
"position") {
VectorRead(child,position); }
else
135 if (tag==
"rotation") {
VectorRead(child,rotation); }
else
136 if (tag==
"positionref")
138 if (tag==
"rotationref")
140 if (tag==
"firstposition") {
VectorRead(child,firstposition); }
else
141 if (tag==
"firstrotation") {
VectorRead(child,firstrotation); }
else
142 if (tag==
"firstpositionref")
144 if (tag==
"firstrotationref")
148 G4String error_msg =
"Unknown tag in boolean solid: " + tag;
149 G4Exception(
"G4GDMLReadSolids::BooleanRead()",
"ReadError",
159 if (( (firstrotation.x()!=0.0) || (firstrotation.y()!=0.0)
160 || (firstrotation.z()!=0.0))
161 || ( (firstposition.x()!=0.0) || (firstposition.y()!=0.0)
162 || (firstposition.z()!=0.0)))
167 firstSolid, firsttransform);
171 {
new G4UnionSolid(name,firstSolid,secondSolid,transform); }
else
186 const xercesc::DOMNamedNodeMap*
const attributes
187 = boxElement->getAttributes();
188 XMLSize_t attributeCount = attributes->getLength();
190 for (XMLSize_t attribute_index=0;
191 attribute_index<attributeCount; attribute_index++)
193 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
195 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
198 const xercesc::DOMAttr*
const attribute
199 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
209 if (attName==
"name") { name =
GenerateName(attValue); }
else
220 new G4Box(name,x,y,z);
236 const xercesc::DOMNamedNodeMap*
const attributes
237 = coneElement->getAttributes();
238 XMLSize_t attributeCount = attributes->getLength();
240 for (XMLSize_t attribute_index=0;
241 attribute_index<attributeCount; attribute_index++)
243 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
245 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
248 const xercesc::DOMAttr*
const attribute
249 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
259 if (attName==
"name") { name =
GenerateName(attValue); }
else
262 if (attName==
"rmin1") { rmin1 =
eval.
Evaluate(attValue); }
else
263 if (attName==
"rmax1") { rmax1 =
eval.
Evaluate(attValue); }
else
264 if (attName==
"rmin2") { rmin2 =
eval.
Evaluate(attValue); }
else
265 if (attName==
"rmax2") { rmax2 =
eval.
Evaluate(attValue); }
else
267 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
268 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
279 new G4Cons(name,rmin1,rmax1,rmin2,rmax2,z,startphi,deltaphi);
292 const xercesc::DOMNamedNodeMap*
const attributes
293 = elconeElement->getAttributes();
294 XMLSize_t attributeCount = attributes->getLength();
296 for (XMLSize_t attribute_index=0;
297 attribute_index<attributeCount; attribute_index++)
299 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
301 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
304 const xercesc::DOMAttr*
const attribute
305 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
315 if (attName==
"name") { name =
GenerateName(attValue); }
else
317 if (attName==
"dx") { dx =
eval.
Evaluate(attValue); }
else
318 if (attName==
"dy") { dy =
eval.
Evaluate(attValue); }
else
319 if (attName==
"zmax") { zmax =
eval.
Evaluate(attValue); }
else
320 if (attName==
"zcut") { zcut =
eval.
Evaluate(attValue); }
340 const xercesc::DOMNamedNodeMap*
const attributes
341 = ellipsoidElement->getAttributes();
342 XMLSize_t attributeCount = attributes->getLength();
344 for (XMLSize_t attribute_index=0;
345 attribute_index<attributeCount; attribute_index++)
347 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
349 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
352 const xercesc::DOMAttr*
const attribute
353 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
363 if (attName==
"name") { name =
GenerateName(attValue); }
else
365 if (attName==
"ax") { ax =
eval.
Evaluate(attValue); }
else
366 if (attName==
"by") { by =
eval.
Evaluate(attValue); }
else
367 if (attName==
"cz") { cz =
eval.
Evaluate(attValue); }
else
368 if (attName==
"zcut1") { zcut1 =
eval.
Evaluate(attValue); }
else
369 if (attName==
"zcut2") { zcut2 =
eval.
Evaluate(attValue); }
390 const xercesc::DOMNamedNodeMap*
const attributes
391 = eltubeElement->getAttributes();
392 XMLSize_t attributeCount = attributes->getLength();
394 for (XMLSize_t attribute_index=0;
395 attribute_index<attributeCount; attribute_index++)
397 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
399 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
402 const xercesc::DOMAttr*
const attribute
403 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
413 if (attName==
"name") { name =
GenerateName(attValue); }
else
415 if (attName==
"dx") { dx =
eval.
Evaluate(attValue); }
else
416 if (attName==
"dy") { dy =
eval.
Evaluate(attValue); }
else
432 const xercesc::DOMNamedNodeMap*
const attributes
433 = xtruElement->getAttributes();
434 XMLSize_t attributeCount = attributes->getLength();
436 for (XMLSize_t attribute_index=0;
437 attribute_index<attributeCount; attribute_index++)
439 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
441 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
444 const xercesc::DOMAttr*
const attribute
445 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
455 if (attName==
"name") { name =
GenerateName(attValue); }
else
459 std::vector<G4TwoVector> twoDimVertexList;
460 std::vector<G4ExtrudedSolid::ZSection> sectionList;
462 for (xercesc::DOMNode* iter = xtruElement->getFirstChild();
463 iter != 0; iter = iter->getNextSibling())
465 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
467 const xercesc::DOMElement*
const child
468 =
dynamic_cast<xercesc::DOMElement*
>(iter);
477 if (tag==
"twoDimVertex")
480 { sectionList.push_back(
SectionRead(child,lunit)); }
497 const xercesc::DOMNamedNodeMap*
const attributes
498 = hypeElement->getAttributes();
499 XMLSize_t attributeCount = attributes->getLength();
501 for (XMLSize_t attribute_index=0;
502 attribute_index<attributeCount; attribute_index++)
504 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
506 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
509 const xercesc::DOMAttr*
const attribute
510 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
520 if (attName==
"name") { name =
GenerateName(attValue); }
else
523 if (attName==
"rmin") { rmin =
eval.
Evaluate(attValue); }
else
524 if (attName==
"rmax") { rmax =
eval.
Evaluate(attValue); }
else
525 if (attName==
"inst") { inst =
eval.
Evaluate(attValue); }
else
526 if (attName==
"outst") { outst =
eval.
Evaluate(attValue); }
else
536 new G4Hype(name,rmin,rmax,inst,outst,z);
543 #if !defined(G4GEOM_USE_USOLIDS)
544 G4Exception(
"G4GDMLReadSolids::MultiUnionNodeRead()",
546 "Installation with USolids primitives required!");
554 const xercesc::DOMNamedNodeMap*
const attributes
555 = unionNodeElement->getAttributes();
556 XMLSize_t attributeCount = attributes->getLength();
558 for (XMLSize_t attribute_index=0;
559 attribute_index<attributeCount; attribute_index++)
561 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
563 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
566 const xercesc::DOMAttr*
const attribute
567 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
570 G4Exception(
"G4GDMLReadSolids::MultiUnionNodeRead()",
580 for (xercesc::DOMNode* iter = unionNodeElement->getFirstChild();
581 iter != 0;iter = iter->getNextSibling())
583 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
585 const xercesc::DOMElement*
const child
586 =
dynamic_cast<xercesc::DOMElement*
>(iter);
589 G4Exception(
"G4GDMLReadSolids::MultiUnionNodeRead()",
595 if (tag==
"position") {
VectorRead(child,position); }
else
596 if (tag==
"rotation") {
VectorRead(child,rotation); }
else
597 if (tag==
"positionref")
599 if (tag==
"rotationref")
601 if (tag==
"solid") { solid =
RefRead(child); }
604 G4String error_msg =
"Unknown tag in MultiUnion structure: " + tag;
605 G4Exception(
"G4GDMLReadSolids::MultiUnionNodeRead()",
"ReadError",
611 multiUnionSolid->
AddNode(*solidNode, transform);
617 #if !defined(G4GEOM_USE_USOLIDS)
620 "Installation with USolids primitives required!");
625 const xercesc::DOMNamedNodeMap*
const attributes
626 = unionElement->getAttributes();
627 XMLSize_t attributeCount = attributes->getLength();
629 for (XMLSize_t attribute_index=0;
630 attribute_index<attributeCount; attribute_index++)
632 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
634 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
637 const xercesc::DOMAttr*
const attribute
638 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
653 for (xercesc::DOMNode* iter = unionElement->getFirstChild();
654 iter != 0;iter = iter->getNextSibling())
656 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
658 const xercesc::DOMElement*
const child
659 =
dynamic_cast<xercesc::DOMElement*
>(iter);
671 G4String error_msg =
"Unknown tag in MultiUnion structure: " + tag;
672 G4Exception(
"G4GDMLReadSolids::MultiUnionRead()",
"ReadError",
685 const xercesc::DOMNamedNodeMap*
const attributes
686 = orbElement->getAttributes();
687 XMLSize_t attributeCount = attributes->getLength();
689 for (XMLSize_t attribute_index=0;
690 attribute_index<attributeCount; attribute_index++)
692 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
694 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
697 const xercesc::DOMAttr*
const attribute
698 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
708 if (attName==
"name") { name =
GenerateName(attValue); }
else
730 const xercesc::DOMNamedNodeMap*
const attributes
731 = paraElement->getAttributes();
732 XMLSize_t attributeCount = attributes->getLength();
734 for (XMLSize_t attribute_index=0;
735 attribute_index<attributeCount; attribute_index++)
737 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
739 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
742 const xercesc::DOMAttr*
const attribute
743 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
753 if (attName==
"name") { name =
GenerateName(attValue); }
else
759 if (attName==
"alpha") { alpha =
eval.
Evaluate(attValue); }
else
760 if (attName==
"theta") { theta =
eval.
Evaluate(attValue); }
else
771 new G4Para(name,x,y,z,alpha,theta,phi);
783 const xercesc::DOMNamedNodeMap*
const attributes
784 = paraElement->getAttributes();
785 XMLSize_t attributeCount = attributes->getLength();
787 for (XMLSize_t attribute_index=0;
788 attribute_index<attributeCount; attribute_index++)
790 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
792 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
795 const xercesc::DOMAttr*
const attribute
796 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
806 if (attName==
"name") { name =
GenerateName(attValue); }
else
808 if (attName==
"rlo") { rlo =
eval.
Evaluate(attValue); }
else
809 if (attName==
"rhi") { rhi =
eval.
Evaluate(attValue); }
else
829 const xercesc::DOMNamedNodeMap*
const attributes
830 = polyconeElement->getAttributes();
831 XMLSize_t attributeCount = attributes->getLength();
833 for (XMLSize_t attribute_index=0;
834 attribute_index<attributeCount; attribute_index++)
836 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
838 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
841 const xercesc::DOMAttr*
const attribute
842 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
852 if (attName==
"name") { name =
GenerateName(attValue); }
else
855 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
856 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
862 std::vector<zplaneType> zplaneList;
864 for (xercesc::DOMNode* iter = polyconeElement->getFirstChild();
865 iter != 0; iter = iter->getNextSibling())
867 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
869 const xercesc::DOMElement*
const child
870 =
dynamic_cast<xercesc::DOMElement*
>(iter);
879 if (tag==
"zplane") { zplaneList.push_back(
ZplaneRead(child)); }
882 G4int numZPlanes = zplaneList.size();
888 for (
G4int i=0; i<numZPlanes; i++)
890 rmin_array[i] = zplaneList[i].rmin*lunit;
891 rmax_array[i] = zplaneList[i].rmax*lunit;
892 z_array[i] = zplaneList[i].z*lunit;
895 new G4Polycone(name,startphi,deltaphi,numZPlanes,
896 z_array,rmin_array,rmax_array);
898 delete [] rmin_array;
899 delete [] rmax_array;
912 const xercesc::DOMNamedNodeMap*
const attributes
913 = polyconeElement->getAttributes();
914 XMLSize_t attributeCount = attributes->getLength();
916 for (XMLSize_t attribute_index=0;
917 attribute_index<attributeCount; attribute_index++)
919 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
921 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
924 const xercesc::DOMAttr*
const attribute
925 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
928 G4Exception(
"G4GDMLReadSolids::GenericPolyconeRead()",
935 if (attName==
"name") { name =
GenerateName(attValue); }
else
938 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
939 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
945 std::vector<rzPointType> rzPointList;
947 for (xercesc::DOMNode* iter = polyconeElement->getFirstChild();
948 iter != 0; iter = iter->getNextSibling())
950 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
952 const xercesc::DOMElement*
const child
953 =
dynamic_cast<xercesc::DOMElement*
>(iter);
956 G4Exception(
"G4GDMLReadSolids::GenericPolyconeRead()",
962 if (tag==
"rzpoint") { rzPointList.push_back(
RZPointRead(child)); }
965 G4int numRZPoints = rzPointList.size();
970 for (
G4int i=0; i<numRZPoints; i++)
972 r_array[i] = rzPointList[i].r*lunit;
973 z_array[i] = rzPointList[i].z*lunit;
991 const xercesc::DOMNamedNodeMap*
const attributes
992 = polyhedraElement->getAttributes();
993 XMLSize_t attributeCount = attributes->getLength();
995 for (XMLSize_t attribute_index=0;
996 attribute_index<attributeCount; attribute_index++)
998 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1000 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1003 const xercesc::DOMAttr*
const attribute
1004 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1014 if (attName==
"name") { name =
GenerateName(attValue); }
else
1017 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1018 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
else
1025 std::vector<zplaneType> zplaneList;
1027 for (xercesc::DOMNode* iter = polyhedraElement->getFirstChild();
1028 iter != 0; iter = iter->getNextSibling())
1030 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
1032 const xercesc::DOMElement*
const child
1033 =
dynamic_cast<xercesc::DOMElement*
>(iter);
1042 if (tag==
"zplane") { zplaneList.push_back(
ZplaneRead(child)); }
1045 G4int numZPlanes = zplaneList.size();
1051 for (
G4int i=0; i<numZPlanes; i++)
1053 rmin_array[i] = zplaneList[i].rmin*lunit;
1054 rmax_array[i] = zplaneList[i].rmax*lunit;
1055 z_array[i] = zplaneList[i].z*lunit;
1058 new G4Polyhedra(name,startphi,deltaphi,numsides,numZPlanes,
1059 z_array,rmin_array,rmax_array);
1061 delete [] rmin_array;
1062 delete [] rmax_array;
1076 const xercesc::DOMNamedNodeMap*
const attributes
1077 = polyhedraElement->getAttributes();
1078 XMLSize_t attributeCount = attributes->getLength();
1080 for (XMLSize_t attribute_index=0;
1081 attribute_index<attributeCount; attribute_index++)
1083 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1085 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1088 const xercesc::DOMAttr*
const attribute
1089 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1092 G4Exception(
"G4GDMLReadSolids::GenericPolyhedraRead()",
1099 if (attName==
"name") { name =
GenerateName(attValue); }
else
1102 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1103 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
else
1110 std::vector<rzPointType> rzpointList;
1112 for (xercesc::DOMNode* iter = polyhedraElement->getFirstChild();
1113 iter != 0; iter = iter->getNextSibling())
1115 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
1117 const xercesc::DOMElement*
const child
1118 =
dynamic_cast<xercesc::DOMElement*
>(iter);
1121 G4Exception(
"G4GDMLReadSolids::GenericPolyhedraRead()",
1127 if (tag==
"rzpoint") { rzpointList.push_back(
RZPointRead(child)); }
1130 G4int numRZPoints = rzpointList.size();
1135 for (
G4int i=0; i<numRZPoints; i++)
1137 r_array[i] = rzpointList[i].r*lunit;
1138 z_array[i] = rzpointList[i].z*lunit;
1141 new G4Polyhedra(name,startphi,deltaphi,numsides,numRZPoints,
1158 const xercesc::DOMNamedNodeMap*
const attributes
1159 = quadrangularElement->getAttributes();
1160 XMLSize_t attributeCount = attributes->getLength();
1162 for (XMLSize_t attribute_index=0;
1163 attribute_index<attributeCount; attribute_index++)
1165 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1167 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1170 const xercesc::DOMAttr*
const attribute
1171 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1174 G4Exception(
"G4GDMLReadSolids::QuadrangularRead()",
1181 if (attName==
"vertex1")
1183 if (attName==
"vertex2")
1185 if (attName==
"vertex3")
1187 if (attName==
"vertex4")
1189 if (attName==
"lunit")
1191 if (attName==
"type")
1192 {
if (attValue==
"RELATIVE") { type =
RELATIVE; } }
1196 vertex3*lunit,vertex4*lunit,type);
1210 const xercesc::DOMNamedNodeMap*
const attributes
1211 = reflectedSolidElement->getAttributes();
1212 XMLSize_t attributeCount = attributes->getLength();
1214 for (XMLSize_t attribute_index=0;
1215 attribute_index<attributeCount; attribute_index++)
1217 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1219 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1222 const xercesc::DOMAttr*
const attribute
1223 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1226 G4Exception(
"G4GDMLReadSolids::ReflectedSolidRead()",
1233 if (attName==
"name") { name =
GenerateName(attValue); }
else
1236 if (attName==
"solid") { solid =
GenerateName(attValue); }
else
1237 if (attName==
"sx") { scale.setX(
eval.
Evaluate(attValue)); }
else
1238 if (attName==
"sy") { scale.setY(
eval.
Evaluate(attValue)); }
else
1239 if (attName==
"sz") { scale.setZ(
eval.
Evaluate(attValue)); }
else
1240 if (attName==
"rx") { rotation.setX(
eval.
Evaluate(attValue)); }
else
1241 if (attName==
"ry") { rotation.setY(
eval.
Evaluate(attValue)); }
else
1242 if (attName==
"rz") { rotation.setZ(
eval.
Evaluate(attValue)); }
else
1243 if (attName==
"dx") { position.setX(
eval.
Evaluate(attValue)); }
else
1244 if (attName==
"dy") { position.setY(
eval.
Evaluate(attValue)); }
else
1245 if (attName==
"dz") { position.setZ(
eval.
Evaluate(attValue)); }
1252 transform = transform*
G4Scale3D(scale.x(),scale.y(),scale.z());
1264 const xercesc::DOMNamedNodeMap*
const attributes
1265 = sectionElement->getAttributes();
1266 XMLSize_t attributeCount = attributes->getLength();
1268 for (XMLSize_t attribute_index=0;
1269 attribute_index<attributeCount; attribute_index++)
1271 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1273 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1276 const xercesc::DOMAttr*
const attribute
1277 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1287 if (attName==
"zPosition")
1289 if (attName==
"xOffset")
1291 if (attName==
"yOffset")
1293 if (attName==
"scalingFactor")
1313 const xercesc::DOMNamedNodeMap*
const attributes
1314 = sphereElement->getAttributes();
1315 XMLSize_t attributeCount = attributes->getLength();
1317 for (XMLSize_t attribute_index=0;
1318 attribute_index<attributeCount; attribute_index++)
1320 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1322 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1325 const xercesc::DOMAttr*
const attribute
1326 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1336 if (attName==
"name") { name =
GenerateName(attValue); }
else
1339 if (attName==
"rmin") { rmin =
eval.
Evaluate(attValue); }
else
1340 if (attName==
"rmax") { rmax =
eval.
Evaluate(attValue); }
else
1341 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1342 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
else
1343 if (attName==
"starttheta") { starttheta =
eval.
Evaluate(attValue); }
else
1344 if (attName==
"deltatheta") { deltatheta =
eval.
Evaluate(attValue); }
1351 starttheta *= aunit;
1352 deltatheta *= aunit;
1354 new G4Sphere(name,rmin,rmax,startphi,deltaphi,starttheta,deltatheta);
1362 const xercesc::DOMNamedNodeMap*
const attributes
1363 = tessellatedElement->getAttributes();
1364 XMLSize_t attributeCount = attributes->getLength();
1366 for (XMLSize_t attribute_index=0;
1367 attribute_index<attributeCount; attribute_index++)
1369 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1371 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1374 const xercesc::DOMAttr*
const attribute
1375 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1378 G4Exception(
"G4GDMLReadSolids::TessellatedRead()",
1385 if (attName==
"name") { name =
GenerateName(attValue); }
1390 for (xercesc::DOMNode* iter = tessellatedElement->getFirstChild();
1391 iter != 0; iter = iter->getNextSibling())
1393 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
1395 const xercesc::DOMElement*
const child
1396 =
dynamic_cast<xercesc::DOMElement*
>(iter);
1399 G4Exception(
"G4GDMLReadSolids::TessellatedRead()",
1405 if (tag==
"triangular")
1407 if (tag==
"quadrangular")
1423 const xercesc::DOMNamedNodeMap*
const attributes
1424 = tetElement->getAttributes();
1425 XMLSize_t attributeCount = attributes->getLength();
1427 for (XMLSize_t attribute_index=0;
1428 attribute_index<attributeCount;attribute_index++)
1430 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1432 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1435 const xercesc::DOMAttr*
const attribute
1436 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1446 if (attName==
"name")
1448 if (attName==
"lunit")
1450 if (attName==
"vertex1")
1452 if (attName==
"vertex2")
1454 if (attName==
"vertex3")
1456 if (attName==
"vertex4")
1460 new G4Tet(name,vertex1*lunit,vertex2*lunit,vertex3*lunit,vertex4*lunit);
1474 const xercesc::DOMNamedNodeMap*
const attributes
1475 = torusElement->getAttributes();
1476 XMLSize_t attributeCount = attributes->getLength();
1478 for (XMLSize_t attribute_index=0;
1479 attribute_index<attributeCount; attribute_index++)
1481 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1483 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1486 const xercesc::DOMAttr*
const attribute
1487 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1497 if (attName==
"name") { name =
GenerateName(attValue); }
else
1500 if (attName==
"rmin") { rmin =
eval.
Evaluate(attValue); }
else
1501 if (attName==
"rmax") { rmax =
eval.
Evaluate(attValue); }
else
1502 if (attName==
"rtor") { rtor =
eval.
Evaluate(attValue); }
else
1503 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1504 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
1513 new G4Torus(name,rmin,rmax,rtor,startphi,deltaphi);
1522 G4double v1x=0.0, v1y=0.0, v2x=0.0, v2y=0.0, v3x=0.0, v3y=0.0,
1523 v4x=0.0, v4y=0.0, v5x=0.0, v5y=0.0, v6x=0.0, v6y=0.0,
1524 v7x=0.0, v7y=0.0, v8x=0.0, v8y=0.0;
1526 const xercesc::DOMNamedNodeMap*
const attributes
1527 = gtrapElement->getAttributes();
1528 XMLSize_t attributeCount = attributes->getLength();
1530 for (XMLSize_t attribute_index=0;
1531 attribute_index<attributeCount; attribute_index++)
1533 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1535 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1538 const xercesc::DOMAttr*
const attribute
1539 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1549 if (attName==
"name") { name =
GenerateName(attValue); }
else
1551 if (attName==
"dz") { dz =
eval.
Evaluate(attValue); }
else
1552 if (attName==
"v1x") { v1x =
eval.
Evaluate(attValue); }
else
1553 if (attName==
"v1y") { v1y =
eval.
Evaluate(attValue); }
else
1554 if (attName==
"v2x") { v2x =
eval.
Evaluate(attValue); }
else
1555 if (attName==
"v2y") { v2y =
eval.
Evaluate(attValue); }
else
1556 if (attName==
"v3x") { v3x =
eval.
Evaluate(attValue); }
else
1557 if (attName==
"v3y") { v3y =
eval.
Evaluate(attValue); }
else
1558 if (attName==
"v4x") { v4x =
eval.
Evaluate(attValue); }
else
1559 if (attName==
"v4y") { v4y =
eval.
Evaluate(attValue); }
else
1560 if (attName==
"v5x") { v5x =
eval.
Evaluate(attValue); }
else
1561 if (attName==
"v5y") { v5y =
eval.
Evaluate(attValue); }
else
1562 if (attName==
"v6x") { v6x =
eval.
Evaluate(attValue); }
else
1563 if (attName==
"v6y") { v6y =
eval.
Evaluate(attValue); }
else
1564 if (attName==
"v7x") { v7x =
eval.
Evaluate(attValue); }
else
1565 if (attName==
"v7y") { v7y =
eval.
Evaluate(attValue); }
else
1566 if (attName==
"v8x") { v8x =
eval.
Evaluate(attValue); }
else
1571 std::vector<G4TwoVector> vertices;
1572 vertices.push_back(
G4TwoVector(v1x*lunit,v1y*lunit));
1573 vertices.push_back(
G4TwoVector(v2x*lunit,v2y*lunit));
1574 vertices.push_back(
G4TwoVector(v3x*lunit,v3y*lunit));
1575 vertices.push_back(
G4TwoVector(v4x*lunit,v4y*lunit));
1576 vertices.push_back(
G4TwoVector(v5x*lunit,v5y*lunit));
1577 vertices.push_back(
G4TwoVector(v6x*lunit,v6y*lunit));
1578 vertices.push_back(
G4TwoVector(v7x*lunit,v7y*lunit));
1579 vertices.push_back(
G4TwoVector(v8x*lunit,v8y*lunit));
1600 const xercesc::DOMNamedNodeMap*
const attributes
1601 = trapElement->getAttributes();
1602 XMLSize_t attributeCount = attributes->getLength();
1604 for (XMLSize_t attribute_index=0;
1605 attribute_index<attributeCount; attribute_index++)
1607 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1609 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1612 const xercesc::DOMAttr*
const attribute
1613 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1623 if (attName==
"name") { name =
GenerateName(attValue); }
else
1626 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
1627 if (attName==
"theta") { theta =
eval.
Evaluate(attValue); }
else
1628 if (attName==
"phi") { phi =
eval.
Evaluate(attValue); }
else
1629 if (attName==
"y1") { y1 =
eval.
Evaluate(attValue); }
else
1630 if (attName==
"x1") { x1 =
eval.
Evaluate(attValue); }
else
1631 if (attName==
"x2") { x2 =
eval.
Evaluate(attValue); }
else
1632 if (attName==
"alpha1") { alpha1 =
eval.
Evaluate(attValue); }
else
1633 if (attName==
"y2") { y2 =
eval.
Evaluate(attValue); }
else
1634 if (attName==
"x3") { x3 =
eval.
Evaluate(attValue); }
else
1635 if (attName==
"x4") { x4 =
eval.
Evaluate(attValue); }
else
1636 if (attName==
"alpha2") { alpha2 =
eval.
Evaluate(attValue); }
1651 new G4Trap(name,z,theta,phi,y1,x1,x2,alpha1,y2,x3,x4,alpha2);
1664 const xercesc::DOMNamedNodeMap*
const attributes = trdElement->getAttributes();
1665 XMLSize_t attributeCount = attributes->getLength();
1667 for (XMLSize_t attribute_index=0;
1668 attribute_index<attributeCount; attribute_index++)
1670 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1672 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1675 const xercesc::DOMAttr*
const attribute
1676 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1686 if (attName==
"name") { name =
GenerateName(attValue); }
else
1688 if (attName==
"x1") { x1 =
eval.
Evaluate(attValue); }
else
1689 if (attName==
"x2") { x2 =
eval.
Evaluate(attValue); }
else
1690 if (attName==
"y1") { y1 =
eval.
Evaluate(attValue); }
else
1691 if (attName==
"y2") { y2 =
eval.
Evaluate(attValue); }
else
1701 new G4Trd(name,x1,x2,y1,y2,z);
1713 const xercesc::DOMNamedNodeMap*
const attributes
1714 = triangularElement->getAttributes();
1715 XMLSize_t attributeCount = attributes->getLength();
1717 for (XMLSize_t attribute_index=0;
1718 attribute_index<attributeCount; attribute_index++)
1720 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1722 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1725 const xercesc::DOMAttr*
const attribute
1726 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1736 if (attName==
"vertex1")
1738 if (attName==
"vertex2")
1740 if (attName==
"vertex3")
1742 if (attName==
"lunit")
1744 if (attName==
"type")
1745 {
if (attValue==
"RELATIVE") { type =
RELATIVE; } }
1762 const xercesc::DOMNamedNodeMap*
const attributes
1763 = tubeElement->getAttributes();
1764 XMLSize_t attributeCount = attributes->getLength();
1766 for (XMLSize_t attribute_index=0;
1767 attribute_index<attributeCount; attribute_index++)
1769 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1771 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1774 const xercesc::DOMAttr*
const attribute
1775 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1785 if (attName==
"name") { name =
GenerateName(attValue); }
else
1788 if (attName==
"rmin") { rmin =
eval.
Evaluate(attValue); }
else
1789 if (attName==
"rmax") { rmax =
eval.
Evaluate(attValue); }
else
1790 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
1791 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1792 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
1801 new G4Tubs(name,rmin,rmax,z,startphi,deltaphi);
1817 const xercesc::DOMNamedNodeMap*
const attributes
1818 = cuttubeElement->getAttributes();
1819 XMLSize_t attributeCount = attributes->getLength();
1821 for (XMLSize_t attribute_index=0;
1822 attribute_index<attributeCount; attribute_index++)
1824 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1826 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1829 const xercesc::DOMAttr*
const attribute
1830 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1840 if (attName==
"name") { name =
GenerateName(attValue); }
else
1843 if (attName==
"rmin") { rmin =
eval.
Evaluate(attValue); }
else
1844 if (attName==
"rmax") { rmax =
eval.
Evaluate(attValue); }
else
1845 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
1846 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1847 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
else
1848 if (attName==
"lowX") { lowNorm.setX (
eval.
Evaluate(attValue)); }
else
1849 if (attName==
"lowY") { lowNorm.setY (
eval.
Evaluate(attValue)); }
else
1850 if (attName==
"lowZ") { lowNorm.setZ (
eval.
Evaluate(attValue)); }
else
1851 if (attName==
"highX") { highNorm.setX (
eval.
Evaluate(attValue)); }
else
1852 if (attName==
"highY") { highNorm.setY (
eval.
Evaluate(attValue)); }
else
1853 if (attName==
"highZ") { highNorm.setZ (
eval.
Evaluate(attValue)); }
1863 new G4CutTubs(name,rmin,rmax,z,startphi,deltaphi,lowNorm,highNorm);
1877 const xercesc::DOMNamedNodeMap*
const attributes
1878 = twistedboxElement->getAttributes();
1879 XMLSize_t attributeCount = attributes->getLength();
1881 for (XMLSize_t attribute_index=0;
1882 attribute_index<attributeCount; attribute_index++)
1884 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1886 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1889 const xercesc::DOMAttr*
const attribute
1890 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1900 if (attName==
"name") { name =
GenerateName(attValue); }
else
1903 if (attName==
"PhiTwist") { PhiTwist =
eval.
Evaluate(attValue); }
else
1904 if (attName==
"x") { x =
eval.
Evaluate(attValue); }
else
1905 if (attName==
"y") { y =
eval.
Evaluate(attValue); }
else
1935 const xercesc::DOMNamedNodeMap*
const attributes
1936 = twistedtrapElement->getAttributes();
1937 XMLSize_t attributeCount = attributes->getLength();
1939 for (XMLSize_t attribute_index=0;
1940 attribute_index<attributeCount; attribute_index++)
1942 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1944 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1947 const xercesc::DOMAttr*
const attribute
1948 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1951 G4Exception(
"G4GDMLReadSolids::TwistedtrapRead()",
1958 if (attName==
"name") { name =
GenerateName(attValue); }
else
1961 if (attName==
"PhiTwist") { PhiTwist =
eval.
Evaluate(attValue); }
else
1962 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
1963 if (attName==
"Theta") { Theta =
eval.
Evaluate(attValue); }
else
1964 if (attName==
"Phi") { Phi =
eval.
Evaluate(attValue); }
else
1965 if (attName==
"y1") { y1 =
eval.
Evaluate(attValue); }
else
1966 if (attName==
"x1") { x1 =
eval.
Evaluate(attValue); }
else
1967 if (attName==
"x2") { x2 =
eval.
Evaluate(attValue); }
else
1968 if (attName==
"y2") { y2 =
eval.
Evaluate(attValue); }
else
1969 if (attName==
"x3") { x3 =
eval.
Evaluate(attValue); }
else
1970 if (attName==
"x4") { x4 =
eval.
Evaluate(attValue); }
else
1971 if (attName==
"Alph") { Alph =
eval.
Evaluate(attValue); }
1987 new G4TwistedTrap(name,PhiTwist,z,Theta,Phi,y1,x1,x2,y2,x3,x4,Alph);
2003 const xercesc::DOMNamedNodeMap*
const attributes
2004 = twistedtrdElement->getAttributes();
2005 XMLSize_t attributeCount = attributes->getLength();
2007 for (XMLSize_t attribute_index=0;
2008 attribute_index<attributeCount; attribute_index++)
2010 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
2012 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
2015 const xercesc::DOMAttr*
const attribute
2016 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
2026 if (attName==
"name") { name =
GenerateName(attValue); }
else
2029 if (attName==
"x1") { x1 =
eval.
Evaluate(attValue); }
else
2030 if (attName==
"x2") { x2 =
eval.
Evaluate(attValue); }
else
2031 if (attName==
"y1") { y1 =
eval.
Evaluate(attValue); }
else
2032 if (attName==
"y2") { y2 =
eval.
Evaluate(attValue); }
else
2033 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
2034 if (attName==
"PhiTwist") { PhiTwist =
eval.
Evaluate(attValue); }
2059 const xercesc::DOMNamedNodeMap*
const attributes
2060 = twistedtubsElement->getAttributes();
2061 XMLSize_t attributeCount = attributes->getLength();
2063 for (XMLSize_t attribute_index=0;
2064 attribute_index<attributeCount; attribute_index++)
2066 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
2068 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
2071 const xercesc::DOMAttr*
const attribute
2072 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
2075 G4Exception(
"G4GDMLReadSolids::TwistedtubsRead()",
2082 if (attName==
"name") { name =
GenerateName(attValue); }
else
2085 if (attName==
"twistedangle") { twistedangle=
eval.
Evaluate(attValue); }
else
2086 if (attName==
"endinnerrad") { endinnerrad=
eval.
Evaluate(attValue); }
else
2087 if (attName==
"endouterrad") { endouterrad=
eval.
Evaluate(attValue); }
else
2088 if (attName==
"zlen") { zlen =
eval.
Evaluate(attValue); }
else
2092 twistedangle *= aunit;
2093 endinnerrad *= lunit;
2094 endouterrad *= lunit;
2098 new G4TwistedTubs(name,twistedangle,endinnerrad,endouterrad,zlen,phi);
2106 const xercesc::DOMNamedNodeMap*
const attributes = element->getAttributes();
2107 XMLSize_t attributeCount = attributes->getLength();
2109 for (XMLSize_t attribute_index=0;
2110 attribute_index<attributeCount; attribute_index++)
2112 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
2114 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
2117 const xercesc::DOMAttr*
const attribute
2118 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
2121 G4Exception(
"G4GDMLReadSolids::TwoDimVertexRead()",
2128 if (attName==
"x") { vec.setX(
eval.
Evaluate(attValue)*lunit); }
else
2129 if (attName==
"y") { vec.setY(
eval.
Evaluate(attValue)*lunit); }
2140 const xercesc::DOMNamedNodeMap*
const attributes
2141 = zplaneElement->getAttributes();
2142 XMLSize_t attributeCount = attributes->getLength();
2144 for (XMLSize_t attribute_index=0;
2145 attribute_index<attributeCount; attribute_index++)
2147 xercesc::DOMNode* node = attributes->item(attribute_index);
2149 if (node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE) {
continue; }
2151 const xercesc::DOMAttr*
const attribute
2152 =
dynamic_cast<xercesc::DOMAttr*
>(node);
2174 const xercesc::DOMNamedNodeMap*
const attributes
2175 = zplaneElement->getAttributes();
2176 XMLSize_t attributeCount = attributes->getLength();
2178 for (XMLSize_t attribute_index=0;
2179 attribute_index<attributeCount; attribute_index++)
2181 xercesc::DOMNode* node = attributes->item(attribute_index);
2183 if (node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE) {
continue; }
2185 const xercesc::DOMAttr*
const attribute
2186 =
dynamic_cast<xercesc::DOMAttr*
>(node);
2196 if (attName==
"r") { rzpoint.
r =
eval.
Evaluate(attValue); }
else
2213 const xercesc::DOMNamedNodeMap*
const attributes
2214 = opticalsurfaceElement->getAttributes();
2215 XMLSize_t attributeCount = attributes->getLength();
2217 for (XMLSize_t attribute_index=0;
2218 attribute_index<attributeCount; attribute_index++)
2220 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
2222 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
2225 const xercesc::DOMAttr*
const attribute
2226 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
2229 G4Exception(
"G4GDMLReadSolids::OpticalSurfaceRead()",
2236 if (attName==
"name") { name =
GenerateName(attValue); }
else
2237 if (attName==
"model") { smodel = attValue; }
else
2238 if (attName==
"finish") { sfinish = attValue; }
else
2239 if (attName==
"type") { stype = attValue; }
else
2240 if (attName==
"value") { value =
eval.
Evaluate(attValue); }
2247 if ((smodel==
"glisur") || (smodel==
"0")) { model =
glisur; }
else
2248 if ((smodel==
"unified") || (smodel==
"1")) { model =
unified; }
else
2249 if ((smodel==
"LUT") || (smodel==
"2")) { model =
LUT; }
2252 if ((sfinish==
"polished") || (sfinish==
"0"))
2254 if ((sfinish==
"polishedfrontpainted") || (sfinish==
"1"))
2256 if ((sfinish==
"polishedbackpainted") || (sfinish==
"2"))
2258 if ((sfinish==
"ground") || (sfinish==
"3"))
2259 { finish =
ground; }
else
2260 if ((sfinish==
"groundfrontpainted") || (sfinish==
"4"))
2262 if ((sfinish==
"groundbackpainted") || (sfinish==
"5"))
2264 if ((sfinish==
"polishedlumirrorair") || (sfinish==
"6"))
2266 if ((sfinish==
"polishedlumirrorglue") || (sfinish==
"7"))
2268 if ((sfinish==
"polishedair") || (sfinish==
"8"))
2270 if ((sfinish==
"polishedteflonair") || (sfinish==
"9"))
2272 if ((sfinish==
"polishedtioair") || (sfinish==
"10"))
2274 if ((sfinish==
"polishedtyvekair") || (sfinish==
"11"))
2276 if ((sfinish==
"polishedvm2000air") || (sfinish==
"12"))
2278 if ((sfinish==
"polishedvm2000glue") || (sfinish==
"13"))
2280 if ((sfinish==
"etchedlumirrorair") || (sfinish==
"14"))
2282 if ((sfinish==
"etchedlumirrorglue") || (sfinish==
"15"))
2284 if ((sfinish==
"etchedair") || (sfinish==
"16"))
2286 if ((sfinish==
"etchedteflonair") || (sfinish==
"17"))
2288 if ((sfinish==
"etchedtioair") || (sfinish==
"18"))
2290 if ((sfinish==
"etchedtyvekair") || (sfinish==
"19"))
2292 if ((sfinish==
"etchedvm2000air") || (sfinish==
"20"))
2294 if ((sfinish==
"etchedvm2000glue") || (sfinish==
"21"))
2296 if ((sfinish==
"groundlumirrorair") || (sfinish==
"22"))
2298 if ((sfinish==
"groundlumirrorglue") || (sfinish==
"23"))
2300 if ((sfinish==
"groundair") || (sfinish==
"24"))
2302 if ((sfinish==
"groundteflonair") || (sfinish==
"25"))
2304 if ((sfinish==
"groundtioair") || (sfinish==
"26"))
2306 if ((sfinish==
"groundtyvekair") || (sfinish==
"27"))
2308 if ((sfinish==
"groundvm2000air") || (sfinish==
"28"))
2312 if ((stype==
"dielectric_metal") || (stype==
"0"))
2314 if ((stype==
"dielectric_dielectric") || (stype==
"1"))
2316 if ((stype==
"dielectric_LUT") || (stype==
"2"))
2318 if ((stype==
"dielectric_dichroic") || (stype==
"3"))
2320 if ((stype==
"firsov") || (stype==
"4"))
2322 else { type =
x_ray; }
2331 for (xercesc::DOMNode* iter = solidsElement->getFirstChild();
2332 iter != 0; iter = iter->getNextSibling())
2334 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
2336 const xercesc::DOMElement*
const child
2337 =
dynamic_cast<xercesc::DOMElement*
>(iter);
2345 if (tag==
"define") {
DefineRead(child); }
else
2346 if (tag==
"box") {
BoxRead(child); }
else
2347 if (tag==
"cone") {
ConeRead(child); }
else
2348 if (tag==
"elcone") {
ElconeRead(child); }
else
2350 if (tag==
"eltube") {
EltubeRead(child); }
else
2351 if (tag==
"xtru") {
XtruRead(child); }
else
2352 if (tag==
"hype") {
HypeRead(child); }
else
2355 if (tag==
"orb") {
OrbRead(child); }
else
2356 if (tag==
"para") {
ParaRead(child); }
else
2363 if (tag==
"sphere") {
SphereRead(child); }
else
2366 if (tag==
"tet") {
TetRead(child); }
else
2367 if (tag==
"torus") {
TorusRead(child); }
else
2369 if (tag==
"trap") {
TrapRead(child); }
else
2370 if (tag==
"trd") {
TrdRead(child); }
else
2371 if (tag==
"tube") {
TubeRead(child); }
else
2382 G4String error_msg =
"Unknown tag in solids: " + tag;
2383 G4Exception(
"G4GDMLReadSolids::SolidsRead()",
"ReadError",
2395 G4String error_msg =
"Referenced solid '" + ref +
"' was not found!";
2396 G4Exception(
"G4GDMLReadSolids::GetSolid()",
"ReadError",
2408 const size_t surfaceCount = surfaceList->size();
2410 for (
size_t i=0; i<surfaceCount; i++)
2412 if ((*surfaceList)[i]->GetName() == ref) {
return (*surfaceList)[i]; }
2415 G4String error_msg =
"Referenced optical surface '" + ref +
"' was not found!";
2416 G4Exception(
"G4GDMLReadSolids::GetSurfaceProperty()",
"ReadError",
zplaneType ZplaneRead(const xercesc::DOMElement *const)
void TubeRead(const xercesc::DOMElement *const)
void TwistedtrapRead(const xercesc::DOMElement *const)
G4int EvaluateInteger(const G4String &)
void SetSolidClosed(const G4bool t)
void BoxRead(const xercesc::DOMElement *const)
G4VSolid * GetSolid(const G4String &name, G4bool verbose=true) const
void OpticalSurfaceRead(const xercesc::DOMElement *const)
CLHEP::Hep3Vector G4ThreeVector
virtual void DefineRead(const xercesc::DOMElement *const)
void TwistedboxRead(const xercesc::DOMElement *const)
G4UMultiUnion G4MultiUnion
void MultiUnionRead(const xercesc::DOMElement *const)
void TorusRead(const xercesc::DOMElement *const)
G4String Transcode(const XMLCh *const)
void TetRead(const xercesc::DOMElement *const)
G4TwoVector TwoDimVertexRead(const xercesc::DOMElement *const, G4double)
G4SurfaceProperty * GetSurfaceProperty(const G4String &) const
void GenericPolyhedraRead(const xercesc::DOMElement *const)
G4TriangularFacet * TriangularRead(const xercesc::DOMElement *const)
G4VSolid * GetSolid(const G4String &) const
void TwistedtubsRead(const xercesc::DOMElement *const)
void TrapRead(const xercesc::DOMElement *const)
void ConeRead(const xercesc::DOMElement *const)
G4String RefRead(const xercesc::DOMElement *const)
void LoopRead(const xercesc::DOMElement *const, void(G4GDMLRead::*)(const xercesc::DOMElement *const))
void SphereRead(const xercesc::DOMElement *const)
static G4double GetValueOf(const G4String &)
void OrbRead(const xercesc::DOMElement *const)
G4ExtrudedSolid::ZSection SectionRead(const xercesc::DOMElement *const, G4double)
G4GLOB_DLL std::ostream G4cout
void BooleanRead(const xercesc::DOMElement *const, const BooleanOp)
void ReflectedSolidRead(const xercesc::DOMElement *const)
void EllipsoidRead(const xercesc::DOMElement *const)
G4bool AddFacet(G4VFacet *aFacet)
void GenTrapRead(const xercesc::DOMElement *const)
static G4SolidStore * GetInstance()
void TrdRead(const xercesc::DOMElement *const)
virtual ~G4GDMLReadSolids()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual void SolidsRead(const xercesc::DOMElement *const)
void EltubeRead(const xercesc::DOMElement *const)
rzPointType RZPointRead(const xercesc::DOMElement *const)
std::vector< G4SurfaceProperty * > G4SurfacePropertyTable
G4String GenerateName(const G4String &name, G4bool strip=false)
void TessellatedRead(const xercesc::DOMElement *const)
void PolyhedraRead(const xercesc::DOMElement *const)
void XtruRead(const xercesc::DOMElement *const)
void CutTubeRead(const xercesc::DOMElement *const)
void VectorRead(const xercesc::DOMElement *const, G4ThreeVector &)
void ParaboloidRead(const xercesc::DOMElement *const)
CLHEP::Hep2Vector G4TwoVector
void GenericPolyconeRead(const xercesc::DOMElement *const)
void ElconeRead(const xercesc::DOMElement *const)
G4ThreeVector GetRotation(const G4String &)
G4RotationMatrix GetRotationMatrix(const G4ThreeVector &)
void ParaRead(const xercesc::DOMElement *const)
void HypeRead(const xercesc::DOMElement *const)
static const G4double alpha
void PolyconeRead(const xercesc::DOMElement *const)
G4QuadrangularFacet * QuadrangularRead(const xercesc::DOMElement *const)
void MultiUnionNodeRead(const xercesc::DOMElement *const, G4MultiUnion *const)
static const G4SurfacePropertyTable * GetSurfacePropertyTable()
void AddNode(G4VSolid &solid, G4Transform3D &trans)
virtual void SolidsRead(const xercesc::DOMElement *const)=0
void TwistedtrdRead(const xercesc::DOMElement *const)
G4double Evaluate(const G4String &)
G4ThreeVector GetPosition(const G4String &)