Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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

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 }
G4double GetXHalfLength() const
void SetZHalfLength(G4double dz)
Definition: G4Box.cc:174
static const G4double kInfinity
Definition: geomdefs.hh:42
CLHEP::Hep3Vector G4ThreeVector
double x() const
Definition: G4Box.hh:64
G4double GetZHalfLength() const
double z() const
G4double GetYHalfLength() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
double y() const
void SetYHalfLength(G4double dy)
Definition: G4Box.cc:154
void SetXHalfLength(G4double dx)
Definition: G4Box.cc:134

Here is the call graph for this function:


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