#include <BesG4Geo.h>
Inheritance diagram for BesG4Geo:
Public Member Functions | |
BesG4Geo () | |
Constructor. | |
~BesG4Geo () | |
Destructor. | |
void | InitFromGdml (const char *gdmlFile, const char *setupName) |
Initialize the instance of G4Geo. | |
void | SetDefaultVis () |
Set default visual attributes;. | |
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 |
Definition at line 21 of file BesG4Geo.h.
BesG4Geo::BesG4Geo | ( | ) |
Constructor.
Definition at line 21 of file BesG4Geo.cxx.
References InitFromGdml(), and deljobs::string.
00022 { 00023 string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT"); 00024 if (GdmlManagementPath == "") cout << "BesG4Geo::GdmlManagementPath not set" << endl; 00025 string GdmlFile = GdmlManagementPath + string("/dat/Bes.gdml"); 00026 cout << "Construct Bes from GdmlFile " << GdmlFile << endl; 00027 InitFromGdml( GdmlFile.c_str(), "Default" ); 00028 }
BesG4Geo::~BesG4Geo | ( | ) |
G4LogicalVolume * SubDetectorG4Geo::GetLogicalVolume | ( | const std::string & | vn | ) | [inherited] |
Get a logical volume by name;.
Definition at line 40 of file SubDetectorG4Geo.cxx.
Referenced by TofG4Geo::InitFromGdml(), MucG4Geo::InitFromGdml(), MRPCG4Geo::InitFromGdml(), MdcG4Geo::InitFromGdml(), EmcG4Geo::InitFromGdml(), and InitFromGdml().
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;.
Definition at line 50 of file SubDetectorG4Geo.h.
References SubDetectorG4Geo::m_TopVolume.
Referenced by BesTofConstruction::Construct(), BesMucConstruction::Construct(), BesMdcConstruction::Construct(), BesEmcConstruction::Construct(), ExtBesTofConstruction::Construct(), ExtBesMucConstruction::Construct(), ExtBesMdcConstruction::Construct(), ExtBesEmcConstruction::Construct(), ExtBesTofConstruction::ConstructETF(), TRungeFitter::setBesFromGdml(), and KalFitAlg::setBesFromGdml().
00050 { return m_TopVolume; }
void BesG4Geo::InitFromGdml | ( | const char * | gdmlFile, | |
const char * | setupName | |||
) |
Initialize the instance of G4Geo.
Definition at line 34 of file BesG4Geo.cxx.
References SubDetectorG4Geo::GetLogicalVolume(), SubDetectorG4Geo::m_G4GeoInit, SubDetectorG4Geo::m_TopVolume, SubDetectorG4Geo::ReadGdml(), and SetDefaultVis().
Referenced by BesG4Geo().
00035 { 00036 ReadGdml(gdmlFile, setupName); 00037 m_TopVolume = GetLogicalVolume("logicalWorld"); 00038 if (!m_TopVolume) cout << "BesG4Geo::InitFromGdml, m_TopVolume not found" << endl; 00039 else cout << "Bes TopVolume name " << m_TopVolume->GetName() << endl; 00040 SetDefaultVis(); 00041 00042 m_G4GeoInit = 1; 00043 }
int SubDetectorG4Geo::IsInitialized | ( | ) | [inline, inherited] |
If the G4 geometry of this subdetctor is initialized;.
Definition at line 44 of file SubDetectorG4Geo.h.
References SubDetectorG4Geo::m_G4GeoInit.
00044 { return m_G4GeoInit; }
void SubDetectorG4Geo::ReadGdml | ( | const char * | gdmlFile, | |
const char * | setupName | |||
) | [inherited] |
Initialize the instance of G4Geo.
Definition at line 28 of file SubDetectorG4Geo.cxx.
References SubDetectorG4Geo::m_config, and SubDetectorG4Geo::m_sxp.
Referenced by TofG4Geo::InitFromGdml(), MucG4Geo::InitFromGdml(), MRPCG4Geo::InitFromGdml(), MdcG4Geo::InitFromGdml(), EmcG4Geo::InitFromGdml(), and InitFromGdml().
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 BesG4Geo::SetDefaultVis | ( | ) |
Set default visual attributes;.
Definition at line 46 of file BesG4Geo.cxx.
Referenced by InitFromGdml().
int SubDetectorG4Geo::m_G4GeoInit [protected, inherited] |
Definition at line 59 of file SubDetectorG4Geo.h.
Referenced by TofG4Geo::InitFromGdml(), MucG4Geo::InitFromGdml(), MRPCG4Geo::InitFromGdml(), MdcG4Geo::InitFromGdml(), EmcG4Geo::InitFromGdml(), InitFromGdml(), and SubDetectorG4Geo::IsInitialized().
G4LogicalVolume* SubDetectorG4Geo::m_TopVolume [protected, inherited] |
Definition at line 61 of file SubDetectorG4Geo.h.
Referenced by SubDetectorG4Geo::GetTopVolume(), TofG4Geo::InitFromGdml(), MucG4Geo::InitFromGdml(), MRPCG4Geo::InitFromGdml(), MdcG4Geo::InitFromGdml(), EmcG4Geo::InitFromGdml(), and InitFromGdml().