Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Mesh.cc File Reference
#include "G4Mesh.hh"
#include "G4VPhysicalVolume.hh"
#include "G4LogicalVolume.hh"
#include "G4PVParameterised.hh"
#include "G4VNestedParameterisation.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4Sphere.hh"
#include "G4Tet.hh"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const G4Mesh &mesh)
 

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream & os,
const G4Mesh & mesh )

Definition at line 163 of file G4Mesh.cc.

163 {
164 os << "G4Mesh: ";
165 os << "\nContainer: " << mesh.GetContainerVolume()->GetName();
166 const auto& map = mesh.GetEnumMap();
167 const auto& typeEntry = map.find(mesh.GetMeshType());
168 G4String type;
169 if (typeEntry != map.end()) {
170 type = typeEntry->second;
171 } else {
172 type = "unrecognised";
173 }
174 os << "\nType: " << type;
175 os << "\nDepth: " << mesh.GetMeshDepth();
176 os << "\nTranslation: " << mesh.GetTransform().getTranslation();
177 os << "\nRotation: " << mesh.GetTransform().getRotation();
178 if (mesh.GetMeshType() == G4Mesh::rectangle &&
179 mesh.GetMeshDepth() == 3) {
180 // Print ThreeDRectangleParameters
181 }
182 return os;
183}
const std::map< G4int, G4String > & GetEnumMap() const
Definition G4Mesh.hh:72
MeshType GetMeshType() const
Definition G4Mesh.hh:75
G4VPhysicalVolume * GetContainerVolume() const
Definition G4Mesh.hh:73
const G4Transform3D & GetTransform() const
Definition G4Mesh.hh:77
@ rectangle
Definition G4Mesh.hh:53
G4int GetMeshDepth() const
Definition G4Mesh.hh:76
const G4String & GetName() const
CLHEP::HepRotation getRotation() const
CLHEP::Hep3Vector getTranslation() const