BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/BesVisLib/BesVisLib/BesGeometry.h
Go to the documentation of this file.
1//
2// BesGeometry.h
3//
4
5#ifndef BES_GEOMETRY
6#define BES_GEOMETRY
7
8#include <TGeometry.h>
9
10#include "BesView.h"
11#include "MdcROOTGeo.h"
12#include "TofROOTGeo.h"
13#include "EmcROOTGeo.h"
14#include "MucROOTGeo.h"
15#include "BesCircle2D.h"
16#include "BesPolygon2D.h"
17
18class BesGeometry : public TObject {
19
20 public:
22 virtual ~BesGeometry();
23
24 //Long Peixun's update: Add parameters for MRPC and CGEM
25 virtual void InitFromGDML(const TString fPath, bool mrpc = false, bool cgem = false);
26 virtual void InitFromROOT(TGeoVolume* volBes);
27 virtual void InitGeometry();
28
29 const char* GetFilename(const char* RunPeriod);
30 virtual void SetDefaultVis();
31 virtual void SetPhysicalDefaultVis(); //Long Peixun's update: Reset 3D color
32 virtual void Draw(Option_t *option = "3D");
33 virtual void Draw3D();
34 virtual void Draw2DXY();
35 virtual void Draw2DZR();
36
37 Float_t GetBesR() { return m_BesR; }
38 Float_t GetBesZ() { return m_BesZ; }
39
40 TGeoVolume *GetVolBes() { return m_Bes; }
41 TGeoVolume *GetVolumeBeamPipe() { return m_BeamPipe; }
42
43 MdcROOTGeo *GetMdcROOTGeo() { return m_MdcROOTGeo; }
44 TofROOTGeo *GetTofROOTGeo() { return m_TofROOTGeo; }
45 EmcROOTGeo *GetEmcROOTGeo() { return m_EmcROOTGeo; }
46 MucROOTGeo *GetMucROOTGeo() { return m_MucROOTGeo; }
47
48 TGeoVolume *GetVolumeMdc() { return m_MdcROOTGeo->GetVolumeMdc(); }
49 TGeoVolume *GetVolumeMdcSegment(int segment) { return m_MdcROOTGeo->GetVolumeSegment(segment); }
50 TGeoVolume *GetVolumeMdcLayer(int layer) { return m_MdcROOTGeo->GetVolumeLayer(layer); }
51 TGeoVolume *GetVolumeMdcReplica(int layer) { return m_MdcROOTGeo->GetVolumeReplica(layer); }
52 TGeoPhysicalNode *GetPhysicalMdcReplica(int layer, int replica) { return m_MdcROOTGeo->GetPhysicalReplica(layer, replica); }
53
54 TGeoVolume *GetVolumeTof() { return m_TofROOTGeo->GetVolumeTof(); }
55 //TGeoVolumeAssembly *GetVolumeTofAssembly(int part) { return m_TofROOTGeo->GetVolumeAssembly(part); }
56 //TGeoVolume *GetVolumeTofScin(int part) { return m_TofROOTGeo->GetVolumeScin(part); }
57 //TGeoVolume *GetVolumeTofBucket(int part) { return m_TofROOTGeo->GetVolumeBucket(part); }
58 TGeoPhysicalNode *GetPhysicalTofScin(int part, int layer, int scin) { return m_TofROOTGeo->GetPhysicalScin(part, layer, scin); }
59
60 TGeoVolume *GetVolumeEmc() { return m_EmcROOTGeo->GetVolumeEmc(); }
61 TGeoVolume *GetVolumeEmcPart(int part) { return m_EmcROOTGeo->GetVolumePart(part); }
62 TGeoVolume *GetVolumeEmcPhi(int part, int phi) { return m_EmcROOTGeo->GetVolumePhi(part, phi); }
63 TGeoVolume *GetVolumeEmcTheta(int part, int phi, int theta) { return m_EmcROOTGeo->GetVolumeTheta(part, phi, theta); }
64 TGeoVolume *GetVolumeEmcCrystal(int part, int phi, int theta) { return m_EmcROOTGeo->GetVolumeCrystal(part, phi, theta); }
65 TGeoPhysicalNode *GetPhysicalEmcCrystal(int part, int phi, int theta) { return m_EmcROOTGeo->GetPhysicalCrystal(part, phi, theta); }
66
67 TGeoVolume *GetVolumeMuc() { return m_MucROOTGeo->GetVolumeMuc(); }
68 TGeoVolume *GetVolumeMucAbsorber(int part, int seg, int absorber) { return m_MucROOTGeo->GetVolumeAbsorber(part, seg, absorber); }
69 TGeoVolume *GetVolumeMucAbsorberPanel(int part, int seg, int absorber, int panel) { return m_MucROOTGeo->GetVolumeAbsorberPanel(part, seg, absorber, panel); }
70 TGeoVolume *GetVolumeMucGap(int part, int seg, int gap) { return m_MucROOTGeo->GetVolumeGap(part, seg, gap); }
71 TGeoVolume *GetVolumeMucStripPlane(int part, int seg, int gap) { return m_MucROOTGeo->GetVolumeStripPlane(part, seg, gap); }
72 TGeoVolume *GetVolumeMucStrip(int part, int seg, int gap, int strip) { return m_MucROOTGeo->GetVolumeStripPlane(part, seg, gap); }
73 TGeoVolume *GetVolumeMucGasChamber(int part, int seg, int gap, int panel, int gasChamber) { return m_MucROOTGeo->GetVolumeGasChamber(part, seg, gap, panel, gasChamber); }
74 TGeoVolume *GetVolumeMucBakelite(int part, int seg, int gap, int RpcUpDown, int panel, int bakelite) { return m_MucROOTGeo->GetVolumeBakelite(part, seg, gap, RpcUpDown, panel, bakelite); }
75 TGeoPhysicalNode *GetPhysicalMucGap(int part, int seg, int gap) { return m_MucROOTGeo->GetPhysicalGap(part, seg, gap); }
76 TGeoPhysicalNode *GetPhysicalMucStrip(int part, int seg, int gap, int strip) { return m_MucROOTGeo->GetPhysicalStrip(part, seg, gap, strip); }
77
78 private:
79 Double_t m_BesR;
80 Double_t m_BesZ;
81
82 Double_t m_BeamPipeRMin;
83 Double_t m_BeamPipeRMax;
84 Double_t m_BeamPipeZ;
85
86 TGeoVolume *m_Bes; //Bes world volume
87 TGeoVolume *m_BeamPipe; //Beam Pipe volume
88 TGeoVolume *m_Mdc;
89 TGeoVolume *m_Tof;
90 TGeoVolume *m_Emc;
91 TGeoVolume *m_Muc;
92 TGeoPhysicalNode *m_phyBeamPipe; //Long Peixun's update: for BeamPipe full 3D view
93
94 MdcROOTGeo *m_MdcROOTGeo; //MdcROOTGeo
95 TofROOTGeo *m_TofROOTGeo; //TofROOTGeo
96 EmcROOTGeo *m_EmcROOTGeo; //EmcROOTGeo
97 MucROOTGeo *m_MucROOTGeo; //MucROOTGeo
98
99 BesCircle2D *m_BeamPipeXY;
100 BesPolygon2D *m_BeamPipeZR;
101 BesPolygon2D *m_ZRPlaneOnXY;
102
103 Int_t m_BeamPipeColor; //Long Peixun's update: color of beampipe
104
105 ClassDef(BesGeometry, 1) // Bes Geometry
106};
107
109
110#endif
R__EXTERN BesGeometry * gBesGeometry
TGeoVolume * GetVolumeMucStrip(int part, int seg, int gap, int strip)
virtual void Draw3D()
TGeoVolume * GetVolumeMucGap(int part, int seg, int gap)
TGeoPhysicalNode * GetPhysicalMucGap(int part, int seg, int gap)
TGeoPhysicalNode * GetPhysicalEmcCrystal(int part, int phi, int theta)
TGeoVolume * GetVolumeMucAbsorber(int part, int seg, int absorber)
virtual void SetPhysicalDefaultVis()
virtual void InitFromROOT(TGeoVolume *volBes)
TGeoVolume * GetVolumeMucStripPlane(int part, int seg, int gap)
TGeoVolume * GetVolumeMucGasChamber(int part, int seg, int gap, int panel, int gasChamber)
virtual ~BesGeometry()
const char * GetFilename(const char *RunPeriod)
TGeoVolume * GetVolumeEmcCrystal(int part, int phi, int theta)
virtual void InitGeometry()
TGeoPhysicalNode * GetPhysicalMucStrip(int part, int seg, int gap, int strip)
TGeoVolume * GetVolumeMucAbsorberPanel(int part, int seg, int absorber, int panel)
virtual void Draw(Option_t *option="3D")
TGeoVolume * GetVolumeEmcPhi(int part, int phi)
virtual void SetDefaultVis()
TGeoVolume * GetVolumeEmcTheta(int part, int phi, int theta)
TGeoVolume * GetVolumeMucBakelite(int part, int seg, int gap, int RpcUpDown, int panel, int bakelite)
TGeoPhysicalNode * GetPhysicalMdcReplica(int layer, int replica)
TGeoPhysicalNode * GetPhysicalTofScin(int part, int layer, int scin)
virtual void Draw2DZR()
virtual void InitFromGDML(const TString fPath, bool mrpc=false, bool cgem=false)
virtual void Draw2DXY()
TGeoVolume * GetVolumeCrystal(int part, int phi, int theta)
Get crystal volume;.
TGeoVolume * GetVolumeTheta(int part, int phi, int theta)
Get theta volume;.
TGeoVolume * GetVolumePart(int part)
Get part volume;.
TGeoVolume * GetVolumePhi(int part, int phi)
Get phi volume;
TGeoPhysicalNode * GetPhysicalCrystal(int part, int phi, int theta)
Get crystal physical node;.
TGeoVolume * GetVolumeLayer(int layer)
Get layer volume;
TGeoVolume * GetVolumeReplica(int layer)
Get replica volume;.
TGeoVolume * GetVolumeSegment(int segment)
Get segment volume;.
TGeoPhysicalNode * GetPhysicalReplica(int layer, int replica)
Get replica physical node;.
TGeoVolume * GetVolumeStripPlane(int part, int seg, int gap)
Get strip plane volume;.
TGeoVolume * GetVolumeGasChamber(int part, int seg, int gap, int panel, int gasChamber)
Get rpc gas chamber volume;
TGeoPhysicalNode * GetPhysicalStrip(int part, int seg, int gap, int strip)
Get strip physical node;.
TGeoVolume * GetVolumeBakelite(int part, int seg, int gap, int panel, int bakelite)
Get rpc bakelite volume;
TGeoVolume * GetVolumeAbsorberPanel(int part, int seg, int absorber, int panel)
Get absorber panel volume;
TGeoVolume * GetVolumeGap(int part, int seg, int gap)
Get gap volume;
TGeoVolume * GetVolumeAbsorber(int part, int seg, int absorber)
Get absorber volume;
TGeoPhysicalNode * GetPhysicalGap(int part, int seg, int gap)
Get rpc gas chamber node;
TGeoPhysicalNode * GetPhysicalScin(int part, int scin)
Get scintillator physical node;.