BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
EventDisplay/BesVisLib/BesVisLib-00-06-02/BesVisLib/MucROOTGeo.h
Go to the documentation of this file.
1//$id$
2/*
3 * 2004/9/20 Zhengyun You Peking University
4 * Muc Geometry General for EventDisplay
5 *
6 * 2004/12/11 Zhengyun You Peking University
7 * named from MucGeo to MucROOTGeo
8 * inherit from class SubDetectorROOTGeo
9 */
10
11#ifndef Muc_ROOT_GEO_H
12#define Muc_ROOT_GEO_H
13
14#include <TGeoVolume.h>
15#include <TGeoNode.h>
16#include <TGeoPhysicalNode.h>
17
18#include "SubDetectorROOTGeo.h"
19#include "BesPolygon2D.h"
20#include "Muc2DStrip.h"
21
22/**
23 * Class MucGeo contains all of the objects necessary to describe the
24 * muc geometry.
25 *
26 * @author Zhengyun You \URL{mailto:[email protected]}
27 *
28 */
29
30class MucROOTGeo : public SubDetectorROOTGeo
31{
32 public:
33
34 /// Constructor.
36
37 /// Destructor.
39
40 /// Initialize ROOTGeo from GDML.
41 void InitFromGDML( const char *gdmlFile, const char *setupName );
42
43 /// Initialize ROOTGeo from TGeoVolume logicalMuc.
44 void InitFromROOT( TGeoVolume *vol );
45
46 /// Initialize 2D Geometry
47 void Init2DGeometry();
48
49 /// Set the pointers to theirs nodes;
50 void SetNode();
51
52 /// Set default visual attributes;
54
55 //Long Peixun's update: Set detector 3D color
57
58 /// Set all visible;
60
61 /// Set quater visible;
63
64 /// Set half visible;
65 void SetHalfVisible();
66
67 /// Set noend visible;
68 void SetNoEndVisible();
69
70 /// Set the pointers to the physical nodes;
72
73 /// Set Detecor (what is detector depends on you)
74 void SetDetector();
75
76 /// Set all physicalNodes corresponding to digiCol;
77 void SetHits();
78
79 /// Set Muc detector visibility;
80 void SetVisMucDetector();
81
82 /// Set Muc hits visibility;
83 void SetVisMucHits();
84
85 /// Get number of part;
86 int GetPartNb();
87
88 /// Get number of segment on part;
89 int GetSegNb(int part);
90
91 /// Get number of gap on part;
92 int GetGapNb(int part);
93
94 /// Get number of strip on gap;
95 int GetStripNb(int part, int seg, int gap);
96
97 /// Get number of absorber on part;
98 int GetAbsorberNb(int part);
99
100 /// Set Muc volume, while initializing from ROOT;
101 void SetVolumeMuc(TGeoVolume *vol) { m_Muc = vol; }
102
103 /// Get Muc volume;
104 TGeoVolume *GetVolumeMuc() { return m_Muc; }
105
106 /// Get absorber volume;
107 TGeoVolume *GetVolumeAbsorber( int part, int seg, int absorber );
108
109 /// Get absorber small block;
110 TGeoVolume *GetVolumeAbsorberSmallBlock( int gap, int sb );
111
112 /// Get absorber panel volume;
113 TGeoVolume *GetVolumeAbsorberPanel( int part, int seg, int absorber, int panel );
114
115 /// Get gap volume;
116 TGeoVolume *GetVolumeGap( int part, int seg, int gap );
117
118 /// Get box volume;
119 TGeoVolume *GetVolumeBox( int part, int seg, int gap);
120
121 /// Get box surface volume;
122 TGeoVolume *GetVolumeBoxSurface( int part, int seg, int gap , int up);
123
124 /// Get strip plane volume;
125 TGeoVolume *GetVolumeStripPlane( int part, int seg, int gap );
126
127 /// Get strip volume;
128 TGeoVolume *GetVolumeStrip( int part, int seg, int gap, int strip );
129
130 /// Get rpc gas chamber volume;
131 TGeoVolume *GetVolumeGasChamber( int part, int seg, int gap, int panel, int gasChamber );
132
133 /// Get rpc gas border volume;
134 TGeoVolume *GetVolumeGasBorder( int part, int seg, int gap, int panel, int gasChamber );
135
136 /// Get rpc bakelite volume;
137 TGeoVolume *GetVolumeBakelite( int part, int seg, int gap, int RpcUpDown, int panel, int bakelite );
138
139 /// Get absorber node;
140 TGeoNode *GetAbsorber( int part, int seg, int absorber );
141
142 /// Get absorber panel node;
143 TGeoNode *GetAbsorberPanel( int part, int seg, int absorber, int panel );
144
145 /// Get gap node;
146 TGeoNode *GetGap( int part, int seg, int gap );
147
148 /// Get strip plane node;
149 TGeoNode *GetStripPlane( int part, int seg, int gap);
150
151 /// Get strip node;
152 TGeoNode *GetStrip( int part, int seg, int gap, int strip );
153
154 /// Get rpc gas chamber node;
155 //TGeoNode *GetGasChamber( int part, int seg, int gap, int gasChamber );
156
157 /// Get rpc bakelite node;
158 //TGeoNode *GetBakelite( int part, int seg, int gap, int bakelite );
159
160 /// Get absorber physical node;
161 TGeoPhysicalNode *GetPhysicalAbsorber( int part, int seg, int gap, int panel );
162
163 /// Get gap physical node;
164 TGeoPhysicalNode *GetPhysicalGap( int part, int seg, int gap );
165
166 /// Get strip physical node;
167 TGeoPhysicalNode *GetPhysicalStrip( int part, int seg, int gap, int strip );
168
169 /// Get Muc2DStrip;
170 Muc2DStrip *Get2DStrip( int part, int seg, int gap, int strip );
171
172 /// Get part no of a physcial node
173 Int_t GetPart(TGeoPhysicalNode* phyNode);
174
175 /// Is a segment visible in ZR view
176 Bool_t IsZRVisible( int part, int seg );
177
178 /// Get input value 0~360
179 Double_t Range360(Double_t input);
180
181 /// Draw function
182 void Draw(Option_t *option);
183
184 /// Draw 2D hits
185 void DrawHits(Option_t *option);
186
187 private:
188
189 static const int m_kPart = 3;
190 static const int m_kSegMax = 8;
191 static const int m_kAbsorberMax = 9;
192 static const int m_kGapMax = 9;
193 static const int m_kPanelMax = 4;
194 static const int m_kStripMax = 112;
195 static const int m_kBakelite = 2;
196 static const int m_kGasChamber = 1;
197 static const int m_kSmallBlockMax = 2;
198 static const int m_kUpDown = 2;
199
200 static const int m_kSeg[m_kPart];
201 static const int m_kAbsorber[m_kPart];
202 static const int m_kGap[m_kPart];
203 static const int m_kPanel[m_kPart];
204 static const int m_kBakelitePanel[m_kPart][m_kUpDown];
205
206 int m_StripNum[m_kPart][m_kSegMax][m_kGapMax];
207
208 int m_MucColor;
209 int m_absorberColor;
210 int m_gapColor;
211 int m_gasChamberColor;
212 int m_bakeliteColor;
213 int m_stripColor;
214
215 static const Int_t m_kStripZMuliple = 12; // as dz is very thin, multiply so that it can be seen.
216
217 TGeoVolume *m_Muc;
218 TGeoNode *m_NodeAbsorber[m_kPart][m_kSegMax][m_kAbsorberMax];
219 TGeoNode *m_NodeAbsorberPanel[m_kPart][m_kSegMax][m_kAbsorberMax][m_kPanelMax];
220 TGeoNode *m_NodeGap[m_kPart][m_kSegMax][m_kGapMax];
221 TGeoNode *m_NodeStripPlane[m_kPart][m_kSegMax][m_kGapMax];
222 TGeoNode *m_NodeStrip[m_kPart][m_kSegMax][m_kGapMax][m_kStripMax];
223
224 TGeoPhysicalNode *m_PhysicalAbsorber[m_kPart][m_kSegMax][m_kAbsorberMax][m_kPanelMax];
225 TGeoPhysicalNode *m_PhysicalGap[m_kPart][m_kSegMax][m_kGapMax];
226 TGeoPhysicalNode *m_PhysicalStrip[m_kPart][m_kSegMax][m_kGapMax][m_kStripMax];
227
228 const TObjArray *m_MucDigiCol;
229
230 // 2D
231 BesPolygon2D *m_MucXY[m_kPart][m_kSegMax];
232 BesPolygon2D *m_MucZR[m_kPart][m_kSegMax];
233 BesPolygon2D *m_MucXYGap[m_kPart][m_kSegMax][m_kGapMax];
234 BesPolygon2D *m_MucZRGap[m_kPart][m_kSegMax][m_kGapMax];
235
236 Muc2DStrip *m_Muc2DStrip[m_kPart][m_kSegMax][m_kGapMax][m_kStripMax];
237};
238
239#endif /* Muc_ROOT_GEO_H */
legend Draw()
void SetQuarterVisible()
Set quater visible;.
TGeoVolume * GetVolumeStripPlane(int part, int seg, int gap)
Get strip plane volume;.
void SetPhysicalNode()
Set the pointers to the physical nodes;.
int GetGapNb(int part)
Get number of gap on part;.
void SetDetector()
Set Detecor (what is detector depends on you)
void SetVolumeDefaultVis()
Set default visual attributes;.
TGeoVolume * GetVolumeGasChamber(int part, int seg, int gap, int panel, int gasChamber)
Get rpc gas chamber volume;
int GetAbsorberNb(int part)
Get number of absorber on part;.
MucROOTGeo()
Constructor.
TGeoPhysicalNode * GetPhysicalStrip(int part, int seg, int gap, int strip)
Get strip physical node;.
TGeoVolume * GetVolumeBox(int part, int seg, int gap)
Get box volume;
TGeoVolume * GetVolumeBakelite(int part, int seg, int gap, int panel, int bakelite)
Get rpc bakelite volume;
TGeoVolume * GetVolumeGasBorder(int part, int seg, int gap, int panel, int gasChamber)
Get rpc gas border volume;
Double_t Range360(Double_t input)
Get input value 0~360.
void SetNode()
Set the pointers to theirs nodes;.
void SetVolumeMuc(TGeoVolume *vol)
Set Muc volume, while initializing from ROOT;.
TGeoVolume * GetVolumeAbsorberPanel(int part, int seg, int absorber, int panel)
Get absorber panel volume;
TGeoNode * GetAbsorber(int part, int seg, int absorber)
Get absorber node;
Bool_t IsZRVisible(int part, int seg)
Is a segment visible in ZR view.
void SetVisMucDetector()
Set Muc detector visibility;.
void SetAllVisible()
Set all visible;.
Int_t GetPart(TGeoPhysicalNode *phyNode)
Get part no of a physcial node.
int GetSegNb(int part)
Get number of segment on part;.
TGeoVolume * GetVolumeGap(int part, int seg, int gap)
Get gap volume;
void SetHits()
Set all physicalNodes corresponding to digiCol;.
~MucROOTGeo()
Destructor.
TGeoVolume * GetVolumeBoxSurface(int part, int seg, int gap, int up)
Get box surface volume;
TGeoNode * GetGap(int part, int seg, int gap)
Get gap node;
TGeoNode * GetStripPlane(int part, int seg, int gap)
Get strip plane node;.
TGeoVolume * GetVolumeStrip(int part, int seg, int gap, int strip)
Get strip volume;
TGeoVolume * GetVolumeAbsorber(int part, int seg, int absorber)
Get absorber volume;
TGeoPhysicalNode * GetPhysicalGap(int part, int seg, int gap)
Get gap physical node;.
TGeoNode * GetStrip(int part, int seg, int gap, int strip)
Get strip node;
TGeoPhysicalNode * GetPhysicalAbsorber(int part, int seg, int gap, int panel)
Get rpc gas chamber node;
int GetStripNb(int part, int seg, int gap)
Get number of strip on gap;.
Muc2DStrip * Get2DStrip(int part, int seg, int gap, int strip)
Get Muc2DStrip;.
TGeoVolume * GetVolumeAbsorberSmallBlock(int gap, int sb)
Get absorber small block;.
TGeoNode * GetAbsorberPanel(int part, int seg, int absorber, int panel)
Get absorber panel node;
void InitFromGDML(const char *gdmlFile, const char *setupName)
Initialize ROOTGeo from GDML.
void InitFromROOT(TGeoVolume *vol)
Initialize ROOTGeo from TGeoVolume logicalMuc.