Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MucG4Geo Class Reference

#include <MucG4Geo.h>

Inheritance diagram for MucG4Geo:

SubDetectorG4Geo SubDetectorG4Geo List of all members.

Public Member Functions

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

Static Public Member Functions

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

Protected Attributes

int m_G4GeoInit
G4LogicalVolume * m_TopVolume
G4LogicalVolume * m_TopVolume

Static Private Attributes

MucG4Geom_pMucG4Geo
MucG4Geom_pMucG4Geo = 0L

Detailed Description

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

Author:
Zhengyun You {mailto:youzy@hep.pku.cn}


Constructor & Destructor Documentation

MucG4Geo::MucG4Geo  ) 
 

Constructor.

00025 { 
00026   string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT");
00027   if (GdmlManagementPath == "") cout << "MucG4Geo::GdmlManagementPath not set" << endl;
00028   string GdmlFile = GdmlManagementPath + string("/dat/Muc.gdml");
00029   cout << "Construct Muc from GdmlFile " << GdmlFile << endl;
00030   InitFromGdml( GdmlFile.c_str(), "Muc" );
00031 }

MucG4Geo::~MucG4Geo  ) 
 

Destructor.

00034 { }

MucG4Geo::MucG4Geo  ) 
 

Constructor.

MucG4Geo::~MucG4Geo  ) 
 

Destructor.


Member Function Documentation

G4LogicalVolume* SubDetectorG4Geo::GetLogicalVolume const std::string &  vn  )  [inherited]
 

Get a logical volume by name;.

G4LogicalVolume * SubDetectorG4Geo::GetLogicalVolume const std::string &  vn  )  [inherited]
 

Get a logical volume by name;.

00041 {
00042   G4LogicalVolume *lv = (G4LogicalVolume*)GDMLProcessor::GetInstance()->GetLogicalVolume(vn);
00043   //if (!lv) std::cout << "Logical Volume " << vn << " not found " << std::endl;
00044   return lv;
00045 }

G4LogicalVolume* SubDetectorG4Geo::GetTopVolume  )  [inline, inherited]
 

Get the top(world) volume;.

00050 { return m_TopVolume; }

G4LogicalVolume* SubDetectorG4Geo::GetTopVolume  )  [inline, inherited]
 

Get the top(world) volume;.

00050 { return m_TopVolume; }

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

Initialize the instance of G4Geo.

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

Initialize the instance of G4Geo.

00038 {
00039   ReadGdml(gdmlFile, setupName);
00040   m_TopVolume = GetLogicalVolume("logicalMuc");
00041   if (!m_TopVolume) cout << "MucG4Geo::InitFromGdml, m_TopVolume not found" << endl;
00042   else cout << "Muc TopVolume name " << m_TopVolume->GetName() << endl;
00043   SetDefaultVis();
00044 
00045   m_G4GeoInit = 1;  
00046 }

MucG4Geo* MucG4Geo::Instance  )  [static]
 

Get a pointer to the single instance of MucG4Geo.

MucG4Geo * MucG4Geo::Instance  )  [static]
 

Get a pointer to the single instance of MucG4Geo.

00058 {
00059   //Get a pointer to the single instance of MucG4Geo
00060   if(!m_pMucG4Geo){
00061     m_pMucG4Geo = new MucG4Geo;
00062     //cout<<"in MucG4Geo:: no MucG4Geo now."<<m_pMucG4Geo<<endl;
00063 
00064   }
00065   //cout<<"in MucG4Geo:: get MucG4Geo successfully."<<endl;
00066   return m_pMucG4Geo;
00067 }

int SubDetectorG4Geo::IsInitialized  )  [inline, inherited]
 

If the G4 geometry of this subdetctor is initialized;.

00044 { return m_G4GeoInit; }

int SubDetectorG4Geo::IsInitialized  )  [inline, inherited]
 

If the G4 geometry of this subdetctor is initialized;.

00044 { return m_G4GeoInit; }

void SubDetectorG4Geo::ReadGdml const char *  gdmlFile,
const char *  setupName
[inherited]
 

Initialize the instance of G4Geo.

void SubDetectorG4Geo::ReadGdml const char *  gdmlFile,
const char *  setupName
[inherited]
 

Initialize the instance of G4Geo.

00029 {
00030   m_config.SetURI( gdmlFile );
00031   m_config.SetSetupName( setupName );
00032   m_config.SetType ( "G4" );
00033   
00034   m_sxp.Configure( &m_config );
00035   m_sxp.Initialize();
00036   m_sxp.Run();
00037 }

void MucG4Geo::SetDefaultVis  ) 
 

Set default visual attributes;.

void MucG4Geo::SetDefaultVis  ) 
 

Set default visual attributes;.

00050 {
00051   //std::cout << "begin of set defaultvis" << std::endl;
00052   
00053   //std::cout << "end of set defaultvis" << std::endl;
00054 }


Member Data Documentation

int SubDetectorG4Geo::m_G4GeoInit [protected, inherited]
 

MucG4Geo* MucG4Geo::m_pMucG4Geo [static, private]
 

MucG4Geo * MucG4Geo::m_pMucG4Geo = 0L [static, private]
 

G4LogicalVolume* SubDetectorG4Geo::m_TopVolume [protected, inherited]
 

G4LogicalVolume* SubDetectorG4Geo::m_TopVolume [protected, inherited]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:34:16 2011 for BOSS6.5.5 by  doxygen 1.3.9.1