#include <G4tgbDetectorConstruction.hh>
Public Member Functions | |
G4tgbDetectorConstruction () | |
~G4tgbDetectorConstruction () | |
G4VPhysicalVolume * | Construct () |
Definition at line 49 of file G4tgbDetectorConstruction.hh.
G4tgbDetectorConstruction::G4tgbDetectorConstruction | ( | ) |
G4tgbDetectorConstruction::~G4tgbDetectorConstruction | ( | ) |
G4VPhysicalVolume * G4tgbDetectorConstruction::Construct | ( | ) |
Definition at line 60 of file G4tgbDetectorConstruction.cc.
References G4tgbVolume::ConstructG4Volumes(), G4tgbVolumeMgr::CopyVolumes(), G4tgbVolumeMgr::FindVolume(), G4cout, G4endl, G4tgbVolumeMgr::GetInstance(), G4tgrVolumeMgr::GetInstance(), G4VPhysicalVolume::GetName(), G4tgrVolume::GetName(), G4tgrVolumeMgr::GetTopVolume(), and G4tgrMessenger::GetVerboseLevel().
00061 { 00062 //------------------- construct g4 geometry 00063 //---------- find top G4tgrVolume 00064 G4tgrVolumeMgr* tgrVolmgr = G4tgrVolumeMgr::GetInstance(); 00065 const G4tgrVolume* tgrVoltop = tgrVolmgr->GetTopVolume(); 00066 00067 //---------- copy list of G4tgrVolume's to list of G4tgbVolume's 00068 // (just a trick to make all GEANT4 volume building in this class) 00069 G4tgbVolumeMgr* tgbVolmgr = G4tgbVolumeMgr::GetInstance(); 00070 tgbVolmgr->CopyVolumes(); 00071 //---------- find corresponding volume in list of G4tgbVolume's 00072 G4tgbVolume* tgbVoltop = tgbVolmgr->FindVolume( tgrVoltop->GetName() ); 00073 00074 //---------- ConstructG4Volumes of top G4tgbVolume 00075 // (it will recursively build the whole tree) 00076 tgbVoltop->ConstructG4Volumes( 0, (const G4LogicalVolume*)0 ); 00077 00078 00079 G4VPhysicalVolume* physvol = (G4tgbVolumeMgr::GetInstance())->GetTopPhysVol(); 00080 00081 #ifdef G4VERBOSE 00082 if( G4tgrMessenger::GetVerboseLevel() >= 1 ) 00083 { 00084 G4cout << " G4tgbDetectorConstruction::Construct() - Volume: " 00085 << physvol->GetName() << G4endl; 00086 } 00087 #endif 00088 00089 return physvol; 00090 }