00001 //$id$ 00002 /* 00003 * 2004/11/29 Zhengyun You Peking University 00004 * Tof Geometry General for EventDisplay 00005 * 00006 * 2004/12/9 Zhengyun You Peking University 00007 * named from TofGeo to TofROOTGeo 00008 * inherit from class SubDetectorROOTGeo 00009 */ 00010 00011 #ifndef TOF_ROOT_GEO_H 00012 #define TOF_ROOT_GEO_H 00013 00014 #include <TGeoVolume.h> 00015 #include <TGeoNode.h> 00016 #include <TGeoPhysicalNode.h> 00017 00018 #include "SubDetectorROOTGeo.h" 00027 class TofROOTGeo : public SubDetectorROOTGeo 00028 { 00029 public: 00030 00032 TofROOTGeo(); 00033 00035 ~TofROOTGeo(); 00036 00038 void InitFromGdml( const char *gdmlFile, const char *setupName ); 00039 00041 void SetNode(); 00042 00044 void SetDefaultVis(); 00045 00047 void SetAllVisible(); 00048 00050 void SetQuarterVisible(); 00051 00053 void SetPhysicalNode(); 00054 00056 int GetPartNb(); 00057 00059 int GetScinNb(int part); 00060 00062 TGeoVolume *GetVolumeTof() { return m_Tof; } 00063 00065 TGeoVolumeAssembly *GetVolumeAssembly( int part ); 00066 00068 TGeoVolume *GetVolumeScin( int part ); 00069 00071 TGeoVolume *GetVolumeBucket( int part ); 00072 00074 TGeoNode *GetScin( int part, int scin ); 00075 00077 TGeoNode *GetBucket( int part, int scin, int bucket ); 00078 00080 TGeoPhysicalNode *GetPhysicalScin( int part, int scin ); 00081 00082 private: 00083 static const int m_kPart = 3; 00084 static const int m_kAssemblyEc = 48; 00085 static const int m_kAssemblyBr = 88; 00086 static const int m_kBucketEc = 1; 00087 static const int m_kBucketBr = 2; 00088 00089 TGeoVolume *m_Tof; 00090 TGeoNode *m_NodeScin[m_kPart][m_kAssemblyBr]; 00091 TGeoPhysicalNode *m_PhysicalScin[m_kPart][m_kAssemblyBr]; 00092 }; 00093 00094 #endif /* TOF_ROOT_GEO_H */