Belle II Software development
DetectorConstruction Class Reference

Class responsible to connect to geometry to simulation. More...

#include <DetectorConstruction.h>

Inheritance diagram for DetectorConstruction:

Public Member Functions

G4VPhysicalVolume * Construct ()
 Return pointer to top volume.
 

Detailed Description

Class responsible to connect to geometry to simulation.

Normally this class is responsible to build the geometry. In our case the geometry should already be built by the Geometry Module since it is also used for tracking and display, so we just hand over the pointer to Geant4

Definition at line 28 of file DetectorConstruction.h.

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * Construct ( )
inline

Return pointer to top volume.

Definition at line 31 of file DetectorConstruction.h.

32 {
33 G4VPhysicalVolume* topVolume = geometry::GeometryManager::getInstance().getTopVolume();
34 if (!topVolume) B2FATAL("No Geometry defined, please create the geometry"
35 " before doing simulation, normally by using the Geometry module.");
36 return topVolume;
37 }
G4VPhysicalVolume * getTopVolume()
Return a pointer to the top volume.
static GeometryManager & getInstance()
Return a reference to the instance.

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