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 ,
G4Material mediumMaterial,
G4Material solidMaterial 
)

Definition at line 253 of file G4STRead.cc.

References FatalException, G4Exception(), G4Box::GetXHalfLength(), G4Box::GetYHalfLength(), G4Box::GetZHalfLength(), G4Box::SetXHalfLength(), G4Box::SetYHalfLength(), and G4Box::SetZHalfLength().

Referenced by G4GDMLParser::ParseST().

00255 {
00256    if (mediumMaterial == 0)
00257    {
00258      G4Exception("G4STRead::Read()", "InvalidSetup", FatalException,
00259                  "Pointer to medium material is not valid!");
00260    }
00261    if (solidMaterial == 0)
00262    {
00263      G4Exception("G4STRead::Read()", "InvalidSetup", FatalException,
00264                  "Pointer to solid material is not valid!");
00265    }
00266 
00267    solid_material = solidMaterial;
00268 
00269    world_box = new G4Box("TessellatedWorldBox",kInfinity,kInfinity,kInfinity);
00270      // We don't know the extent of the world yet!
00271    world_volume = new G4LogicalVolume(world_box, mediumMaterial,
00272                                       "TessellatedWorldLV", 0, 0, 0);
00273    world_extent = G4ThreeVector(0,0,0);
00274 
00275    ReadGeom(name+".geom");
00276    ReadTree(name+".tree");
00277 
00278    // Now setting the world extent ...
00279    //
00280    if (world_box->GetXHalfLength() > world_extent.x())
00281      { world_box->SetXHalfLength(world_extent.x()); }
00282    if (world_box->GetYHalfLength() > world_extent.y())
00283      { world_box->SetYHalfLength(world_extent.y()); }
00284    if (world_box->GetZHalfLength() > world_extent.z())
00285      { world_box->SetZHalfLength(world_extent.z()); }
00286 
00287    return world_volume;
00288 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:27 2013 for Geant4 by  doxygen 1.4.7