00001
00002
00003
00004
00005
00006
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/MRPCG4Geo.h"
00019
00020
00021
00022 MRPCG4Geo::MRPCG4Geo()
00023 {
00024 string GdmlManagementPath = getenv("GDMLMANAGEMENTROOT");
00025 if (GdmlManagementPath == "") cout << "MRPCG4Geo::GdmlManagementPath not set" << endl;
00026
00027
00028 string GdmlFile = GdmlManagementPath + string("/dat/Tof_mrpc.gdml");
00029 cout << "Construct new Tof (including MRPC (double sided readout) as End Cap Tof) from GdmlFile " << GdmlFile << endl;
00030
00031
00032 InitFromGdml( GdmlFile.c_str(), "Tof" );
00033 }
00034
00035 MRPCG4Geo::~MRPCG4Geo()
00036 { }
00037
00038 void
00039 MRPCG4Geo::InitFromGdml( const char *gdmlFile, const char *setupName )
00040 {
00041 ReadGdml(gdmlFile, setupName);
00042 m_TopVolume = GetLogicalVolume("logicalTof");
00043 if (!m_TopVolume) cout << "MRPCG4Geo::InitFromGdml, m_TopVolume not found" << endl;
00044 else cout << "MRPC TopVolume name " << m_TopVolume->GetName() << endl;
00045 SetDefaultVis();
00046
00047 m_G4GeoInit = 1;
00048 }
00049
00050 void
00051 MRPCG4Geo::SetDefaultVis()
00052 {
00053 }