Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4tgbDetectorBuilder Class Reference

#include <G4tgbDetectorBuilder.hh>

Public Member Functions

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

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:67
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)
static G4int GetVerboseLevel()
const G4String & GetName() const

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()

Referenced by G4tgbVolumeMgr::ReadAndConstructDetector().


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