Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4STRead Class Reference

#include <G4STRead.hh>

Public Member Functions

G4LogicalVolumeRead (const G4String &, G4Material *mediumMaterial, G4Material *solidMaterial)
 

Detailed Description

Definition at line 55 of file G4STRead.hh.

Member Function Documentation

◆ Read()

G4LogicalVolume * G4STRead::Read ( const G4String name,
G4Material mediumMaterial,
G4Material solidMaterial 
)

Definition at line 253 of file G4STRead.cc.

255{
256 if (mediumMaterial == 0)
257 {
258 G4Exception("G4STRead::Read()", "InvalidSetup", FatalException,
259 "Pointer to medium material is not valid!");
260 }
261 if (solidMaterial == 0)
262 {
263 G4Exception("G4STRead::Read()", "InvalidSetup", FatalException,
264 "Pointer to solid material is not valid!");
265 }
266
267 solid_material = solidMaterial;
268
269 world_box = new G4Box("TessellatedWorldBox",kInfinity,kInfinity,kInfinity);
270 // We don't know the extent of the world yet!
271 world_volume = new G4LogicalVolume(world_box, mediumMaterial,
272 "TessellatedWorldLV", 0, 0, 0);
273 world_extent = G4ThreeVector(0,0,0);
274
275 ReadGeom(name+".geom");
276 ReadTree(name+".tree");
277
278 // Now setting the world extent ...
279 //
280 if (world_box->GetXHalfLength() > world_extent.x())
281 { world_box->SetXHalfLength(world_extent.x()); }
282 if (world_box->GetYHalfLength() > world_extent.y())
283 { world_box->SetYHalfLength(world_extent.y()); }
284 if (world_box->GetZHalfLength() > world_extent.z())
285 { world_box->SetZHalfLength(world_extent.z()); }
286
287 return world_volume;
288}
@ FatalException
CLHEP::Hep3Vector G4ThreeVector
double z() const
double x() const
double y() const
Definition: G4Box.hh:55
G4double GetYHalfLength() const
G4double GetZHalfLength() const
void SetZHalfLength(G4double dz)
Definition: G4Box.cc:170
G4double GetXHalfLength() const
void SetYHalfLength(G4double dy)
Definition: G4Box.cc:150
void SetXHalfLength(G4double dx)
Definition: G4Box.cc:130
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

The documentation for this class was generated from the following files: