File indexing completed on 2025-01-18 09:58:39
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
0035
0036
0037
0038
0039 #ifndef G4MESH_HH
0040 #define G4MESH_HH
0041
0042 #include "G4Transform3D.hh"
0043 #include "geomdefs.hh"
0044
0045 class G4VPhysicalVolume;
0046
0047 class G4Mesh
0048 {
0049 public:
0050
0051 enum MeshType {
0052 invalid
0053 , rectangle
0054 , nested3DRectangular
0055 , cylinder
0056 , sphere
0057 , tetrahedron
0058 };
0059
0060 struct ThreeDRectangleParameters {
0061 EAxis fAxis1 = kUndefined, fAxis2 = kUndefined, fAxis3 = kUndefined;
0062 G4int fNreplica1 = 0, fNreplica2 = 0, fNreplica3 = 0;
0063 G4double fOffset1 = 0., fOffset2 = 0., fOffset3 = 0.;
0064 G4double fWidth1 = 0., fWidth2 = 0., fWidth3 = 0.;
0065 G4bool fConsuming1 = false, fConsuming2 = false, fConsuming3 = false;
0066 G4double fHalfX = 0., fHalfY = 0., fHalfZ = 0.;
0067 };
0068
0069 G4Mesh(G4VPhysicalVolume* containerVolume, const G4Transform3D&);
0070 virtual ~G4Mesh();
0071
0072 const std::map<G4int,G4String>& GetEnumMap() const {return fEnumMap;}
0073 G4VPhysicalVolume* GetContainerVolume() const {return fpContainerVolume;}
0074 G4VPhysicalVolume* GetParameterisedVolume() const {return fpParameterisedVolume;}
0075 MeshType GetMeshType() const {return fMeshType;}
0076 G4int GetMeshDepth() const {return fMeshDepth;}
0077 const G4Transform3D& GetTransform() const {return fTransform;}
0078 const ThreeDRectangleParameters& GetThreeDRectParameters() const {return f3DRPs;}
0079
0080 private:
0081
0082 static std::map<G4int,G4String> fEnumMap;
0083 G4VPhysicalVolume* fpContainerVolume;
0084 G4VPhysicalVolume* fpParameterisedVolume;
0085 MeshType fMeshType;
0086 G4int fMeshDepth;
0087 G4Transform3D fTransform;
0088 ThreeDRectangleParameters f3DRPs;
0089 };
0090
0091 std::ostream& operator << (std::ostream& os, const G4Mesh& mesh);
0092
0093 #endif