00001 //$id$ 00002 00003 /* 00004 * 2005/10/30 Zhengyun You Peking University 00005 * Tof 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/TofID.h" 00018 #include "G4Geo/TofG4Geo.h" 00019 #include "ReadBoostRoot.hh" 00020 00021 00022 TofG4Geo::TofG4Geo() 00023 { 00024 string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT"); 00025 if (GdmlManagementPath == "") cout << "TofG4Geo::GdmlManagementPath not set" << endl; 00026 00027 00028 00029 string GdmlFile = GdmlManagementPath + string("/dat/Tof.gdml"); 00030 cout << "Construct old Tof from GdmlFile " << GdmlFile << endl; 00031 00032 00033 00034 InitFromGdml( GdmlFile.c_str(), "Tof" ); 00035 } 00036 00037 TofG4Geo::~TofG4Geo() 00038 { } 00039 00040 void 00041 TofG4Geo::InitFromGdml( const char *gdmlFile, const char *setupName ) 00042 { 00043 ReadGdml(gdmlFile, setupName); 00044 m_TopVolume = GetLogicalVolume("logicalTof"); 00045 if (!m_TopVolume) cout << "TofG4Geo::InitFromGdml, m_TopVolume not found" << endl; 00046 else cout << "Tof TopVolume name " << m_TopVolume->GetName() << endl; 00047 SetDefaultVis(); 00048 00049 m_G4GeoInit = 1; 00050 } 00051 00052 void 00053 TofG4Geo::SetDefaultVis() 00054 { 00055 }