CGEM BOSS 6.6.5.f
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;.
 
 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 DetectorDescription/G4Geo/G4Geo-00-00-13/G4Geo/SubDetectorG4Geo.h.

Constructor & Destructor Documentation

◆ SubDetectorG4Geo() [1/2]

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() [1/2]

SubDetectorG4Geo::~SubDetectorG4Geo ( )
virtual

Destructor.

Definition at line 22 of file SubDetectorG4Geo.cxx.

23{
24 m_sxp.Finalize();
25}

◆ SubDetectorG4Geo() [2/2]

SubDetectorG4Geo::SubDetectorG4Geo ( )

Constructor.

◆ ~SubDetectorG4Geo() [2/2]

virtual SubDetectorG4Geo::~SubDetectorG4Geo ( )
virtual

Destructor.

Member Function Documentation

◆ GetLogicalVolume() [1/2]

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

◆ GetLogicalVolume() [2/2]

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

Get a logical volume by name;.

◆ GetTopVolume() [1/2]

◆ GetTopVolume() [2/2]

G4LogicalVolume * SubDetectorG4Geo::GetTopVolume ( )
inline

Get the top(world) volume;.

Definition at line 50 of file InstallArea/include/G4Geo/G4Geo/SubDetectorG4Geo.h.

50{ return m_TopVolume; }

◆ IsInitialized() [1/2]

int SubDetectorG4Geo::IsInitialized ( )
inline

If the G4 geometry of this subdetctor is initialized;.

Definition at line 44 of file DetectorDescription/G4Geo/G4Geo-00-00-13/G4Geo/SubDetectorG4Geo.h.

44{ return m_G4GeoInit; }

◆ IsInitialized() [2/2]

int SubDetectorG4Geo::IsInitialized ( )
inline

If the G4 geometry of this subdetctor is initialized;.

Definition at line 44 of file InstallArea/include/G4Geo/G4Geo/SubDetectorG4Geo.h.

44{ return m_G4GeoInit; }

◆ ReadGdml() [1/2]

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

◆ ReadGdml() [2/2]

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

Initialize the instance of G4Geo.

Member Data Documentation

◆ m_G4GeoInit

◆ m_TopVolume


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