BmnRoot
Loading...
Searching...
No Matches
BmnInnerTrackerGeometryDraw.cxx
Go to the documentation of this file.
2
4 // 1. Initialize GEM and SILICON geometries to be used ...
5 TString gPathConfig = gSystem->Getenv("VMCWORKDIR");
6 fGEM = new BmnGemStripStationSet(gPathConfig + "/parameters/gem/XMLConfigs/GemRunSpring2018.xml");
7 fSILICON = new BmnSiliconStationSet(gPathConfig + "/parameters/silicon/XMLConfigs/SiliconRunSpring2018.xml");
8
9 // 2. Create box, layer and dead zone borders ...
10 CreateBordersGem();
11 CreateBordersSilicon();
12}
13
15 if (fGEM)
16 delete fGEM;
17
18 if (fSILICON)
19 delete fSILICON;
20}
21
22void BmnInnerTrackerGeometryDraw::CreateBordersGem() {
23 const Int_t nMods = 2;
24 const Int_t nLayers = 4;
25
26 gemModBoxes = new TBox**[fGEM->GetNStations()];
27 gemLayBoxes = new TBox***[fGEM->GetNStations()];
28 gemDeadZones = new TPolyLine***[fGEM->GetNStations()];
29
30 for (Int_t iStat = 0; iStat < fGEM->GetNStations(); iStat++) {
31 gemModBoxes[iStat] = new TBox*[nMods];
32 gemLayBoxes[iStat] = new TBox**[nMods];
33 gemDeadZones[iStat] = new TPolyLine**[nMods];
34
35 for (Int_t iMod = 0; iMod < fGEM->GetStation(iStat)->GetNModules(); iMod++) {
36 BmnGemStripModule* mod = fGEM->GetStation(iStat)->GetModule(iMod);
37
38 Double_t xmin = -mod->GetXMinModule();
39 Double_t xmax = -mod->GetXMaxModule();
40 Double_t ymin = mod->GetYMinModule();
41 Double_t ymax = mod->GetYMaxModule();
42
43 gemModBoxes[iStat][iMod] = new TBox(xmin, ymin, xmax, ymax);
44 gemLayBoxes[iStat][iMod] = new TBox*[nLayers];
45 gemDeadZones[iStat][iMod] = new TPolyLine*[nLayers];
46
47 gemModBoxes[iStat][iMod]->SetLineColorAlpha(TColor::GetColor("#009900"), 0.3);
48 gemModBoxes[iStat][iMod]->SetLineStyle(1);
49 gemModBoxes[iStat][iMod]->SetLineWidth(1);
50
51 gemModBoxes[iStat][iMod]->SetFillColorAlpha(TColor::GetColor("#cccccc"), 0.3);
52 gemModBoxes[iStat][iMod]->SetFillStyle(0); // 0 - not filled, 1001 - solid
53
54 for (Int_t iLayer = 0; iLayer < fGEM->GetStation(iStat)->GetModule(iMod)->GetNStripLayers(); iLayer++) {
55 BmnGemStripLayer layer = fGEM->GetStation(iStat)->GetModule(iMod)->GetStripLayer(iLayer);
56
57 // Get dead zones per each layer ...
58 vector <DeadZoneOfStripLayer> DeadZones = layer.GetDeadZones();
59 Int_t NDeadZones = DeadZones.size();
60
61 gemDeadZones[iStat][iMod][iLayer] = new TPolyLine[NDeadZones];
62 gemDeadZones[iStat][iMod][iLayer]->SetFillStyle(0); // 0 - not filled, 1001 - solid
63
64 for (Int_t iZone = 0; iZone < NDeadZones; ++iZone) {
65 DeadZoneOfStripLayer dead_zone = DeadZones[iZone];
66
67 for (Int_t ipoint = 0; ipoint < dead_zone.GetNPoints(); ++ipoint) {
68 Double_t x = -dead_zone.GetXPoint(ipoint);
69 Double_t y = dead_zone.GetYPoint(ipoint);
70 gemDeadZones[iStat][iMod][iLayer][iZone].SetNextPoint(x, y);
71 if (ipoint == dead_zone.GetNPoints() - 1) {
72 gemDeadZones[iStat][iMod][iLayer][iZone].SetNextPoint(dead_zone.GetXPoint(0), dead_zone.GetYPoint(0));
73 }
74 }
75 }
76
77 Double_t xminL = -layer.GetXMinLayer();
78 Double_t xmaxL = -layer.GetXMaxLayer();
79 Double_t yminL = layer.GetYMinLayer();
80 Double_t ymaxL = layer.GetYMaxLayer();
81
82 gemLayBoxes[iStat][iMod][iLayer] = new TBox(xminL, yminL, xmaxL, ymaxL);
83 gemLayBoxes[iStat][iMod][iLayer]->SetLineColorAlpha(TColor::GetColor("#009900"), 0.3);
84 gemLayBoxes[iStat][iMod][iLayer]->SetLineStyle(1);
85 gemLayBoxes[iStat][iMod][iLayer]->SetLineWidth(1);
86
87 gemLayBoxes[iStat][iMod][iLayer]->SetFillColorAlpha(TColor::GetColor("#cccccc"), 0.3);
88 gemLayBoxes[iStat][iMod][iLayer]->SetFillStyle(0); // 0 - not filled, 1001 - solid
89 }
90 }
91 }
92}
93
94void BmnInnerTrackerGeometryDraw::CreateBordersSilicon() {
95 const Int_t nMods = 8;
96 const Int_t nLayers = 4;
97
98 siliconModBoxes = new TBox**[fSILICON->GetNStations()];
99 siliconLayBoxes = new TBox***[fSILICON->GetNStations()];
100 siliconDeadZones = new TPolyLine***[fSILICON->GetNStations()];
101
102 for (Int_t iStat = 0; iStat < fSILICON->GetNStations(); iStat++) {
103 siliconModBoxes[iStat] = new TBox*[nMods];
104 siliconLayBoxes[iStat] = new TBox**[nMods];
105 siliconDeadZones[iStat] = new TPolyLine**[nMods];
106
107 for (Int_t iMod = 0; iMod < fSILICON->GetStation(iStat)->GetNModules(); iMod++) {
108 BmnSiliconModule* mod = fSILICON->GetStation(iStat)->GetModule(iMod);
109
110 Double_t xmin = -mod->GetXMinModule();
111 Double_t xmax = -mod->GetXMaxModule();
112 Double_t ymin = mod->GetYMinModule();
113 Double_t ymax = mod->GetYMaxModule();
114
115 siliconModBoxes[iStat][iMod] = new TBox(xmin, ymin, xmax, ymax);
116 siliconLayBoxes[iStat][iMod] = new TBox*[nLayers];
117 siliconDeadZones[iStat][iMod] = new TPolyLine*[nLayers];
118
119 siliconModBoxes[iStat][iMod] = new TBox(xmin, ymin, xmax, ymax);
120 siliconModBoxes[iStat][iMod]->SetLineColorAlpha(TColor::GetColor("#009900"), 0.3);
121 siliconModBoxes[iStat][iMod]->SetLineStyle(1);
122 siliconModBoxes[iStat][iMod]->SetLineWidth(1);
123
124 siliconModBoxes[iStat][iMod]->SetFillColorAlpha(TColor::GetColor("#cccccc"), 0.3);
125 siliconModBoxes[iStat][iMod]->SetFillStyle(0); // 0 - not filled, 1001 - solid
126
127 for (Int_t iLayer = 0; iLayer < fSILICON->GetStation(iStat)->GetModule(iMod)->GetNStripLayers(); iLayer++) {
128 BmnSiliconLayer layer = fSILICON->GetStation(iStat)->GetModule(iMod)->GetStripLayer(iLayer);
129
130 // Get dead zones per each layer ...
131 vector <DeadZoneOfStripLayer> DeadZones = layer.GetDeadZones();
132 Int_t NDeadZones = DeadZones.size();
133
134 siliconDeadZones[iStat][iMod][iLayer] = new TPolyLine[NDeadZones];
135 if (iStat == 2 && iMod == 7 && (iLayer == 0 || iLayer == 2))
136 siliconDeadZones[iStat][iMod][iLayer]->SetFillStyle(0); // 0 - not filled, 1001 - solid
137
138 for (Int_t iZone = 0; iZone < NDeadZones; ++iZone) {
139 DeadZoneOfStripLayer dead_zone = DeadZones[iZone];
140
141 for (Int_t ipoint = 0; ipoint < dead_zone.GetNPoints(); ++ipoint) {
142 Double_t x = -dead_zone.GetXPoint(ipoint);
143 Double_t y = dead_zone.GetYPoint(ipoint);
144 siliconDeadZones[iStat][iMod][iLayer][iZone].SetNextPoint(x, y);
145 if (ipoint == dead_zone.GetNPoints() - 1) {
146 siliconDeadZones[iStat][iMod][iLayer][iZone].SetNextPoint(dead_zone.GetXPoint(0), dead_zone.GetYPoint(0));
147 }
148 }
149 }
150
151 Double_t xminL = -layer.GetXMinLayer();
152 Double_t xmaxL = -layer.GetXMaxLayer();
153 Double_t yminL = layer.GetYMinLayer();
154 Double_t ymaxL = layer.GetYMaxLayer();
155
156 siliconLayBoxes[iStat][iMod][iLayer] = new TBox(xminL, yminL, xmaxL, ymaxL);
157 siliconLayBoxes[iStat][iMod][iLayer]->SetLineColorAlpha(TColor::GetColor("#009900"), 0.3);
158 siliconLayBoxes[iStat][iMod][iLayer]->SetLineStyle(1);
159 siliconLayBoxes[iStat][iMod][iLayer]->SetLineWidth(1);
160 siliconLayBoxes[iStat][iMod][iLayer]->SetFillColorAlpha(TColor::GetColor("#cccccc"), 0.3);
161 siliconLayBoxes[iStat][iMod][iLayer]->SetFillStyle(0); // 0 - not filled, 1001 - solid
162 }
163 }
164 }
165}
166
167
Double_t GetYMinLayer()
Double_t GetYMaxLayer()
Double_t GetXMinLayer()
vector< DeadZoneOfStripLayer > GetDeadZones()
Double_t GetXMaxLayer()
BmnGemStripLayer & GetStripLayer(Int_t num)
BmnGemStripStation * GetStation(Int_t station_num)
BmnGemStripModule * GetModule(Int_t module_num)
Double_t GetXMaxLayer()
Double_t GetYMinLayer()
Double_t GetYMaxLayer()
vector< DeadZoneOfStripLayer > GetDeadZones()
Double_t GetXMinLayer()
Double_t GetYMinModule()
Double_t GetXMinModule()
Double_t GetXMaxModule()
BmnSiliconLayer & GetStripLayer(Int_t num)
Double_t GetYMaxModule()
BmnSiliconStation * GetStation(Int_t station_num)
BmnSiliconModule * GetModule(Int_t module_num)
Double_t GetXPoint(Int_t index)
Double_t GetYPoint(Int_t index)