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 // G4GDMLReadSolids
0027 //
0028 // Class description:
0029 //
0030 // GDML class for loading solids according to specifications in Geant4.
0031 
0032 // Author: Zoltan Torzsok, November 2007
0033 // --------------------------------------------------------------------
0034 #ifndef G4GDMLREADSOLIDS_HH
0035 #define G4GDMLREADSOLIDS_HH 1
0036 
0037 #include "G4Types.hh"
0038 #include "G4GDMLReadMaterials.hh"
0039 #include "G4ExtrudedSolid.hh"
0040 #include "G4MultiUnion.hh"
0041 #include "G4MaterialPropertiesTable.hh"
0042 
0043 class G4VSolid;
0044 class G4QuadrangularFacet;
0045 class G4TriangularFacet;
0046 class G4SurfaceProperty;
0047 class G4OpticalSurface;
0048 
0049 class G4GDMLReadSolids : public G4GDMLReadMaterials
0050 {
0051   enum BooleanOp
0052   {
0053     UNION,
0054     SUBTRACTION,
0055     INTERSECTION
0056   };
0057 
0058   // typedef struct { G4double rmin,rmax,z; } zplaneType;
0059   typedef struct
0060   {
0061     G4double r, z;
0062   } rzPointType;
0063 
0064   public:
0065 
0066     G4VSolid* GetSolid(const G4String&) const;
0067     G4SurfaceProperty* GetSurfaceProperty(const G4String&) const;
0068 
0069     virtual void SolidsRead(const xercesc::DOMElement* const);
0070 
0071   protected:
0072 
0073     typedef struct
0074     {
0075       G4double rmin, rmax, z;
0076     } zplaneType;
0077 
0078     G4GDMLReadSolids();
0079     virtual ~G4GDMLReadSolids();
0080 
0081     void BooleanRead(const xercesc::DOMElement* const, const BooleanOp);
0082     void BoxRead(const xercesc::DOMElement* const);
0083     void ConeRead(const xercesc::DOMElement* const);
0084     void ElconeRead(const xercesc::DOMElement* const);
0085     void EllipsoidRead(const xercesc::DOMElement* const);
0086     void EltubeRead(const xercesc::DOMElement* const);
0087     void XtruRead(const xercesc::DOMElement* const);
0088     void HypeRead(const xercesc::DOMElement* const);
0089     void MultiUnionNodeRead(const xercesc::DOMElement* const,
0090                             G4MultiUnion* const);
0091     void MultiUnionRead(const xercesc::DOMElement* const);
0092     void OrbRead(const xercesc::DOMElement* const);
0093     void ParaRead(const xercesc::DOMElement* const);
0094     void ParaboloidRead(const xercesc::DOMElement* const);
0095     void PolyconeRead(const xercesc::DOMElement* const);
0096     void GenericPolyconeRead(const xercesc::DOMElement* const);
0097     void PolyhedraRead(const xercesc::DOMElement* const);
0098     void GenericPolyhedraRead(const xercesc::DOMElement* const);
0099     G4QuadrangularFacet* QuadrangularRead(const xercesc::DOMElement* const);
0100     void ReflectedSolidRead(const xercesc::DOMElement* const);
0101     void ScaledSolidRead(const xercesc::DOMElement* const);
0102     G4ExtrudedSolid::ZSection SectionRead(const xercesc::DOMElement* const,
0103                                           G4double);
0104     void SphereRead(const xercesc::DOMElement* const);
0105     void TessellatedRead(const xercesc::DOMElement* const);
0106     void TetRead(const xercesc::DOMElement* const);
0107     void TorusRead(const xercesc::DOMElement* const);
0108     void GenTrapRead(const xercesc::DOMElement* const);
0109     void TrapRead(const xercesc::DOMElement* const);
0110     void TrdRead(const xercesc::DOMElement* const);
0111     void TubeRead(const xercesc::DOMElement* const);
0112     void CutTubeRead(const xercesc::DOMElement* const);
0113     void TwistedboxRead(const xercesc::DOMElement* const);
0114     void TwistedtrapRead(const xercesc::DOMElement* const);
0115     void TwistedtrdRead(const xercesc::DOMElement* const);
0116     void TwistedtubsRead(const xercesc::DOMElement* const);
0117     G4TriangularFacet* TriangularRead(const xercesc::DOMElement* const);
0118     G4TwoVector TwoDimVertexRead(const xercesc::DOMElement* const, G4double);
0119     zplaneType ZplaneRead(const xercesc::DOMElement* const);
0120     rzPointType RZPointRead(const xercesc::DOMElement* const);
0121     void OpticalSurfaceRead(const xercesc::DOMElement* const);
0122     void PropertyRead(const xercesc::DOMElement* const, G4OpticalSurface*);
0123 
0124   private:
0125 
0126     std::map<G4String, G4MaterialPropertyVector*> mapOfMatPropVects;
0127 };
0128 
0129 #endif