BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/TofROOTGeo.h
Go to the documentation of this file.
1//$id$
2/*
3 * 2004/11/29 Zhengyun You Peking University
4 * Tof Geometry General for EventDisplay
5 *
6 * 2004/12/9 Zhengyun You Peking University
7 * named from TofGeo to TofROOTGeo
8 * inherit from class SubDetectorROOTGeo
9 */
10
11#ifndef Tof_ROOT_GEO_H
12#define Tof_ROOT_GEO_H
13
14#include <TGeoVolume.h>
15#include <TGeoNode.h>
16#include <TGeoPhysicalNode.h>
17
18#include "SubDetectorROOTGeo.h"
19#include "Tof2DScin.h"
20
21/**
22 * Class TofGeo contains all of the objects necessary to describe the
23 * tof geometry.
24 *
25 * @author Zhengyun You \URL{mailto:[email protected]}
26 *
27 */
28
29class TofROOTGeo : public SubDetectorROOTGeo
30{
31 public:
32
33 /// Constructor.
35
36 /// Destructor.
38
39 /// Initialize ROOTGeo from GDML.
40 void InitFromGDML( const char *gdmlFile, const char *setupName );
41
42 /// Initialize ROOTGeo from TGeoVolume logicalTof.
43 void InitFromROOT( TGeoVolume *vol );
44
45 /// Initialize 2D Geometry
46 void Init2DGeometry();
47
48 /// Set the pointers to theirs nodes;
49 void SetNode();
50
51 /// Set default visual attributes;
53
54 /// Set all visible;
56 void SetTMatch(Bool_t input);
57 void SetQMatch(Bool_t input);
58
59 /// Set quater visible;
61
62 /// Set half visible;
63 void SetHalfVisible();
64
65 /// Set noend visible;
66 void SetNoEndVisible();
67
68 /// Set the pointers to the physical nodes;
70
71 /// Draw Detecor (what is detector depends on you)
72 void SetDetector();
73
74 /// Set all physicalNodes corresponding to digiCol;
75 void SetHits();
76
77 /// Set Tof detector visibility;
78 void SetVisTofDetector();
79
80 /// Set Tof hits visibility;
81 void SetVisTofHits();
82
83 /// Get number of part;
84 int GetPartNb();
85
86 /// Get number of scintillators on each part;
87 int GetScinNb(int part);
88
89 // Get number of layer on part;
90 int GetLayerNb(int part);
91
92 /// Set Tof volume, while initializing from ROOT;
93 void SetVolumeTof(TGeoVolume *vol) { m_Tof = vol; }
94
95 /// Get Tof volume;
96 TGeoVolume *GetVolumeTof() { return m_Tof; }
97
98 /// Get assembly volume; part=0,2 for AssemblyEc, 1 for AssemblyBr;
99 //TGeoVolumeAssembly *GetVolumeAssembly( int part );
100
101 /// Get part volume;
102 TGeoVolume *GetVolumePart( int part);
103
104 /// Get PVF volume;
105 TGeoVolume *GetVolumePVF( int part, int layer );
106
107 /// Get Al volume;
108 TGeoVolume *GetVolumeAl( int part, int layer );
109
110 /// Get scintillator volume;
111 TGeoVolume *GetVolumeScin( int part, int layer );
112
113 /// Get bucket volume;
114 TGeoVolume *GetVolumeBucket( int part, int layer );
115
116 /// Get PVF node;
117 TGeoNode *GetPVF( int part, int layer, int scin );
118
119 /// Get Al node;
120 TGeoNode *GetAl( int part, int layer );
121
122 /// Get scintillator node;
123 TGeoNode *GetScin( int part, int layer );
124
125 /// Get bucket node, 0 for west bucket, 1 for the east one;
126 //TGeoNode *GetBucket( int part, int layer, int scin, int bucket );
127
128 /// Get scintillator physical node;
129 TGeoPhysicalNode *GetPhysicalScin( int part, int layer, int scin );
130
131 /// Get Tof2DScin;
132 Tof2DScin *Get2DScin( Int_t part, Int_t layer, Int_t scin );
133
134 /// Get part no of a scintillator physcial node
135 Int_t GetPart(TGeoPhysicalNode* phyNode);
136
137 /// Draw function
138 void Draw(Option_t *option);
139
140 /// Draw 2D hits
141 void DrawHits(Option_t *option);
142
143 private:
144 static const int m_kPart = 3;
145 static const int m_kLayerBr = 2;
146 static const int m_kLayerEc = 1;
147 static const int m_kScinBr = 88;
148 static const int m_kScinEc = 48;
149 static const int m_kBucketEc = 1;
150 static const int m_kBucketBr = 2;
151
152 static const int TOF_TIME_FACTOR = 1000000;
153 static const int TOF_CHARGE_FACTOR = 1000000;
154
155 Bool_t k_TMatch;
156 Bool_t k_QMatch;
157
158 int m_TofColor;
159 int m_BucketColor;
160 int m_ScinColor;
161
162 TGeoVolume *m_Tof;
163 TGeoNode *m_NodePVF[m_kPart][m_kLayerBr][m_kScinBr];
164 TGeoNode *m_NodeAl[m_kPart][m_kLayerBr];
165 TGeoNode *m_NodeScin[m_kPart][m_kLayerBr];
166 TGeoPhysicalNode *m_PhysicalScin[m_kPart][m_kLayerBr][m_kScinBr];
167
168 const TObjArray *m_TofDigiCol;
169
170 // 2D
171 Tof2DScin *m_Tof2DScin[m_kPart][m_kLayerBr][m_kScinBr];
172
173};
174
175#endif /* Tof_ROOT_GEO_H */
TGeoNode * GetAl(int part, int layer)
Get Al node;.
void SetQuarterVisible()
Set quater visible;.
TGeoVolume * GetVolumeScin(int part)
Get scintillator volume;.
void SetVolumeTof(TGeoVolume *vol)
Set Tof volume, while initializing from ROOT;.
void InitFromROOT(TGeoVolume *vol)
Initialize ROOTGeo from TGeoVolume logicalTof.
TGeoVolume * GetVolumeAl(int part, int layer)
Get Al volume;.
int GetPartNb()
Get number of part;.
void InitFromGDML(const char *gdmlFile, const char *setupName)
Initialize ROOTGeo from GDML.
TGeoVolume * GetVolumeBucket(int part)
Get bucket volume;.
void SetHits()
Set all physicalNodes corresponding to digiCol;.
TofROOTGeo()
Constructor.
TGeoVolume * GetVolumePart(int part)
Get assembly volume; part=0,2 for AssemblyEc, 1 for AssemblyBr;
void SetDetector()
Draw Detecor (what is detector depends on you)
void DrawHits(Option_t *option)
Draw 2D hits.
Tof2DScin * Get2DScin(Int_t part, Int_t layer, Int_t scin)
Get Tof2DScin;.
~TofROOTGeo()
Destructor.
void SetVisTofDetector()
Set Tof detector visibility;.
int GetScinNb(int part)
Get number of scintillators on each part;.
void SetPhysicalNode()
Set the pointers to the physical nodes;.
TGeoNode * GetPVF(int part, int layer, int scin)
Get PVF node;.
TGeoVolume * GetVolumePVF(int part, int layer)
Get PVF volume;.
TGeoPhysicalNode * GetPhysicalScin(int part, int scin)
Get scintillator physical node;.
Int_t GetPart(TGeoPhysicalNode *phyNode)
Get part no of a scintillator physcial node.
TGeoNode * GetScin(int part, int layer)
Get scintillator node;.
void SetNode()
Set the pointers to theirs nodes;.
void SetVolumeDefaultVis()
Set default visual attributes;.
void SetAllVisible()
Set all visible;.