80 BooleanRead(
const xercesc::DOMElement*
const booleanElement,
const BooleanOp op)
90 const xercesc::DOMNamedNodeMap*
const attributes
91 = booleanElement->getAttributes();
92 XMLSize_t attributeCount = attributes->getLength();
94 for (XMLSize_t attribute_index=0;
95 attribute_index<attributeCount; attribute_index++)
97 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
99 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
102 const xercesc::DOMAttr*
const attribute
103 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
116 for (xercesc::DOMNode* iter = booleanElement->getFirstChild();
117 iter != 0;iter = iter->getNextSibling())
119 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
121 const xercesc::DOMElement*
const child
122 =
dynamic_cast<xercesc::DOMElement*
>(iter);
131 if (tag==
"first") { first =
RefRead(child); }
else
132 if (tag==
"second") { scnd =
RefRead(child); }
else
133 if (tag==
"position") {
VectorRead(child,position); }
else
134 if (tag==
"rotation") {
VectorRead(child,rotation); }
else
135 if (tag==
"positionref")
137 if (tag==
"rotationref")
139 if (tag==
"firstposition") {
VectorRead(child,firstposition); }
else
140 if (tag==
"firstrotation") {
VectorRead(child,firstrotation); }
else
141 if (tag==
"firstpositionref")
143 if (tag==
"firstrotationref")
147 G4String error_msg =
"Unknown tag in boolean solid: " + tag;
148 G4Exception(
"G4GDMLReadSolids::BooleanRead()",
"ReadError",
158 if (( (firstrotation.
x()!=0.0) || (firstrotation.
y()!=0.0)
159 || (firstrotation.
z()!=0.0))
160 || ( (firstposition.
x()!=0.0) || (firstposition.
y()!=0.0)
161 || (firstposition.
z()!=0.0)))
166 firstSolid, firsttransform);
170 {
new G4UnionSolid(name,firstSolid,secondSolid,transform); }
else
173 if (op==INTERSECTION)
185 const xercesc::DOMNamedNodeMap*
const attributes
186 = boxElement->getAttributes();
187 XMLSize_t attributeCount = attributes->getLength();
189 for (XMLSize_t attribute_index=0;
190 attribute_index<attributeCount; attribute_index++)
192 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
194 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
197 const xercesc::DOMAttr*
const attribute
198 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
208 if (attName==
"name") { name =
GenerateName(attValue); }
else
209 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
219 new G4Box(name,x,y,z);
235 const xercesc::DOMNamedNodeMap*
const attributes
236 = coneElement->getAttributes();
237 XMLSize_t attributeCount = attributes->getLength();
239 for (XMLSize_t attribute_index=0;
240 attribute_index<attributeCount; attribute_index++)
242 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
244 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
247 const xercesc::DOMAttr*
const attribute
248 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
258 if (attName==
"name") { name =
GenerateName(attValue); }
else
259 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
260 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
261 if (attName==
"rmin1") { rmin1 =
eval.
Evaluate(attValue); }
else
262 if (attName==
"rmax1") { rmax1 =
eval.
Evaluate(attValue); }
else
263 if (attName==
"rmin2") { rmin2 =
eval.
Evaluate(attValue); }
else
264 if (attName==
"rmax2") { rmax2 =
eval.
Evaluate(attValue); }
else
266 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
267 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
278 new G4Cons(name,rmin1,rmax1,rmin2,rmax2,z,startphi,deltaphi);
291 const xercesc::DOMNamedNodeMap*
const attributes
292 = elconeElement->getAttributes();
293 XMLSize_t attributeCount = attributes->getLength();
295 for (XMLSize_t attribute_index=0;
296 attribute_index<attributeCount; attribute_index++)
298 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
300 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
303 const xercesc::DOMAttr*
const attribute
304 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
314 if (attName==
"name") { name =
GenerateName(attValue); }
else
315 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
316 if (attName==
"dx") { dx =
eval.
Evaluate(attValue); }
else
317 if (attName==
"dy") { dy =
eval.
Evaluate(attValue); }
else
318 if (attName==
"zmax") { zmax =
eval.
Evaluate(attValue); }
else
319 if (attName==
"zcut") { zcut =
eval.
Evaluate(attValue); }
339 const xercesc::DOMNamedNodeMap*
const attributes
340 = ellipsoidElement->getAttributes();
341 XMLSize_t attributeCount = attributes->getLength();
343 for (XMLSize_t attribute_index=0;
344 attribute_index<attributeCount; attribute_index++)
346 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
348 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
351 const xercesc::DOMAttr*
const attribute
352 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
362 if (attName==
"name") { name =
GenerateName(attValue); }
else
363 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
364 if (attName==
"ax") { ax =
eval.
Evaluate(attValue); }
else
365 if (attName==
"by") { by =
eval.
Evaluate(attValue); }
else
366 if (attName==
"cz") { cz =
eval.
Evaluate(attValue); }
else
367 if (attName==
"zcut1") { zcut1 =
eval.
Evaluate(attValue); }
else
368 if (attName==
"zcut2") { zcut2 =
eval.
Evaluate(attValue); }
389 const xercesc::DOMNamedNodeMap*
const attributes
390 = eltubeElement->getAttributes();
391 XMLSize_t attributeCount = attributes->getLength();
393 for (XMLSize_t attribute_index=0;
394 attribute_index<attributeCount; attribute_index++)
396 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
398 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
401 const xercesc::DOMAttr*
const attribute
402 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
412 if (attName==
"name") { name =
GenerateName(attValue); }
else
413 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
414 if (attName==
"dx") { dx =
eval.
Evaluate(attValue); }
else
415 if (attName==
"dy") { dy =
eval.
Evaluate(attValue); }
else
431 const xercesc::DOMNamedNodeMap*
const attributes
432 = xtruElement->getAttributes();
433 XMLSize_t attributeCount = attributes->getLength();
435 for (XMLSize_t attribute_index=0;
436 attribute_index<attributeCount; attribute_index++)
438 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
440 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
443 const xercesc::DOMAttr*
const attribute
444 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
454 if (attName==
"name") { name =
GenerateName(attValue); }
else
455 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
458 std::vector<G4TwoVector> twoDimVertexList;
459 std::vector<G4ExtrudedSolid::ZSection> sectionList;
461 for (xercesc::DOMNode* iter = xtruElement->getFirstChild();
462 iter != 0; iter = iter->getNextSibling())
464 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
466 const xercesc::DOMElement*
const child
467 =
dynamic_cast<xercesc::DOMElement*
>(iter);
476 if (tag==
"twoDimVertex")
479 { sectionList.push_back(
SectionRead(child,lunit)); }
496 const xercesc::DOMNamedNodeMap*
const attributes
497 = hypeElement->getAttributes();
498 XMLSize_t attributeCount = attributes->getLength();
500 for (XMLSize_t attribute_index=0;
501 attribute_index<attributeCount; attribute_index++)
503 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
505 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
508 const xercesc::DOMAttr*
const attribute
509 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
519 if (attName==
"name") { name =
GenerateName(attValue); }
else
520 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
521 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
522 if (attName==
"rmin") { rmin =
eval.
Evaluate(attValue); }
else
523 if (attName==
"rmax") { rmax =
eval.
Evaluate(attValue); }
else
524 if (attName==
"inst") { inst =
eval.
Evaluate(attValue); }
else
525 if (attName==
"outst") { outst =
eval.
Evaluate(attValue); }
else
535 new G4Hype(name,rmin,rmax,inst,outst,z);
542 "MultiUnion is not supported yet. Sorry!");
551 const xercesc::DOMNamedNodeMap*
const attributes
552 = orbElement->getAttributes();
553 XMLSize_t attributeCount = attributes->getLength();
555 for (XMLSize_t attribute_index=0;
556 attribute_index<attributeCount; attribute_index++)
558 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
560 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
563 const xercesc::DOMAttr*
const attribute
564 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
574 if (attName==
"name") { name =
GenerateName(attValue); }
else
575 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
596 const xercesc::DOMNamedNodeMap*
const attributes
597 = paraElement->getAttributes();
598 XMLSize_t attributeCount = attributes->getLength();
600 for (XMLSize_t attribute_index=0;
601 attribute_index<attributeCount; attribute_index++)
603 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
605 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
608 const xercesc::DOMAttr*
const attribute
609 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
619 if (attName==
"name") { name =
GenerateName(attValue); }
else
620 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
621 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
625 if (attName==
"alpha") { alpha =
eval.
Evaluate(attValue); }
else
626 if (attName==
"theta") { theta =
eval.
Evaluate(attValue); }
else
637 new G4Para(name,x,y,z,alpha,theta,phi);
649 const xercesc::DOMNamedNodeMap*
const attributes
650 = paraElement->getAttributes();
651 XMLSize_t attributeCount = attributes->getLength();
653 for (XMLSize_t attribute_index=0;
654 attribute_index<attributeCount; attribute_index++)
656 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
658 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
661 const xercesc::DOMAttr*
const attribute
662 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
672 if (attName==
"name") { name =
GenerateName(attValue); }
else
673 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
674 if (attName==
"rlo") { rlo =
eval.
Evaluate(attValue); }
else
675 if (attName==
"rhi") { rhi =
eval.
Evaluate(attValue); }
else
695 const xercesc::DOMNamedNodeMap*
const attributes
696 = polyconeElement->getAttributes();
697 XMLSize_t attributeCount = attributes->getLength();
699 for (XMLSize_t attribute_index=0;
700 attribute_index<attributeCount; attribute_index++)
702 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
704 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
707 const xercesc::DOMAttr*
const attribute
708 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
718 if (attName==
"name") { name =
GenerateName(attValue); }
else
719 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
720 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
721 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
722 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
728 std::vector<zplaneType> zplaneList;
730 for (xercesc::DOMNode* iter = polyconeElement->getFirstChild();
731 iter != 0; iter = iter->getNextSibling())
733 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
735 const xercesc::DOMElement*
const child
736 =
dynamic_cast<xercesc::DOMElement*
>(iter);
745 if (tag==
"zplane") { zplaneList.push_back(
ZplaneRead(child)); }
748 G4int numZPlanes = zplaneList.size();
754 for (
G4int i=0; i<numZPlanes; i++)
756 rmin_array[i] = zplaneList[i].rmin*lunit;
757 rmax_array[i] = zplaneList[i].rmax*lunit;
758 z_array[i] = zplaneList[i].z*lunit;
761 new G4Polycone(name,startphi,deltaphi,numZPlanes,
762 z_array,rmin_array,rmax_array);
774 const xercesc::DOMNamedNodeMap*
const attributes
775 = polyconeElement->getAttributes();
776 XMLSize_t attributeCount = attributes->getLength();
778 for (XMLSize_t attribute_index=0;
779 attribute_index<attributeCount; attribute_index++)
781 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
783 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
786 const xercesc::DOMAttr*
const attribute
787 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
790 G4Exception(
"G4GDMLReadSolids::GenericPolyconeRead()",
797 if (attName==
"name") { name =
GenerateName(attValue); }
else
798 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
799 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
800 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
801 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
807 std::vector<rzPointType> rzPointList;
809 for (xercesc::DOMNode* iter = polyconeElement->getFirstChild();
810 iter != 0; iter = iter->getNextSibling())
812 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
814 const xercesc::DOMElement*
const child
815 =
dynamic_cast<xercesc::DOMElement*
>(iter);
818 G4Exception(
"G4GDMLReadSolids::GenericPolyconeRead()",
824 if (tag==
"rzpoint") { rzPointList.push_back(
RZPointRead(child)); }
827 G4int numRZPoints = rzPointList.size();
832 for (
G4int i=0; i<numRZPoints; i++)
834 r_array[i] = rzPointList[i].r*lunit;
835 z_array[i] = rzPointList[i].z*lunit;
851 const xercesc::DOMNamedNodeMap*
const attributes
852 = polyhedraElement->getAttributes();
853 XMLSize_t attributeCount = attributes->getLength();
855 for (XMLSize_t attribute_index=0;
856 attribute_index<attributeCount; attribute_index++)
858 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
860 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
863 const xercesc::DOMAttr*
const attribute
864 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
874 if (attName==
"name") { name =
GenerateName(attValue); }
else
875 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
876 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
877 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
878 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
else
885 std::vector<zplaneType> zplaneList;
887 for (xercesc::DOMNode* iter = polyhedraElement->getFirstChild();
888 iter != 0; iter = iter->getNextSibling())
890 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
892 const xercesc::DOMElement*
const child
893 =
dynamic_cast<xercesc::DOMElement*
>(iter);
902 if (tag==
"zplane") { zplaneList.push_back(
ZplaneRead(child)); }
905 G4int numZPlanes = zplaneList.size();
911 for (
G4int i=0; i<numZPlanes; i++)
913 rmin_array[i] = zplaneList[i].rmin*lunit;
914 rmax_array[i] = zplaneList[i].rmax*lunit;
915 z_array[i] = zplaneList[i].z*lunit;
918 new G4Polyhedra(name,startphi,deltaphi,numsides,numZPlanes,
919 z_array,rmin_array,rmax_array);
933 const xercesc::DOMNamedNodeMap*
const attributes
934 = polyhedraElement->getAttributes();
935 XMLSize_t attributeCount = attributes->getLength();
937 for (XMLSize_t attribute_index=0;
938 attribute_index<attributeCount; attribute_index++)
940 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
942 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
945 const xercesc::DOMAttr*
const attribute
946 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
949 G4Exception(
"G4GDMLReadSolids::GenericPolyhedraRead()",
956 if (attName==
"name") { name =
GenerateName(attValue); }
else
957 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
958 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
959 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
960 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
else
967 std::vector<rzPointType> rzpointList;
969 for (xercesc::DOMNode* iter = polyhedraElement->getFirstChild();
970 iter != 0; iter = iter->getNextSibling())
972 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
974 const xercesc::DOMElement*
const child
975 =
dynamic_cast<xercesc::DOMElement*
>(iter);
978 G4Exception(
"G4GDMLReadSolids::GenericPolyhedraRead()",
984 if (tag==
"rzpoint") { rzpointList.push_back(
RZPointRead(child)); }
987 G4int numRZPoints = rzpointList.size();
993 for (
G4int i=0; i<numRZPoints; i++)
995 r_array[i] = rzpointList[i].r*lunit;
996 z_array[i] = rzpointList[i].z*lunit;
999 new G4Polyhedra(name,startphi,deltaphi,numsides,numRZPoints,
1014 const xercesc::DOMNamedNodeMap*
const attributes
1015 = quadrangularElement->getAttributes();
1016 XMLSize_t attributeCount = attributes->getLength();
1018 for (XMLSize_t attribute_index=0;
1019 attribute_index<attributeCount; attribute_index++)
1021 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1023 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1026 const xercesc::DOMAttr*
const attribute
1027 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1030 G4Exception(
"G4GDMLReadSolids::QuadrangularRead()",
1037 if (attName==
"vertex1")
1039 if (attName==
"vertex2")
1041 if (attName==
"vertex3")
1043 if (attName==
"vertex4")
1045 if (attName==
"lunit")
1047 if (attName==
"type")
1048 {
if (attValue==
"RELATIVE") { type =
RELATIVE; } }
1052 vertex3*lunit,vertex4*lunit,type);
1066 const xercesc::DOMNamedNodeMap*
const attributes
1067 = reflectedSolidElement->getAttributes();
1068 XMLSize_t attributeCount = attributes->getLength();
1070 for (XMLSize_t attribute_index=0;
1071 attribute_index<attributeCount; attribute_index++)
1073 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1075 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1078 const xercesc::DOMAttr*
const attribute
1079 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1082 G4Exception(
"G4GDMLReadSolids::ReflectedSolidRead()",
1089 if (attName==
"name") { name =
GenerateName(attValue); }
else
1090 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
1091 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
1092 if (attName==
"solid") { solid =
GenerateName(attValue); }
else
1108 transform = transform*
G4Scale3D(scale.
x(),scale.
y(),scale.
z());
1120 const xercesc::DOMNamedNodeMap*
const attributes
1121 = sectionElement->getAttributes();
1122 XMLSize_t attributeCount = attributes->getLength();
1124 for (XMLSize_t attribute_index=0;
1125 attribute_index<attributeCount; attribute_index++)
1127 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1129 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1132 const xercesc::DOMAttr*
const attribute
1133 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1143 if (attName==
"zPosition")
1145 if (attName==
"xOffset")
1147 if (attName==
"yOffset")
1149 if (attName==
"scalingFactor")
1169 const xercesc::DOMNamedNodeMap*
const attributes
1170 = sphereElement->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);
1192 if (attName==
"name") { name =
GenerateName(attValue); }
else
1193 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
1194 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
1195 if (attName==
"rmin") { rmin =
eval.
Evaluate(attValue); }
else
1196 if (attName==
"rmax") { rmax =
eval.
Evaluate(attValue); }
else
1197 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1198 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
else
1199 if (attName==
"starttheta") { starttheta =
eval.
Evaluate(attValue); }
else
1200 if (attName==
"deltatheta") { deltatheta =
eval.
Evaluate(attValue); }
1207 starttheta *= aunit;
1208 deltatheta *= aunit;
1210 new G4Sphere(name,rmin,rmax,startphi,deltaphi,starttheta,deltatheta);
1218 const xercesc::DOMNamedNodeMap*
const attributes
1219 = tessellatedElement->getAttributes();
1220 XMLSize_t attributeCount = attributes->getLength();
1222 for (XMLSize_t attribute_index=0;
1223 attribute_index<attributeCount; attribute_index++)
1225 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1227 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1230 const xercesc::DOMAttr*
const attribute
1231 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1234 G4Exception(
"G4GDMLReadSolids::TessellatedRead()",
1241 if (attName==
"name") { name =
GenerateName(attValue); }
1246 for (xercesc::DOMNode* iter = tessellatedElement->getFirstChild();
1247 iter != 0; iter = iter->getNextSibling())
1249 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
1251 const xercesc::DOMElement*
const child
1252 =
dynamic_cast<xercesc::DOMElement*
>(iter);
1255 G4Exception(
"G4GDMLReadSolids::TessellatedRead()",
1261 if (tag==
"triangular")
1263 if (tag==
"quadrangular")
1279 const xercesc::DOMNamedNodeMap*
const attributes
1280 = tetElement->getAttributes();
1281 XMLSize_t attributeCount = attributes->getLength();
1283 for (XMLSize_t attribute_index=0;
1284 attribute_index<attributeCount;attribute_index++)
1286 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1288 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1291 const xercesc::DOMAttr*
const attribute
1292 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1302 if (attName==
"name")
1304 if (attName==
"lunit")
1306 if (attName==
"vertex1")
1308 if (attName==
"vertex2")
1310 if (attName==
"vertex3")
1312 if (attName==
"vertex4")
1316 new G4Tet(name,vertex1*lunit,vertex2*lunit,vertex3*lunit,vertex4*lunit);
1330 const xercesc::DOMNamedNodeMap*
const attributes
1331 = torusElement->getAttributes();
1332 XMLSize_t attributeCount = attributes->getLength();
1334 for (XMLSize_t attribute_index=0;
1335 attribute_index<attributeCount; attribute_index++)
1337 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1339 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1342 const xercesc::DOMAttr*
const attribute
1343 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1353 if (attName==
"name") { name =
GenerateName(attValue); }
else
1354 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
1355 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
1356 if (attName==
"rmin") { rmin =
eval.
Evaluate(attValue); }
else
1357 if (attName==
"rmax") { rmax =
eval.
Evaluate(attValue); }
else
1358 if (attName==
"rtor") { rtor =
eval.
Evaluate(attValue); }
else
1359 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1360 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
1369 new G4Torus(name,rmin,rmax,rtor,startphi,deltaphi);
1378 G4double v1x=0.0, v1y=0.0, v2x=0.0, v2y=0.0, v3x=0.0, v3y=0.0,
1379 v4x=0.0, v4y=0.0, v5x=0.0, v5y=0.0, v6x=0.0, v6y=0.0,
1380 v7x=0.0, v7y=0.0, v8x=0.0, v8y=0.0;
1382 const xercesc::DOMNamedNodeMap*
const attributes
1383 = gtrapElement->getAttributes();
1384 XMLSize_t attributeCount = attributes->getLength();
1386 for (XMLSize_t attribute_index=0;
1387 attribute_index<attributeCount; attribute_index++)
1389 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1391 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1394 const xercesc::DOMAttr*
const attribute
1395 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1405 if (attName==
"name") { name =
GenerateName(attValue); }
else
1406 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
1407 if (attName==
"dz") { dz =
eval.
Evaluate(attValue); }
else
1408 if (attName==
"v1x") { v1x =
eval.
Evaluate(attValue); }
else
1409 if (attName==
"v1y") { v1y =
eval.
Evaluate(attValue); }
else
1410 if (attName==
"v2x") { v2x =
eval.
Evaluate(attValue); }
else
1411 if (attName==
"v2y") { v2y =
eval.
Evaluate(attValue); }
else
1412 if (attName==
"v3x") { v3x =
eval.
Evaluate(attValue); }
else
1413 if (attName==
"v3y") { v3y =
eval.
Evaluate(attValue); }
else
1414 if (attName==
"v4x") { v4x =
eval.
Evaluate(attValue); }
else
1415 if (attName==
"v4y") { v4y =
eval.
Evaluate(attValue); }
else
1416 if (attName==
"v5x") { v5x =
eval.
Evaluate(attValue); }
else
1417 if (attName==
"v5y") { v5y =
eval.
Evaluate(attValue); }
else
1418 if (attName==
"v6x") { v6x =
eval.
Evaluate(attValue); }
else
1419 if (attName==
"v6y") { v6y =
eval.
Evaluate(attValue); }
else
1420 if (attName==
"v7x") { v7x =
eval.
Evaluate(attValue); }
else
1421 if (attName==
"v7y") { v7y =
eval.
Evaluate(attValue); }
else
1422 if (attName==
"v8x") { v8x =
eval.
Evaluate(attValue); }
else
1427 std::vector<G4TwoVector> vertices;
1428 vertices.push_back(
G4TwoVector(v1x*lunit,v1y*lunit));
1429 vertices.push_back(
G4TwoVector(v2x*lunit,v2y*lunit));
1430 vertices.push_back(
G4TwoVector(v3x*lunit,v3y*lunit));
1431 vertices.push_back(
G4TwoVector(v4x*lunit,v4y*lunit));
1432 vertices.push_back(
G4TwoVector(v5x*lunit,v5y*lunit));
1433 vertices.push_back(
G4TwoVector(v6x*lunit,v6y*lunit));
1434 vertices.push_back(
G4TwoVector(v7x*lunit,v7y*lunit));
1435 vertices.push_back(
G4TwoVector(v8x*lunit,v8y*lunit));
1456 const xercesc::DOMNamedNodeMap*
const attributes
1457 = trapElement->getAttributes();
1458 XMLSize_t attributeCount = attributes->getLength();
1460 for (XMLSize_t attribute_index=0;
1461 attribute_index<attributeCount; attribute_index++)
1463 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1465 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1468 const xercesc::DOMAttr*
const attribute
1469 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1479 if (attName==
"name") { name =
GenerateName(attValue); }
else
1480 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
1481 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
1482 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
1483 if (attName==
"theta") { theta =
eval.
Evaluate(attValue); }
else
1484 if (attName==
"phi") { phi =
eval.
Evaluate(attValue); }
else
1485 if (attName==
"y1") { y1 =
eval.
Evaluate(attValue); }
else
1486 if (attName==
"x1") { x1 =
eval.
Evaluate(attValue); }
else
1487 if (attName==
"x2") { x2 =
eval.
Evaluate(attValue); }
else
1488 if (attName==
"alpha1") { alpha1 =
eval.
Evaluate(attValue); }
else
1489 if (attName==
"y2") { y2 =
eval.
Evaluate(attValue); }
else
1490 if (attName==
"x3") { x3 =
eval.
Evaluate(attValue); }
else
1491 if (attName==
"x4") { x4 =
eval.
Evaluate(attValue); }
else
1492 if (attName==
"alpha2") { alpha2 =
eval.
Evaluate(attValue); }
1507 new G4Trap(name,z,theta,phi,y1,x1,x2,alpha1,y2,x3,x4,alpha2);
1520 const xercesc::DOMNamedNodeMap*
const attributes = trdElement->getAttributes();
1521 XMLSize_t attributeCount = attributes->getLength();
1523 for (XMLSize_t attribute_index=0;
1524 attribute_index<attributeCount; attribute_index++)
1526 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1528 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1531 const xercesc::DOMAttr*
const attribute
1532 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1542 if (attName==
"name") { name =
GenerateName(attValue); }
else
1543 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
1544 if (attName==
"x1") { x1 =
eval.
Evaluate(attValue); }
else
1545 if (attName==
"x2") { x2 =
eval.
Evaluate(attValue); }
else
1546 if (attName==
"y1") { y1 =
eval.
Evaluate(attValue); }
else
1547 if (attName==
"y2") { y2 =
eval.
Evaluate(attValue); }
else
1557 new G4Trd(name,x1,x2,y1,y2,z);
1569 const xercesc::DOMNamedNodeMap*
const attributes
1570 = triangularElement->getAttributes();
1571 XMLSize_t attributeCount = attributes->getLength();
1573 for (XMLSize_t attribute_index=0;
1574 attribute_index<attributeCount; attribute_index++)
1576 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1578 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1581 const xercesc::DOMAttr*
const attribute
1582 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1592 if (attName==
"vertex1")
1594 if (attName==
"vertex2")
1596 if (attName==
"vertex3")
1598 if (attName==
"lunit")
1600 if (attName==
"type")
1601 {
if (attValue==
"RELATIVE") { type =
RELATIVE; } }
1618 const xercesc::DOMNamedNodeMap*
const attributes
1619 = tubeElement->getAttributes();
1620 XMLSize_t attributeCount = attributes->getLength();
1622 for (XMLSize_t attribute_index=0;
1623 attribute_index<attributeCount; attribute_index++)
1625 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1627 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1630 const xercesc::DOMAttr*
const attribute
1631 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1641 if (attName==
"name") { name =
GenerateName(attValue); }
else
1642 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
1643 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
1644 if (attName==
"rmin") { rmin =
eval.
Evaluate(attValue); }
else
1645 if (attName==
"rmax") { rmax =
eval.
Evaluate(attValue); }
else
1646 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
1647 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1648 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
1657 new G4Tubs(name,rmin,rmax,z,startphi,deltaphi);
1673 const xercesc::DOMNamedNodeMap*
const attributes
1674 = cuttubeElement->getAttributes();
1675 XMLSize_t attributeCount = attributes->getLength();
1677 for (XMLSize_t attribute_index=0;
1678 attribute_index<attributeCount; attribute_index++)
1680 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1682 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1685 const xercesc::DOMAttr*
const attribute
1686 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1696 if (attName==
"name") { name =
GenerateName(attValue); }
else
1697 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
1698 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
1699 if (attName==
"rmin") { rmin =
eval.
Evaluate(attValue); }
else
1700 if (attName==
"rmax") { rmax =
eval.
Evaluate(attValue); }
else
1701 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
1702 if (attName==
"startphi") { startphi =
eval.
Evaluate(attValue); }
else
1703 if (attName==
"deltaphi") { deltaphi =
eval.
Evaluate(attValue); }
else
1719 new G4CutTubs(name,rmin,rmax,z,startphi,deltaphi,lowNorm,highNorm);
1733 const xercesc::DOMNamedNodeMap*
const attributes
1734 = twistedboxElement->getAttributes();
1735 XMLSize_t attributeCount = attributes->getLength();
1737 for (XMLSize_t attribute_index=0;
1738 attribute_index<attributeCount; attribute_index++)
1740 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1742 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1745 const xercesc::DOMAttr*
const attribute
1746 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1756 if (attName==
"name") { name =
GenerateName(attValue); }
else
1757 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
1758 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
1759 if (attName==
"PhiTwist") { PhiTwist =
eval.
Evaluate(attValue); }
else
1760 if (attName==
"x") { x =
eval.
Evaluate(attValue); }
else
1761 if (attName==
"y") { y =
eval.
Evaluate(attValue); }
else
1791 const xercesc::DOMNamedNodeMap*
const attributes
1792 = twistedtrapElement->getAttributes();
1793 XMLSize_t attributeCount = attributes->getLength();
1795 for (XMLSize_t attribute_index=0;
1796 attribute_index<attributeCount; attribute_index++)
1798 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1800 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1803 const xercesc::DOMAttr*
const attribute
1804 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1807 G4Exception(
"G4GDMLReadSolids::TwistedtrapRead()",
1814 if (attName==
"name") { name =
GenerateName(attValue); }
else
1815 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
1816 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
1817 if (attName==
"PhiTwist") { PhiTwist =
eval.
Evaluate(attValue); }
else
1818 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
1819 if (attName==
"Theta") { Theta =
eval.
Evaluate(attValue); }
else
1820 if (attName==
"Phi") { Phi =
eval.
Evaluate(attValue); }
else
1821 if (attName==
"y1") { y1 =
eval.
Evaluate(attValue); }
else
1822 if (attName==
"x1") { x1 =
eval.
Evaluate(attValue); }
else
1823 if (attName==
"x2") { x2 =
eval.
Evaluate(attValue); }
else
1824 if (attName==
"y2") { y2 =
eval.
Evaluate(attValue); }
else
1825 if (attName==
"x3") { x3 =
eval.
Evaluate(attValue); }
else
1826 if (attName==
"x4") { x4 =
eval.
Evaluate(attValue); }
else
1827 if (attName==
"Alph") { Alph =
eval.
Evaluate(attValue); }
1843 new G4TwistedTrap(name,PhiTwist,z,Theta,Phi,y1,x1,x2,y2,x3,x4,Alph);
1859 const xercesc::DOMNamedNodeMap*
const attributes
1860 = twistedtrdElement->getAttributes();
1861 XMLSize_t attributeCount = attributes->getLength();
1863 for (XMLSize_t attribute_index=0;
1864 attribute_index<attributeCount; attribute_index++)
1866 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1868 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1871 const xercesc::DOMAttr*
const attribute
1872 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1882 if (attName==
"name") { name =
GenerateName(attValue); }
else
1883 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
1884 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
1885 if (attName==
"x1") { x1 =
eval.
Evaluate(attValue); }
else
1886 if (attName==
"x2") { x2 =
eval.
Evaluate(attValue); }
else
1887 if (attName==
"y1") { y1 =
eval.
Evaluate(attValue); }
else
1888 if (attName==
"y2") { y2 =
eval.
Evaluate(attValue); }
else
1889 if (attName==
"z") { z =
eval.
Evaluate(attValue); }
else
1890 if (attName==
"PhiTwist") { PhiTwist =
eval.
Evaluate(attValue); }
1915 const xercesc::DOMNamedNodeMap*
const attributes
1916 = twistedtubsElement->getAttributes();
1917 XMLSize_t attributeCount = attributes->getLength();
1919 for (XMLSize_t attribute_index=0;
1920 attribute_index<attributeCount; attribute_index++)
1922 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1924 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1927 const xercesc::DOMAttr*
const attribute
1928 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1931 G4Exception(
"G4GDMLReadSolids::TwistedtubsRead()",
1938 if (attName==
"name") { name =
GenerateName(attValue); }
else
1939 if (attName==
"lunit") { lunit =
eval.
Evaluate(attValue); }
else
1940 if (attName==
"aunit") { aunit =
eval.
Evaluate(attValue); }
else
1941 if (attName==
"twistedangle") { twistedangle=
eval.
Evaluate(attValue); }
else
1942 if (attName==
"endinnerrad") { endinnerrad=
eval.
Evaluate(attValue); }
else
1943 if (attName==
"endouterrad") { endouterrad=
eval.
Evaluate(attValue); }
else
1944 if (attName==
"zlen") { zlen =
eval.
Evaluate(attValue); }
else
1948 twistedangle *= aunit;
1949 endinnerrad *= lunit;
1950 endouterrad *= lunit;
1954 new G4TwistedTubs(name,twistedangle,endinnerrad,endouterrad,zlen,phi);
1962 const xercesc::DOMNamedNodeMap*
const attributes = element->getAttributes();
1963 XMLSize_t attributeCount = attributes->getLength();
1965 for (XMLSize_t attribute_index=0;
1966 attribute_index<attributeCount; attribute_index++)
1968 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
1970 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
1973 const xercesc::DOMAttr*
const attribute
1974 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
1977 G4Exception(
"G4GDMLReadSolids::TwoDimVertexRead()",
1996 const xercesc::DOMNamedNodeMap*
const attributes
1997 = zplaneElement->getAttributes();
1998 XMLSize_t attributeCount = attributes->getLength();
2000 for (XMLSize_t attribute_index=0;
2001 attribute_index<attributeCount; attribute_index++)
2003 xercesc::DOMNode* node = attributes->item(attribute_index);
2005 if (node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE) {
continue; }
2007 const xercesc::DOMAttr*
const attribute
2008 =
dynamic_cast<xercesc::DOMAttr*
>(node);
2028 rzPointType rzpoint = {0.,0.};
2030 const xercesc::DOMNamedNodeMap*
const attributes
2031 = zplaneElement->getAttributes();
2032 XMLSize_t attributeCount = attributes->getLength();
2034 for (XMLSize_t attribute_index=0;
2035 attribute_index<attributeCount; attribute_index++)
2037 xercesc::DOMNode* node = attributes->item(attribute_index);
2039 if (node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE) {
continue; }
2041 const xercesc::DOMAttr*
const attribute
2042 =
dynamic_cast<xercesc::DOMAttr*
>(node);
2052 if (attName==
"r") { rzpoint.r =
eval.
Evaluate(attValue); }
else
2053 if (attName==
"z") { rzpoint.z =
eval.
Evaluate(attValue); }
2069 const xercesc::DOMNamedNodeMap*
const attributes
2070 = opticalsurfaceElement->getAttributes();
2071 XMLSize_t attributeCount = attributes->getLength();
2073 for (XMLSize_t attribute_index=0;
2074 attribute_index<attributeCount; attribute_index++)
2076 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
2078 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
2081 const xercesc::DOMAttr*
const attribute
2082 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
2085 G4Exception(
"G4GDMLReadSolids::OpticalSurfaceRead()",
2092 if (attName==
"name") { name =
GenerateName(attValue); }
else
2093 if (attName==
"model") { smodel = attValue; }
else
2094 if (attName==
"finish") { sfinish = attValue; }
else
2095 if (attName==
"type") { stype = attValue; }
else
2096 if (attName==
"value") { value =
eval.
Evaluate(attValue); }
2103 if ((smodel==
"glisur") || (smodel==
"0")) { model =
glisur; }
else
2104 if ((smodel==
"unified") || (smodel==
"1")) { model =
unified; }
2105 else { model =
LUT; }
2107 if ((sfinish==
"polished") || (sfinish==
"0"))
2109 if ((sfinish==
"polishedfrontpainted") || (sfinish==
"1"))
2111 if ((sfinish==
"polishedbackpainted") || (sfinish==
"2"))
2113 if ((sfinish==
"ground") || (sfinish==
"3"))
2114 { finish =
ground; }
else
2115 if ((sfinish==
"groundfrontpainted") || (sfinish==
"4"))
2117 if ((sfinish==
"groundbackpainted") || (sfinish==
"5"))
2119 if ((sfinish==
"polishedlumirrorair") || (sfinish==
"6"))
2121 if ((sfinish==
"polishedlumirrorglue") || (sfinish==
"7"))
2123 if ((sfinish==
"polishedair") || (sfinish==
"8"))
2125 if ((sfinish==
"polishedteflonair") || (sfinish==
"9"))
2127 if ((sfinish==
"polishedtioair") || (sfinish==
"10"))
2129 if ((sfinish==
"polishedtyvekair") || (sfinish==
"11"))
2131 if ((sfinish==
"polishedvm2000air") || (sfinish==
"12"))
2133 if ((sfinish==
"polishedvm2000glue") || (sfinish==
"13"))
2135 if ((sfinish==
"etchedlumirrorair") || (sfinish==
"14"))
2137 if ((sfinish==
"etchedlumirrorglue") || (sfinish==
"15"))
2139 if ((sfinish==
"etchedair") || (sfinish==
"16"))
2141 if ((sfinish==
"etchedteflonair") || (sfinish==
"17"))
2143 if ((sfinish==
"etchedtioair") || (sfinish==
"18"))
2145 if ((sfinish==
"etchedtyvekair") || (sfinish==
"19"))
2147 if ((sfinish==
"etchedvm2000air") || (sfinish==
"20"))
2149 if ((sfinish==
"etchedvm2000glue") || (sfinish==
"21"))
2151 if ((sfinish==
"groundlumirrorair") || (sfinish==
"22"))
2153 if ((sfinish==
"groundlumirrorglue") || (sfinish==
"23"))
2155 if ((sfinish==
"groundair") || (sfinish==
"24"))
2157 if ((sfinish==
"groundteflonair") || (sfinish==
"25"))
2159 if ((sfinish==
"groundtioair") || (sfinish==
"26"))
2161 if ((sfinish==
"groundtyvekair") || (sfinish==
"27"))
2163 if ((sfinish==
"groundvm2000air") || (sfinish==
"28"))
2167 if ((stype==
"dielectric_metal") || (stype==
"0"))
2169 if ((stype==
"dielectric_dielectric") || (stype==
"1"))
2171 if ((stype==
"dielectric_LUT") || (stype==
"2"))
2173 if ((stype==
"firsov") || (stype==
"3"))
2175 else { type =
x_ray; }
2184 for (xercesc::DOMNode* iter = solidsElement->getFirstChild();
2185 iter != 0; iter = iter->getNextSibling())
2187 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
2189 const xercesc::DOMElement*
const child
2190 =
dynamic_cast<xercesc::DOMElement*
>(iter);
2198 if (tag==
"define") {
DefineRead(child); }
else
2199 if (tag==
"box") {
BoxRead(child); }
else
2200 if (tag==
"cone") {
ConeRead(child); }
else
2201 if (tag==
"elcone") {
ElconeRead(child); }
else
2203 if (tag==
"eltube") {
EltubeRead(child); }
else
2204 if (tag==
"xtru") {
XtruRead(child); }
else
2205 if (tag==
"hype") {
HypeRead(child); }
else
2206 if (tag==
"intersection") {
BooleanRead(child,INTERSECTION); }
else
2208 if (tag==
"orb") {
OrbRead(child); }
else
2209 if (tag==
"para") {
ParaRead(child); }
else
2216 if (tag==
"sphere") {
SphereRead(child); }
else
2217 if (tag==
"subtraction") {
BooleanRead(child,SUBTRACTION); }
else
2219 if (tag==
"tet") {
TetRead(child); }
else
2220 if (tag==
"torus") {
TorusRead(child); }
else
2222 if (tag==
"trap") {
TrapRead(child); }
else
2223 if (tag==
"trd") {
TrdRead(child); }
else
2224 if (tag==
"tube") {
TubeRead(child); }
else
2230 if (tag==
"union") {
BooleanRead(child,UNION); }
else
2235 G4String error_msg =
"Unknown tag in solids: " + tag;
2236 G4Exception(
"G4GDMLReadSolids::SolidsRead()",
"ReadError",
2248 G4String error_msg =
"Referenced solid '" + ref +
"' was not found!";
2249 G4Exception(
"G4GDMLReadSolids::GetSolid()",
"ReadError",
2261 const size_t surfaceCount = surfaceList->size();
2263 for (
size_t i=0; i<surfaceCount; i++)
2265 if ((*surfaceList)[i]->GetName() == ref) {
return (*surfaceList)[i]; }
2268 G4String error_msg =
"Referenced optical surface '" + ref +
"' was not found!";
2269 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)
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)
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)
const XML_Char XML_Content * model
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)
const XML_Char int const XML_Char * value
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)
void PolyconeRead(const xercesc::DOMElement *const)
G4QuadrangularFacet * QuadrangularRead(const xercesc::DOMElement *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 &)