Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4tgbDetectorConstruction Class Reference

#include <G4tgbDetectorConstruction.hh>

Public Member Functions

 G4tgbDetectorConstruction ()
 
 ~G4tgbDetectorConstruction ()
 
G4VPhysicalVolumeConstruct ()
 

Detailed Description

Definition at line 49 of file G4tgbDetectorConstruction.hh.

Constructor & Destructor Documentation

G4tgbDetectorConstruction::G4tgbDetectorConstruction ( )

Definition at line 52 of file G4tgbDetectorConstruction.cc.

53 {;}
G4tgbDetectorConstruction::~G4tgbDetectorConstruction ( )

Definition at line 56 of file G4tgbDetectorConstruction.cc.

57 {;}

Member Function Documentation

G4VPhysicalVolume * G4tgbDetectorConstruction::Construct ( void  )

Definition at line 60 of file G4tgbDetectorConstruction.cc.

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

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

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