54 std::istringstream stream(line.substr(2));
75 "A solid must be defined before defining a facet!");
84 std::istringstream stream(line.substr(4));
85 stream >> x1 >> y1 >> z1 >> x2 >> y2 >> z2 >> x3 >> y3 >> z3;
90 else if(line[2] ==
'4')
97 std::istringstream stream(line.substr(4));
98 stream >> x1 >> y1 >> z1 >> x2 >> y2 >> z2 >> x3 >> y3 >> z3 >> x4 >> y4 >>
107 "Number of vertices per facet should be either 3 or 4!");
122 std::istringstream stream(line.substr(2));
123 stream >> level >>
name >> r1 >> r2 >> r3 >> n1 >> r4 >> r5 >> r6 >> n2 >>
124 r7 >> r8 >> r9 >> n3 >> pX >> pY >> pZ >> n4 >> n5;
125 std::string::size_type idx =
name.rfind(
"_");
126 if(idx != std::string::npos)
133 "Invalid input stream!");
150 if(tessellated ==
nullptr)
152 G4String error_msg =
"Referenced solid '" +
name +
"' not found!";
159 "' is not associated with a logical volume!";
215 std::ifstream GeomFile(
name);
227 while(getline(GeomFile, line))
233 else if(line[0] ==
'p')
253 std::ifstream TreeFile(
name);
263 while(getline(TreeFile, line))
279 if(mediumMaterial ==
nullptr)
282 "Pointer to medium material is not valid!");
284 if(solidMaterial ==
nullptr)
287 "Pointer to solid material is not valid!");
295 "TessellatedWorldLV", 0, 0, 0);
static const G4double pos
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
HepRotation inverse() const
G4double GetYHalfLength() const
G4double GetZHalfLength() const
void SetZHalfLength(G4double dz)
G4double GetXHalfLength() const
void SetYHalfLength(G4double dy)
void SetXHalfLength(G4double dx)
void ReadGeom(const G4String &)
G4Material * solid_material
G4LogicalVolume * Read(const G4String &, G4Material *mediumMaterial, G4Material *solidMaterial)
void ReadTree(const G4String &)
G4ThreeVector world_extent
void FacetRead(const std::string &)
void TessellatedRead(const std::string &)
std::map< G4TessellatedSolid *, G4LogicalVolume * > volumeMap
void PhysvolRead(const std::string &)
G4LogicalVolume * world_volume
std::vector< G4TessellatedSolid * > tessellatedList
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
static const G4double kInfinity
const char * name(G4int ptype)