33 #include "G4UnitsTable.hh"
34 #include "G4LogicalVolume.hh"
35 #include "G4VPhysicalVolume.hh"
36 #include "G4PVPlacement.hh"
39 #include "G4AssemblyVolume.hh"
40 #include "G4ReflectionFactory.hh"
41 #include "G4PVDivisionFactory.hh"
42 #include "G4LogicalBorderSurface.hh"
43 #include "G4LogicalSkinSurface.hh"
44 #include "G4VisAttributes.hh"
48 : G4GDMLReadParamvol()
59 const xercesc::DOMElement*
const bordersurfaceElement)
62 G4VPhysicalVolume* pv1 =
nullptr;
63 G4VPhysicalVolume* pv2 =
nullptr;
64 G4SurfaceProperty* prop =
nullptr;
67 const xercesc::DOMNamedNodeMap*
const attributes =
68 bordersurfaceElement->getAttributes();
69 XMLSize_t attributeCount = attributes->getLength();
71 for(XMLSize_t attribute_index = 0; attribute_index < attributeCount;
74 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
76 if(attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
81 const xercesc::DOMAttr*
const attribute =
82 dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
83 if(attribute ==
nullptr)
85 G4Exception(
"G4GDMLReadStructure::BorderSurfaceRead()",
"InvalidRead",
86 FatalException,
"No attribute found!");
89 const G4String attName = Transcode(attribute->getName());
90 const G4String attValue = Transcode(attribute->getValue());
94 name = GenerateName(attValue);
96 else if(attName ==
"surfaceproperty")
98 prop = GetSurfaceProperty(GenerateName(attValue));
102 for(xercesc::DOMNode* iter = bordersurfaceElement->getFirstChild();
103 iter !=
nullptr; iter = iter->getNextSibling())
105 if(iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)
110 const xercesc::DOMElement*
const child =
111 dynamic_cast<xercesc::DOMElement*
>(iter);
114 G4Exception(
"G4GDMLReadStructure::BorderSurfaceRead()",
"InvalidRead",
115 FatalException,
"No child found!");
118 const G4String
tag = Transcode(child->getTagName());
120 if(tag !=
"physvolref")
127 pv1 =
GetPhysvol(GenerateName(RefRead(child)));
132 pv2 =
GetPhysvol(GenerateName(RefRead(child)));
139 new G4LogicalBorderSurface(Strip(name), pv1, pv2, prop);
144 const xercesc::DOMElement*
const divisionvolElement)
148 G4double
width = 0.0;
151 EAxis axis = kUndefined;
152 G4LogicalVolume* logvol =
nullptr;
154 const xercesc::DOMNamedNodeMap*
const attributes =
155 divisionvolElement->getAttributes();
156 XMLSize_t attributeCount = attributes->getLength();
159 for(XMLSize_t attribute_index = 0; attribute_index < attributeCount;
162 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
164 if(attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
169 const xercesc::DOMAttr*
const attribute =
170 dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
171 if(attribute ==
nullptr)
173 G4Exception(
"G4GDMLReadStructure::DivisionvolRead()",
"InvalidRead",
174 FatalException,
"No attribute found!");
177 const G4String attName = Transcode(attribute->getName());
178 const G4String attValue = Transcode(attribute->getValue());
180 if(attName ==
"name")
184 else if(attName ==
"unit")
186 unit = G4UnitDefinition::GetValueOf(attValue);
187 unitname = G4UnitDefinition::GetCategory(attValue);
189 else if(attName ==
"width")
191 width = eval.Evaluate(attValue);
193 else if(attName ==
"offset")
195 offset = eval.Evaluate(attValue);
197 else if(attName ==
"number")
199 number = eval.EvaluateInteger(attValue);
201 else if(attName ==
"axis")
203 if(attValue ==
"kXAxis")
207 else if(attValue ==
"kYAxis")
211 else if(attValue ==
"kZAxis")
215 else if(attValue ==
"kRho")
219 else if(attValue ==
"kPhi")
226 if(((axis == kXAxis || axis == kYAxis || axis == kZAxis) &&
227 unitname !=
"Length") ||
228 ((axis == kRho || axis ==
kPhi) && unitname !=
"Angle"))
230 G4Exception(
"G4GDMLReadStructure::DivisionvolRead()",
"InvalidRead",
231 FatalException,
"Invalid unit!");
237 for(xercesc::DOMNode* iter = divisionvolElement->getFirstChild();
238 iter !=
nullptr; iter = iter->getNextSibling())
240 if(iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)
245 const xercesc::DOMElement*
const child =
246 dynamic_cast<xercesc::DOMElement*
>(iter);
249 G4Exception(
"G4GDMLReadStructure::DivisionvolRead()",
"InvalidRead",
250 FatalException,
"No child found!");
253 const G4String
tag = Transcode(child->getTagName());
255 if(tag ==
"volumeref")
257 logvol =
GetVolume(GenerateName(RefRead(child)));
261 if(logvol ==
nullptr)
266 G4PVDivisionFactory::GetInstance();
267 G4PhysicalVolumesPair pair;
269 G4String pv_name = logvol->GetName() +
"_div";
270 if((number != 0) && (width == 0.0))
272 pair = G4ReflectionFactory::Instance()->Divide(
275 else if((number == 0) && (width != 0.0))
277 pair = G4ReflectionFactory::Instance()->Divide(
282 pair = G4ReflectionFactory::Instance()->Divide(
286 if(pair.first !=
nullptr)
288 GeneratePhysvolName(name, pair.first);
290 if(pair.second !=
nullptr)
292 GeneratePhysvolName(name, pair.second);
298 const xercesc::DOMElement*
const fileElement)
303 const xercesc::DOMNamedNodeMap*
const attributes =
304 fileElement->getAttributes();
305 XMLSize_t attributeCount = attributes->getLength();
307 for(XMLSize_t attribute_index = 0; attribute_index < attributeCount;
310 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
312 if(attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
317 const xercesc::DOMAttr*
const attribute =
318 dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
319 if(attribute ==
nullptr)
321 G4Exception(
"G4GDMLReadStructure::FileRead()",
"InvalidRead",
322 FatalException,
"No attribute found!");
325 const G4String attName = Transcode(attribute->getName());
326 const G4String attValue = Transcode(attribute->getValue());
328 if(attName ==
"name")
332 else if(attName ==
"volname")
338 const G4bool isModule =
true;
340 structure.Read(name, validate, isModule);
347 for(
auto pos = aux->cbegin();
pos != aux->cend(); ++
pos)
357 return structure.
GetVolume(structure.GetSetup(
"Default"));
361 return structure.
GetVolume(structure.GenerateName(volname));
367 const xercesc::DOMElement*
const physvolElement, G4AssemblyVolume* pAssembly)
370 G4LogicalVolume* logvol =
nullptr;
371 G4AssemblyVolume* assembly =
nullptr;
372 G4ThreeVector
position(0.0, 0.0, 0.0);
373 G4ThreeVector rotation(0.0, 0.0, 0.0);
374 G4ThreeVector scale(1.0, 1.0, 1.0);
375 G4int copynumber = 0;
377 const xercesc::DOMNamedNodeMap*
const attributes =
378 physvolElement->getAttributes();
379 XMLSize_t attributeCount = attributes->getLength();
381 for(XMLSize_t attribute_index = 0; attribute_index < attributeCount;
384 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
386 if(attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
391 const xercesc::DOMAttr*
const attribute =
392 dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
393 if(attribute ==
nullptr)
395 G4Exception(
"G4GDMLReadStructure::PhysvolRead()",
"InvalidRead",
396 FatalException,
"No attribute found!");
399 const G4String attName = Transcode(attribute->getName());
400 const G4String attValue = Transcode(attribute->getValue());
402 if(attName ==
"name")
406 if(attName ==
"copynumber")
408 copynumber = eval.EvaluateInteger(attValue);
412 for(xercesc::DOMNode* iter = physvolElement->getFirstChild(); iter !=
nullptr;
413 iter = iter->getNextSibling())
415 if(iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)
420 const xercesc::DOMElement*
const child =
421 dynamic_cast<xercesc::DOMElement*
>(iter);
424 G4Exception(
"G4GDMLReadStructure::PhysvolRead()",
"InvalidRead",
425 FatalException,
"No child found!");
428 const G4String
tag = Transcode(child->getTagName());
430 if(tag ==
"volumeref")
432 const G4String& child_name = GenerateName(RefRead(child));
434 if(assembly ==
nullptr)
439 else if(tag ==
"file")
443 else if(tag ==
"position")
445 VectorRead(child, position);
447 else if(tag ==
"rotation")
449 VectorRead(child, rotation);
451 else if(tag ==
"scale")
453 VectorRead(child, scale);
455 else if(tag ==
"positionref")
457 position = GetPosition(GenerateName(RefRead(child)));
459 else if(tag ==
"rotationref")
461 rotation = GetRotation(GenerateName(RefRead(child)));
463 else if(tag ==
"scaleref")
465 scale = GetScale(GenerateName(RefRead(child)));
469 G4String error_msg =
"Unknown tag in physvol: " +
tag;
470 G4Exception(
"G4GDMLReadStructure::PhysvolRead()",
"ReadError",
471 FatalException, error_msg);
476 G4Transform3D
transform(GetRotationMatrix(rotation).inverse(), position);
477 transform = transform * G4Scale3D(scale.x(), scale.y(), scale.z());
479 if(pAssembly !=
nullptr)
481 if(assembly !=
nullptr)
483 pAssembly->AddPlacedAssembly(assembly, transform);
485 if(logvol ==
nullptr)
489 pAssembly->AddPlacedVolume(logvol, transform);
493 if(assembly !=
nullptr)
499 if(logvol ==
nullptr)
503 G4String pv_name = logvol->GetName() +
"_PV";
504 G4PhysicalVolumesPair pair = G4ReflectionFactory::Instance()->Place(
505 transform, pv_name, logvol,
pMotherLogical,
false, copynumber, check);
507 if(pair.first !=
nullptr)
509 GeneratePhysvolName(name, pair.first);
511 if(pair.second !=
nullptr)
513 GeneratePhysvolName(name, pair.second);
521 const xercesc::DOMElement*
const replicavolElement, G4int number)
523 G4LogicalVolume* logvol =
nullptr;
524 for(xercesc::DOMNode* iter = replicavolElement->getFirstChild();
525 iter !=
nullptr; iter = iter->getNextSibling())
527 if(iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)
532 const xercesc::DOMElement*
const child =
533 dynamic_cast<xercesc::DOMElement*
>(iter);
536 G4Exception(
"G4GDMLReadStructure::ReplicavolRead()",
"InvalidRead",
537 FatalException,
"No child found!");
540 const G4String
tag = Transcode(child->getTagName());
542 if(tag ==
"volumeref")
544 logvol =
GetVolume(GenerateName(RefRead(child)));
546 else if(tag ==
"replicate_along_axis")
555 G4String error_msg =
"Unknown tag in ReplicavolRead: " +
tag;
556 G4Exception(
"G4GDMLReadStructure::ReplicavolRead()",
"ReadError",
557 FatalException, error_msg);
564 const xercesc::DOMElement*
const replicaElement, G4LogicalVolume* logvol,
567 G4double
width = 0.0;
569 G4ThreeVector
position(0.0, 0.0, 0.0);
570 G4ThreeVector rotation(0.0, 0.0, 0.0);
571 EAxis axis = kUndefined;
574 for(xercesc::DOMNode* iter = replicaElement->getFirstChild(); iter !=
nullptr;
575 iter = iter->getNextSibling())
577 if(iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)
582 const xercesc::DOMElement*
const child =
583 dynamic_cast<xercesc::DOMElement*
>(iter);
586 G4Exception(
"G4GDMLReadStructure::ReplicaRead()",
"InvalidRead",
587 FatalException,
"No child found!");
590 const G4String
tag = Transcode(child->getTagName());
592 if(tag ==
"position")
594 VectorRead(child, position);
596 else if(tag ==
"rotation")
598 VectorRead(child, rotation);
600 else if(tag ==
"positionref")
602 position = GetPosition(GenerateName(RefRead(child)));
604 else if(tag ==
"rotationref")
606 rotation = GetRotation(GenerateName(RefRead(child)));
608 else if(tag ==
"direction")
612 else if(tag ==
"width")
616 else if(tag ==
"offset")
622 G4String error_msg =
"Unknown tag in ReplicaRead: " +
tag;
623 G4Exception(
"G4GDMLReadStructure::ReplicaRead()",
"ReadError",
624 FatalException, error_msg);
628 G4String pv_name = logvol->GetName() +
"_PV";
629 G4PhysicalVolumesPair pair = G4ReflectionFactory::Instance()->Replicate(
632 if(pair.first !=
nullptr)
634 GeneratePhysvolName(name, pair.first);
636 if(pair.second !=
nullptr)
638 GeneratePhysvolName(name, pair.second);
644 const xercesc::DOMElement*
const axisElement)
646 EAxis axis = kUndefined;
648 const xercesc::DOMNamedNodeMap*
const attributes =
649 axisElement->getAttributes();
650 XMLSize_t attributeCount = attributes->getLength();
652 for(XMLSize_t attribute_index = 0; attribute_index < attributeCount;
655 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
657 if(attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
662 const xercesc::DOMAttr*
const attribute =
663 dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
664 if(attribute ==
nullptr)
666 G4Exception(
"G4GDMLReadStructure::AxisRead()",
"InvalidRead",
667 FatalException,
"No attribute found!");
670 const G4String attName = Transcode(attribute->getName());
671 const G4String attValue = Transcode(attribute->getValue());
674 if(eval.Evaluate(attValue) == 1.)
679 else if(attName ==
"y")
681 if(eval.Evaluate(attValue) == 1.)
686 else if(attName ==
"z")
688 if(eval.Evaluate(attValue) == 1.)
693 else if(attName ==
"rho")
695 if(eval.Evaluate(attValue) == 1.)
700 else if(attName ==
"phi")
702 if(eval.Evaluate(attValue) == 1.)
714 const xercesc::DOMElement*
const readElement)
716 G4double
value = 0.0;
718 const xercesc::DOMNamedNodeMap*
const attributes =
719 readElement->getAttributes();
720 XMLSize_t attributeCount = attributes->getLength();
722 for(XMLSize_t attribute_index = 0; attribute_index < attributeCount;
725 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
727 if(attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
731 const xercesc::DOMAttr*
const attribute =
732 dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
733 if(attribute ==
nullptr)
735 G4Exception(
"G4GDMLReadStructure::QuantityRead()",
"InvalidRead",
736 FatalException,
"No attribute found!");
739 const G4String attName = Transcode(attribute->getName());
740 const G4String attValue = Transcode(attribute->getValue());
742 if(attName ==
"unit")
744 unit = G4UnitDefinition::GetValueOf(attValue);
745 if(G4UnitDefinition::GetCategory(attValue) !=
"Length" &&
746 G4UnitDefinition::GetCategory(attValue) !=
"Angle")
748 G4Exception(
"G4GDMLReadStructure::QuantityRead()",
"InvalidRead",
750 "Invalid unit for length or angle (width, offset)!");
753 else if(attName ==
"value")
755 value = eval.Evaluate(attValue);
764 const xercesc::DOMElement*
const volumeElement)
766 G4VSolid* solidPtr =
nullptr;
767 G4Material* materialPtr =
nullptr;
768 G4GDMLAuxListType auxList;
770 XMLCh* name_attr = xercesc::XMLString::transcode(
"name");
771 const G4String
name = Transcode(volumeElement->getAttribute(name_attr));
774 for(xercesc::DOMNode* iter = volumeElement->getFirstChild(); iter !=
nullptr;
775 iter = iter->getNextSibling())
777 if(iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)
782 const xercesc::DOMElement*
const child =
783 dynamic_cast<xercesc::DOMElement*
>(iter);
786 G4Exception(
"G4GDMLReadStructure::VolumeRead()",
"InvalidRead",
787 FatalException,
"No child found!");
790 const G4String
tag = Transcode(child->getTagName());
792 if(tag ==
"auxiliary")
794 auxList.push_back(AuxiliaryRead(child));
796 else if(tag ==
"materialref")
798 materialPtr = GetMaterial(GenerateName(RefRead(child),
true));
800 else if(tag ==
"solidref")
802 solidPtr = GetSolid(GenerateName(RefRead(child)));
807 new G4LogicalVolume(solidPtr, materialPtr, GenerateName(name), 0, 0, 0);
819 const xercesc::DOMElement*
const assemblyElement)
821 XMLCh* name_attr = xercesc::XMLString::transcode(
"name");
822 const G4String
name = Transcode(assemblyElement->getAttribute(name_attr));
825 G4AssemblyVolume* pAssembly =
new G4AssemblyVolume();
826 auto aName = GenerateName(name);
833 assemblyMap.insert(std::make_pair(aName, pAssembly));
836 for(xercesc::DOMNode* iter = assemblyElement->getFirstChild();
837 iter !=
nullptr; iter = iter->getNextSibling())
839 if(iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)
843 const xercesc::DOMElement*
const child =
844 dynamic_cast<xercesc::DOMElement*
>(iter);
847 G4Exception(
"G4GDMLReadStructure::AssemblyRead()",
"InvalidRead",
848 FatalException,
"No child found!");
851 const G4String
tag = Transcode(child->getTagName());
859 G4cout <<
"Unsupported GDML tag '" << tag
860 <<
"' for Geant4 assembly structure !" << G4endl;
867 const xercesc::DOMElement*
const skinsurfaceElement)
870 G4LogicalVolume* logvol =
nullptr;
871 G4SurfaceProperty* prop =
nullptr;
873 const xercesc::DOMNamedNodeMap*
const attributes =
874 skinsurfaceElement->getAttributes();
875 XMLSize_t attributeCount = attributes->getLength();
877 for(XMLSize_t attribute_index = 0; attribute_index < attributeCount;
880 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
882 if(attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
887 const xercesc::DOMAttr*
const attribute =
888 dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
889 if(attribute ==
nullptr)
891 G4Exception(
"G4GDMLReadStructure::SkinsurfaceRead()",
"InvalidRead",
892 FatalException,
"No attribute found!");
895 const G4String attName = Transcode(attribute->getName());
896 const G4String attValue = Transcode(attribute->getValue());
898 if(attName ==
"name")
900 name = GenerateName(attValue);
902 else if(attName ==
"surfaceproperty")
904 prop = GetSurfaceProperty(GenerateName(attValue));
908 for(xercesc::DOMNode* iter = skinsurfaceElement->getFirstChild();
909 iter !=
nullptr; iter = iter->getNextSibling())
911 if(iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)
916 const xercesc::DOMElement*
const child =
917 dynamic_cast<xercesc::DOMElement*
>(iter);
920 G4Exception(
"G4GDMLReadStructure::SkinsurfaceRead()",
"InvalidRead",
921 FatalException,
"No child found!");
924 const G4String
tag = Transcode(child->getTagName());
926 if(tag ==
"volumeref")
928 logvol =
GetVolume(GenerateName(RefRead(child)));
932 G4String error_msg =
"Unknown tag in skinsurface: " +
tag;
933 G4Exception(
"G4GDMLReadStructure::SkinsurfaceRead()",
"ReadError",
934 FatalException, error_msg);
938 new G4LogicalSkinSurface(Strip(name), logvol, prop);
943 const xercesc::DOMElement*
const volumeElement)
945 for(xercesc::DOMNode* iter = volumeElement->getFirstChild(); iter !=
nullptr;
946 iter = iter->getNextSibling())
948 if(iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)
953 const xercesc::DOMElement*
const child =
954 dynamic_cast<xercesc::DOMElement*
>(iter);
957 G4Exception(
"G4GDMLReadStructure::Volume_contentRead()",
"InvalidRead",
958 FatalException,
"No child found!");
961 const G4String
tag = Transcode(child->getTagName());
963 if((tag ==
"auxiliary") || (tag ==
"materialref") || (tag ==
"solidref"))
967 else if(tag ==
"paramvol")
971 else if(tag ==
"physvol")
975 else if(tag ==
"replicavol")
978 const xercesc::DOMNamedNodeMap*
const attributes = child->getAttributes();
979 XMLSize_t attributeCount = attributes->getLength();
980 for(XMLSize_t attribute_index = 0; attribute_index < attributeCount;
983 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
984 if(attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
988 const xercesc::DOMAttr*
const attribute =
989 dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
990 if(attribute ==
nullptr)
992 G4Exception(
"G4GDMLReadStructure::Volume_contentRead()",
993 "InvalidRead", FatalException,
"No attribute found!");
996 const G4String attName = Transcode(attribute->getName());
997 const G4String attValue = Transcode(attribute->getValue());
998 if(attName ==
"number")
1000 number = eval.EvaluateInteger(attValue);
1005 else if(tag ==
"divisionvol")
1009 else if(tag ==
"loop")
1011 LoopRead(child, &G4GDMLRead::Volume_contentRead);
1015 G4cout <<
"Treating unknown GDML tag in volume '" << tag
1016 <<
"' as GDML extension..." << G4endl;
1023 const xercesc::DOMElement*
const structureElement)
1026 G4cout <<
"G4GDML: Reading structure..." << G4endl;
1028 for(xercesc::DOMNode* iter = structureElement->getFirstChild();
1029 iter !=
nullptr; iter = iter->getNextSibling())
1031 if(iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE)
1036 const xercesc::DOMElement*
const child =
1037 dynamic_cast<xercesc::DOMElement*
>(iter);
1038 if(child ==
nullptr)
1040 G4Exception(
"G4GDMLReadStructure::StructureRead()",
"InvalidRead",
1041 FatalException,
"No child found!");
1044 const G4String
tag = Transcode(child->getTagName());
1046 if(tag ==
"bordersurface")
1050 else if(tag ==
"skinsurface")
1054 else if(tag ==
"volume")
1058 else if(tag ==
"assembly")
1062 else if(tag ==
"loop")
1064 LoopRead(child, &G4GDMLRead::StructureRead);
1068 G4String error_msg =
"Unknown tag in structure: " +
tag;
1069 G4Exception(
"G4GDMLReadStructure::StructureRead()",
"ReadError",
1070 FatalException, error_msg);
1078 G4VPhysicalVolume* physvolPtr
1081 if(physvolPtr ==
nullptr)
1083 G4String error_msg =
"Referenced physvol '" + ref +
"' was not found!";
1084 G4Exception(
"G4GDMLReadStructure::GetPhysvol()",
"ReadError",
1085 FatalException, error_msg);
1094 G4LogicalVolume* volumePtr
1097 if(volumePtr ==
nullptr)
1099 G4String error_msg =
"Referenced volume '" + ref +
"' was not found!";
1100 G4Exception(
"G4GDMLReadStructure::GetVolume()",
"ReadError", FatalException,
1120 G4LogicalVolume* logvol)
const
1129 return G4GDMLAuxListType();
1135 const G4String& setupName)
1137 G4String sname = GetSetup(setupName);
1144 volume->SetVisAttributes(G4VisAttributes::GetInvisible());
1146 G4VPhysicalVolume* pvWorld =
nullptr;
1154 pvWorld =
new G4PVPlacement(
nullptr, G4ThreeVector(0, 0, 0), volume,
1155 volume->GetName() +
"_PV", 0, 0, 0);