/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/MucROOTGeo.h

Go to the documentation of this file.
00001 //$id$
00002 /*
00003  *    2004/9/20    Zhengyun You      Peking University
00004  *                 Muc Geometry General for EventDisplay
00005  *
00006  *    2004/12/11   Zhengyun You      Peking University
00007  *                 named from MucGeo to MucROOTGeo
00008  *                 inherit from class SubDetectorROOTGeo
00009  */
00010 
00011 #ifndef Muc_ROOT_GEO_H
00012 #define Muc_ROOT_GEO_H
00013 
00014 #include <TGeoVolume.h>
00015 #include <TGeoNode.h>
00016 #include <TGeoPhysicalNode.h>
00017 
00018 #include "SubDetectorROOTGeo.h"
00019 #include "BesPolygon2D.h"
00020 #include "Muc2DStrip.h"
00021 
00030 class MucROOTGeo : public SubDetectorROOTGeo
00031 {
00032  public:
00033   
00035   MucROOTGeo();
00036 
00038   ~MucROOTGeo();
00039 
00041   void InitFromGDML( const char *gdmlFile, const char *setupName );
00042 
00044   void InitFromROOT( TGeoVolume *vol );
00045 
00047   void Init2DGeometry();
00048 
00050   void SetNode();
00051   
00053   void SetVolumeDefaultVis();
00054 
00056   void SetAllVisible();
00057 
00059   void SetQuarterVisible();
00060 
00062   void SetHalfVisible();
00063 
00065   void SetNoEndVisible();
00066 
00068   void SetPhysicalNode();
00069   
00071   void SetDetector();
00072   
00074   void SetHits();
00075   
00077   void SetVisMucDetector();
00078 
00080   void SetVisMucHits();
00081 
00083   int GetPartNb();
00084 
00086   int GetSegNb(int part);
00087   
00089   int GetGapNb(int part);
00090 
00092   int GetStripNb(int part, int seg, int gap);
00093 
00095   int GetAbsorberNb(int part);
00096   
00098   void SetVolumeMuc(TGeoVolume *vol) { m_Muc = vol; }
00099   
00101   TGeoVolume *GetVolumeMuc() { return m_Muc; }
00102   
00104   TGeoVolume *GetVolumeAbsorber( int part, int seg, int absorber );
00105 
00107   TGeoVolume *GetVolumeAbsorberSmallBlock( int gap, int sb );
00108 
00110   TGeoVolume *GetVolumeAbsorberPanel( int part, int seg, int absorber, int panel );
00111 
00113   TGeoVolume *GetVolumeGap( int part, int seg, int gap );
00114 
00116   TGeoVolume *GetVolumeBox( int part, int seg, int gap);
00117 
00119   TGeoVolume *GetVolumeBoxSurface( int part, int seg, int gap , int up);
00120 
00122   TGeoVolume *GetVolumeStripPlane( int part, int seg, int gap );
00123 
00125   TGeoVolume *GetVolumeStrip( int part, int seg, int gap, int strip );
00126   
00128   TGeoVolume *GetVolumeGasChamber( int part, int seg, int gap, int panel, int gasChamber );
00129 
00131   TGeoVolume *GetVolumeGasBorder( int part, int seg, int gap, int panel, int gasChamber );
00132 
00134   TGeoVolume *GetVolumeBakelite( int part, int seg, int gap, int RpcUpDown, int panel, int bakelite );
00135 
00137   TGeoNode *GetAbsorber( int part, int seg, int absorber );
00138 
00140   TGeoNode *GetAbsorberPanel( int part, int seg, int absorber, int panel );
00141 
00143   TGeoNode *GetGap( int part, int seg, int gap );
00144 
00146   TGeoNode *GetStripPlane( int part, int seg, int gap);
00147 
00149   TGeoNode *GetStrip( int part, int seg, int gap, int strip );
00150   
00152   //TGeoNode *GetGasChamber( int part, int seg, int gap, int gasChamber );
00153 
00155   //TGeoNode *GetBakelite( int part, int seg, int gap, int bakelite );
00156 
00158   TGeoPhysicalNode *GetPhysicalAbsorber( int part, int seg, int gap, int panel );
00159 
00161   TGeoPhysicalNode *GetPhysicalGap( int part, int seg, int gap );
00162 
00164   TGeoPhysicalNode *GetPhysicalStrip( int part, int seg, int gap, int strip );
00165 
00167   Muc2DStrip *Get2DStrip( int part, int seg, int gap, int strip ); 
00168 
00170   Int_t GetPart(TGeoPhysicalNode* phyNode);
00171 
00173   Bool_t IsZRVisible( int part, int seg );
00174 
00176   Double_t Range360(Double_t input);
00177 
00179   void Draw(Option_t *option);
00180 
00182   void DrawHits(Option_t *option);
00183  
00184  private:
00185 
00186   static const int m_kPart        = 3;
00187   static const int m_kSegMax      = 8;
00188   static const int m_kAbsorberMax = 9;
00189   static const int m_kGapMax      = 9;
00190   static const int m_kPanelMax    = 4;
00191   static const int m_kStripMax    = 112;
00192   static const int m_kBakelite    = 2;
00193   static const int m_kGasChamber  = 1;
00194   static const int m_kSmallBlockMax = 2;
00195   static const int m_kUpDown      = 2;
00196 
00197   static const int m_kSeg[m_kPart];
00198   static const int m_kAbsorber[m_kPart];
00199   static const int m_kGap[m_kPart];
00200   static const int m_kPanel[m_kPart];
00201   static const int m_kBakelitePanel[m_kPart][m_kUpDown];
00202 
00203   int m_StripNum[m_kPart][m_kSegMax][m_kGapMax];
00204 
00205   int m_MucColor;
00206   int m_absorberColor;
00207   int m_gapColor;
00208   int m_gasChamberColor;
00209   int m_bakeliteColor;
00210   int m_stripColor;
00211 
00212   static const Int_t m_kStripZMuliple = 12;  // as dz is very thin, multiply so that it can be seen.
00213 
00214   TGeoVolume       *m_Muc;
00215   TGeoNode         *m_NodeAbsorber[m_kPart][m_kSegMax][m_kAbsorberMax];
00216   TGeoNode         *m_NodeAbsorberPanel[m_kPart][m_kSegMax][m_kAbsorberMax][m_kPanelMax];
00217   TGeoNode         *m_NodeGap[m_kPart][m_kSegMax][m_kGapMax];
00218   TGeoNode         *m_NodeStripPlane[m_kPart][m_kSegMax][m_kGapMax];
00219   TGeoNode         *m_NodeStrip[m_kPart][m_kSegMax][m_kGapMax][m_kStripMax];
00220 
00221   TGeoPhysicalNode *m_PhysicalAbsorber[m_kPart][m_kSegMax][m_kAbsorberMax][m_kPanelMax];
00222   TGeoPhysicalNode *m_PhysicalGap[m_kPart][m_kSegMax][m_kGapMax];
00223   TGeoPhysicalNode *m_PhysicalStrip[m_kPart][m_kSegMax][m_kGapMax][m_kStripMax];
00224 
00225   const TObjArray  *m_MucDigiCol;
00226 
00227   // 2D
00228   BesPolygon2D     *m_MucXY[m_kPart][m_kSegMax];
00229   BesPolygon2D     *m_MucZR[m_kPart][m_kSegMax];
00230   BesPolygon2D     *m_MucXYGap[m_kPart][m_kSegMax][m_kGapMax];
00231   BesPolygon2D     *m_MucZRGap[m_kPart][m_kSegMax][m_kGapMax];
00232   
00233   Muc2DStrip       *m_Muc2DStrip[m_kPart][m_kSegMax][m_kGapMax][m_kStripMax];
00234 };
00235 
00236 #endif   /* Muc_ROOT_GEO_H */

Generated on Tue Nov 29 22:58:01 2016 for BOSS_7.0.2 by  doxygen 1.4.7