70std::map<G4int,G4String> G4Mesh::fEnumMap = {
72 {rectangle,
"rectangle"},
73 {nested3DRectangular,
"nested3Drectangular"},
74 {cylinder,
"cylinder"},
76 {tetrahedron,
"tetrahedron"}
80: fpContainerVolume(containerVolume)
81, fpParameterisedVolume(nullptr)
84, fTransform(transform)
86 if (fpContainerVolume ==
nullptr)
return;
99 G4bool isContainer =
false;
106 fpParameterisedVolume = pv1;
114 fpParameterisedVolume = pv2;
121 fpParameterisedVolume = pv3;
131 if (
dynamic_cast<G4Box*
>(pEndSol)) {
133 auto pBox =
static_cast<G4Box*
>(pEndSol);
134 f3DRPs.
fHalfX = pBox->GetXHalfLength();
135 f3DRPs.
fHalfY = pBox->GetYHalfLength();
136 f3DRPs.
fHalfZ = pBox->GetZHalfLength();
137 }
else if (
dynamic_cast<G4Tet*
>(pEndSol)) {
139 }
else if (
dynamic_cast<G4Tubs*
>(pEndSol)) {
141 }
else if (
dynamic_cast<G4Sphere*
>(pEndSol)) {
146 if (fMeshDepth == 3 && fMeshType ==
rectangle) {
167 const auto& typeEntry = map.find(mesh.
GetMeshType());
169 if (typeEntry != map.end()) {
170 type = typeEntry->second;
172 type =
"unrecognised";
174 os <<
"\nType: " << type;
const G4DNABoundingBox invalid
std::ostream & operator<<(std::ostream &os, const G4Mesh &mesh)
G4VSolid * GetSolid() const
std::size_t GetNoDaughters() const
G4VPhysicalVolume * GetDaughter(const std::size_t i) const
const std::map< G4int, G4String > & GetEnumMap() const
MeshType GetMeshType() const
G4VPhysicalVolume * GetContainerVolume() const
const G4Transform3D & GetTransform() const
G4Mesh(G4VPhysicalVolume *containerVolume, const G4Transform3D &)
G4int GetMeshDepth() const
G4LogicalVolume * GetLogicalVolume() const
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const =0
const G4String & GetName() const
virtual G4VPVParameterisation * GetParameterisation() const =0