BOSS 8.0.0
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;.
 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 31 of file DetectorDescription/G4Geo/include/G4Geo/SubDetectorG4Geo.h.

Constructor & Destructor Documentation

◆ SubDetectorG4Geo() [1/3]

SubDetectorG4Geo::SubDetectorG4Geo ( )

Constructor.

Definition at line 15 of file SubDetectorG4Geo.cxx.

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

◆ ~SubDetectorG4Geo() [1/3]

SubDetectorG4Geo::~SubDetectorG4Geo ( )
virtual

Destructor.

Definition at line 20 of file SubDetectorG4Geo.cxx.

20{ m_sxp.Finalize(); }

◆ SubDetectorG4Geo() [2/3]

SubDetectorG4Geo::SubDetectorG4Geo ( )

Constructor.

◆ ~SubDetectorG4Geo() [2/3]

virtual SubDetectorG4Geo::~SubDetectorG4Geo ( )
virtual

Destructor.

◆ SubDetectorG4Geo() [3/3]

SubDetectorG4Geo::SubDetectorG4Geo ( )

Constructor.

◆ ~SubDetectorG4Geo() [3/3]

virtual SubDetectorG4Geo::~SubDetectorG4Geo ( )
virtual

Destructor.

Member Function Documentation

◆ GetLogicalVolume() [1/3]

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

Get a logical volume by name;.

Definition at line 32 of file SubDetectorG4Geo.cxx.

32 {
33 G4LogicalVolume* lv = (G4LogicalVolume*)GDMLProcessor::GetInstance()->GetLogicalVolume( vn );
34 // if (!lv) std::cout << "Logical Volume " << vn << " not found " << std::endl;
35 return lv;
36}

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

◆ GetLogicalVolume() [2/3]

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

Get a logical volume by name;.

◆ GetLogicalVolume() [3/3]

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

Get a logical volume by name;.

◆ GetTopVolume() [1/3]

◆ GetTopVolume() [2/3]

G4LogicalVolume * SubDetectorG4Geo::GetTopVolume ( )
inline

Get the top(world) volume;.

Definition at line 49 of file InstallArea/x86_64-el9-gcc13-dbg/include/G4Geo/SubDetectorG4Geo.h.

49{ return m_TopVolume; }

◆ GetTopVolume() [3/3]

G4LogicalVolume * SubDetectorG4Geo::GetTopVolume ( )
inline

Get the top(world) volume;.

Definition at line 49 of file InstallArea/x86_64-el9-gcc13-opt/include/G4Geo/SubDetectorG4Geo.h.

49{ return m_TopVolume; }

◆ IsInitialized() [1/3]

int SubDetectorG4Geo::IsInitialized ( )
inline

If the G4 geometry of this subdetctor is initialized;.

Definition at line 43 of file DetectorDescription/G4Geo/include/G4Geo/SubDetectorG4Geo.h.

43{ return m_G4GeoInit; }

◆ IsInitialized() [2/3]

int SubDetectorG4Geo::IsInitialized ( )
inline

If the G4 geometry of this subdetctor is initialized;.

Definition at line 43 of file InstallArea/x86_64-el9-gcc13-dbg/include/G4Geo/SubDetectorG4Geo.h.

43{ return m_G4GeoInit; }

◆ IsInitialized() [3/3]

int SubDetectorG4Geo::IsInitialized ( )
inline

If the G4 geometry of this subdetctor is initialized;.

Definition at line 43 of file InstallArea/x86_64-el9-gcc13-opt/include/G4Geo/SubDetectorG4Geo.h.

43{ return m_G4GeoInit; }

◆ ReadGdml() [1/3]

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

Initialize the instance of G4Geo.

Definition at line 22 of file SubDetectorG4Geo.cxx.

22 {
23 m_config.SetURI( gdmlFile );
24 m_config.SetSetupName( setupName );
25 m_config.SetType( "G4" );
26
27 m_sxp.Configure( &m_config );
28 m_sxp.Initialize();
29 m_sxp.Run();
30}

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

◆ ReadGdml() [2/3]

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

Initialize the instance of G4Geo.

◆ ReadGdml() [3/3]

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: