00001 //$id$ 00002 /* 00003 * 2005/10/30 Zhengyun You Peking University 00004 * 2007/05/23 Yuan Ye IHEP 00005 * Mdc Geometry General for Simulation 00006 * inherit from class SubDetectorG4Geo 00007 */ 00008 00009 using namespace std; 00010 00011 #include <string> 00012 #include <iostream> 00013 #include <sstream> 00014 #include <vector> 00015 #include <iomanip> 00016 00017 #include "Identifier/MdcID.h" 00018 #include "G4Geo/MdcG4Geo.h" 00019 00020 MdcG4Geo::MdcG4Geo() 00021 { 00022 string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT"); 00023 if (GdmlManagementPath == "") cout << "MdcG4Geo::GdmlManagementPath not set" << endl; 00024 string GdmlFile = GdmlManagementPath + string("/dat/Mdc.gdml"); 00025 cout << "Construct Mdc from GdmlFile " << GdmlFile << endl; 00026 InitFromGdml( GdmlFile.c_str(), "Mdc" ); 00027 } 00028 00029 MdcG4Geo::~MdcG4Geo() 00030 { } 00031 00032 void 00033 MdcG4Geo::InitFromGdml( const char *gdmlFile, const char *setupName ) 00034 { 00035 ReadGdml(gdmlFile, setupName); 00036 m_TopVolume = GetLogicalVolume("logicalMdc"); 00037 if (!m_TopVolume) cout << "MdcG4Geo::InitFromGdml, m_TopVolume not found" << endl; 00038 else cout << "Mdc TopVolume name " << m_TopVolume->GetName() << endl; 00039 SetDefaultVis(); 00040 00041 m_G4GeoInit = 1; 00042 } 00043 00044 void 00045 MdcG4Geo::SetDefaultVis() 00046 { 00047 }