00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef EMC_ROOT_GEO_H
00015 #define EMC_ROOT_GEO_H
00016
00017 #include <TGeoVolume.h>
00018 #include <TGeoNode.h>
00019 #include <TGeoPhysicalNode.h>
00020
00021 #include "SubDetectorROOTGeo.h"
00030 class EmcROOTGeo : public SubDetectorROOTGeo
00031 {
00032 public:
00033
00035 EmcROOTGeo();
00036
00038 ~EmcROOTGeo();
00039
00041 void InitFromGdml( const char *gdmlFile, const char *setupName );
00042
00044 void SetNode();
00045
00047 void SetDefaultVis();
00048
00050 void SetAllVisible();
00051
00053 void SetQuarterVisible();
00054
00056 void SetPhysicalNode();
00057
00059 int GetPartNb();
00060
00062 int GetThetaNb(int part);
00063
00065 int GetPhiNb(int part);
00066
00068 TGeoVolume *GetVolumeEmc() { return m_Emc; }
00069
00071 TGeoVolume *GetVolumePart( int part );
00072
00074 TGeoVolume *GetVolumePhi( int part, int phi );
00075
00077 TGeoVolume *GetVolumeTheta( int part, int phi, int theta );
00078
00080 TGeoVolume *GetVolumeCrystal( int part, int phi, int theta );
00081
00083 TGeoNode *GetPart( int part );
00084
00086 TGeoNode *GetPhi( int part, int phi );
00087
00089 TGeoNode *GetTheta( int part, int phi, int theta );
00090
00092 TGeoNode *GetCrystal( int part, int phi, int theta );
00093
00095 TGeoPhysicalNode *GetPhysicalCrystal( int part, int phi, int theta );
00096
00097 private:
00098 static const int m_kPart = 3;
00099 static const int m_kPhiBr = 120;
00100 static const int m_kThetaBr = 44;
00101
00102
00103 int m_kPhiEc;
00104 int m_kThetaEc;
00105
00106 TGeoVolume *m_Emc;
00107 TGeoNode *m_NodeTheta[m_kPart][m_kPhiBr][m_kThetaBr];
00108 TGeoPhysicalNode *m_PhysicalCrystal[m_kPart][m_kPhiBr][m_kThetaBr];
00109
00110
00111
00112
00113 };
00114
00115 #endif