56 std::istringstream stream(line.substr(2));
76 "A solid must be defined before defining a facet!");
85 std::istringstream stream(line.substr(4));
86 stream >> x1 >> y1 >> z1 >> x2 >> y2 >> z2 >> x3 >> y3 >> z3;
92 else if (line[2]==
'4')
99 std::istringstream stream(line.substr(4));
100 stream >> x1 >> y1 >> z1 >> x2 >> y2 >> z2
101 >> x3 >> y3 >> z3 >> x4 >> y4 >> z4;
111 "Number of vertices per facet should be either 3 or 4!");
125 std::istringstream stream(line.substr(2));
126 stream >> level >> name >> r1 >> r2 >> r3 >> n1 >> r4 >> r5 >> r6
127 >> n2 >> r7 >> r8 >> r9 >> n3 >> pX >> pY >> pZ >> n4 >> n5;
128 std::string::size_type idx = name.rfind(
"_");
129 if (idx!=std::string::npos)
135 G4Exception(
"G4STRead::PhysvolRead()",
"ReadError",
140 G4cout <<
"G4STRead: Placing tessellated solid: " << name <<
G4endl;
153 if (tessellated == 0)
155 G4String error_msg =
"Referenced solid '" + name +
"' not found!";
156 G4Exception(
"G4STRead::PhysvolRead()",
"ReadError",
161 G4String error_msg =
"Referenced solid '" + name
162 +
"' is not associated with a logical volume!";
163 G4Exception(
"G4STRead::PhysvolRead()",
"InvalidSetup",
179 tessellated->CalculateExtent(
kXAxis,limits,
181 tessellated->CalculateExtent(
kYAxis,limits,
183 tessellated->CalculateExtent(
kZAxis,limits,
203 G4cout <<
"G4STRead: Reading '" << name <<
"'..." <<
G4endl;
205 std::ifstream GeomFile(name);
218 while (getline(GeomFile,line))
229 G4cout <<
"G4STRead: Reading '" << name <<
"' done." <<
G4endl;
235 G4cout <<
"G4STRead: Reading '" << name <<
"'..." <<
G4endl;
237 std::ifstream TreeFile(name);
248 while (getline(TreeFile,line))
253 G4cout <<
"G4STRead: Reading '" << name <<
"' done." <<
G4endl;
260 if (mediumMaterial == 0)
263 "Pointer to medium material is not valid!");
265 if (solidMaterial == 0)
268 "Pointer to solid material is not valid!");
276 "TessellatedWorldLV", 0, 0, 0);
void SetXHalfLength(G4double dx)
G4double GetYHalfLength() const
CLHEP::Hep3Vector G4ThreeVector
static const G4double pos
static const G4double kInfinity
Float_t y1[n_points_granero]
Float_t x1[n_points_granero]
void SetZHalfLength(G4double dz)
Float_t y2[n_points_geant4]
G4LogicalVolume * Read(const G4String &, G4Material *mediumMaterial, G4Material *solidMaterial)
G4Material * solid_material
std::map< G4TessellatedSolid *, G4LogicalVolume * > volumeMap
void TessellatedRead(const std::string &)
void ReadTree(const G4String &)
G4double GetXHalfLength() const
void SetYHalfLength(G4double dy)
std::vector< G4TessellatedSolid * > tessellatedList
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4LogicalVolume * world_volume
G4GLOB_DLL std::ostream G4cout
void ReadGeom(const G4String &)
void FacetRead(const std::string &)
Float_t x2[n_points_geant4]
G4double GetZHalfLength() const
void PhysvolRead(const std::string &)
HepRotation inverse() const
G4ThreeVector world_extent