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);
539 #if !defined(G4GEOM_USE_USOLIDS)
544 G4Exception(
"G4GDMLReadSolids::MultiUnionNodeRead()",
546 "Installation with USolids primitives required!");
559 const xercesc::DOMNamedNodeMap*
const attributes
560 = unionNodeElement->getAttributes();
561 XMLSize_t attributeCount = attributes->getLength();
563 for (XMLSize_t attribute_index=0;
564 attribute_index<attributeCount; attribute_index++)
566 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
568 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
571 const xercesc::DOMAttr*
const attribute
572 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
575 G4Exception(
"G4GDMLReadSolids::MultiUnionNodeRead()",
585 for (xercesc::DOMNode* iter = unionNodeElement->getFirstChild();
586 iter != 0;iter = iter->getNextSibling())
588 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
590 const xercesc::DOMElement*
const child
591 =
dynamic_cast<xercesc::DOMElement*
>(iter);
594 G4Exception(
"G4GDMLReadSolids::MultiUnionNodeRead()",
601 if (tag==
"rotation") {
VectorRead(child,rotation); }
else
602 if (tag==
"positionref")
604 if (tag==
"rotationref")
606 if (tag==
"solid") { solid =
RefRead(child); }
609 G4String error_msg =
"Unknown tag in MultiUnion structure: " + tag;
610 G4Exception(
"G4GDMLReadSolids::MultiUnionNodeRead()",
"ReadError",
616 multiUnionSolid->AddNode(*solidNode, transform);
620 #if !defined(G4GEOM_USE_USOLIDS)
626 "Installation with USolids primitives required!");
635 const xercesc::DOMNamedNodeMap*
const attributes
636 = unionElement->getAttributes();
637 XMLSize_t attributeCount = attributes->getLength();
639 for (XMLSize_t attribute_index=0;
640 attribute_index<attributeCount; attribute_index++)
642 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
644 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
647 const xercesc::DOMAttr*
const attribute
648 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
663 for (xercesc::DOMNode* iter = unionElement->getFirstChild();
664 iter != 0;iter = iter->getNextSibling())
666 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
668 const xercesc::DOMElement*
const child
669 =
dynamic_cast<xercesc::DOMElement*
>(iter);
681 G4String error_msg =
"Unknown tag in MultiUnion structure: " + tag;
682 G4Exception(
"G4GDMLReadSolids::MultiUnionRead()",
"ReadError",
686 multiUnion->Voxelize();
696 const xercesc::DOMNamedNodeMap*
const attributes
697 = orbElement->getAttributes();
698 XMLSize_t attributeCount = attributes->getLength();
700 for (XMLSize_t attribute_index=0;
701 attribute_index<attributeCount; attribute_index++)
703 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
705 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
708 const xercesc::DOMAttr*
const attribute
709 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
719 if (attName==
"name") { name =
GenerateName(attValue); }
else
741 const xercesc::DOMNamedNodeMap*
const attributes
742 = paraElement->getAttributes();
743 XMLSize_t attributeCount = attributes->getLength();
745 for (XMLSize_t attribute_index=0;
746 attribute_index<attributeCount; attribute_index++)
748 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
750 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
753 const xercesc::DOMAttr*
const attribute
754 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
764 if (attName==
"name") { name =
GenerateName(attValue); }
else
770 if (attName==
"alpha") { alpha =
eval.
Evaluate(attValue); }
else
771 if (attName==
"theta") { theta =
eval.
Evaluate(attValue); }
else
782 new G4Para(name,x,y,z,alpha,theta,phi);
794 const xercesc::DOMNamedNodeMap*
const attributes
795 = paraElement->getAttributes();
796 XMLSize_t attributeCount = attributes->getLength();
798 for (XMLSize_t attribute_index=0;
799 attribute_index<attributeCount; attribute_index++)
801 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
803 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
806 const xercesc::DOMAttr*
const attribute
807 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
817 if (attName==
"name") { name =
GenerateName(attValue); }
else
819 if (attName==
"rlo") { rlo =
eval.
Evaluate(attValue); }
else
820 if (attName==
"rhi") { rhi =
eval.
Evaluate(attValue); }
else
840 const xercesc::DOMNamedNodeMap*
const attributes
841 = polyconeElement->getAttributes();
842 XMLSize_t attributeCount = attributes->getLength();
844 for (XMLSize_t attribute_index=0;
845 attribute_index<attributeCount; attribute_index++)
847 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
849 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
852 const xercesc::DOMAttr*
const attribute
853 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
863 if (attName==
"name") { name =
GenerateName(attValue); }
else
866 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
867 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
873 std::vector<zplaneType> zplaneList;
875 for (xercesc::DOMNode* iter = polyconeElement->getFirstChild();
876 iter != 0; iter = iter->getNextSibling())
878 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
880 const xercesc::DOMElement*
const child
881 =
dynamic_cast<xercesc::DOMElement*
>(iter);
890 if (tag==
"zplane") { zplaneList.push_back(
ZplaneRead(child)); }
893 G4int numZPlanes = zplaneList.size();
899 for (
G4int i=0; i<numZPlanes; i++)
901 rmin_array[i] = zplaneList[i].rmin*lunit;
902 rmax_array[i] = zplaneList[i].rmax*lunit;
903 z_array[i] = zplaneList[i].z*lunit;
906 new G4Polycone(name,startphi,deltaphi,numZPlanes,
907 z_array,rmin_array,rmax_array);
909 delete [] rmin_array;
910 delete [] rmax_array;
923 const xercesc::DOMNamedNodeMap*
const attributes
924 = polyconeElement->getAttributes();
925 XMLSize_t attributeCount = attributes->getLength();
927 for (XMLSize_t attribute_index=0;
928 attribute_index<attributeCount; attribute_index++)
930 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
932 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
935 const xercesc::DOMAttr*
const attribute
936 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
939 G4Exception(
"G4GDMLReadSolids::GenericPolyconeRead()",
946 if (attName==
"name") { name =
GenerateName(attValue); }
else
949 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
950 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
956 std::vector<rzPointType> rzPointList;
958 for (xercesc::DOMNode* iter = polyconeElement->getFirstChild();
959 iter != 0; iter = iter->getNextSibling())
961 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
963 const xercesc::DOMElement*
const child
964 =
dynamic_cast<xercesc::DOMElement*
>(iter);
967 G4Exception(
"G4GDMLReadSolids::GenericPolyconeRead()",
973 if (tag==
"rzpoint") { rzPointList.push_back(
RZPointRead(child)); }
976 G4int numRZPoints = rzPointList.size();
981 for (
G4int i=0; i<numRZPoints; i++)
983 r_array[i] = rzPointList[i].r*lunit;
984 z_array[i] = rzPointList[i].z*lunit;
1002 const xercesc::DOMNamedNodeMap*
const attributes
1003 = polyhedraElement->getAttributes();
1004 XMLSize_t attributeCount = attributes->getLength();
1006 for (XMLSize_t attribute_index=0;
1007 attribute_index<attributeCount; attribute_index++)
1009 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1011 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1014 const xercesc::DOMAttr*
const attribute
1015 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1025 if (attName==
"name") { name =
GenerateName(attValue); }
else
1028 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1029 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
else
1036 std::vector<zplaneType> zplaneList;
1038 for (xercesc::DOMNode* iter = polyhedraElement->getFirstChild();
1039 iter != 0; iter = iter->getNextSibling())
1041 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
1043 const xercesc::DOMElement*
const child
1044 =
dynamic_cast<xercesc::DOMElement*
>(iter);
1053 if (tag==
"zplane") { zplaneList.push_back(
ZplaneRead(child)); }
1056 G4int numZPlanes = zplaneList.size();
1062 for (
G4int i=0; i<numZPlanes; i++)
1064 rmin_array[i] = zplaneList[i].rmin*lunit;
1065 rmax_array[i] = zplaneList[i].rmax*lunit;
1066 z_array[i] = zplaneList[i].z*lunit;
1069 new G4Polyhedra(name,startphi,deltaphi,numsides,numZPlanes,
1070 z_array,rmin_array,rmax_array);
1072 delete [] rmin_array;
1073 delete [] rmax_array;
1087 const xercesc::DOMNamedNodeMap*
const attributes
1088 = polyhedraElement->getAttributes();
1089 XMLSize_t attributeCount = attributes->getLength();
1091 for (XMLSize_t attribute_index=0;
1092 attribute_index<attributeCount; attribute_index++)
1094 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1096 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1099 const xercesc::DOMAttr*
const attribute
1100 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1103 G4Exception(
"G4GDMLReadSolids::GenericPolyhedraRead()",
1110 if (attName==
"name") { name =
GenerateName(attValue); }
else
1113 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1114 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
else
1121 std::vector<rzPointType> rzpointList;
1123 for (xercesc::DOMNode* iter = polyhedraElement->getFirstChild();
1124 iter != 0; iter = iter->getNextSibling())
1126 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
1128 const xercesc::DOMElement*
const child
1129 =
dynamic_cast<xercesc::DOMElement*
>(iter);
1132 G4Exception(
"G4GDMLReadSolids::GenericPolyhedraRead()",
1138 if (tag==
"rzpoint") { rzpointList.push_back(
RZPointRead(child)); }
1141 G4int numRZPoints = rzpointList.size();
1146 for (
G4int i=0; i<numRZPoints; i++)
1148 r_array[i] = rzpointList[i].r*lunit;
1149 z_array[i] = rzpointList[i].z*lunit;
1152 new G4Polyhedra(name,startphi,deltaphi,numsides,numRZPoints,
1169 const xercesc::DOMNamedNodeMap*
const attributes
1170 = quadrangularElement->getAttributes();
1171 XMLSize_t attributeCount = attributes->getLength();
1173 for (XMLSize_t attribute_index=0;
1174 attribute_index<attributeCount; attribute_index++)
1176 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1178 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1181 const xercesc::DOMAttr*
const attribute
1182 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1185 G4Exception(
"G4GDMLReadSolids::QuadrangularRead()",
1192 if (attName==
"vertex1")
1194 if (attName==
"vertex2")
1196 if (attName==
"vertex3")
1198 if (attName==
"vertex4")
1200 if (attName==
"lunit")
1202 if (attName==
"type")
1203 {
if (attValue==
"RELATIVE") { type =
RELATIVE; } }
1207 vertex3*lunit,vertex4*lunit,type);
1221 const xercesc::DOMNamedNodeMap*
const attributes
1222 = reflectedSolidElement->getAttributes();
1223 XMLSize_t attributeCount = attributes->getLength();
1225 for (XMLSize_t attribute_index=0;
1226 attribute_index<attributeCount; attribute_index++)
1228 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1230 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1233 const xercesc::DOMAttr*
const attribute
1234 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1237 G4Exception(
"G4GDMLReadSolids::ReflectedSolidRead()",
1244 if (attName==
"name") { name =
GenerateName(attValue); }
else
1247 if (attName==
"solid") { solid =
GenerateName(attValue); }
else
1248 if (attName==
"sx") { scale.setX(
eval.
Evaluate(attValue)); }
else
1249 if (attName==
"sy") { scale.setY(
eval.
Evaluate(attValue)); }
else
1250 if (attName==
"sz") { scale.setZ(
eval.
Evaluate(attValue)); }
else
1251 if (attName==
"rx") { rotation.setX(
eval.
Evaluate(attValue)); }
else
1252 if (attName==
"ry") { rotation.setY(
eval.
Evaluate(attValue)); }
else
1253 if (attName==
"rz") { rotation.setZ(
eval.
Evaluate(attValue)); }
else
1254 if (attName==
"dx") { position.setX(
eval.
Evaluate(attValue)); }
else
1255 if (attName==
"dy") { position.setY(
eval.
Evaluate(attValue)); }
else
1256 if (attName==
"dz") { position.setZ(
eval.
Evaluate(attValue)); }
1263 transform = transform*
G4Scale3D(scale.x(),scale.y(),scale.z());
1275 const xercesc::DOMNamedNodeMap*
const attributes
1276 = sectionElement->getAttributes();
1277 XMLSize_t attributeCount = attributes->getLength();
1279 for (XMLSize_t attribute_index=0;
1280 attribute_index<attributeCount; attribute_index++)
1282 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1284 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1287 const xercesc::DOMAttr*
const attribute
1288 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1298 if (attName==
"zPosition")
1300 if (attName==
"xOffset")
1302 if (attName==
"yOffset")
1304 if (attName==
"scalingFactor")
1324 const xercesc::DOMNamedNodeMap*
const attributes
1325 = sphereElement->getAttributes();
1326 XMLSize_t attributeCount = attributes->getLength();
1328 for (XMLSize_t attribute_index=0;
1329 attribute_index<attributeCount; attribute_index++)
1331 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1333 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1336 const xercesc::DOMAttr*
const attribute
1337 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1347 if (attName==
"name") { name =
GenerateName(attValue); }
else
1350 if (attName==
"rmin") { rmin =
eval.
Evaluate(attValue); }
else
1351 if (attName==
"rmax") { rmax =
eval.
Evaluate(attValue); }
else
1352 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1353 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
else
1354 if (attName==
"starttheta") { starttheta =
eval.
Evaluate(attValue); }
else
1355 if (attName==
"deltatheta") { deltatheta =
eval.
Evaluate(attValue); }
1362 starttheta *= aunit;
1363 deltatheta *= aunit;
1365 new G4Sphere(name,rmin,rmax,startphi,deltaphi,starttheta,deltatheta);
1373 const xercesc::DOMNamedNodeMap*
const attributes
1374 = tessellatedElement->getAttributes();
1375 XMLSize_t attributeCount = attributes->getLength();
1377 for (XMLSize_t attribute_index=0;
1378 attribute_index<attributeCount; attribute_index++)
1380 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1382 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1385 const xercesc::DOMAttr*
const attribute
1386 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1389 G4Exception(
"G4GDMLReadSolids::TessellatedRead()",
1396 if (attName==
"name") { name =
GenerateName(attValue); }
1401 for (xercesc::DOMNode* iter = tessellatedElement->getFirstChild();
1402 iter != 0; iter = iter->getNextSibling())
1404 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
1406 const xercesc::DOMElement*
const child
1407 =
dynamic_cast<xercesc::DOMElement*
>(iter);
1410 G4Exception(
"G4GDMLReadSolids::TessellatedRead()",
1416 if (tag==
"triangular")
1418 if (tag==
"quadrangular")
1434 const xercesc::DOMNamedNodeMap*
const attributes
1435 = tetElement->getAttributes();
1436 XMLSize_t attributeCount = attributes->getLength();
1438 for (XMLSize_t attribute_index=0;
1439 attribute_index<attributeCount;attribute_index++)
1441 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1443 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1446 const xercesc::DOMAttr*
const attribute
1447 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1457 if (attName==
"name")
1459 if (attName==
"lunit")
1461 if (attName==
"vertex1")
1463 if (attName==
"vertex2")
1465 if (attName==
"vertex3")
1467 if (attName==
"vertex4")
1471 new G4Tet(name,vertex1*lunit,vertex2*lunit,vertex3*lunit,vertex4*lunit);
1485 const xercesc::DOMNamedNodeMap*
const attributes
1486 = torusElement->getAttributes();
1487 XMLSize_t attributeCount = attributes->getLength();
1489 for (XMLSize_t attribute_index=0;
1490 attribute_index<attributeCount; attribute_index++)
1492 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1494 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1497 const xercesc::DOMAttr*
const attribute
1498 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1508 if (attName==
"name") { name =
GenerateName(attValue); }
else
1511 if (attName==
"rmin") { rmin =
eval.
Evaluate(attValue); }
else
1512 if (attName==
"rmax") { rmax =
eval.
Evaluate(attValue); }
else
1513 if (attName==
"rtor") { rtor =
eval.
Evaluate(attValue); }
else
1514 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1515 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
1524 new G4Torus(name,rmin,rmax,rtor,startphi,deltaphi);
1533 G4double v1x=0.0, v1y=0.0, v2x=0.0, v2y=0.0, v3x=0.0, v3y=0.0,
1534 v4x=0.0, v4y=0.0, v5x=0.0, v5y=0.0, v6x=0.0, v6y=0.0,
1535 v7x=0.0, v7y=0.0, v8x=0.0, v8y=0.0;
1537 const xercesc::DOMNamedNodeMap*
const attributes
1538 = gtrapElement->getAttributes();
1539 XMLSize_t attributeCount = attributes->getLength();
1541 for (XMLSize_t attribute_index=0;
1542 attribute_index<attributeCount; attribute_index++)
1544 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1546 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1549 const xercesc::DOMAttr*
const attribute
1550 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1560 if (attName==
"name") { name =
GenerateName(attValue); }
else
1562 if (attName==
"dz") { dz =
eval.
Evaluate(attValue); }
else
1563 if (attName==
"v1x") { v1x =
eval.
Evaluate(attValue); }
else
1564 if (attName==
"v1y") { v1y =
eval.
Evaluate(attValue); }
else
1565 if (attName==
"v2x") { v2x =
eval.
Evaluate(attValue); }
else
1566 if (attName==
"v2y") { v2y =
eval.
Evaluate(attValue); }
else
1567 if (attName==
"v3x") { v3x =
eval.
Evaluate(attValue); }
else
1568 if (attName==
"v3y") { v3y =
eval.
Evaluate(attValue); }
else
1569 if (attName==
"v4x") { v4x =
eval.
Evaluate(attValue); }
else
1570 if (attName==
"v4y") { v4y =
eval.
Evaluate(attValue); }
else
1571 if (attName==
"v5x") { v5x =
eval.
Evaluate(attValue); }
else
1572 if (attName==
"v5y") { v5y =
eval.
Evaluate(attValue); }
else
1573 if (attName==
"v6x") { v6x =
eval.
Evaluate(attValue); }
else
1574 if (attName==
"v6y") { v6y =
eval.
Evaluate(attValue); }
else
1575 if (attName==
"v7x") { v7x =
eval.
Evaluate(attValue); }
else
1576 if (attName==
"v7y") { v7y =
eval.
Evaluate(attValue); }
else
1577 if (attName==
"v8x") { v8x =
eval.
Evaluate(attValue); }
else
1582 std::vector<G4TwoVector> vertices;
1583 vertices.push_back(
G4TwoVector(v1x*lunit,v1y*lunit));
1584 vertices.push_back(
G4TwoVector(v2x*lunit,v2y*lunit));
1585 vertices.push_back(
G4TwoVector(v3x*lunit,v3y*lunit));
1586 vertices.push_back(
G4TwoVector(v4x*lunit,v4y*lunit));
1587 vertices.push_back(
G4TwoVector(v5x*lunit,v5y*lunit));
1588 vertices.push_back(
G4TwoVector(v6x*lunit,v6y*lunit));
1589 vertices.push_back(
G4TwoVector(v7x*lunit,v7y*lunit));
1590 vertices.push_back(
G4TwoVector(v8x*lunit,v8y*lunit));
1611 const xercesc::DOMNamedNodeMap*
const attributes
1612 = trapElement->getAttributes();
1613 XMLSize_t attributeCount = attributes->getLength();
1615 for (XMLSize_t attribute_index=0;
1616 attribute_index<attributeCount; attribute_index++)
1618 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1620 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1623 const xercesc::DOMAttr*
const attribute
1624 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1634 if (attName==
"name") { name =
GenerateName(attValue); }
else
1637 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
1638 if (attName==
"theta") { theta =
eval.
Evaluate(attValue); }
else
1639 if (attName==
"phi") { phi =
eval.
Evaluate(attValue); }
else
1640 if (attName==
"y1") { y1 =
eval.
Evaluate(attValue); }
else
1641 if (attName==
"x1") { x1 =
eval.
Evaluate(attValue); }
else
1642 if (attName==
"x2") { x2 =
eval.
Evaluate(attValue); }
else
1643 if (attName==
"alpha1") { alpha1 =
eval.
Evaluate(attValue); }
else
1644 if (attName==
"y2") { y2 =
eval.
Evaluate(attValue); }
else
1645 if (attName==
"x3") { x3 =
eval.
Evaluate(attValue); }
else
1646 if (attName==
"x4") { x4 =
eval.
Evaluate(attValue); }
else
1647 if (attName==
"alpha2") { alpha2 =
eval.
Evaluate(attValue); }
1662 new G4Trap(name,z,theta,phi,y1,x1,x2,alpha1,y2,x3,x4,alpha2);
1675 const xercesc::DOMNamedNodeMap*
const attributes = trdElement->getAttributes();
1676 XMLSize_t attributeCount = attributes->getLength();
1678 for (XMLSize_t attribute_index=0;
1679 attribute_index<attributeCount; attribute_index++)
1681 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1683 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1686 const xercesc::DOMAttr*
const attribute
1687 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1697 if (attName==
"name") { name =
GenerateName(attValue); }
else
1699 if (attName==
"x1") { x1 =
eval.
Evaluate(attValue); }
else
1700 if (attName==
"x2") { x2 =
eval.
Evaluate(attValue); }
else
1701 if (attName==
"y1") { y1 =
eval.
Evaluate(attValue); }
else
1702 if (attName==
"y2") { y2 =
eval.
Evaluate(attValue); }
else
1712 new G4Trd(name,x1,x2,y1,y2,z);
1724 const xercesc::DOMNamedNodeMap*
const attributes
1725 = triangularElement->getAttributes();
1726 XMLSize_t attributeCount = attributes->getLength();
1728 for (XMLSize_t attribute_index=0;
1729 attribute_index<attributeCount; attribute_index++)
1731 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1733 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1736 const xercesc::DOMAttr*
const attribute
1737 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1747 if (attName==
"vertex1")
1749 if (attName==
"vertex2")
1751 if (attName==
"vertex3")
1753 if (attName==
"lunit")
1755 if (attName==
"type")
1756 {
if (attValue==
"RELATIVE") { type =
RELATIVE; } }
1773 const xercesc::DOMNamedNodeMap*
const attributes
1774 = tubeElement->getAttributes();
1775 XMLSize_t attributeCount = attributes->getLength();
1777 for (XMLSize_t attribute_index=0;
1778 attribute_index<attributeCount; attribute_index++)
1780 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1782 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1785 const xercesc::DOMAttr*
const attribute
1786 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1796 if (attName==
"name") { name =
GenerateName(attValue); }
else
1799 if (attName==
"rmin") { rmin =
eval.
Evaluate(attValue); }
else
1800 if (attName==
"rmax") { rmax =
eval.
Evaluate(attValue); }
else
1801 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
1802 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1803 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
1812 new G4Tubs(name,rmin,rmax,z,startphi,deltaphi);
1828 const xercesc::DOMNamedNodeMap*
const attributes
1829 = cuttubeElement->getAttributes();
1830 XMLSize_t attributeCount = attributes->getLength();
1832 for (XMLSize_t attribute_index=0;
1833 attribute_index<attributeCount; attribute_index++)
1835 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1837 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1840 const xercesc::DOMAttr*
const attribute
1841 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1851 if (attName==
"name") { name =
GenerateName(attValue); }
else
1854 if (attName==
"rmin") { rmin =
eval.
Evaluate(attValue); }
else
1855 if (attName==
"rmax") { rmax =
eval.
Evaluate(attValue); }
else
1856 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
1857 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1858 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
else
1859 if (attName==
"lowX") { lowNorm.setX (
eval.
Evaluate(attValue)); }
else
1860 if (attName==
"lowY") { lowNorm.setY (
eval.
Evaluate(attValue)); }
else
1861 if (attName==
"lowZ") { lowNorm.setZ (
eval.
Evaluate(attValue)); }
else
1862 if (attName==
"highX") { highNorm.setX (
eval.
Evaluate(attValue)); }
else
1863 if (attName==
"highY") { highNorm.setY (
eval.
Evaluate(attValue)); }
else
1864 if (attName==
"highZ") { highNorm.setZ (
eval.
Evaluate(attValue)); }
1874 new G4CutTubs(name,rmin,rmax,z,startphi,deltaphi,lowNorm,highNorm);
1888 const xercesc::DOMNamedNodeMap*
const attributes
1889 = twistedboxElement->getAttributes();
1890 XMLSize_t attributeCount = attributes->getLength();
1892 for (XMLSize_t attribute_index=0;
1893 attribute_index<attributeCount; attribute_index++)
1895 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1897 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1900 const xercesc::DOMAttr*
const attribute
1901 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1911 if (attName==
"name") { name =
GenerateName(attValue); }
else
1914 if (attName==
"PhiTwist") { PhiTwist =
eval.
Evaluate(attValue); }
else
1915 if (attName==
"x") { x =
eval.
Evaluate(attValue); }
else
1916 if (attName==
"y") { y =
eval.
Evaluate(attValue); }
else
1946 const xercesc::DOMNamedNodeMap*
const attributes
1947 = twistedtrapElement->getAttributes();
1948 XMLSize_t attributeCount = attributes->getLength();
1950 for (XMLSize_t attribute_index=0;
1951 attribute_index<attributeCount; attribute_index++)
1953 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1955 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1958 const xercesc::DOMAttr*
const attribute
1959 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1962 G4Exception(
"G4GDMLReadSolids::TwistedtrapRead()",
1969 if (attName==
"name") { name =
GenerateName(attValue); }
else
1972 if (attName==
"PhiTwist") { PhiTwist =
eval.
Evaluate(attValue); }
else
1973 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
1974 if (attName==
"Theta") { Theta =
eval.
Evaluate(attValue); }
else
1975 if (attName==
"Phi") { Phi =
eval.
Evaluate(attValue); }
else
1976 if (attName==
"y1") { y1 =
eval.
Evaluate(attValue); }
else
1977 if (attName==
"x1") { x1 =
eval.
Evaluate(attValue); }
else
1978 if (attName==
"x2") { x2 =
eval.
Evaluate(attValue); }
else
1979 if (attName==
"y2") { y2 =
eval.
Evaluate(attValue); }
else
1980 if (attName==
"x3") { x3 =
eval.
Evaluate(attValue); }
else
1981 if (attName==
"x4") { x4 =
eval.
Evaluate(attValue); }
else
1982 if (attName==
"Alph") { Alph =
eval.
Evaluate(attValue); }
1998 new G4TwistedTrap(name,PhiTwist,z,Theta,Phi,y1,x1,x2,y2,x3,x4,Alph);
2014 const xercesc::DOMNamedNodeMap*
const attributes
2015 = twistedtrdElement->getAttributes();
2016 XMLSize_t attributeCount = attributes->getLength();
2018 for (XMLSize_t attribute_index=0;
2019 attribute_index<attributeCount; attribute_index++)
2021 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
2023 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
2026 const xercesc::DOMAttr*
const attribute
2027 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
2037 if (attName==
"name") { name =
GenerateName(attValue); }
else
2040 if (attName==
"x1") { x1 =
eval.
Evaluate(attValue); }
else
2041 if (attName==
"x2") { x2 =
eval.
Evaluate(attValue); }
else
2042 if (attName==
"y1") { y1 =
eval.
Evaluate(attValue); }
else
2043 if (attName==
"y2") { y2 =
eval.
Evaluate(attValue); }
else
2044 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
2045 if (attName==
"PhiTwist") { PhiTwist =
eval.
Evaluate(attValue); }
2070 const xercesc::DOMNamedNodeMap*
const attributes
2071 = twistedtubsElement->getAttributes();
2072 XMLSize_t attributeCount = attributes->getLength();
2074 for (XMLSize_t attribute_index=0;
2075 attribute_index<attributeCount; attribute_index++)
2077 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
2079 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
2082 const xercesc::DOMAttr*
const attribute
2083 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
2086 G4Exception(
"G4GDMLReadSolids::TwistedtubsRead()",
2093 if (attName==
"name") { name =
GenerateName(attValue); }
else
2096 if (attName==
"twistedangle") { twistedangle=
eval.
Evaluate(attValue); }
else
2097 if (attName==
"endinnerrad") { endinnerrad=
eval.
Evaluate(attValue); }
else
2098 if (attName==
"endouterrad") { endouterrad=
eval.
Evaluate(attValue); }
else
2099 if (attName==
"zlen") { zlen =
eval.
Evaluate(attValue); }
else
2103 twistedangle *= aunit;
2104 endinnerrad *= lunit;
2105 endouterrad *= lunit;
2109 new G4TwistedTubs(name,twistedangle,endinnerrad,endouterrad,zlen,phi);
2117 const xercesc::DOMNamedNodeMap*
const attributes = element->getAttributes();
2118 XMLSize_t attributeCount = attributes->getLength();
2120 for (XMLSize_t attribute_index=0;
2121 attribute_index<attributeCount; attribute_index++)
2123 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
2125 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
2128 const xercesc::DOMAttr*
const attribute
2129 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
2132 G4Exception(
"G4GDMLReadSolids::TwoDimVertexRead()",
2139 if (attName==
"x") { vec.setX(
eval.
Evaluate(attValue)*lunit); }
else
2140 if (attName==
"y") { vec.setY(
eval.
Evaluate(attValue)*lunit); }
2151 const xercesc::DOMNamedNodeMap*
const attributes
2152 = zplaneElement->getAttributes();
2153 XMLSize_t attributeCount = attributes->getLength();
2155 for (XMLSize_t attribute_index=0;
2156 attribute_index<attributeCount; attribute_index++)
2158 xercesc::DOMNode* node = attributes->item(attribute_index);
2160 if (node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE) {
continue; }
2162 const xercesc::DOMAttr*
const attribute
2163 =
dynamic_cast<xercesc::DOMAttr*
>(node);
2185 const xercesc::DOMNamedNodeMap*
const attributes
2186 = zplaneElement->getAttributes();
2187 XMLSize_t attributeCount = attributes->getLength();
2189 for (XMLSize_t attribute_index=0;
2190 attribute_index<attributeCount; attribute_index++)
2192 xercesc::DOMNode* node = attributes->item(attribute_index);
2194 if (node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE) {
continue; }
2196 const xercesc::DOMAttr*
const attribute
2197 =
dynamic_cast<xercesc::DOMAttr*
>(node);
2207 if (attName==
"r") { rzpoint.
r =
eval.
Evaluate(attValue); }
else
2224 const xercesc::DOMNamedNodeMap*
const attributes
2225 = opticalsurfaceElement->getAttributes();
2226 XMLSize_t attributeCount = attributes->getLength();
2228 for (XMLSize_t attribute_index=0;
2229 attribute_index<attributeCount; attribute_index++)
2231 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
2233 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
2236 const xercesc::DOMAttr*
const attribute
2237 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
2240 G4Exception(
"G4GDMLReadSolids::OpticalSurfaceRead()",
2247 if (attName==
"name") { name =
GenerateName(attValue); }
else
2248 if (attName==
"model") { smodel = attValue; }
else
2249 if (attName==
"finish") { sfinish = attValue; }
else
2250 if (attName==
"type") { stype = attValue; }
else
2251 if (attName==
"value") { value =
eval.
Evaluate(attValue); }
2258 if ((smodel==
"glisur") || (smodel==
"0")) { model =
glisur; }
else
2259 if ((smodel==
"unified") || (smodel==
"1")) { model =
unified; }
else
2260 if ((smodel==
"LUT") || (smodel==
"2")) { model =
LUT; }
2263 if ((sfinish==
"polished") || (sfinish==
"0"))
2265 if ((sfinish==
"polishedfrontpainted") || (sfinish==
"1"))
2267 if ((sfinish==
"polishedbackpainted") || (sfinish==
"2"))
2269 if ((sfinish==
"ground") || (sfinish==
"3"))
2270 { finish =
ground; }
else
2271 if ((sfinish==
"groundfrontpainted") || (sfinish==
"4"))
2273 if ((sfinish==
"groundbackpainted") || (sfinish==
"5"))
2275 if ((sfinish==
"polishedlumirrorair") || (sfinish==
"6"))
2277 if ((sfinish==
"polishedlumirrorglue") || (sfinish==
"7"))
2279 if ((sfinish==
"polishedair") || (sfinish==
"8"))
2281 if ((sfinish==
"polishedteflonair") || (sfinish==
"9"))
2283 if ((sfinish==
"polishedtioair") || (sfinish==
"10"))
2285 if ((sfinish==
"polishedtyvekair") || (sfinish==
"11"))
2287 if ((sfinish==
"polishedvm2000air") || (sfinish==
"12"))
2289 if ((sfinish==
"polishedvm2000glue") || (sfinish==
"13"))
2291 if ((sfinish==
"etchedlumirrorair") || (sfinish==
"14"))
2293 if ((sfinish==
"etchedlumirrorglue") || (sfinish==
"15"))
2295 if ((sfinish==
"etchedair") || (sfinish==
"16"))
2297 if ((sfinish==
"etchedteflonair") || (sfinish==
"17"))
2299 if ((sfinish==
"etchedtioair") || (sfinish==
"18"))
2301 if ((sfinish==
"etchedtyvekair") || (sfinish==
"19"))
2303 if ((sfinish==
"etchedvm2000air") || (sfinish==
"20"))
2305 if ((sfinish==
"etchedvm2000glue") || (sfinish==
"21"))
2307 if ((sfinish==
"groundlumirrorair") || (sfinish==
"22"))
2309 if ((sfinish==
"groundlumirrorglue") || (sfinish==
"23"))
2311 if ((sfinish==
"groundair") || (sfinish==
"24"))
2313 if ((sfinish==
"groundteflonair") || (sfinish==
"25"))
2315 if ((sfinish==
"groundtioair") || (sfinish==
"26"))
2317 if ((sfinish==
"groundtyvekair") || (sfinish==
"27"))
2319 if ((sfinish==
"groundvm2000air") || (sfinish==
"28"))
2323 if ((stype==
"dielectric_metal") || (stype==
"0"))
2325 if ((stype==
"dielectric_dielectric") || (stype==
"1"))
2327 if ((stype==
"dielectric_LUT") || (stype==
"2"))
2329 if ((stype==
"dielectric_dichroic") || (stype==
"3"))
2331 if ((stype==
"firsov") || (stype==
"4"))
2333 else { type =
x_ray; }
2342 for (xercesc::DOMNode* iter = solidsElement->getFirstChild();
2343 iter != 0; iter = iter->getNextSibling())
2345 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
2347 const xercesc::DOMElement*
const child
2348 =
dynamic_cast<xercesc::DOMElement*
>(iter);
2356 if (tag==
"define") {
DefineRead(child); }
else
2357 if (tag==
"box") {
BoxRead(child); }
else
2358 if (tag==
"cone") {
ConeRead(child); }
else
2359 if (tag==
"elcone") {
ElconeRead(child); }
else
2361 if (tag==
"eltube") {
EltubeRead(child); }
else
2362 if (tag==
"xtru") {
XtruRead(child); }
else
2363 if (tag==
"hype") {
HypeRead(child); }
else
2366 if (tag==
"orb") {
OrbRead(child); }
else
2367 if (tag==
"para") {
ParaRead(child); }
else
2374 if (tag==
"sphere") {
SphereRead(child); }
else
2377 if (tag==
"tet") {
TetRead(child); }
else
2378 if (tag==
"torus") {
TorusRead(child); }
else
2380 if (tag==
"trap") {
TrapRead(child); }
else
2381 if (tag==
"trd") {
TrdRead(child); }
else
2382 if (tag==
"tube") {
TubeRead(child); }
else
2393 G4String error_msg =
"Unknown tag in solids: " + tag;
2394 G4Exception(
"G4GDMLReadSolids::SolidsRead()",
"ReadError",
2406 G4String error_msg =
"Referenced solid '" + ref +
"' was not found!";
2407 G4Exception(
"G4GDMLReadSolids::GetSolid()",
"ReadError",
2419 const size_t surfaceCount = surfaceList->size();
2421 for (
size_t i=0; i<surfaceCount; i++)
2423 if ((*surfaceList)[i]->GetName() == ref) {
return (*surfaceList)[i]; }
2426 G4String error_msg =
"Referenced optical surface '" + ref +
"' was not found!";
2427 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)
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)
const G4double x[NPOINTSGL]
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()
virtual void SolidsRead(const xercesc::DOMElement *const)=0
void TwistedtrdRead(const xercesc::DOMElement *const)
G4double Evaluate(const G4String &)
G4ThreeVector GetPosition(const G4String &)