Geant4-11
Public Member Functions
G4tgbDetectorBuilder Class Reference

#include <G4tgbDetectorBuilder.hh>

Public Member Functions

virtual G4VPhysicalVolumeConstructDetector (const G4tgrVolume *tgrVoltop)
 
 G4tgbDetectorBuilder ()
 
virtual const G4tgrVolumeReadDetector ()
 
virtual ~G4tgbDetectorBuilder ()
 

Detailed Description

Definition at line 42 of file G4tgbDetectorBuilder.hh.

Constructor & Destructor Documentation

◆ G4tgbDetectorBuilder()

G4tgbDetectorBuilder::G4tgbDetectorBuilder ( )

Definition at line 47 of file G4tgbDetectorBuilder.cc.

48{
49}

◆ ~G4tgbDetectorBuilder()

G4tgbDetectorBuilder::~G4tgbDetectorBuilder ( )
virtual

Definition at line 52 of file G4tgbDetectorBuilder.cc.

53{
54}

Member Function Documentation

◆ ConstructDetector()

G4VPhysicalVolume * G4tgbDetectorBuilder::ConstructDetector ( const G4tgrVolume tgrVoltop)
virtual

Definition at line 69 of file G4tgbDetectorBuilder.cc.

70{
71 //---------- copy list of G4tgrVolume's to list of G4tgbVolume's
72 // (just a trick to make all GEANT4 volume building in this class)
74 tgbVolmgr->CopyVolumes();
75 //---------- find corresponding volume in list of G4tgbVolume's
76 G4tgbVolume* tgbVoltop = tgbVolmgr->FindVolume(tgrVoltop->GetName());
77
78 //---------- ConstructG4Volumes of top G4tgbVolume
79 // (it will recursively build the whole tree)
80 tgbVoltop->ConstructG4Volumes(0, (const G4LogicalVolume*) 0);
81
82 G4VPhysicalVolume* physvol = tgbVolmgr->GetTopPhysVol();
83
84#ifdef G4VERBOSE
86 {
87 G4cout << " G4tgbDetectorConstruction::ConstructDetector() - Volume: "
88 << physvol->GetName() << G4endl;
89 }
90#endif
91
92 return physvol;
93}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
G4tgbVolume * FindVolume(const G4String &volname)
static G4tgbVolumeMgr * GetInstance()
G4VPhysicalVolume * GetTopPhysVol()
void ConstructG4Volumes(const G4tgrPlace *place, const G4LogicalVolume *parentLV)
Definition: G4tgbVolume.cc:125
static G4int GetVerboseLevel()
const G4String & GetName() const
Definition: G4tgrVolume.hh:83

References G4tgbVolume::ConstructG4Volumes(), G4tgbVolumeMgr::CopyVolumes(), G4tgbVolumeMgr::FindVolume(), G4cout, G4endl, G4tgbVolumeMgr::GetInstance(), G4VPhysicalVolume::GetName(), G4tgrVolume::GetName(), G4tgbVolumeMgr::GetTopPhysVol(), and G4tgrMessenger::GetVerboseLevel().

Referenced by G4tgbVolumeMgr::ReadAndConstructDetector().

◆ ReadDetector()

const G4tgrVolume * G4tgbDetectorBuilder::ReadDetector ( )
virtual

Definition at line 57 of file G4tgbDetectorBuilder.cc.

58{
59 //------------------- construct g4 geometry
60 //---------- find top G4tgrVolume
63 const G4tgrVolume* tgrVoltop = tgrVolmgr->GetTopVolume();
64 return tgrVoltop;
65}
static G4tgrFileReader * GetInstance()
const G4tgrVolume * GetTopVolume()
static G4tgrVolumeMgr * GetInstance()

References G4tgrFileReader::GetInstance(), G4tgrVolumeMgr::GetInstance(), G4tgrVolumeMgr::GetTopVolume(), and G4tgrFileReader::ReadFiles().

Referenced by G4tgbVolumeMgr::ReadAndConstructDetector().


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