BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
DetectorDescription/ROOTGeo/include/ROOTGeo/MdcROOTGeo.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 MdcROOTGeo
8 * inherit from class SubDetectorROOTGeo
9 */
10
11#ifndef MDC_ROOT_GEO_H
12#define MDC_ROOT_GEO_H
13
14#include <map>
15
16#include <TGeoNode.h>
17#include <TGeoPhysicalNode.h>
18#include <TGeoVolume.h>
19
20#include "SubDetectorROOTGeo.h"
21/**
22 * Class MdcGeo contains all of the objects necessary to describe the
23 * mdc geometry.
24 *
25 * @author Zhengyun You \URL{mailto:youzy@hep.pku.cn}
26 *
27 */
28
30public:
31 /// Constructor.
32 MdcROOTGeo();
33
34 /// Destructor.
36
37 /// Initialize the instance of ROOTGeo.
38 void InitFromGdml( const char* gdmlFile, const char* setupName );
39
40 /// Set the pointers to theirs nodes;
41 void SetNode();
42
43 /// Correct some axial layer id to copyNo;
44 int CorrectReplica( int layer, int replica );
45
46 /// Set default visual attributes;
47 void SetDefaultVis();
48
49 /// Set all visible;
50 void SetAllVisible();
51
52 /// Set quater visible;
53 void SetQuarterVisible();
54
55 /// Set the pointers to the physical nodes;
56 void SetPhysicalNode();
57
58 /// Get number of segments;
60
61 /// Get number of layers;
63
64 /// Get number of replicas on each layer;
65 int GetReplicaNb( int layer ) { return m_kReplica[layer]; }
66
67 /// Get Mdc volume;
68 TGeoVolume* GetVolumeMdc() { return m_Mdc; }
69
70 /// Get segment volume;
71 TGeoVolume* GetVolumeSegment( int segment );
72
73 /// Get layer volume;
74 TGeoVolume* GetVolumeLayer( int layer );
75
76 /// Get replica volume;
77 TGeoVolume* GetVolumeReplica( int layer );
78
79 /// Get segment node;
80 TGeoNode* GetSegment( int segment, int no );
81
82 /// Get layer node;
83 TGeoNode* GetLayer( int layer );
84
85 /// Get replica node;
86 TGeoNode* GetReplica( int layer, int replica );
87
88 /// Get replica physical node;
89 TGeoPhysicalNode* GetPhysicalReplica( int layer, int replica );
90
91private:
92 static const int m_kSegment = 66;
93 static const int m_kStereoLayerIn = 8;
94 static const int m_kAxialLayerIn = 12;
95 static const int m_kStereoLayerOut = 16;
96 static const int m_kAxialLayerOut = 7;
97 static const int m_kLayer = 50;
98 static const int m_kReplicaMax = 288;
99 static const int m_kReplica[m_kLayer];
100 static const int m_kCorrectLayer = 10;
101 static const int m_kiCorrectLayer[m_kCorrectLayer];
102 static const int m_kiCorrectReplica[m_kCorrectLayer];
103
104 std::map<int, int> m_CorrectMap;
105 typedef std::map<int, int> intMap;
106
107 TGeoVolume* m_Mdc;
108 TGeoNode* m_NodeReplica[m_kLayer][m_kReplicaMax];
109 TGeoPhysicalNode* m_PhysicalReplica[m_kLayer][m_kReplicaMax];
110};
111
112#endif /* MDC_ROOT_GEO_H */
TGeoNode * GetSegment(int segment, int no)
Get segment node;.
int GetSegmentNb()
Get number of segments;.
int CorrectReplica(int layer, int replica)
Correct some axial layer id to copyNo;.
TGeoVolume * GetVolumeLayer(int layer)
Get layer volume;.
int GetReplicaNb(int layer)
Get number of replicas on each layer;.
void SetQuarterVisible()
Set quater visible;.
void SetNode()
Set the pointers to theirs nodes;.
int GetLayerNb()
Get number of layers;.
TGeoNode * GetLayer(int layer)
Get layer node;.
TGeoNode * GetReplica(int layer, int replica)
Get replica node;.
void SetDefaultVis()
Set default visual attributes;.
TGeoVolume * GetVolumeReplica(int layer)
Get replica volume;.
TGeoVolume * GetVolumeSegment(int segment)
Get segment volume;.
TGeoPhysicalNode * GetPhysicalReplica(int layer, int replica)
Get replica physical node;.
void SetPhysicalNode()
Set the pointers to the physical nodes;.
void InitFromGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of ROOTGeo.