CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemROOTGeo.h
Go to the documentation of this file.
1/*
2 * 2018/1/26 Long Peixun IHEP
3 * Cgem Geometry General for EventDisplay
4 * Inherit from class SubDetectorROOTGeo
5*/
6
7#ifndef CGEM_ROOT_GEO_H
8#define CGEM_ROOT_GEO_H
9
10#include <TGeoVolume.h>
11//#include <TGeoNode.h>
12//#include <TGeoPhysicalNode.h>
13#include <TPolyLine3D.h>
14
15#include "SubDetectorROOTGeo.h"
16#include "Cgem2DStrip.h"
17
18/*
19 * Class CgemROOTGeo contains all of the objects necessary to describe the CGEM geometry.
20 * Author: Long Peixun
21*/
22
24{
25public:
26 //Constructor
28 //Destructor
29 virtual ~CgemROOTGeo();
30
31 //Initialize ROOTGeo from GDML
32 void InitFromGDML(const char *gdmlFile, const char *setupName);
33 //Initialize ROOTGeo from TGeoVolume CGEM
34 void InitFromROOT(TGeoVolume *vol);
35
36 //Initialize Geometry
37 void InitGeometry();
38
39 //Set the pointers to theirs nodes
40 void SetNode();
41 //Set default visual attributes
43 //Set default 3D color
45
46 //Set all visible;
47 void SetAllVisible();
48 //Set quater visible
49 void SetQuarterVisible();
50 //Set half visible;
51 void SetHalfVisible();
52
53 //Set the pointers to the physical nodes
54 void SetPhysicalNode();
55 //Draw Detecor (what is detector depends on you)
56 void SetDetector();
57 //Set all physicalNodes corresponding to digiCol
58 void SetHits();
59 //Long Peixun's update: clear all hits
60 void ClearHits();
61
62 //Set CGEM default detector visibility
63 void SetVisCgemDetector();
64 //Set CGEM hits visibility
65 void SetVisCgemHits();
66
67 //Set CGEM volume, while initializing from ROOT
68 void SetVolumeCgem(TGeoVolume *vol) { m_CGEM = vol; }
69 //Get CGEM volume
70 TGeoVolume *GetVolumeCgem() const { return m_CGEM; }
71 //Get 2D strip
72 Cgem2DStripBase* Get2DStrip(bool is_x, int layer, int sheet, int strip) const;
73
74 //Get CGEM's anode, cathode and foil
75 TGeoNode* GetCgemAnode(int layer);
76 TGeoNode* GetCgemCathode(int layer);
77 TGeoNode* GetCgemFoil(int layer, int foil);
78
79 //Draw function
80 void Draw(Option_t *option);
81 //Draw unfolded function
82 void DrawUF(int layer, Option_t *option = "");
83 //Draw 2D hits
84 void DrawHits(Option_t *option);
85 //Draw 3D hits
86 void Draw3DHits(Option_t *option);
87
88 //These 4 functions are used for CGEM clusters calculation in BesEvent
89 double calcZFromLayerSheetVIDPhi(int layer, int sheet, double v, double phi) const;
90 double getRFromLayerSheet(int layer, int sheet) const;
91 double getSheetWidth(int layer, int sheet) const;
92 double isPointInSheet(int layer, int sheet, double phi, double z) const;
93private:
94 //Constants of CGEM
95 static const int m_kCgemLayer = 3;
96 static const int m_kCgemFoil = 3;
97
98 //CGEM nodes
99 TGeoVolume *m_CGEM;
100 TGeoNode *m_NodeCgemAnode[m_kCgemLayer];
101 TGeoNode *m_NodeCgemCathode[m_kCgemLayer];
102 TGeoNode *m_NodeCgemFoil[m_kCgemLayer][m_kCgemFoil];
103
104 //CGEM strip colors
105 int m_CgemColor;
106 int m_XstripColor; //3D X-strip color
107 int m_VstripColor; //3D V-strip color
108
109 //CGEM geometry information
110 Double_t RX[m_kCgemLayer][2];
111 Double_t RV[m_kCgemLayer][2];
112 Double_t StereoAngle[m_kCgemLayer][2];
113 Double_t SheetLength[m_kCgemLayer][2];
114 Double_t SheetWidth[m_kCgemLayer][2];
115 Double_t XMin[m_kCgemLayer][2];
116 Double_t ZMin[m_kCgemLayer][2];
117 Double_t XPitch[m_kCgemLayer][2];
118 Double_t VPitch[m_kCgemLayer][2];
119 Int_t NXStrip[m_kCgemLayer][2]; //X-strips number of each layer and sheet
120 Int_t NVStrip[m_kCgemLayer][2]; //V-strips number of each layer and sheet
121 Double_t *XStripPhi[m_kCgemLayer][2]; //phi of each X-strip
122 Double_t *VStripV[m_kCgemLayer][2]; //New Geom: V of each V-strip
123
124 //CGEM 2D geometry
125 //XY:
126 BesCircle2D *m_CgemXY;
127 BesCircle2D *m_CgemCathodeXY[m_kCgemLayer];
128 BesCircle2D *m_CgemAnodeXY[m_kCgemLayer];
129 BesCircle2D *m_CgemFoilXY[m_kCgemLayer][m_kCgemFoil];
130 Cgem2DXStrip **m_CgemXStrip[m_kCgemLayer][2];
131
132 //ZR:
133 BesPolygon2D *m_CgemZR[2];
134 BesPolygon2D *m_CgemCathodeZR[m_kCgemLayer][2];
135 BesPolygon2D *m_CgemAnodeZR[m_kCgemLayer][2];
136 BesPolygon2D *m_CgemFoilZR[m_kCgemLayer][m_kCgemFoil][2];
137 Cgem2DVStrip **m_CgemVStrip[m_kCgemLayer][2];
138
139 //CGEM unfolded geometry
140 BesPolygon2D *m_CgemSheet[m_kCgemLayer][2];
141
142 //Hits array
143 const TObjArray* m_CgemDigiCol;
144};
145
146#endif //CGEM_ROOT_GEO_H
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35
double getRFromLayerSheet(int layer, int sheet) const
void SetVisCgemHits()
TGeoNode * GetCgemAnode(int layer)
void SetPhysicalNode()
void SetHits()
void SetVolumeCgem(TGeoVolume *vol)
Definition: CgemROOTGeo.h:68
void SetNode()
void Draw3DHits(Option_t *option)
double getSheetWidth(int layer, int sheet) const
void SetVolumeDefaultVis()
void InitFromROOT(TGeoVolume *vol)
Definition: CgemROOTGeo.cxx:89
Cgem2DStripBase * Get2DStrip(bool is_x, int layer, int sheet, int strip) const
TGeoNode * GetCgemCathode(int layer)
virtual ~CgemROOTGeo()
Definition: CgemROOTGeo.cxx:60
void ClearHits()
void InitGeometry()
Definition: CgemROOTGeo.cxx:97
TGeoVolume * GetVolumeCgem() const
Definition: CgemROOTGeo.h:70
TGeoNode * GetCgemFoil(int layer, int foil)
double isPointInSheet(int layer, int sheet, double phi, double z) const
void SetPhysicalDefaultVis()
void DrawHits(Option_t *option)
void SetAllVisible()
double calcZFromLayerSheetVIDPhi(int layer, int sheet, double v, double phi) const
void SetVisCgemDetector()
void SetDetector()
void DrawUF(int layer, Option_t *option="")
void SetHalfVisible()
void SetQuarterVisible()
void InitFromGDML(const char *gdmlFile, const char *setupName)
Definition: CgemROOTGeo.cxx:81
c1_1 Draw()