BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
create_rootgeom_GEMS_RunSRCSpring2018.C
Go to the documentation of this file.
1/*
2 * Use this macro to create ROOT geometry for the RunSRCSpring2018 configuration
3 * (BM@N RUN-7:SRC)
4 *
5 * Created: 30.08.2018
6 * 02.03.2021 (Updated): radius of hole in active zone (4.0 -> 6.0 cm)
7 * Author: Baranov D.
8 */
9
10#include "TGeoVolume.h"
11
12// Set Parameters of GEMS -------------------------------------------------------
13const Int_t NStations = 10; // stations in the detector
14const Int_t NMaxModules = 2; // max. number of modules in a station
15
16//(X-Y-Z)Positions of stations (sensitive volumes)
17// const Double_t XStationPositions[NStations] = { 0.0 /*0*/, 0.0 /*1*/, 0.0 /*2*/, 0.0 /*3*/, 0.0 /*4*/, 0.0 /*5*/, 0.0
18// /*6*/, 0.0 /*7*/, 0.0 /*8*/, 0.0 /*9*/ }; const Double_t YStationPositions[NStations] = { 0.0 /*0*/, 0.0 /*1*/, 0.0
19// /*2*/, 0.0 /*3*/, 0.0 /*4*/, 0.0 /*5*/, 0.0 /*6*/, 0.0 /*7*/, 0.0 /*8*/, 0.0 /*9*/ }; const Double_t
20// ZStationPositions[NStations] = { 0.0 /*0*/, 0.0 /*1*/, 0.0 /*2*/, 0.0 /*3*/, 0.0 /*4*/, 0.0 /*5*/, 0.0 /*6*/, 0.0
21// /*7*/, 0.0 /*8*/, 0.0 /*9*/ };
22
23//(X-Y-Z)Positions of stations (sensitive volumes) -----------------------------
25 +117.22007, // station 0 (left side: upper GEM M4)
26 +117.27807, // station 1 (left side: lower GEM M3)
27 -117.51723, // station 2 (right side: upper GEM M1)
28 -115.31016, // station 3 (right side: lower GEM M2)
29 +1.0055, // station 4 (GEM M10)
30 +1.4715, // station 5 (GEM M7)
31 +2.1145, // station 6 (GEM M5)
32 +2.9225, // station 7 (GEM M6)
33 +3.6775, // station 8 (GEM M8)
34 +4.5025 // station 9 (GEM M9)
35};
37 +16.86775, // station 0 (left side: upper GEM M4)
38 -25.90225, // station 1 (left side: lower GEM M3)
39 +16.86775, // station 2 (right side: upper GEM M1)
40 -25.76025, // station 3 (right side: lower GEM M2)
41 +7.97675, // station 4 (GEM M10)
42 +7.96375, // station 5 (GEM M7)
43 +7.64975, // station 6 (GEM M5)
44 +7.74575, // station 7 (GEM M6)
45 +8.02675, // station 8 (GEM M8)
46 +7.95175 // station 9 (GEM M9)
47};
49 -444.86679, // station 0 (left side: upper GEM M4)
50 -447.56632, // station 1 (left side: lower GEM M3)
51 -444.91641, // station 2 (right side: upper GEM M1)
52 -446.26916, // station 3 (right side: lower GEM M2)
53 +64.754, // station 4 (GEM M10)
54 +87.854, // station 5 (GEM M7)
55 +112.967, // station 6 (GEM M5)
56 +135.988, // station 7 (GEM M6)
57 +160.845, // station 8 (GEM M8)
58 +183.712 // station 9 (GEM M9)
59};
60//------------------------------------------------------------------------------
61
62//(X-Y-Z)Shifts of modules in each station -------------------------------------
64 {0.0}, // station 0 (left side: upper GEM M4)
65 {0.0}, // station 1 (left side: lower GEM M3)
66 {0.0}, // station 2 (right side: upper GEM M1)
67 {0.0}, // station 3 (right side: lower GEM M2)
68 {163.2 * 0.25, -163.2 * 0.25}, // station 4 (GEM M10)
69 {163.2 * 0.25, -163.2 * 0.25}, // station 5 (GEM M7)
70 {163.2 * 0.25, -163.2 * 0.25}, // station 6 (GEM M5)
71 {163.2 * 0.25, -163.2 * 0.25}, // station 7 (GEM M6)
72 {163.2 * 0.25, -163.2 * 0.25}, // station 8 (GEM M8)
73 {163.2 * 0.25, -163.2 * 0.25} // station 9 (GEM M9)
74};
76 {0.0}, // station 0 (left side: upper GEM M4)
77 {0.0}, // station 1 (left side: lower GEM M3)
78 {0.0}, // station 2 (right side: upper GEM M1)
79 {0.0}, // station 3 (right side: lower GEM M2)
80 {0.0, 0.0}, // station 4 (GEM M10)
81 {0.0, 0.0}, // station 5 (GEM M7)
82 {0.0, 0.0}, // station 6 (GEM M5)
83 {0.0, 0.0}, // station 7 (GEM M6)
84 {0.0, 0.0}, // station 8 (GEM M8)
85 {0.0, 0.0} // station 9 (GEM M9)
86};
88 {0.0}, // station 0 (left side: upper GEM M4)
89 {0.0}, // station 1 (left side: lower GEM M3)
90 {0.0}, // station 2 (right side: upper GEM M1)
91 {0.0}, // station 3 (right side: lower GEM M2)
92 {0.0, 0.0}, // station 4 (GEM M10)
93 {0.0, 0.0}, // station 5 (GEM M7)
94 {0.0, 0.0}, // station 6 (GEM M5)
95 {0.0, 0.0}, // station 7 (GEM M6)
96 {0.0, 0.0}, // station 8 (GEM M8)
97 {0.0, 0.0} // station 9 (GEM M9)
98};
99//------------------------------------------------------------------------------
100
101// GEM plane sizes (66x41 type) -------------------------------------------------
105
108const Double_t dZFrame_Station66x41 = 2.1; // was 2.3 cm - thickness
109//------------------------------------------------------------------------------
110
111// GEM plane sizes (163x45 type) ------------------------------------------------
115
119//------------------------------------------------------------------------------
120
121// GeoManager
123
124// media
130
131class FairGeoMedia;
132class FairGeoBuilder;
133
134TGeoVolume* CreateStation(TString station_name);
135TGeoVolume* CreateModule_Station66x41(TString module_name, Double_t xsize, Double_t ysize, Double_t zsize);
138 Double_t xsize,
139 Double_t ysize,
140 Double_t zsize,
141 Double_t hole_radius);
143 Double_t dx,
144 Double_t dy,
145 Double_t dz,
146 Double_t hole_radius);
147
148void DefineRequiredMedia(FairGeoMedia* geoMedia, FairGeoBuilder* geoBuild)
149{
150
151 // air medium
152 FairGeoMedium* mAir = geoMedia->getMedium("air");
153 if (!mAir)
154 Fatal("Main", "FairMedium air not found");
155 geoBuild->createMedium(mAir);
156 pMedAir = gGeoManager->GetMedium("air");
157 if (!pMedAir)
158 Fatal("Main", "Medium air not found");
159
160 // carbon medium
161 FairGeoMedium* mCarbon = geoMedia->getMedium("carbon");
162 if (!mCarbon)
163 Fatal("Main", "FairMedium carbon not found");
164 geoBuild->createMedium(mCarbon);
165 pMedCarbon = gGeoManager->GetMedium("carbon");
166 if (!pMedCarbon)
167 Fatal("Main", "Medium carbon not found");
168
169 // fiberglass medium
170 FairGeoMedium* mFiberGlass = geoMedia->getMedium("fiberglass");
171 if (!mFiberGlass)
172 Fatal("Main", "FairMedium fiberglass not found");
173 geoBuild->createMedium(mFiberGlass);
174 pMedFiberGlass = gGeoManager->GetMedium("fiberglass");
175 if (!pMedFiberGlass)
176 Fatal("Main", "Medium fiberglass not found");
177
178 // arco27020 medium
179 FairGeoMedium* mArCO27030 = geoMedia->getMedium("arco27030");
180 if (!mArCO27030)
181 Fatal("Main", "FairMedium arco27030 not found");
182 geoBuild->createMedium(mArCO27030);
183 pMedArCO27030 = gGeoManager->GetMedium("arco27030");
184 if (!pMedArCO27030)
185 Fatal("Main", "Medium arco27030 not found");
186}
187
189{
190
191 // ---- set working directory --------------------------------------------
192 TString gPath = gSystem->Getenv("VMCWORKDIR");
193
194 // ------- Geometry file name (output) ----------------------------------
195 const TString geoDetectorName = "GEMS";
196 const TString geoDetectorVersion = "RunSRCSpring2018";
197 const TString geoFileName = gPath + "/geometry/" + geoDetectorName + "_" + geoDetectorVersion + ".root";
198
199 // ---- global geometry parameters ---------------------------------------
200 FairGeoLoader* geoLoad = new FairGeoLoader("TGeo", "FairGeoLoader");
201 FairGeoInterface* geoFace = geoLoad->getGeoInterface();
202
203 // ------- Load media from media file ----------------------------------
204 TString medFile = gPath + "/geometry/media.geo";
205 geoFace->setMediaFile(medFile);
206 geoFace->readMedia();
207 FairGeoMedia* geoMedia = geoFace->getMedia();
208 FairGeoBuilder* geoBuild = geoLoad->getGeoBuilder();
209
210 DefineRequiredMedia(geoMedia, geoBuild);
211 // -------------------------------------------------------------------------
212
213 // -------------- Create geometry and top volume -------------------------
214 gGeoMan = (TGeoManager*)gROOT->FindObject("FAIRGeom");
215 gGeoMan->SetName(geoDetectorName + "_geom");
216 TGeoVolume* top = new TGeoVolumeAssembly("TOP");
217 top->SetMedium(pMedAir);
218 gGeoMan->SetTopVolume(top);
219 // gGeoMan->SetTopVisible(1);
220 // --------------------------------------------------------------------------
221
222 // Define TOP Geometry
223 TGeoVolume* GEMS = new TGeoVolumeAssembly(geoDetectorName);
224 GEMS->SetMedium(pMedAir);
225
226 // TGeoVolume *target = gGeoMan->MakeSphere("target", 0, 0, 5.0);
227 // GEMS->AddNode(target, 0, new TGeoTranslation(0.0, 0.0, -647.476));
228
229 // station 0 (small 66x41 GEM: left side: upper station)
230 if (1) {
231 Int_t stationNum = 0; // station number
232
233 TGeoVolume* station = CreateStation(TString("station") + TString::Itoa(stationNum, 10));
234 TGeoVolume* module0 =
235 CreateModule_Station66x41(TString("Sensor_module0_") + station->GetName(), XModuleSize_Station66x41,
239
240 TGeoCombiTrans* module0_transform = new TGeoCombiTrans();
241 module0_transform->SetTranslation(XModuleShifts[stationNum][0], YModuleShifts[stationNum][0],
242 ZModuleShifts[stationNum][0] + ZModuleSize_Station66x41 * 0.5);
243 module0_transform->RotateY(+30.5843); // deg
244
245 TGeoCombiTrans* station_transform = new TGeoCombiTrans();
246 station_transform->SetTranslation(XStationPositions[stationNum], YStationPositions[stationNum],
247 ZStationPositions[stationNum]);
248
249 station->AddNode(module0, 0, new TGeoCombiTrans(*module0_transform)); // module
250 station->AddNode(frame0, 0, new TGeoCombiTrans(*module0_transform)); // frame
251
252 GEMS->AddNode(station, 0, station_transform);
253 }
254
255 // station 1 (small 66x41 GEM: left side: lower station)
256 if (1) {
257 Int_t stationNum = 1; // station number
258
259 TGeoVolume* station = CreateStation(TString("station") + TString::Itoa(stationNum, 10));
260 TGeoVolume* module0 =
261 CreateModule_Station66x41(TString("Sensor_module0_") + station->GetName(), XModuleSize_Station66x41,
265
266 TGeoCombiTrans* module0_transform = new TGeoCombiTrans();
267 module0_transform->SetTranslation(XModuleShifts[stationNum][0], YModuleShifts[stationNum][0],
268 ZModuleShifts[stationNum][0] + ZModuleSize_Station66x41 * 0.5);
269 module0_transform->RotateY(+30.5843); // deg
270
271 TGeoCombiTrans* station_transform = new TGeoCombiTrans();
272 station_transform->SetTranslation(XStationPositions[stationNum], YStationPositions[stationNum],
273 ZStationPositions[stationNum]);
274
275 station->AddNode(module0, 0, new TGeoCombiTrans(*module0_transform)); // module
276 station->AddNode(frame0, 0, new TGeoCombiTrans(*module0_transform)); // frame
277
278 GEMS->AddNode(station, 0, station_transform);
279 }
280
281 // station 2 (small 66x41 GEM: right side: upper station)
282 if (1) {
283 Int_t stationNum = 2; // station number
284
285 TGeoVolume* station = CreateStation(TString("station") + TString::Itoa(stationNum, 10));
286 TGeoVolume* module0 =
287 CreateModule_Station66x41(TString("Sensor_module0_") + station->GetName(), XModuleSize_Station66x41,
291
292 TGeoCombiTrans* module0_transform = new TGeoCombiTrans();
293 module0_transform->SetTranslation(XModuleShifts[stationNum][0], YModuleShifts[stationNum][0],
294 ZModuleShifts[stationNum][0] + ZModuleSize_Station66x41 * 0.5);
295 module0_transform->RotateY(-30.6845); // deg
296
297 TGeoCombiTrans* station_transform = new TGeoCombiTrans();
298 station_transform->SetTranslation(XStationPositions[stationNum], YStationPositions[stationNum],
299 ZStationPositions[stationNum]);
300
301 station->AddNode(module0, 0, new TGeoCombiTrans(*module0_transform)); // module
302 station->AddNode(frame0, 0, new TGeoCombiTrans(*module0_transform)); // frame
303
304 GEMS->AddNode(station, 0, station_transform);
305 }
306
307 // station 3 (small 66x41 GEM: right side: lower station)
308 if (1) {
309 Int_t stationNum = 3; // station number
310
311 TGeoVolume* station = CreateStation(TString("station") + TString::Itoa(stationNum, 10));
312 TGeoVolume* module0 =
313 CreateModule_Station66x41(TString("Sensor_module0_") + station->GetName(), XModuleSize_Station66x41,
317
318 TGeoCombiTrans* module0_transform = new TGeoCombiTrans();
319 module0_transform->SetTranslation(XModuleShifts[stationNum][0], YModuleShifts[stationNum][0],
320 ZModuleShifts[stationNum][0] + ZModuleSize_Station66x41 * 0.5);
321 module0_transform->RotateY(-30.6845); // deg
322
323 TGeoCombiTrans* station_transform = new TGeoCombiTrans();
324 station_transform->SetTranslation(XStationPositions[stationNum], YStationPositions[stationNum],
325 ZStationPositions[stationNum]);
326
327 station->AddNode(module0, 0, new TGeoCombiTrans(*module0_transform)); // module
328 station->AddNode(frame0, 0, new TGeoCombiTrans(*module0_transform)); // frame
329
330 GEMS->AddNode(station, 0, station_transform);
331 }
332
333 // stations 4-9 (each is a big 163x45 GEM consisting of two modules)
334 if (1) {
335 for (Int_t istation = 4; istation < 10; ++istation) {
336
337 Int_t stationNum = istation; // station number
338
339 TGeoVolume* station = CreateStation(TString("station") + TString::Itoa(stationNum, 10));
340 TGeoVolume* module0 =
343 TGeoVolume* module1 =
346 TGeoVolume* frame0 =
349 TGeoVolume* frame1 =
352
353 TGeoCombiTrans* module0_transform = new TGeoCombiTrans();
354 module0_transform->SetTranslation(XModuleShifts[stationNum][0], YModuleShifts[stationNum][0],
355 ZModuleShifts[stationNum][0] + ZModuleSize_Station163x45 * 0.5);
356
357 TGeoCombiTrans* module1_transform = new TGeoCombiTrans();
358 module1_transform->ReflectX(true);
359 module1_transform->SetTranslation(XModuleShifts[stationNum][1], YModuleShifts[stationNum][1],
360 ZModuleShifts[stationNum][1] + ZModuleSize_Station163x45 * 0.5);
361
362 TGeoCombiTrans* station_transform = new TGeoCombiTrans();
363 station_transform->SetTranslation(XStationPositions[stationNum], YStationPositions[stationNum],
364 ZStationPositions[stationNum]);
365
366 station->AddNode(module0, 0, new TGeoCombiTrans(*module0_transform)); // module
367 station->AddNode(module1, 0, new TGeoCombiTrans(*module1_transform)); // module
368
369 station->AddNode(frame0, 0, new TGeoCombiTrans(*module0_transform)); // frame
370 station->AddNode(frame1, 0, new TGeoCombiTrans(*module1_transform)); // frame
371
372 GEMS->AddNode(station, 0, station_transform);
373 }
374 }
375
376 top->AddNode(GEMS, 0);
378
379 // --------------- Finish -----------------------------------------------
380 gGeoMan->CloseGeometry();
381 gGeoMan->CheckOverlaps(0.0001);
382 gGeoMan->PrintOverlaps();
383 gGeoMan->Test();
384 // gGeoMan->RestoreMasterVolume();
385
386 TFile* geoFile = new TFile(geoFileName, "RECREATE");
387 top->Write();
388 geoFile->Close();
389 top->Draw("ogl");
390}
391//------------------------------------------------------------------------------
392
394{
395
396 TGeoVolume* stationA = new TGeoVolumeAssembly(station_name);
397 stationA->SetMedium(pMedAir);
398
399 return stationA;
400}
401
403{
404
405 // module shape
406 TGeoShape* moduleS = new TGeoBBox("moduleS", xsize * 0.5, ysize * 0.5, zsize * 0.5);
407
408 // module volume
409 TGeoVolume* moduleV = new TGeoVolume(module_name, moduleS);
410
411 // medium
412 if (pMedArCO27030)
413 moduleV->SetMedium(pMedArCO27030);
414 else
415 Fatal("Main", "Invalid medium for sensitive modules!");
416
417 // visual parameters
418 moduleV->SetLineColor(TColor::GetColor("#ff47ca"));
419 moduleV->SetTransparency(20);
420
421 return moduleV;
422}
423
425{
426
427 // frame shapes
428 TGeoShape* vertical_frameS =
429 new TGeoBBox("vertical_frameS", dx * 0.5, YModuleSize_Station66x41 * 0.5 + dy, dz * 0.5);
430 TGeoShape* horizontal_frameS =
431 new TGeoBBox("horizontal_frameS", XModuleSize_Station66x41 * 0.5, dy * 0.5, dz * 0.5);
432
433 // frame volumes
434 TGeoVolume* composite_frameV = new TGeoVolumeAssembly(frame_name);
435 TGeoVolume* vertical_frameV = new TGeoVolume(frame_name + "_vertical_frameV", vertical_frameS);
436 TGeoVolume* horizontal_frameV = new TGeoVolume(frame_name + "_horizontal_frameV", horizontal_frameS);
437
438 // media
439 TGeoMedium* frame_medium = pMedCarbon; // set medium
440 if (pMedCarbon) {
441 vertical_frameV->SetMedium(frame_medium);
442 horizontal_frameV->SetMedium(frame_medium);
443 } else
444 Fatal("Main", "Invalid medium for frames!");
445 if (pMedAir) {
446 composite_frameV->SetMedium(pMedAir);
447 } else
448 Fatal("Main", "Invalid medium for frames!");
449
450 // visual parameters
451 vertical_frameV->SetLineColor(TColor::GetColor("#9999ff"));
452 horizontal_frameV->SetLineColor(TColor::GetColor("#9999ff"));
453
454 // frame part positions in the frame
455 TGeoCombiTrans* left_vertical_frame_position = new TGeoCombiTrans();
456 left_vertical_frame_position->SetTranslation(XModuleSize_Station66x41 * 0.5 + dXFrame_Station66x41 * 0.5, 0.0, 0.0);
457
458 TGeoCombiTrans* right_vertical_frame_position = new TGeoCombiTrans();
459 right_vertical_frame_position->SetTranslation(-XModuleSize_Station66x41 * 0.5 - dXFrame_Station66x41 * 0.5, 0.0,
460 0.0);
461
462 TGeoCombiTrans* bottom_horizontal_frame_position = new TGeoCombiTrans();
463 bottom_horizontal_frame_position->SetTranslation(0.0, YModuleSize_Station66x41 * 0.5 + dYFrame_Station66x41 * 0.5,
464 0.0);
465
466 TGeoCombiTrans* lower_horizontal_frame_position = new TGeoCombiTrans();
467 lower_horizontal_frame_position->SetTranslation(0.0, -YModuleSize_Station66x41 * 0.5 - dYFrame_Station66x41 * 0.5,
468 0.0);
469
470 composite_frameV->AddNode(vertical_frameV, 0, left_vertical_frame_position);
471 composite_frameV->AddNode(vertical_frameV, 1, right_vertical_frame_position);
472 composite_frameV->AddNode(horizontal_frameV, 0, bottom_horizontal_frame_position);
473 composite_frameV->AddNode(horizontal_frameV, 1, lower_horizontal_frame_position);
474
475 return composite_frameV;
476}
477
479 Double_t xsize,
480 Double_t ysize,
481 Double_t zsize,
482 Double_t hole_radius)
483{
484
485 // module shapes
486 TGeoShape* module_partS = new TGeoBBox("module_partS", xsize * 0.5, ysize * 0.5, zsize * 0.5);
487 TGeoShape* holeS = new TGeoTube("holeS", 0.0, hole_radius, zsize * 0.5 + 0.01);
488
489 gRandom->SetSeed(0);
490 Int_t uniqueId = gRandom->Integer(10000);
491 TGeoTranslation* hole_module_trans = new TGeoTranslation(
492 TString("hole_module_trans_") + TString::Itoa(uniqueId, 10), -xsize * 0.5, -ysize * 0.5, 0.0);
493
494 hole_module_trans->RegisterYourself();
495
496 TString bool_expression_module = TString(module_partS->GetName()) + TString(" - ") + TString(holeS->GetName())
497 + TString(":") + TString(hole_module_trans->GetName());
498 TGeoCompositeShape* moduleS = new TGeoCompositeShape(bool_expression_module);
499
500 // module volume
501 TGeoVolume* moduleV = new TGeoVolume(module_name, moduleS);
502
503 // medium
504 if (pMedArCO27030)
505 moduleV->SetMedium(pMedArCO27030);
506 else
507 Fatal("Main", "Invalid medium for sensitive modules!");
508
509 // visual parameters
510 moduleV->SetLineColor(TColor::GetColor("#ff47ca"));
511 moduleV->SetTransparency(20);
512
513 return moduleV;
514}
515
517 Double_t dx,
518 Double_t dy,
519 Double_t dz,
520 Double_t hole_radius)
521{
522
523 // frame shapes
524 TGeoShape* vertical_frameS =
525 new TGeoBBox("vertical_frameS", dx * 0.5, YModuleSize_Station163x45 * 0.5 + dy, dz * 0.5);
526 TGeoShape* horizontal_upper_frameS =
527 new TGeoBBox("horizontal_upper_frameS", XModuleSize_Station163x45 * 0.5, dy * 0.5, dz * 0.5);
528 TGeoShape* horizontal_bottom_frameS = new TGeoBBox(
529 "horizontal_upper_frameS", XModuleSize_Station163x45 * 0.5 - hole_radius * 0.5, dy * 0.5, dz * 0.5);
530
531 // frame volumes
532 TGeoVolume* composite_frameV = new TGeoVolumeAssembly(frame_name);
533 TGeoVolume* vertical_frameV = new TGeoVolume(frame_name + "_vertical_frameV", vertical_frameS);
534 TGeoVolume* horizontal_upper_frameV =
535 new TGeoVolume(frame_name + "_horizontal_upper_frameV", horizontal_upper_frameS);
536 TGeoVolume* horizontal_bottom_frameV =
537 new TGeoVolume(frame_name + "_horizontal_bottom_frameV", horizontal_bottom_frameS);
538
539 // media
540 TGeoMedium* frame_medium = pMedCarbon; // set medium
541 if (pMedCarbon) {
542 vertical_frameV->SetMedium(frame_medium);
543 horizontal_upper_frameV->SetMedium(frame_medium);
544 horizontal_bottom_frameV->SetMedium(frame_medium);
545 } else
546 Fatal("Main", "Invalid medium for frames!");
547 if (pMedAir) {
548 composite_frameV->SetMedium(pMedAir);
549 } else
550 Fatal("Main", "Invalid medium for frames!");
551
552 // visual parameters
553 vertical_frameV->SetLineColor(TColor::GetColor("#9999ff"));
554 horizontal_upper_frameV->SetLineColor(TColor::GetColor("#9999ff"));
555 horizontal_bottom_frameV->SetLineColor(TColor::GetColor("#9999ff"));
556
557 // frame part positions in the frame
558 TGeoCombiTrans* left_vertical_frame_position = new TGeoCombiTrans();
559 left_vertical_frame_position->SetTranslation(XModuleSize_Station163x45 * 0.5 + dXFrame_Station163x45 * 0.5, 0.0,
560 0.0);
561
562 TGeoCombiTrans* upper_horizontal_frame_position = new TGeoCombiTrans();
563 upper_horizontal_frame_position->SetTranslation(0.0, YModuleSize_Station163x45 * 0.5 + dYFrame_Station163x45 * 0.5,
564 0.0);
565
566 TGeoCombiTrans* bottom_horizontal_frame_position = new TGeoCombiTrans();
567 bottom_horizontal_frame_position->SetTranslation(
568 hole_radius * 0.5, -YModuleSize_Station163x45 * 0.5 - dYFrame_Station163x45 * 0.5, 0.0);
569
570 composite_frameV->AddNode(vertical_frameV, 0, left_vertical_frame_position);
571 composite_frameV->AddNode(horizontal_upper_frameV, 0, upper_horizontal_frame_position);
572 composite_frameV->AddNode(horizontal_bottom_frameV, 0, bottom_horizontal_frame_position);
573
574 return composite_frameV;
575}
int Int_t
double Double_t
constexpr Bool_t kTRUE
void Fatal(const char *location, const char *msgfmt,...)
R__EXTERN TGeoManager * gGeoManager
#define gROOT
R__EXTERN TRandom * gRandom
R__EXTERN TSystem * gSystem
static Int_t GetColor(const char *hexcolor)
void Close(Option_t *option="") override
void ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE) override
void RotateY(Double_t angle) override
void SetTranslation(const TGeoTranslation &tr)
virtual void RegisterYourself()
const char * GetName() const override
void SetVisContainers(Bool_t flag=kTRUE) override
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
void Draw(Option_t *option="") override
void SetTransparency(Char_t transparency=0)
virtual void SetMedium(TGeoMedium *medium)
void SetLineColor(Color_t lcolor) override
const char * GetName() const override
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
static TString Itoa(Int_t value, Int_t base)
const Double_t dYFrame_Station163x45
const Double_t dXFrame_Station66x41
const Double_t dZFrame_Station66x41
const Double_t ZModuleSize_Station66x41
const Double_t YStationPositions[NStations]
const Double_t dYFrame_Station66x41
const Double_t ZModuleSize_Station163x45
const Double_t dXFrame_Station163x45
const Double_t YModuleSize_Station163x45
const Double_t dZFrame_Station163x45
const Double_t ZStationPositions[NStations]
const Double_t YModuleSize_Station66x41
const Double_t XModuleSize_Station163x45
const Double_t XModuleSize_Station66x41
TGeoMedium * pMedFiberGlass
const Double_t XStationPositions[NStations]
void create_rootgeom_GEMS_RunSRCSpring2018()
TGeoVolume * CreateModule_Station66x41(TString module_name, Double_t xsize, Double_t ysize, Double_t zsize)
TGeoVolume * CreateFrameForModule_Station163x45(TString frame_name, Double_t dx, Double_t dy, Double_t dz, Double_t hole_radius)
TGeoVolume * CreateStation(TString station_name)
TGeoVolume * CreateModule_Station163x45(TString module_name, Double_t xsize, Double_t ysize, Double_t zsize, Double_t hole_radius)
void DefineRequiredMedia(FairGeoMedia *geoMedia, FairGeoBuilder *geoBuild)
TGeoVolume * CreateFrameForModule_Station66x41(TString frame_name, Double_t dx, Double_t dy, Double_t dz)