Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:19

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // G4GDMLReadStructure
0027 //
0028 // Class description:
0029 //
0030 // GDML class for import of structures.
0031 
0032 // Author: Zoltan Torzsok, November 2007
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();  // Clears internal map and evaluator
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