BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
MucG4Geo Class Reference

#include <MucG4Geo.h>

+ Inheritance diagram for MucG4Geo:

Public Member Functions

 MucG4Geo ()
 Constructor.
 
 ~MucG4Geo ()
 Destructor.
 
void InitFromGdml (const char *gdmlFile, const char *setupName)
 Initialize the instance of G4Geo.
 
void SetDefaultVis ()
 Set default visual attributes;.
 
- Public Member Functions inherited from SubDetectorG4Geo
 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;.
 

Static Public Member Functions

static MucG4GeoInstance ()
 Get a pointer to the single instance of MucG4Geo.
 

Additional Inherited Members

- Protected Attributes inherited from SubDetectorG4Geo
int m_G4GeoInit
 
G4LogicalVolume * m_TopVolume
 

Detailed Description

Class MucGeo contains all of the objects necessary to describe the muc geometry.

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

Definition at line 21 of file MucG4Geo.h.

Constructor & Destructor Documentation

◆ MucG4Geo()

MucG4Geo::MucG4Geo ( )

Constructor.

Definition at line 24 of file MucG4Geo.cxx.

25{
26 string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT");
27 if (GdmlManagementPath == "") cout << "MucG4Geo::GdmlManagementPath not set" << endl;
28 string GdmlFile = GdmlManagementPath + string("/dat/Muc.gdml");
29 cout << "Construct Muc from GdmlFile " << GdmlFile << endl;
30 InitFromGdml( GdmlFile.c_str(), "Muc" );
31}
void InitFromGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of G4Geo.
Definition MucG4Geo.cxx:37

Referenced by Instance().

◆ ~MucG4Geo()

MucG4Geo::~MucG4Geo ( )

Destructor.

Definition at line 33 of file MucG4Geo.cxx.

34{ }

Member Function Documentation

◆ InitFromGdml()

void MucG4Geo::InitFromGdml ( const char * gdmlFile,
const char * setupName )

Initialize the instance of G4Geo.

Definition at line 37 of file MucG4Geo.cxx.

38{
39 ReadGdml(gdmlFile, setupName);
40 m_TopVolume = GetLogicalVolume("logicalMuc");
41 if (!m_TopVolume) cout << "MucG4Geo::InitFromGdml, m_TopVolume not found" << endl;
42 else cout << "Muc TopVolume name " << m_TopVolume->GetName() << endl;
44
45 m_G4GeoInit = 1;
46}
void SetDefaultVis()
Set default visual attributes;.
Definition MucG4Geo.cxx:49
void ReadGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of G4Geo.
G4LogicalVolume * GetLogicalVolume(const std::string &vn)
Get a logical volume by name;.
G4LogicalVolume * m_TopVolume

Referenced by MucG4Geo().

◆ Instance()

MucG4Geo * MucG4Geo::Instance ( )
static

Get a pointer to the single instance of MucG4Geo.

Definition at line 57 of file MucG4Geo.cxx.

58{
59 //Get a pointer to the single instance of MucG4Geo
60 if(!m_pMucG4Geo){
61 m_pMucG4Geo = new MucG4Geo;
62 //cout<<"in MucG4Geo:: no MucG4Geo now."<<m_pMucG4Geo<<endl;
63
64 }
65 //cout<<"in MucG4Geo:: get MucG4Geo successfully."<<endl;
66 return m_pMucG4Geo;
67}
MucG4Geo()
Constructor.
Definition MucG4Geo.cxx:24

◆ SetDefaultVis()

void MucG4Geo::SetDefaultVis ( )

Set default visual attributes;.

Definition at line 49 of file MucG4Geo.cxx.

50{
51 //std::cout << "begin of set defaultvis" << std::endl;
52
53 //std::cout << "end of set defaultvis" << std::endl;
54}

Referenced by InitFromGdml().


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