Geant4-11
Public Member Functions
G4tgbDetectorConstruction Class Reference

#include <G4tgbDetectorConstruction.hh>

Public Member Functions

G4VPhysicalVolumeConstruct ()
 
 G4tgbDetectorConstruction ()
 
 ~G4tgbDetectorConstruction ()
 

Detailed Description

Definition at line 43 of file G4tgbDetectorConstruction.hh.

Constructor & Destructor Documentation

◆ G4tgbDetectorConstruction()

G4tgbDetectorConstruction::G4tgbDetectorConstruction ( )

Definition at line 40 of file G4tgbDetectorConstruction.cc.

41{
42}

◆ ~G4tgbDetectorConstruction()

G4tgbDetectorConstruction::~G4tgbDetectorConstruction ( )

Definition at line 45 of file G4tgbDetectorConstruction.cc.

46{
47}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * G4tgbDetectorConstruction::Construct ( )

Definition at line 50 of file G4tgbDetectorConstruction.cc.

51{
52 //------------------- construct g4 geometry
53 //---------- find top G4tgrVolume
55 const G4tgrVolume* tgrVoltop = tgrVolmgr->GetTopVolume();
56
57 //---------- copy list of G4tgrVolume's to list of G4tgbVolume's
58 // (just a trick to make all GEANT4 volume building in this class)
60 tgbVolmgr->CopyVolumes();
61 //---------- find corresponding volume in list of G4tgbVolume's
62 G4tgbVolume* tgbVoltop = tgbVolmgr->FindVolume(tgrVoltop->GetName());
63
64 //---------- ConstructG4Volumes of top G4tgbVolume
65 // (it will recursively build the whole tree)
66 tgbVoltop->ConstructG4Volumes(0, (const G4LogicalVolume*) 0);
67
68 G4VPhysicalVolume* physvol = (G4tgbVolumeMgr::GetInstance())->GetTopPhysVol();
69
70#ifdef G4VERBOSE
72 {
73 G4cout << " G4tgbDetectorConstruction::Construct() - Volume: "
74 << physvol->GetName() << G4endl;
75 }
76#endif
77
78 return physvol;
79}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
G4tgbVolume * FindVolume(const G4String &volname)
static G4tgbVolumeMgr * GetInstance()
void ConstructG4Volumes(const G4tgrPlace *place, const G4LogicalVolume *parentLV)
Definition: G4tgbVolume.cc:125
static G4int GetVerboseLevel()
const G4tgrVolume * GetTopVolume()
static G4tgrVolumeMgr * GetInstance()
const G4String & GetName() const
Definition: G4tgrVolume.hh:83

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


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