82 BooleanRead(
const xercesc::DOMElement* 
const booleanElement, 
const BooleanOp op)
 
   92    const xercesc::DOMNamedNodeMap* 
const attributes
 
   93          = booleanElement->getAttributes();
 
   94    XMLSize_t attributeCount = attributes->getLength();
 
   96    for (XMLSize_t attribute_index=0;
 
   97         attribute_index<attributeCount; attribute_index++)
 
   99       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  101       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  104       const xercesc::DOMAttr* 
const attribute
 
  105             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
  118    for (xercesc::DOMNode* iter = booleanElement->getFirstChild();
 
  119         iter != 0;iter = iter->getNextSibling())
 
  121       if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)  { 
continue; }
 
  123       const xercesc::DOMElement* 
const child
 
  124             = 
dynamic_cast<xercesc::DOMElement*
>(iter);
 
  133       if (tag==
"first") { first = 
RefRead(child); } 
else 
  134       if (tag==
"second") { scnd = 
RefRead(child); } 
else 
  135       if (tag==
"position") { 
VectorRead(child,position); } 
else 
  136       if (tag==
"rotation") { 
VectorRead(child,rotation); } 
else 
  137       if (tag==
"positionref")
 
  139       if (tag==
"rotationref")
 
  141       if (tag==
"firstposition") { 
VectorRead(child,firstposition); } 
else 
  142       if (tag==
"firstrotation") { 
VectorRead(child,firstrotation); } 
else 
  143       if (tag==
"firstpositionref")
 
  145       if (tag==
"firstrotationref")
 
  149         G4String error_msg = 
"Unknown tag in boolean solid: " + tag;
 
  150         G4Exception(
"G4GDMLReadSolids::BooleanRead()", 
"ReadError",
 
  160    if (( (firstrotation.
x()!=0.0) || (firstrotation.
y()!=0.0)
 
  161                                   || (firstrotation.
z()!=0.0))
 
  162     || ( (firstposition.
x()!=0.0) || (firstposition.
y()!=0.0)
 
  163                                   || (firstposition.
z()!=0.0)))
 
  168                                         firstSolid, firsttransform);
 
  172      { 
new G4UnionSolid(name,firstSolid,secondSolid,transform); } 
else 
  175    if (op==INTERSECTION)
 
  187    const xercesc::DOMNamedNodeMap* 
const attributes
 
  188          = boxElement->getAttributes();
 
  189    XMLSize_t attributeCount = attributes->getLength();
 
  191    for (XMLSize_t attribute_index=0;
 
  192         attribute_index<attributeCount; attribute_index++)
 
  194       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  196       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  199       const xercesc::DOMAttr* 
const attribute
 
  200             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
  210       if (attName==
"name") { name = 
GenerateName(attValue); } 
else  
  213         G4Exception(
"G4GDMLReadSolids::BoxRead()", 
"InvalidRead",
 
  226    new G4Box(name,x,y,z);
 
  242    const xercesc::DOMNamedNodeMap* 
const attributes
 
  243          = coneElement->getAttributes();
 
  244    XMLSize_t attributeCount = attributes->getLength();
 
  246    for (XMLSize_t attribute_index=0;
 
  247         attribute_index<attributeCount; attribute_index++)
 
  249       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  251       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  254       const xercesc::DOMAttr* 
const attribute
 
  255             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
  265       if (attName==
"name") { name = 
GenerateName(attValue); } 
else  
  268         G4Exception(
"G4GDMLReadSolids::ConeRead()", 
"InvalidRead",
 
  273           G4Exception(
"G4GDMLReadSolids::ConeRead()", 
"InvalidRead",
 
  276       if (attName==
"rmin1") { rmin1 = 
eval.
Evaluate(attValue); } 
else 
  277       if (attName==
"rmax1") { rmax1 = 
eval.
Evaluate(attValue); } 
else 
  278       if (attName==
"rmin2") { rmin2 = 
eval.
Evaluate(attValue); } 
else 
  279       if (attName==
"rmax2") { rmax2 = 
eval.
Evaluate(attValue); } 
else 
  281       if (attName==
"startphi") { startphi = 
eval.
Evaluate(attValue); } 
else 
  282       if (attName==
"deltaphi") { deltaphi = 
eval.
Evaluate(attValue); }
 
  293    new G4Cons(name,rmin1,rmax1,rmin2,rmax2,z,startphi,deltaphi);
 
  306    const xercesc::DOMNamedNodeMap* 
const attributes
 
  307          = elconeElement->getAttributes();
 
  308    XMLSize_t attributeCount = attributes->getLength();
 
  310    for (XMLSize_t attribute_index=0;
 
  311         attribute_index<attributeCount; attribute_index++)
 
  313       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  315       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  318       const xercesc::DOMAttr* 
const attribute
 
  319             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
  329       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
  332       G4Exception(
"G4GDMLReadSolids::ElconeRead()", 
"InvalidRead",
 
  335       if (attName==
"dx") { dx = 
eval.
Evaluate(attValue); } 
else 
  336       if (attName==
"dy") { dy = 
eval.
Evaluate(attValue); } 
else 
  337       if (attName==
"zmax") { zmax = 
eval.
Evaluate(attValue); } 
else 
  338       if (attName==
"zcut") { zcut = 
eval.
Evaluate(attValue); }
 
  358    const xercesc::DOMNamedNodeMap* 
const attributes
 
  359          = ellipsoidElement->getAttributes();
 
  360    XMLSize_t attributeCount = attributes->getLength();
 
  362    for (XMLSize_t attribute_index=0;
 
  363         attribute_index<attributeCount; attribute_index++)
 
  365       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  367       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  370       const xercesc::DOMAttr* 
const attribute
 
  371             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
  381       if (attName==
"name") { name  = 
GenerateName(attValue); } 
else 
  384       G4Exception(
"G4GDMLReadSolids::EllipsoidRead()", 
"InvalidRead",
 
  387       if (attName==
"ax") { ax = 
eval.
Evaluate(attValue); } 
else 
  388       if (attName==
"by") { by = 
eval.
Evaluate(attValue); } 
else 
  389       if (attName==
"cz") { cz = 
eval.
Evaluate(attValue); } 
else 
  390       if (attName==
"zcut1") { zcut1 = 
eval.
Evaluate(attValue); } 
else 
  391       if (attName==
"zcut2") { zcut2 = 
eval.
Evaluate(attValue); }
 
  412    const xercesc::DOMNamedNodeMap* 
const attributes
 
  413          = eltubeElement->getAttributes();
 
  414    XMLSize_t attributeCount = attributes->getLength();
 
  416    for (XMLSize_t attribute_index=0;
 
  417         attribute_index<attributeCount; attribute_index++)
 
  419       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  421       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  424       const xercesc::DOMAttr* 
const attribute
 
  425             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
  435       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
  438       G4Exception(
"G4GDMLReadSolids::EltubeRead()", 
"InvalidRead",
 
  441       if (attName==
"dx") { dx = 
eval.
Evaluate(attValue); } 
else 
  442       if (attName==
"dy") { dy = 
eval.
Evaluate(attValue); } 
else 
  458    const xercesc::DOMNamedNodeMap* 
const attributes
 
  459          = xtruElement->getAttributes();
 
  460    XMLSize_t attributeCount = attributes->getLength();
 
  462    for (XMLSize_t attribute_index=0;
 
  463         attribute_index<attributeCount; attribute_index++)
 
  465       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  467       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  470       const xercesc::DOMAttr* 
const attribute
 
  471             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
  481       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
  484       G4Exception(
"G4GDMLReadSolids::XtruRead()", 
"InvalidRead",
 
  489    std::vector<G4TwoVector> twoDimVertexList;
 
  490    std::vector<G4ExtrudedSolid::ZSection> sectionList;
 
  492    for (xercesc::DOMNode* iter = xtruElement->getFirstChild();
 
  493         iter != 0; iter = iter->getNextSibling())
 
  495       if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) { 
continue; }
 
  497       const xercesc::DOMElement* 
const child
 
  498             = 
dynamic_cast<xercesc::DOMElement*
>(iter);
 
  507       if (tag==
"twoDimVertex")
 
  510         { sectionList.push_back(
SectionRead(child,lunit)); }
 
  527    const xercesc::DOMNamedNodeMap* 
const attributes
 
  528          = hypeElement->getAttributes();
 
  529    XMLSize_t attributeCount = attributes->getLength();
 
  531    for (XMLSize_t attribute_index=0;
 
  532         attribute_index<attributeCount; attribute_index++)
 
  534       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  536       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  539       const xercesc::DOMAttr* 
const attribute
 
  540             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
  550       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
  553       G4Exception(
"G4GDMLReadSolids::HypeRead()", 
"InvalidRead",
 
  558       G4Exception(
"G4GDMLReadSolids::HypeRead()", 
"InvalidRead",
 
  561       if (attName==
"rmin") { rmin = 
eval.
Evaluate(attValue); } 
else 
  562       if (attName==
"rmax") { rmax = 
eval.
Evaluate(attValue); } 
else 
  563       if (attName==
"inst") { inst = 
eval.
Evaluate(attValue); } 
else 
  564       if (attName==
"outst") { outst = 
eval.
Evaluate(attValue); } 
else 
  574    new G4Hype(name,rmin,rmax,inst,outst,z);
 
  577 #if !defined(G4GEOM_USE_USOLIDS) 
  582    G4Exception(
"G4GDMLReadSolids::MultiUnionNodeRead()",
 
  584                "Installation with USolids primitives required!");
 
  597    const xercesc::DOMNamedNodeMap* 
const attributes
 
  598          = unionNodeElement->getAttributes();
 
  599    XMLSize_t attributeCount = attributes->getLength();
 
  601    for (XMLSize_t attribute_index=0;
 
  602         attribute_index<attributeCount; attribute_index++)
 
  604       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  606       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  609       const xercesc::DOMAttr* 
const attribute
 
  610             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
  613         G4Exception(
"G4GDMLReadSolids::MultiUnionNodeRead()",
 
  623    for (xercesc::DOMNode* iter = unionNodeElement->getFirstChild();
 
  624         iter != 0;iter = iter->getNextSibling())
 
  626       if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)  { 
continue; }
 
  628       const xercesc::DOMElement* 
const child
 
  629             = 
dynamic_cast<xercesc::DOMElement*
>(iter);
 
  632         G4Exception(
"G4GDMLReadSolids::MultiUnionNodeRead()",
 
  639       if (tag==
"rotation") { 
VectorRead(child,rotation); } 
else 
  640       if (tag==
"positionref")
 
  642       if (tag==
"rotationref")
 
  644       if (tag==
"solid") { solid = 
RefRead(child); }
 
  647         G4String error_msg = 
"Unknown tag in MultiUnion structure: " + tag;
 
  648         G4Exception(
"G4GDMLReadSolids::MultiUnionNodeRead()", 
"ReadError",
 
  654    multiUnionSolid->AddNode(*solidNode, transform);
 
  658 #if !defined(G4GEOM_USE_USOLIDS) 
  664                "Installation with USolids primitives required!");
 
  673    const xercesc::DOMNamedNodeMap* 
const attributes
 
  674          = unionElement->getAttributes();
 
  675    XMLSize_t attributeCount = attributes->getLength();
 
  677    for (XMLSize_t attribute_index=0;
 
  678         attribute_index<attributeCount; attribute_index++)
 
  680       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  682       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  685       const xercesc::DOMAttr* 
const attribute
 
  686             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
  701    for (xercesc::DOMNode* iter = unionElement->getFirstChild();
 
  702         iter != 0;iter = iter->getNextSibling())
 
  704       if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)  { 
continue; }
 
  706       const xercesc::DOMElement* 
const child
 
  707             = 
dynamic_cast<xercesc::DOMElement*
>(iter);
 
  719         G4String error_msg = 
"Unknown tag in MultiUnion structure: " + tag;
 
  720         G4Exception(
"G4GDMLReadSolids::MultiUnionRead()", 
"ReadError",
 
  724    multiUnion->Voxelize();
 
  734    const xercesc::DOMNamedNodeMap* 
const attributes
 
  735          = orbElement->getAttributes();
 
  736    XMLSize_t attributeCount = attributes->getLength();
 
  738    for (XMLSize_t attribute_index=0;
 
  739         attribute_index<attributeCount; attribute_index++)
 
  741       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  743       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  746       const xercesc::DOMAttr* 
const attribute
 
  747             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
  757       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
  760       G4Exception(
"G4GDMLReadSolids::OrbRead()", 
"InvalidRead",
 
  783    const xercesc::DOMNamedNodeMap* 
const attributes
 
  784          = paraElement->getAttributes();
 
  785    XMLSize_t attributeCount = attributes->getLength();
 
  787    for (XMLSize_t attribute_index=0;
 
  788         attribute_index<attributeCount; attribute_index++)
 
  790       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  792       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  795       const xercesc::DOMAttr* 
const attribute
 
  796             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
  806       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
  809         G4Exception(
"G4GDMLReadSolids::ParaRead()", 
"InvalidRead",
 
  814           G4Exception(
"G4GDMLReadSolids::ParaRead()", 
"InvalidRead",
 
  820       if (attName==
"alpha") { alpha = 
eval.
Evaluate(attValue); } 
else 
  821       if (attName==
"theta") { theta = 
eval.
Evaluate(attValue); } 
else 
  832    new G4Para(name,x,y,z,alpha,theta,phi);
 
  844    const xercesc::DOMNamedNodeMap* 
const attributes
 
  845          = paraElement->getAttributes();
 
  846    XMLSize_t attributeCount = attributes->getLength();
 
  848    for (XMLSize_t attribute_index=0;
 
  849         attribute_index<attributeCount; attribute_index++)
 
  851       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  853       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  856       const xercesc::DOMAttr* 
const attribute
 
  857             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
  867       if (attName==
"name")  { name = 
GenerateName(attValue); } 
else 
  870       G4Exception(
"G4GDMLReadSolids::ParaboloidRead()", 
"InvalidRead",
 
  873       if (attName==
"rlo")   { rlo =  
eval.
Evaluate(attValue); } 
else 
  874       if (attName==
"rhi")   { rhi = 
eval.
Evaluate(attValue); } 
else 
  894    const xercesc::DOMNamedNodeMap* 
const attributes
 
  895          = polyconeElement->getAttributes();
 
  896    XMLSize_t attributeCount = attributes->getLength();
 
  898    for (XMLSize_t attribute_index=0;
 
  899         attribute_index<attributeCount; attribute_index++)
 
  901       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  903       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  906       const xercesc::DOMAttr* 
const attribute
 
  907             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
  917       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
  920       G4Exception(
"G4GDMLReadSolids::PolyconeRead()", 
"InvalidRead",
 
  925       G4Exception(
"G4GDMLReadSolids::PolyconeRead()", 
"InvalidRead",
 
  928       if (attName==
"startphi") { startphi = 
eval.
Evaluate(attValue); }
else 
  929       if (attName==
"deltaphi") { deltaphi = 
eval.
Evaluate(attValue); }
 
  935    std::vector<zplaneType> zplaneList;
 
  937    for (xercesc::DOMNode* iter = polyconeElement->getFirstChild();
 
  938         iter != 0; iter = iter->getNextSibling())
 
  940       if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) { 
continue; }
 
  942       const xercesc::DOMElement* 
const child
 
  943             = 
dynamic_cast<xercesc::DOMElement*
>(iter);
 
  952       if (tag==
"zplane") { zplaneList.push_back(
ZplaneRead(child)); }
 
  955    G4int numZPlanes = zplaneList.size();
 
  961    for (
G4int i=0; i<numZPlanes; i++)
 
  963       rmin_array[i] = zplaneList[i].rmin*lunit;
 
  964       rmax_array[i] = zplaneList[i].rmax*lunit;
 
  965       z_array[i]    = zplaneList[i].z*lunit;
 
  968    new G4Polycone(name,startphi,deltaphi,numZPlanes,
 
  969                   z_array,rmin_array,rmax_array);
 
  971    delete [] rmin_array;
 
  972    delete [] rmax_array;
 
  985    const xercesc::DOMNamedNodeMap* 
const attributes
 
  986          = polyconeElement->getAttributes();
 
  987    XMLSize_t attributeCount = attributes->getLength();
 
  989    for (XMLSize_t attribute_index=0;
 
  990         attribute_index<attributeCount; attribute_index++)
 
  992       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
  994       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
  997       const xercesc::DOMAttr* 
const attribute
 
  998             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 1001         G4Exception(
"G4GDMLReadSolids::GenericPolyconeRead()",
 
 1008       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 1011       G4Exception(
"G4GDMLReadSolids::GenericPolyconeRead()", 
"InvalidRead",
 
 1016       G4Exception(
"G4GDMLReadSolids::GenericPolyconeRead()", 
"InvalidRead",
 
 1019       if (attName==
"startphi") { startphi = 
eval.
Evaluate(attValue); }
else 
 1020       if (attName==
"deltaphi") { deltaphi = 
eval.
Evaluate(attValue); }
 
 1026    std::vector<rzPointType> rzPointList;
 
 1028    for (xercesc::DOMNode* iter = polyconeElement->getFirstChild();
 
 1029         iter != 0; iter = iter->getNextSibling())
 
 1031       if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) { 
continue; }
 
 1033       const xercesc::DOMElement* 
const child
 
 1034             = 
dynamic_cast<xercesc::DOMElement*
>(iter);
 
 1037         G4Exception(
"G4GDMLReadSolids::GenericPolyconeRead()",
 
 1043       if (tag==
"rzpoint") { rzPointList.push_back(
RZPointRead(child)); }
 
 1046    G4int numRZPoints = rzPointList.size();
 
 1051    for (
G4int i=0; i<numRZPoints; i++)
 
 1053       r_array[i] = rzPointList[i].r*lunit;
 
 1054       z_array[i] = rzPointList[i].z*lunit;
 
 1072    const xercesc::DOMNamedNodeMap* 
const attributes
 
 1073          = polyhedraElement->getAttributes();
 
 1074    XMLSize_t attributeCount = attributes->getLength();
 
 1076    for (XMLSize_t attribute_index=0;
 
 1077         attribute_index<attributeCount; attribute_index++)
 
 1079       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 1081       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 1084       const xercesc::DOMAttr* 
const attribute
 
 1085             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 1095       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 1098       G4Exception(
"G4GDMLReadSolids::PolyhedraRead()", 
"InvalidRead",
 
 1103       G4Exception(
"G4GDMLReadSolids::PolyhedraRead()", 
"InvalidRead",
 
 1106       if (attName==
"startphi") { startphi = 
eval.
Evaluate(attValue); } 
else 
 1107       if (attName==
"deltaphi") { deltaphi = 
eval.
Evaluate(attValue); } 
else 
 1114    std::vector<zplaneType> zplaneList;
 
 1116    for (xercesc::DOMNode* iter = polyhedraElement->getFirstChild();
 
 1117         iter != 0; iter = iter->getNextSibling())
 
 1119       if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)  { 
continue; }
 
 1121       const xercesc::DOMElement* 
const child
 
 1122             = 
dynamic_cast<xercesc::DOMElement*
>(iter);
 
 1131       if (tag==
"zplane") { zplaneList.push_back(
ZplaneRead(child)); }
 
 1134    G4int numZPlanes = zplaneList.size();
 
 1140    for (
G4int i=0; i<numZPlanes; i++)
 
 1142       rmin_array[i] = zplaneList[i].rmin*lunit;
 
 1143       rmax_array[i] = zplaneList[i].rmax*lunit;
 
 1144       z_array[i] = zplaneList[i].z*lunit;
 
 1147    new G4Polyhedra(name,startphi,deltaphi,numsides,numZPlanes,
 
 1148                    z_array,rmin_array,rmax_array);
 
 1150    delete [] rmin_array;
 
 1151    delete [] rmax_array;
 
 1165    const xercesc::DOMNamedNodeMap* 
const attributes
 
 1166          = polyhedraElement->getAttributes();
 
 1167    XMLSize_t attributeCount = attributes->getLength();
 
 1169    for (XMLSize_t attribute_index=0;
 
 1170         attribute_index<attributeCount; attribute_index++)
 
 1172       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 1174       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 1177       const xercesc::DOMAttr* 
const attribute
 
 1178             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 1181         G4Exception(
"G4GDMLReadSolids::GenericPolyhedraRead()",
 
 1188       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 1191       G4Exception(
"G4GDMLReadSolids::GenericPolyhedraRead()", 
"InvalidRead",
 
 1196       G4Exception(
"G4GDMLReadSolids::GenericPolyhedraRead()", 
"InvalidRead",
 
 1199       if (attName==
"startphi") { startphi = 
eval.
Evaluate(attValue); } 
else 
 1200       if (attName==
"deltaphi") { deltaphi = 
eval.
Evaluate(attValue); } 
else 
 1207    std::vector<rzPointType> rzpointList;
 
 1209    for (xercesc::DOMNode* iter = polyhedraElement->getFirstChild();
 
 1210         iter != 0; iter = iter->getNextSibling())
 
 1212       if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)  { 
continue; }
 
 1214       const xercesc::DOMElement* 
const child
 
 1215             = 
dynamic_cast<xercesc::DOMElement*
>(iter);
 
 1218         G4Exception(
"G4GDMLReadSolids::GenericPolyhedraRead()",
 
 1224       if (tag==
"rzpoint") { rzpointList.push_back(
RZPointRead(child)); }
 
 1227    G4int numRZPoints = rzpointList.size();
 
 1232    for (
G4int i=0; i<numRZPoints; i++)
 
 1234       r_array[i] = rzpointList[i].r*lunit;
 
 1235       z_array[i] = rzpointList[i].z*lunit;
 
 1238    new G4Polyhedra(name,startphi,deltaphi,numsides,numRZPoints,
 
 1255    const xercesc::DOMNamedNodeMap* 
const attributes
 
 1256          = quadrangularElement->getAttributes();
 
 1257    XMLSize_t attributeCount = attributes->getLength();
 
 1259    for (XMLSize_t attribute_index=0;
 
 1260         attribute_index<attributeCount; attribute_index++)
 
 1262       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 1264       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 1267       const xercesc::DOMAttr* 
const attribute
 
 1268             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 1271         G4Exception(
"G4GDMLReadSolids::QuadrangularRead()",
 
 1278       if (attName==
"vertex1")
 
 1280       if (attName==
"vertex2")
 
 1282       if (attName==
"vertex3")
 
 1284       if (attName==
"vertex4")
 
 1286       if (attName==
"lunit")
 
 1289         G4Exception(
"G4GDMLReadSolids::QuadrangularRead()", 
"InvalidRead",
 
 1292     if (attName==
"type")
 
 1293         { 
if (attValue==
"RELATIVE") { type = 
RELATIVE; } }
 
 1297                                   vertex3*lunit,vertex4*lunit,type);
 
 1311    const xercesc::DOMNamedNodeMap* 
const attributes
 
 1312          = reflectedSolidElement->getAttributes();
 
 1313    XMLSize_t attributeCount = attributes->getLength();
 
 1315    for (XMLSize_t attribute_index=0;
 
 1316         attribute_index<attributeCount; attribute_index++)
 
 1318       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 1320       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 1323       const xercesc::DOMAttr* 
const attribute
 
 1324             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 1327         G4Exception(
"G4GDMLReadSolids::ReflectedSolidRead()",
 
 1334       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 1337       G4Exception(
"G4GDMLReadSolids::ReflectedSolidRead()", 
"InvalidRead",
 
 1342       G4Exception(
"G4GDMLReadSolids::ReflectedSolidRead()", 
"InvalidRead",
 
 1345       if (attName==
"solid") { solid = 
GenerateName(attValue); } 
else 
 1361    transform = transform*
G4Scale3D(scale.
x(),scale.
y(),scale.
z());
 
 1373    const xercesc::DOMNamedNodeMap* 
const attributes
 
 1374          = scaledSolidElement->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::ScaledSolidRead()",
 
 1396       if (attName==
"name") { name = 
GenerateName(attValue); }
 
 1399    for (xercesc::DOMNode* iter = scaledSolidElement->getFirstChild();
 
 1400         iter != 0; iter = iter->getNextSibling())
 
 1402      if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)  { 
continue; }
 
 1404      const xercesc::DOMElement* 
const child
 
 1405            = 
dynamic_cast<xercesc::DOMElement*
>(iter);
 
 1408        G4Exception(
"G4GDMLReadSolids::ScaledSolidRead()",
 
 1414      if (tag==
"solidref")
 
 1416      else if (tag==
"scale")
 
 1418      else if (tag==
"scaleref")
 
 1422        G4String error_msg = 
"Unknown tag in scaled solid: " + tag;
 
 1423        G4Exception(
"G4GDMLReadSolids::ScaledSolidRead()", 
"ReadError",
 
 1441    const xercesc::DOMNamedNodeMap* 
const attributes
 
 1442          = sectionElement->getAttributes();
 
 1443    XMLSize_t attributeCount = attributes->getLength();
 
 1445    for (XMLSize_t attribute_index=0;
 
 1446         attribute_index<attributeCount; attribute_index++)
 
 1448       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 1450       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 1453       const xercesc::DOMAttr* 
const attribute
 
 1454             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 1464       if (attName==
"zPosition")
 
 1466       if (attName==
"xOffset")
 
 1468       if (attName==
"yOffset")
 
 1470       if (attName==
"scalingFactor")
 
 1490    const xercesc::DOMNamedNodeMap* 
const attributes
 
 1491          = sphereElement->getAttributes();
 
 1492    XMLSize_t attributeCount = attributes->getLength();
 
 1494    for (XMLSize_t attribute_index=0;
 
 1495         attribute_index<attributeCount; attribute_index++)
 
 1497       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 1499       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 1502       const xercesc::DOMAttr* 
const attribute
 
 1503             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 1513       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 1516       G4Exception(
"G4GDMLReadSolids::SphereRead()", 
"InvalidRead",
 
 1521       G4Exception(
"G4GDMLReadSolids::SphereRead()", 
"InvalidRead",
 
 1524       if (attName==
"rmin") { rmin = 
eval.
Evaluate(attValue); } 
else 
 1525       if (attName==
"rmax") { rmax = 
eval.
Evaluate(attValue); } 
else 
 1526       if (attName==
"startphi") { startphi = 
eval.
Evaluate(attValue); } 
else 
 1527       if (attName==
"deltaphi") { deltaphi = 
eval.
Evaluate(attValue); } 
else 
 1528       if (attName==
"starttheta") { starttheta = 
eval.
Evaluate(attValue); } 
else 
 1529       if (attName==
"deltatheta") { deltatheta = 
eval.
Evaluate(attValue); }
 
 1536    starttheta *= aunit;
 
 1537    deltatheta *= aunit;
 
 1539    new G4Sphere(name,rmin,rmax,startphi,deltaphi,starttheta,deltatheta);
 
 1547    const xercesc::DOMNamedNodeMap* 
const attributes
 
 1548          = tessellatedElement->getAttributes();
 
 1549    XMLSize_t attributeCount = attributes->getLength();
 
 1551    for (XMLSize_t attribute_index=0;
 
 1552         attribute_index<attributeCount; attribute_index++)
 
 1554       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 1556       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 1559       const xercesc::DOMAttr* 
const attribute
 
 1560             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 1563         G4Exception(
"G4GDMLReadSolids::TessellatedRead()",
 
 1570       if (attName==
"name")  { name = 
GenerateName(attValue); }
 
 1575    for (xercesc::DOMNode* iter = tessellatedElement->getFirstChild();
 
 1576         iter != 0; iter = iter->getNextSibling())
 
 1578       if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) { 
continue; }
 
 1580       const xercesc::DOMElement* 
const child
 
 1581             = 
dynamic_cast<xercesc::DOMElement*
>(iter);
 
 1584         G4Exception(
"G4GDMLReadSolids::TessellatedRead()",
 
 1590       if (tag==
"triangular")
 
 1592       if (tag==
"quadrangular")
 
 1608    const xercesc::DOMNamedNodeMap* 
const attributes
 
 1609          = tetElement->getAttributes();
 
 1610    XMLSize_t attributeCount = attributes->getLength();
 
 1612    for (XMLSize_t attribute_index=0;
 
 1613         attribute_index<attributeCount;attribute_index++)
 
 1615       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 1617       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 1620       const xercesc::DOMAttr* 
const attribute
 
 1621             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 1631       if (attName==
"name")
 
 1633       if (attName==
"lunit")
 
 1636         G4Exception(
"G4GDMLReadSolids::TetRead()", 
"InvalidRead",
 
 1639       if (attName==
"vertex1")
 
 1641       if (attName==
"vertex2")
 
 1643       if (attName==
"vertex3")
 
 1645       if (attName==
"vertex4")
 
 1649    new G4Tet(name,vertex1*lunit,vertex2*lunit,vertex3*lunit,vertex4*lunit);
 
 1663    const xercesc::DOMNamedNodeMap* 
const attributes
 
 1664          = torusElement->getAttributes();
 
 1665    XMLSize_t attributeCount = attributes->getLength();
 
 1667    for (XMLSize_t attribute_index=0;
 
 1668         attribute_index<attributeCount; attribute_index++)
 
 1670       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 1672       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 1675       const xercesc::DOMAttr* 
const attribute
 
 1676             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 1686       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 1689       G4Exception(
"G4GDMLReadSolids::TorusRead()", 
"InvalidRead",
 
 1694       G4Exception(
"G4GDMLReadSolids::TorusRead()", 
"InvalidRead",
 
 1697       if (attName==
"rmin") { rmin = 
eval.
Evaluate(attValue); } 
else 
 1698       if (attName==
"rmax") { rmax = 
eval.
Evaluate(attValue); } 
else 
 1699       if (attName==
"rtor") { rtor = 
eval.
Evaluate(attValue); } 
else 
 1700       if (attName==
"startphi") { startphi = 
eval.
Evaluate(attValue); } 
else 
 1701       if (attName==
"deltaphi") { deltaphi = 
eval.
Evaluate(attValue); }
 
 1710    new G4Torus(name,rmin,rmax,rtor,startphi,deltaphi);
 
 1719    G4double v1x=0.0, v1y=0.0, v2x=0.0, v2y=0.0, v3x=0.0, v3y=0.0,
 
 1720         v4x=0.0, v4y=0.0, v5x=0.0, v5y=0.0, v6x=0.0, v6y=0.0,
 
 1721         v7x=0.0, v7y=0.0, v8x=0.0, v8y=0.0;
 
 1723    const xercesc::DOMNamedNodeMap* 
const attributes
 
 1724          = gtrapElement->getAttributes();
 
 1725    XMLSize_t attributeCount = attributes->getLength();
 
 1727    for (XMLSize_t attribute_index=0;
 
 1728         attribute_index<attributeCount; attribute_index++)
 
 1730       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 1732       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 1735       const xercesc::DOMAttr* 
const attribute
 
 1736             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 1746       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 1749       G4Exception(
"G4GDMLReadSolids::GenTrapRead()", 
"InvalidRead",
 
 1752       if (attName==
"dz") { dz = 
eval.
Evaluate(attValue); } 
else 
 1753       if (attName==
"v1x") { v1x = 
eval.
Evaluate(attValue); } 
else 
 1754       if (attName==
"v1y") { v1y = 
eval.
Evaluate(attValue); } 
else 
 1755       if (attName==
"v2x") { v2x = 
eval.
Evaluate(attValue); } 
else 
 1756       if (attName==
"v2y") { v2y = 
eval.
Evaluate(attValue); } 
else 
 1757       if (attName==
"v3x") { v3x = 
eval.
Evaluate(attValue); } 
else 
 1758       if (attName==
"v3y") { v3y = 
eval.
Evaluate(attValue); } 
else 
 1759       if (attName==
"v4x") { v4x = 
eval.
Evaluate(attValue); } 
else 
 1760       if (attName==
"v4y") { v4y = 
eval.
Evaluate(attValue); } 
else 
 1761       if (attName==
"v5x") { v5x = 
eval.
Evaluate(attValue); } 
else 
 1762       if (attName==
"v5y") { v5y = 
eval.
Evaluate(attValue); } 
else 
 1763       if (attName==
"v6x") { v6x = 
eval.
Evaluate(attValue); } 
else 
 1764       if (attName==
"v6y") { v6y = 
eval.
Evaluate(attValue); } 
else 
 1765       if (attName==
"v7x") { v7x = 
eval.
Evaluate(attValue); } 
else 
 1766       if (attName==
"v7y") { v7y = 
eval.
Evaluate(attValue); } 
else 
 1767       if (attName==
"v8x") { v8x = 
eval.
Evaluate(attValue); } 
else 
 1772    std::vector<G4TwoVector> vertices;
 
 1773    vertices.push_back(
G4TwoVector(v1x*lunit,v1y*lunit));
 
 1774    vertices.push_back(
G4TwoVector(v2x*lunit,v2y*lunit));
 
 1775    vertices.push_back(
G4TwoVector(v3x*lunit,v3y*lunit));
 
 1776    vertices.push_back(
G4TwoVector(v4x*lunit,v4y*lunit));
 
 1777    vertices.push_back(
G4TwoVector(v5x*lunit,v5y*lunit));
 
 1778    vertices.push_back(
G4TwoVector(v6x*lunit,v6y*lunit));
 
 1779    vertices.push_back(
G4TwoVector(v7x*lunit,v7y*lunit));
 
 1780    vertices.push_back(
G4TwoVector(v8x*lunit,v8y*lunit));
 
 1801    const xercesc::DOMNamedNodeMap* 
const attributes
 
 1802          = trapElement->getAttributes();
 
 1803    XMLSize_t attributeCount = attributes->getLength();
 
 1805    for (XMLSize_t attribute_index=0;
 
 1806         attribute_index<attributeCount; attribute_index++)
 
 1808       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 1810       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 1813       const xercesc::DOMAttr* 
const attribute
 
 1814             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 1824       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 1827       G4Exception(
"G4GDMLReadSolids::TrapRead()", 
"InvalidRead",
 
 1832           G4Exception(
"G4GDMLReadSolids::TrapRead()", 
"InvalidRead",
 
 1835       if (attName==
"z") { z = 
eval.
Evaluate(attValue); } 
else 
 1836       if (attName==
"theta") { theta = 
eval.
Evaluate(attValue); } 
else 
 1837       if (attName==
"phi") { phi = 
eval.
Evaluate(attValue); } 
else 
 1838       if (attName==
"y1") { y1 = 
eval.
Evaluate(attValue); } 
else 
 1839       if (attName==
"x1") { x1 = 
eval.
Evaluate(attValue); } 
else 
 1840       if (attName==
"x2") { x2 = 
eval.
Evaluate(attValue); } 
else 
 1841       if (attName==
"alpha1") { alpha1 = 
eval.
Evaluate(attValue); } 
else 
 1842       if (attName==
"y2") { y2 = 
eval.
Evaluate(attValue); } 
else 
 1843       if (attName==
"x3") { x3 = 
eval.
Evaluate(attValue); } 
else 
 1844       if (attName==
"x4") { x4 = 
eval.
Evaluate(attValue); } 
else 
 1845       if (attName==
"alpha2") { alpha2 = 
eval.
Evaluate(attValue); }
 
 1860    new G4Trap(name,z,theta,phi,y1,x1,x2,alpha1,y2,x3,x4,alpha2);
 
 1873    const xercesc::DOMNamedNodeMap* 
const attributes = trdElement->getAttributes();
 
 1874    XMLSize_t attributeCount = attributes->getLength();
 
 1876    for (XMLSize_t attribute_index=0;
 
 1877         attribute_index<attributeCount; attribute_index++)
 
 1879       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 1881       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 1884       const xercesc::DOMAttr* 
const attribute
 
 1885             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 1895       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 1898       G4Exception(
"G4GDMLReadSolids::TrdRead()", 
"InvalidRead",
 
 1901       if (attName==
"x1") { x1 = 
eval.
Evaluate(attValue); } 
else 
 1902       if (attName==
"x2") { x2 = 
eval.
Evaluate(attValue); } 
else 
 1903       if (attName==
"y1") { y1 = 
eval.
Evaluate(attValue); } 
else 
 1904       if (attName==
"y2") { y2 = 
eval.
Evaluate(attValue); } 
else 
 1914    new G4Trd(name,x1,x2,y1,y2,z);
 
 1926    const xercesc::DOMNamedNodeMap* 
const attributes
 
 1927          = triangularElement->getAttributes();
 
 1928    XMLSize_t attributeCount = attributes->getLength();
 
 1930    for (XMLSize_t attribute_index=0;
 
 1931         attribute_index<attributeCount; attribute_index++)
 
 1933       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 1935       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 1938       const xercesc::DOMAttr* 
const attribute
 
 1939             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 1949       if (attName==
"vertex1")
 
 1951       if (attName==
"vertex2")
 
 1953       if (attName==
"vertex3")
 
 1955       if (attName==
"lunit")
 
 1958         G4Exception(
"G4GDMLReadSolids::TriangularRead()", 
"InvalidRead",
 
 1961       if (attName==
"type")
 
 1962         { 
if (attValue==
"RELATIVE") { type = 
RELATIVE; } }
 
 1979    const xercesc::DOMNamedNodeMap* 
const attributes
 
 1980          = tubeElement->getAttributes();
 
 1981    XMLSize_t attributeCount = attributes->getLength();
 
 1983    for (XMLSize_t attribute_index=0;
 
 1984         attribute_index<attributeCount; attribute_index++)
 
 1986       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 1988       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 1991       const xercesc::DOMAttr* 
const attribute
 
 1992             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 2002       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 2005       G4Exception(
"G4GDMLReadSolids::TubeRead()", 
"InvalidRead",
 
 2010       G4Exception(
"G4GDMLReadSolids::TubeRead()", 
"InvalidRead",
 
 2013       if (attName==
"rmin") { rmin = 
eval.
Evaluate(attValue); } 
else 
 2014       if (attName==
"rmax") { rmax = 
eval.
Evaluate(attValue); } 
else 
 2015       if (attName==
"z") { z = 
eval.
Evaluate(attValue); } 
else 
 2016       if (attName==
"startphi") { startphi = 
eval.
Evaluate(attValue); } 
else 
 2017       if (attName==
"deltaphi") { deltaphi = 
eval.
Evaluate(attValue); }
 
 2026    new G4Tubs(name,rmin,rmax,z,startphi,deltaphi);
 
 2042    const xercesc::DOMNamedNodeMap* 
const attributes
 
 2043          = cuttubeElement->getAttributes();
 
 2044    XMLSize_t attributeCount = attributes->getLength();
 
 2046    for (XMLSize_t attribute_index=0;
 
 2047         attribute_index<attributeCount; attribute_index++)
 
 2049       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 2051       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 2054       const xercesc::DOMAttr* 
const attribute
 
 2055             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 2065       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 2068       G4Exception(
"G4GDMLReadSolids::CutTubeRead()", 
"InvalidRead",
 
 2073         G4Exception(
"G4GDMLReadSolids::CutTubeRead()", 
"InvalidRead",
 
 2076       if (attName==
"rmin") { rmin = 
eval.
Evaluate(attValue); } 
else 
 2077       if (attName==
"rmax") { rmax = 
eval.
Evaluate(attValue); } 
else 
 2078       if (attName==
"z") { z = 
eval.
Evaluate(attValue); } 
else 
 2079       if (attName==
"startphi") { startphi = 
eval.
Evaluate(attValue); } 
else 
 2080       if (attName==
"deltaphi") { deltaphi = 
eval.
Evaluate(attValue); } 
else 
 2096    new G4CutTubs(name,rmin,rmax,z,startphi,deltaphi,lowNorm,highNorm);
 
 2110    const xercesc::DOMNamedNodeMap* 
const attributes
 
 2111          = twistedboxElement->getAttributes();
 
 2112    XMLSize_t attributeCount = attributes->getLength();
 
 2114    for (XMLSize_t attribute_index=0;
 
 2115         attribute_index<attributeCount; attribute_index++)
 
 2117       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 2119       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 2122       const xercesc::DOMAttr* 
const attribute
 
 2123             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 2133       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 2136       G4Exception(
"G4GDMLReadSolids::TwistedBoxRead()", 
"InvalidRead",
 
 2141       G4Exception(
"G4GDMLReadSolids::TwistedboxRead()", 
"InvalidRead",
 
 2144       if (attName==
"PhiTwist") { PhiTwist = 
eval.
Evaluate(attValue); } 
else 
 2145       if (attName==
"x") { x = 
eval.
Evaluate(attValue); } 
else 
 2146       if (attName==
"y") { y = 
eval.
Evaluate(attValue); } 
else 
 2176    const xercesc::DOMNamedNodeMap* 
const attributes
 
 2177          = twistedtrapElement->getAttributes();
 
 2178    XMLSize_t attributeCount = attributes->getLength();
 
 2180    for (XMLSize_t attribute_index=0;
 
 2181         attribute_index<attributeCount; attribute_index++)
 
 2183       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 2185       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 2188       const xercesc::DOMAttr* 
const attribute
 
 2189             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 2192         G4Exception(
"G4GDMLReadSolids::TwistedtrapRead()",
 
 2199       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 2202       G4Exception(
"G4GDMLReadSolids::TwistedtrapRead()", 
"InvalidRead",
 
 2207       G4Exception(
"G4GDMLReadSolids::TwistedtrapRead()", 
"InvalidRead",
 
 2210       if (attName==
"PhiTwist") { PhiTwist = 
eval.
Evaluate(attValue); } 
else 
 2211       if (attName==
"z") { z = 
eval.
Evaluate(attValue); } 
else 
 2212       if (attName==
"Theta") { Theta = 
eval.
Evaluate(attValue); } 
else 
 2213       if (attName==
"Phi") { Phi = 
eval.
Evaluate(attValue); } 
else 
 2214       if (attName==
"y1") { y1 = 
eval.
Evaluate(attValue); } 
else 
 2215       if (attName==
"x1") { x1 = 
eval.
Evaluate(attValue); } 
else 
 2216       if (attName==
"x2") { x2 = 
eval.
Evaluate(attValue); } 
else 
 2217       if (attName==
"y2") { y2 = 
eval.
Evaluate(attValue); } 
else 
 2218       if (attName==
"x3") { x3 = 
eval.
Evaluate(attValue); } 
else 
 2219       if (attName==
"x4") { x4 = 
eval.
Evaluate(attValue); } 
else 
 2220       if (attName==
"Alph") { Alph = 
eval.
Evaluate(attValue); }
 
 2236    new G4TwistedTrap(name,PhiTwist,z,Theta,Phi,y1,x1,x2,y2,x3,x4,Alph);
 
 2252    const xercesc::DOMNamedNodeMap* 
const attributes
 
 2253          = twistedtrdElement->getAttributes();
 
 2254    XMLSize_t attributeCount = attributes->getLength();
 
 2256    for (XMLSize_t attribute_index=0;
 
 2257         attribute_index<attributeCount; attribute_index++)
 
 2259       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 2261       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 2264       const xercesc::DOMAttr* 
const attribute
 
 2265             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 2275       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 2278       G4Exception(
"G4GDMLReadSolids::TwistedtrdRead()", 
"InvalidRead",
 
 2283       G4Exception(
"G4GDMLReadSolids::TwistedtrdRead()", 
"InvalidRead",
 
 2286       if (attName==
"x1") { x1 = 
eval.
Evaluate(attValue); } 
else 
 2287       if (attName==
"x2") { x2 = 
eval.
Evaluate(attValue); } 
else 
 2288       if (attName==
"y1") { y1 = 
eval.
Evaluate(attValue); } 
else 
 2289       if (attName==
"y2") { y2 = 
eval.
Evaluate(attValue); } 
else 
 2290       if (attName==
"z") { z = 
eval.
Evaluate(attValue); } 
else 
 2291       if (attName==
"PhiTwist") { PhiTwist = 
eval.
Evaluate(attValue); }
 
 2316    const xercesc::DOMNamedNodeMap* 
const attributes
 
 2317          = twistedtubsElement->getAttributes();
 
 2318    XMLSize_t attributeCount = attributes->getLength();
 
 2320    for (XMLSize_t attribute_index=0;
 
 2321         attribute_index<attributeCount; attribute_index++)
 
 2323       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 2325       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 2328       const xercesc::DOMAttr* 
const attribute
 
 2329             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 2332         G4Exception(
"G4GDMLReadSolids::TwistedtubsRead()",
 
 2339       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 2342       G4Exception(
"G4GDMLReadSolids::TwistedtubsRead()", 
"InvalidRead",
 
 2347       G4Exception(
"G4GDMLReadSolids::TwistedtubsRead()", 
"InvalidRead",
 
 2350       if (attName==
"twistedangle") { twistedangle=
eval.
Evaluate(attValue); } 
else 
 2351       if (attName==
"endinnerrad")  { endinnerrad=
eval.
Evaluate(attValue);  } 
else 
 2352       if (attName==
"endouterrad")  { endouterrad=
eval.
Evaluate(attValue);  } 
else 
 2353       if (attName==
"zlen") { zlen = 
eval.
Evaluate(attValue); } 
else 
 2357    twistedangle *= aunit;
 
 2358    endinnerrad *= lunit;
 
 2359    endouterrad *= lunit;
 
 2363    new G4TwistedTubs(name,twistedangle,endinnerrad,endouterrad,zlen,phi);
 
 2371    const xercesc::DOMNamedNodeMap* 
const attributes = element->getAttributes();
 
 2372    XMLSize_t attributeCount = attributes->getLength();
 
 2374    for (XMLSize_t attribute_index=0;
 
 2375         attribute_index<attributeCount; attribute_index++)
 
 2377       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 2379       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 2382       const xercesc::DOMAttr* 
const attribute
 
 2383             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 2386         G4Exception(
"G4GDMLReadSolids::TwoDimVertexRead()",
 
 2405    const xercesc::DOMNamedNodeMap* 
const attributes
 
 2406          = zplaneElement->getAttributes();
 
 2407    XMLSize_t attributeCount = attributes->getLength();
 
 2409    for (XMLSize_t attribute_index=0;
 
 2410         attribute_index<attributeCount; attribute_index++)
 
 2412       xercesc::DOMNode* node = attributes->item(attribute_index);
 
 2414       if (node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE) { 
continue; }
 
 2416       const xercesc::DOMAttr* 
const attribute
 
 2417             = 
dynamic_cast<xercesc::DOMAttr*
>(node);   
 
 2437   rzPointType rzpoint = {0.,0.};
 
 2439   const xercesc::DOMNamedNodeMap* 
const attributes
 
 2440          = zplaneElement->getAttributes();
 
 2441    XMLSize_t attributeCount = attributes->getLength();
 
 2443    for (XMLSize_t attribute_index=0;
 
 2444         attribute_index<attributeCount; attribute_index++)
 
 2446       xercesc::DOMNode* node = attributes->item(attribute_index);
 
 2448       if (node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE) { 
continue; }
 
 2450       const xercesc::DOMAttr* 
const attribute
 
 2451             = 
dynamic_cast<xercesc::DOMAttr*
>(node);   
 
 2461       if (attName==
"r") { rzpoint.r = 
eval.
Evaluate(attValue); } 
else 
 2462       if (attName==
"z") { rzpoint.z = 
eval.
Evaluate(attValue); }
 
 2478    const xercesc::DOMNamedNodeMap* 
const attributes
 
 2479          = opticalsurfaceElement->getAttributes();
 
 2480    XMLSize_t attributeCount = attributes->getLength();
 
 2482    for (XMLSize_t attribute_index=0;
 
 2483         attribute_index<attributeCount; attribute_index++)
 
 2485       xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
 
 2487       if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
 
 2490       const xercesc::DOMAttr* 
const attribute
 
 2491             = 
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);   
 
 2494         G4Exception(
"G4GDMLReadSolids::OpticalSurfaceRead()",
 
 2501       if (attName==
"name") { name = 
GenerateName(attValue); } 
else 
 2502       if (attName==
"model") { smodel = attValue; } 
else 
 2503       if (attName==
"finish") { sfinish = attValue; } 
else 
 2504       if (attName==
"type") { stype = attValue; } 
else 
 2505       if (attName==
"value") { value = 
eval.
Evaluate(attValue); }
 
 2512    if ((smodel==
"glisur") || (smodel==
"0")) { model = 
glisur; } 
else 
 2513    if ((smodel==
"unified") || (smodel==
"1")) { model = 
unified; } 
else 
 2514    if ((smodel==
"LUT") || (smodel==
"2")) { model = 
LUT; }
 
 2517    if ((sfinish==
"polished") || (sfinish==
"0"))
 
 2519    if ((sfinish==
"polishedfrontpainted") || (sfinish==
"1"))
 
 2521    if ((sfinish==
"polishedbackpainted") || (sfinish==
"2"))
 
 2523    if ((sfinish==
"ground") || (sfinish==
"3"))
 
 2524       { finish = 
ground; } 
else 
 2525    if ((sfinish==
"groundfrontpainted") || (sfinish==
"4"))
 
 2527    if ((sfinish==
"groundbackpainted") || (sfinish==
"5"))
 
 2529    if ((sfinish==
"polishedlumirrorair") || (sfinish==
"6"))
 
 2531    if ((sfinish==
"polishedlumirrorglue") || (sfinish==
"7"))
 
 2533    if ((sfinish==
"polishedair") || (sfinish==
"8"))
 
 2535    if ((sfinish==
"polishedteflonair") || (sfinish==
"9"))
 
 2537    if ((sfinish==
"polishedtioair") || (sfinish==
"10"))
 
 2539    if ((sfinish==
"polishedtyvekair") || (sfinish==
"11"))
 
 2541    if ((sfinish==
"polishedvm2000air") || (sfinish==
"12"))
 
 2543    if ((sfinish==
"polishedvm2000glue") || (sfinish==
"13"))
 
 2545    if ((sfinish==
"etchedlumirrorair") || (sfinish==
"14"))
 
 2547    if ((sfinish==
"etchedlumirrorglue") || (sfinish==
"15"))
 
 2549    if ((sfinish==
"etchedair") || (sfinish==
"16"))
 
 2551    if ((sfinish==
"etchedteflonair") || (sfinish==
"17"))
 
 2553    if ((sfinish==
"etchedtioair") || (sfinish==
"18"))
 
 2555    if ((sfinish==
"etchedtyvekair") || (sfinish==
"19"))
 
 2557    if ((sfinish==
"etchedvm2000air") || (sfinish==
"20"))
 
 2559    if ((sfinish==
"etchedvm2000glue") || (sfinish==
"21"))
 
 2561    if ((sfinish==
"groundlumirrorair") || (sfinish==
"22"))
 
 2563    if ((sfinish==
"groundlumirrorglue") || (sfinish==
"23"))
 
 2565    if ((sfinish==
"groundair") || (sfinish==
"24"))
 
 2567    if ((sfinish==
"groundteflonair") || (sfinish==
"25"))
 
 2569    if ((sfinish==
"groundtioair") || (sfinish==
"26"))
 
 2571    if ((sfinish==
"groundtyvekair") || (sfinish==
"27"))
 
 2573    if ((sfinish==
"groundvm2000air") || (sfinish==
"28"))
 
 2577    if ((stype==
"dielectric_metal") || (stype==
"0"))
 
 2579    if ((stype==
"dielectric_dielectric") || (stype==
"1"))
 
 2581    if ((stype==
"dielectric_LUT") || (stype==
"2"))
 
 2583    if ((stype==
"dielectric_dichroic") || (stype==
"3"))
 
 2585    if ((stype==
"firsov") || (stype==
"4"))
 
 2587    else { type = 
x_ray; }
 
 2596    for (xercesc::DOMNode* iter = solidsElement->getFirstChild();
 
 2597         iter != 0; iter = iter->getNextSibling())
 
 2599       if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)  { 
continue; }
 
 2601       const xercesc::DOMElement* 
const child
 
 2602             = 
dynamic_cast<xercesc::DOMElement*
>(iter);
 
 2610       if (tag==
"define") { 
DefineRead(child);  }  
else  
 2611       if (tag==
"box")    { 
BoxRead(child); } 
else 
 2612       if (tag==
"cone")   { 
ConeRead(child); } 
else 
 2613       if (tag==
"elcone") { 
ElconeRead(child); } 
else 
 2615       if (tag==
"eltube") { 
EltubeRead(child); } 
else 
 2616       if (tag==
"xtru") { 
XtruRead(child); } 
else 
 2617       if (tag==
"hype") { 
HypeRead(child); } 
else 
 2618       if (tag==
"intersection") { 
BooleanRead(child,INTERSECTION); } 
else 
 2620       if (tag==
"orb") { 
OrbRead(child); } 
else 
 2621       if (tag==
"para") { 
ParaRead(child); } 
else 
 2629       if (tag==
"sphere") { 
SphereRead(child); } 
else 
 2630       if (tag==
"subtraction") { 
BooleanRead(child,SUBTRACTION); } 
else 
 2632       if (tag==
"tet") { 
TetRead(child); } 
else 
 2633       if (tag==
"torus") { 
TorusRead(child); } 
else 
 2635       if (tag==
"trap") { 
TrapRead(child); } 
else 
 2636       if (tag==
"trd") { 
TrdRead(child); } 
else 
 2637       if (tag==
"tube") { 
TubeRead(child); } 
else 
 2643       if (tag==
"union") { 
BooleanRead(child,UNION); } 
else 
 2648         G4String error_msg = 
"Unknown tag in solids: " + tag;
 
 2649         G4Exception(
"G4GDMLReadSolids::SolidsRead()", 
"ReadError",
 
 2661      G4String error_msg = 
"Referenced solid '" + ref + 
"' was not found!";
 
 2662      G4Exception(
"G4GDMLReadSolids::GetSolid()", 
"ReadError",
 
 2674    const size_t surfaceCount = surfaceList->size();
 
 2676    for (
size_t i=0; i<surfaceCount; i++)
 
 2678       if ((*surfaceList)[i]->GetName() == ref)  { 
return (*surfaceList)[i]; }
 
 2681    G4String error_msg = 
"Referenced optical surface '" + ref + 
"' was not found!";
 
 2682    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)
 
void ScaledSolidRead(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)
 
G4ThreeVector GetScale(const G4String &)
 
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)
 
const XML_Char int const XML_Char * value
 
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)
 
static G4String GetCategory(const G4String &)
 
std::vector< G4SurfaceProperty * > G4SurfacePropertyTable
 
G4String GenerateName(const G4String &name, G4bool strip=false)
 
void TessellatedRead(const xercesc::DOMElement *const)
 
void PolyhedraRead(const xercesc::DOMElement *const)
 
void XtruRead(const xercesc::DOMElement *const)
 
void CutTubeRead(const xercesc::DOMElement *const)
 
void VectorRead(const xercesc::DOMElement *const, G4ThreeVector &)
 
void ParaboloidRead(const xercesc::DOMElement *const)
 
CLHEP::Hep2Vector G4TwoVector
 
void GenericPolyconeRead(const xercesc::DOMElement *const)
 
void ElconeRead(const xercesc::DOMElement *const)
 
G4ThreeVector GetRotation(const G4String &)
 
G4RotationMatrix GetRotationMatrix(const G4ThreeVector &)
 
void ParaRead(const xercesc::DOMElement *const)
 
void HypeRead(const xercesc::DOMElement *const)
 
static const G4double alpha
 
void PolyconeRead(const xercesc::DOMElement *const)
 
G4QuadrangularFacet * QuadrangularRead(const xercesc::DOMElement *const)
 
void MultiUnionNodeRead(const xercesc::DOMElement *const, G4MultiUnion *const)
 
const XML_Char XML_Content * model
 
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 &)