File indexing completed on 2025-01-18 09:58:19
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 #ifndef G4GDMLREADSTRUCTURE_HH
0035 #define G4GDMLREADSTRUCTURE_HH 1
0036
0037 #include "G4Types.hh"
0038 #include "geomdefs.hh"
0039
0040 #include <vector>
0041 #include <map>
0042 #include "G4GDMLReadParamvol.hh"
0043
0044 class G4AssemblyVolume;
0045 class G4LogicalVolume;
0046 class G4VPhysicalVolume;
0047
0048 using G4GDMLAuxMapType = std::map<G4LogicalVolume*, G4GDMLAuxListType>;
0049 using G4GDMLAssemblyMapType = std::map<G4String, G4AssemblyVolume*>;
0050
0051 class G4GDMLReadStructure : public G4GDMLReadParamvol
0052 {
0053 public:
0054
0055 G4GDMLReadStructure();
0056 virtual ~G4GDMLReadStructure();
0057
0058 G4VPhysicalVolume* GetPhysvol(const G4String&) const;
0059 G4LogicalVolume* GetVolume(const G4String&) const;
0060 G4AssemblyVolume* GetAssembly(const G4String&) const;
0061 G4GDMLAuxListType GetVolumeAuxiliaryInformation(G4LogicalVolume*) const;
0062 G4VPhysicalVolume* GetWorldVolume(const G4String&);
0063 const G4GDMLAuxMapType* GetAuxMap() const { return &auxMap; }
0064 void Clear();
0065
0066 virtual void VolumeRead(const xercesc::DOMElement* const);
0067 virtual void Volume_contentRead(const xercesc::DOMElement* const);
0068 virtual void StructureRead(const xercesc::DOMElement* const);
0069
0070 protected:
0071
0072 void AssemblyRead(const xercesc::DOMElement* const);
0073 void DivisionvolRead(const xercesc::DOMElement* const);
0074 G4LogicalVolume* FileRead(const xercesc::DOMElement* const);
0075 void PhysvolRead(const xercesc::DOMElement* const,
0076 G4AssemblyVolume* assembly = 0);
0077 void ReplicavolRead(const xercesc::DOMElement* const, G4int number);
0078 void ReplicaRead(const xercesc::DOMElement* const replicaElement,
0079 G4LogicalVolume* logvol, G4int number);
0080 EAxis AxisRead(const xercesc::DOMElement* const axisElement);
0081 G4double QuantityRead(const xercesc::DOMElement* const readElement);
0082 void BorderSurfaceRead(const xercesc::DOMElement* const);
0083 void SkinSurfaceRead(const xercesc::DOMElement* const);
0084
0085 protected:
0086
0087 G4GDMLAuxMapType auxMap;
0088 G4GDMLAssemblyMapType assemblyMap;
0089 G4LogicalVolume* pMotherLogical = nullptr;
0090 std::map<std::string, G4VPhysicalVolume*> setuptoPV;
0091 G4bool strip = false;
0092 };
0093
0094 #endif