CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
SubDetectorG4Geo Class Reference

#include <SubDetectorG4Geo.h>

+ Inheritance diagram for SubDetectorG4Geo:

Public Member Functions

 SubDetectorG4Geo ()
 Constructor.
 
virtual ~SubDetectorG4Geo ()
 Destructor.
 
void ReadGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of G4Geo.
 
int IsInitialized ()
 If the G4 geometry of this subdetctor is initialized;.
 
G4LogicalVolume * GetLogicalVolume (const std::string &vn)
 Get a logical volume by name;.
 
G4LogicalVolume * GetTopVolume ()
 Get the top(world) volume;.
 

Protected Attributes

int m_G4GeoInit
 
G4LogicalVolume * m_TopVolume
 

Detailed Description

Class SubDetectorG4Geo is a base class for the four subdetector G4 geometry class.

Author
Zhengyun You \URL{youzy.nosp@m.@hep.nosp@m..pku..nosp@m.cn}

Definition at line 30 of file SubDetectorG4Geo.h.

Constructor & Destructor Documentation

◆ SubDetectorG4Geo()

SubDetectorG4Geo::SubDetectorG4Geo ( )

Constructor.

Definition at line 15 of file SubDetectorG4Geo.cxx.

16 : m_G4GeoInit(0)
17{
18 // Default constructor.
19 //m_sxp.Initialize();
20}

◆ ~SubDetectorG4Geo()

SubDetectorG4Geo::~SubDetectorG4Geo ( )
virtual

Destructor.

Definition at line 22 of file SubDetectorG4Geo.cxx.

23{
24 m_sxp.Finalize();
25}

Member Function Documentation

◆ GetLogicalVolume()

G4LogicalVolume * SubDetectorG4Geo::GetLogicalVolume ( const std::string &  vn)

Get a logical volume by name;.

Definition at line 40 of file SubDetectorG4Geo.cxx.

41{
42 G4LogicalVolume *lv = (G4LogicalVolume*)GDMLProcessor::GetInstance()->GetLogicalVolume(vn);
43 //if (!lv) std::cout << "Logical Volume " << vn << " not found " << std::endl;
44 return lv;
45}

Referenced by BesG4Geo::InitFromGdml(), CgemG4Geo::InitFromGdml(), EmcG4Geo::InitFromGdml(), MdcG4Geo::InitFromGdml(), MRPCG4Geo::InitFromGdml(), MRPCG4Geo_dbs::InitFromGdml(), MucG4Geo::InitFromGdml(), and TofG4Geo::InitFromGdml().

◆ GetTopVolume()

◆ IsInitialized()

int SubDetectorG4Geo::IsInitialized ( )
inline

If the G4 geometry of this subdetctor is initialized;.

Definition at line 44 of file SubDetectorG4Geo.h.

44{ return m_G4GeoInit; }

◆ ReadGdml()

void SubDetectorG4Geo::ReadGdml ( const char *  gdmlFile,
const char *  setupName 
)

Initialize the instance of G4Geo.

Definition at line 28 of file SubDetectorG4Geo.cxx.

29{
30 m_config.SetURI( gdmlFile );
31 m_config.SetSetupName( setupName );
32 m_config.SetType ( "G4" );
33
34 m_sxp.Configure( &m_config );
35 m_sxp.Initialize();
36 m_sxp.Run();
37}

Referenced by BesG4Geo::InitFromGdml(), CgemG4Geo::InitFromGdml(), EmcG4Geo::InitFromGdml(), MdcG4Geo::InitFromGdml(), MRPCG4Geo::InitFromGdml(), MRPCG4Geo_dbs::InitFromGdml(), MucG4Geo::InitFromGdml(), and TofG4Geo::InitFromGdml().

Member Data Documentation

◆ m_G4GeoInit

◆ m_TopVolume


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