CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
DetectorDescription/ROOTGeo/ROOTGeo-00-00-15/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 <TGeoVolume.h>
17#include <TGeoNode.h>
18#include <TGeoPhysicalNode.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:[email protected]}
26 *
27 */
28
30{
31 public:
32
33 /// Constructor.
34 MdcROOTGeo();
35
36 /// Destructor.
38
39 /// Initialize the instance of ROOTGeo.
40 void InitFromGdml( const char *gdmlFile, const char *setupName );
41
42 /// Set the pointers to theirs nodes;
43 void SetNode();
44
45 /// Correct some axial layer id to copyNo;
46 int CorrectReplica(int layer, int replica);
47
48 /// Set default visual attributes;
49 void SetDefaultVis();
50
51 /// Set all visible;
52 void SetAllVisible();
53
54 /// Set quater visible;
55 void SetQuarterVisible();
56
57 /// Set the pointers to the physical nodes;
58 void SetPhysicalNode();
59
60 /// Get number of segments;
62
63 /// Get number of layers;
65
66 /// Get number of replicas on each layer;
67 int GetReplicaNb(int layer) { return m_kReplica[layer]; }
68
69 /// Get Mdc volume;
70 TGeoVolume *GetVolumeMdc() { return m_Mdc; }
71
72 /// Get segment volume;
73 TGeoVolume *GetVolumeSegment( int segment );
74
75 /// Get layer volume;
76 TGeoVolume *GetVolumeLayer( int layer );
77
78 /// Get replica volume;
79 TGeoVolume *GetVolumeReplica( int layer );
80
81 /// Get segment node;
82 TGeoNode *GetSegment( int segment, int no );
83
84 /// Get layer node;
85 TGeoNode *GetLayer( int layer );
86
87 /// Get replica node;
88 TGeoNode *GetReplica( int layer, int replica );
89
90 /// Get replica physical node;
91 TGeoPhysicalNode *GetPhysicalReplica( int layer, int replica );
92
93 private:
94
95 static const int m_kSegment = 66;
96 static const int m_kStereoLayerIn = 8;
97 static const int m_kAxialLayerIn = 12;
98 static const int m_kStereoLayerOut = 16;
99 static const int m_kAxialLayerOut = 7;
100 static const int m_kLayer = 50;
101 static const int m_kReplicaMax = 288;
102 static const int m_kReplica[m_kLayer];
103 static const int m_kCorrectLayer = 10;
104 static const int m_kiCorrectLayer[m_kCorrectLayer];
105 static const int m_kiCorrectReplica[m_kCorrectLayer];
106
107 std::map<int ,int> m_CorrectMap;
108 typedef std::map<int, int> intMap;
109
110 TGeoVolume *m_Mdc;
111 TGeoNode *m_NodeReplica[m_kLayer][m_kReplicaMax];
112 TGeoPhysicalNode *m_PhysicalReplica[m_kLayer][m_kReplicaMax];
113};
114
115#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 SetNode()
Set the pointers to theirs nodes;.
int GetLayerNb()
Get number of layers;.
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.