#include <EmcG4Geo.h>
Inheritance diagram for EmcG4Geo:
Public Member Functions | |
EmcG4Geo () | |
Constructor. | |
EmcG4Geo () | |
Constructor. | |
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;. | |
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;. | |
~EmcG4Geo () | |
Destructor. | |
~EmcG4Geo () | |
Destructor. | |
Static Public Member Functions | |
EmcG4Geo * | Instance () |
Get a pointer to the single instance of EmcG4Geo. | |
EmcG4Geo * | Instance () |
Get a pointer to the single instance of EmcG4Geo. | |
Protected Attributes | |
int | m_G4GeoInit |
G4LogicalVolume * | m_TopVolume |
G4LogicalVolume * | m_TopVolume |
Static Private Attributes | |
EmcG4Geo * | m_pEmcG4Geo |
EmcG4Geo * | m_pEmcG4Geo = 0L |
|
Constructor.
00023 { 00024 string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT"); 00025 if (GdmlManagementPath == "") cout << "EmcG4Geo::GdmlManagementPath not set!" << endl; 00026 string GdmlFile = GdmlManagementPath + string("/dat/Emc.gdml"); 00027 cout << "Construct Emc from GdmlFile " << GdmlFile << endl; 00028 InitFromGdml( GdmlFile.c_str(), "Emc" ); 00029 }
|
|
Destructor.
00032 { }
|
|
Constructor.
|
|
Destructor.
|
|
Get a logical volume by name;.
|
|
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 }
|
|
Get the top(world) volume;.
00050 { return m_TopVolume; }
|
|
Get the top(world) volume;.
00050 { return m_TopVolume; }
|
|
Initialize the instance of G4Geo.
|
|
Initialize the instance of G4Geo.
00036 { 00037 ReadGdml(gdmlFile, setupName); 00038 m_TopVolume = GetLogicalVolume("logicalEMC"); 00039 if (!m_TopVolume) cout << "EmcG4Geo::InitFromGdml, m_TopVolume not found" << endl; 00040 else cout << "Emc TopVolume name " << m_TopVolume->GetName() << endl; 00041 SetDefaultVis(); 00042 00043 m_G4GeoInit = 1; 00044 }
|
|
Get a pointer to the single instance of EmcG4Geo.
|
|
Get a pointer to the single instance of EmcG4Geo.
00053 { 00054 //Get a pointer to the single instance of EmcG4Geo 00055 if(!m_pEmcG4Geo) { 00056 m_pEmcG4Geo = new EmcG4Geo; 00057 //cout<<"in EmcG4Geo:: no EmcG4Geo now."<<m_pEmcG4Geo<<endl; 00058 } 00059 //cout<<"in EmcG4Geo:: get EmcG4Geo successfully."<<endl; 00060 return m_pEmcG4Geo; 00061 }
|
|
If the G4 geometry of this subdetctor is initialized;.
00044 { return m_G4GeoInit; }
|
|
If the G4 geometry of this subdetctor is initialized;.
00044 { return m_G4GeoInit; }
|
|
Initialize the instance of G4Geo.
|
|
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 }
|
|
Set default visual attributes;.
|
|
Set default visual attributes;.
00048 { 00049 }
|
|
|
|
|
|
|
|
|
|
|