BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
create_rootgeom_GEMS_RunSpring2018.C
Go to the documentation of this file.
1/*
2 * Baranov D.
3 * 16.05.2018
4 * 02.03.2021 (Updated): radius of hole in active zone (4.0 -> 6.0 cm)
5 * Use this macro to create ROOT geometry for the RunSpring2018 configuration (BM@N RUN-7)
6 *
7 */
8
9// Set Parameters of GEMS -------------------------------------------------------
10const Int_t NStations = 6; // stations in the detector
11const Int_t NMaxModules = 2; // max. number of modules in a station
12
13//(X-Y-Z)Positions of stations (sensitive volumes)
14const Double_t XStationPositions[NStations] = {+0.5390, +0.7025, +1.9925, +3.0860, +3.7980, +4.5815};
15const Double_t YStationPositions[NStations] = {+15.99873, +16.20573, +16.36073, +16.40473, +16.09373, +16.45473};
16const Double_t ZStationPositions[NStations] = {+39.702, +64.535, +112.649, +135.330, +160.6635, +183.668};
17
18//(X-Y-Z)Shifts of modules in each station
19const Double_t XModuleShifts[NStations][NMaxModules] = {{163.2 * 0.25, -163.2 * 0.25}, {163.2 * 0.25, -163.2 * 0.25},
20 {163.2 * 0.25, -163.2 * 0.25}, {163.2 * 0.25, -163.2 * 0.25},
21 {163.2 * 0.25, -163.2 * 0.25}, {163.2 * 0.25, -163.2 * 0.25}};
22const Double_t YModuleShifts[NStations][NMaxModules] = {{0.0, 0.0}, {0.0, 0.0}, {0.0, 0.0},
23 {0.0, 0.0}, {0.0, 0.0}, {0.0, 0.0}};
24const Double_t ZModuleShifts[NStations][NMaxModules] = {{0.0, 0.0}, {0.0, 0.0}, {0.0, 0.0},
25 {0.0, 0.0}, {0.0, 0.0}, {0.0, 0.0}};
26
27// GEM plane sizes (66x41 type) -------------------------------------------------
31
35//------------------------------------------------------------------------------
36
37// GEM plane sizes (163x45 type) ------------------------------------------------
41
45//------------------------------------------------------------------------------
46
47// GeoManager
49
50// media
56
57class FairGeoMedia;
58class FairGeoBuilder;
59
60TGeoVolume* CreateStation(TString station_name);
61TGeoVolume* CreateModule_Station66x41(TString module_name, Double_t xsize, Double_t ysize, Double_t zsize);
64 Double_t xsize,
65 Double_t ysize,
66 Double_t zsize,
67 Double_t hole_radius);
69 Double_t dx,
70 Double_t dy,
71 Double_t dz,
72 Double_t hole_radius);
73
74void DefineRequiredMedia(FairGeoMedia* geoMedia, FairGeoBuilder* geoBuild)
75{
76
77 // air medium
78 FairGeoMedium* mAir = geoMedia->getMedium("air");
79 if (!mAir)
80 Fatal("Main", "FairMedium air not found");
81 geoBuild->createMedium(mAir);
82 pMedAir = gGeoManager->GetMedium("air");
83 if (!pMedAir)
84 Fatal("Main", "Medium air not found");
85
86 // carbon medium
87 FairGeoMedium* mCarbon = geoMedia->getMedium("carbon");
88 if (!mCarbon)
89 Fatal("Main", "FairMedium carbon not found");
90 geoBuild->createMedium(mCarbon);
91 pMedCarbon = gGeoManager->GetMedium("carbon");
92 if (!pMedCarbon)
93 Fatal("Main", "Medium carbon not found");
94
95 // fiberglass medium
96 FairGeoMedium* mFiberGlass = geoMedia->getMedium("fiberglass");
97 if (!mFiberGlass)
98 Fatal("Main", "FairMedium fiberglass not found");
99 geoBuild->createMedium(mFiberGlass);
100 pMedFiberGlass = gGeoManager->GetMedium("fiberglass");
101 if (!pMedFiberGlass)
102 Fatal("Main", "Medium fiberglass not found");
103
104 // arco27020 medium
105 FairGeoMedium* mArCO27030 = geoMedia->getMedium("arco27030");
106 if (!mArCO27030)
107 Fatal("Main", "FairMedium arco27030 not found");
108 geoBuild->createMedium(mArCO27030);
109 pMedArCO27030 = gGeoManager->GetMedium("arco27030");
110 if (!pMedArCO27030)
111 Fatal("Main", "Medium arco27030 not found");
112}
113
115{
116
117 // ---- set working directory --------------------------------------------
118 TString gPath = gSystem->Getenv("VMCWORKDIR");
119
120 // ------- Geometry file name (output) ----------------------------------
121 const TString geoDetectorName = "GEMS";
122 const TString geoDetectorVersion = "RunSpring2018";
123 const TString geoFileName = gPath + "/geometry/" + geoDetectorName + "_" + geoDetectorVersion + ".root";
124
125 // ---- global geometry parameters ---------------------------------------
126 FairGeoLoader* geoLoad = new FairGeoLoader("TGeo", "FairGeoLoader");
127 FairGeoInterface* geoFace = geoLoad->getGeoInterface();
128
129 // ------- Load media from media file ----------------------------------
130 TString medFile = gPath + "/geometry/media.geo";
131 geoFace->setMediaFile(medFile);
132 geoFace->readMedia();
133 FairGeoMedia* geoMedia = geoFace->getMedia();
134 FairGeoBuilder* geoBuild = geoLoad->getGeoBuilder();
135
136 DefineRequiredMedia(geoMedia, geoBuild);
137 // -------------------------------------------------------------------------
138
139 // -------------- Create geometry and top volume -------------------------
140 gGeoMan = (TGeoManager*)gROOT->FindObject("FAIRGeom");
141 gGeoMan->SetName(geoDetectorName + "_geom");
142 TGeoVolume* top = new TGeoVolumeAssembly("TOP");
143 top->SetMedium(pMedAir);
144 gGeoMan->SetTopVolume(top);
145 // gGeoMan->SetTopVisible(1);
146 // --------------------------------------------------------------------------
147
148 // Define TOP Geometry
149 TGeoVolume* GEMS = new TGeoVolumeAssembly(geoDetectorName);
150 GEMS->SetMedium(pMedAir);
151
152 // TGeoVolume *target = gGeoMan->MakeSphere("target", 0, 0, 5.0);
153 // GEMS->AddNode(target, 0, new TGeoTranslation(0.0, 0.0, -647.476));
154
155 // station 0 (big 163x45 GEM consisting two modules)
156 if (1) {
157 Int_t stationNum = 0; // station number
158
159 TGeoVolume* station = CreateStation(TString("station") + TString::Itoa(stationNum, 10));
160 TGeoVolume* module0 =
163 TGeoVolume* module1 =
166 TGeoVolume* frame0 =
169 TGeoVolume* frame1 =
172
173 TGeoCombiTrans* module0_transform = new TGeoCombiTrans();
174 module0_transform->SetTranslation(XModuleShifts[stationNum][0], YModuleShifts[stationNum][0],
175 ZModuleShifts[stationNum][0] + ZModuleSize_Station163x45 * 0.5);
176
177 TGeoCombiTrans* module1_transform = new TGeoCombiTrans();
178 module1_transform->ReflectX(true);
179 module1_transform->SetTranslation(XModuleShifts[stationNum][1], YModuleShifts[stationNum][1],
180 ZModuleShifts[stationNum][1] + ZModuleSize_Station163x45 * 0.5);
181
182 TGeoCombiTrans* station_transform = new TGeoCombiTrans();
183 station_transform->SetTranslation(XStationPositions[stationNum], YStationPositions[stationNum],
184 ZStationPositions[stationNum]);
185
186 station->AddNode(module0, 0, new TGeoCombiTrans(*module0_transform)); // module
187 station->AddNode(module1, 0, new TGeoCombiTrans(*module1_transform)); // module
188
189 station->AddNode(frame0, 0, new TGeoCombiTrans(*module0_transform)); // frame
190 station->AddNode(frame1, 0, new TGeoCombiTrans(*module1_transform)); // frame
191
192 GEMS->AddNode(station, 0, station_transform);
193 }
194
195 // station 1 (big 163x45 GEM consisting two modules)
196 if (1) {
197 Int_t stationNum = 1; // station number
198
199 TGeoVolume* station = CreateStation(TString("station") + TString::Itoa(stationNum, 10));
200 TGeoVolume* module0 =
203 TGeoVolume* module1 =
206 TGeoVolume* frame0 =
209 TGeoVolume* frame1 =
212
213 TGeoCombiTrans* module0_transform = new TGeoCombiTrans();
214 module0_transform->SetTranslation(XModuleShifts[stationNum][0], YModuleShifts[stationNum][0],
215 ZModuleShifts[stationNum][0] + ZModuleSize_Station163x45 * 0.5);
216
217 TGeoCombiTrans* module1_transform = new TGeoCombiTrans();
218 module1_transform->ReflectX(true);
219 module1_transform->SetTranslation(XModuleShifts[stationNum][1], YModuleShifts[stationNum][1],
220 ZModuleShifts[stationNum][1] + ZModuleSize_Station163x45 * 0.5);
221
222 TGeoCombiTrans* station_transform = new TGeoCombiTrans();
223 station_transform->SetTranslation(XStationPositions[stationNum], YStationPositions[stationNum],
224 ZStationPositions[stationNum]);
225
226 station->AddNode(module0, 0, new TGeoCombiTrans(*module0_transform)); // module
227 station->AddNode(module1, 0, new TGeoCombiTrans(*module1_transform)); // module
228
229 station->AddNode(frame0, 0, new TGeoCombiTrans(*module0_transform)); // frame
230 station->AddNode(frame1, 0, new TGeoCombiTrans(*module1_transform)); // frame
231
232 GEMS->AddNode(station, 0, station_transform);
233 }
234
235 // station 2 (big 163x45 GEM consisting two modules)
236 if (1) {
237 Int_t stationNum = 2; // station number
238
239 TGeoVolume* station = CreateStation(TString("station") + TString::Itoa(stationNum, 10));
240 TGeoVolume* module0 =
243 TGeoVolume* module1 =
246 TGeoVolume* frame0 =
249 TGeoVolume* frame1 =
252
253 TGeoCombiTrans* module0_transform = new TGeoCombiTrans();
254 module0_transform->SetTranslation(XModuleShifts[stationNum][0], YModuleShifts[stationNum][0],
255 ZModuleShifts[stationNum][0] + ZModuleSize_Station163x45 * 0.5);
256
257 TGeoCombiTrans* module1_transform = new TGeoCombiTrans();
258 module1_transform->ReflectX(true);
259 module1_transform->SetTranslation(XModuleShifts[stationNum][1], YModuleShifts[stationNum][1],
260 ZModuleShifts[stationNum][1] + ZModuleSize_Station163x45 * 0.5);
261
262 TGeoCombiTrans* station_transform = new TGeoCombiTrans();
263 station_transform->SetTranslation(XStationPositions[stationNum], YStationPositions[stationNum],
264 ZStationPositions[stationNum]);
265
266 station->AddNode(module0, 0, new TGeoCombiTrans(*module0_transform)); // module
267 station->AddNode(module1, 0, new TGeoCombiTrans(*module1_transform)); // module
268
269 station->AddNode(frame0, 0, new TGeoCombiTrans(*module0_transform)); // frame
270 station->AddNode(frame1, 0, new TGeoCombiTrans(*module1_transform)); // frame
271
272 GEMS->AddNode(station, 0, station_transform);
273 }
274
275 // station 3 (big 163x45 GEM consisting two modules)
276 if (1) {
277 Int_t stationNum = 3; // station number
278
279 TGeoVolume* station = CreateStation(TString("station") + TString::Itoa(stationNum, 10));
280 TGeoVolume* module0 =
283 TGeoVolume* module1 =
286 TGeoVolume* frame0 =
289 TGeoVolume* frame1 =
292
293 TGeoCombiTrans* module0_transform = new TGeoCombiTrans();
294 module0_transform->SetTranslation(XModuleShifts[stationNum][0], YModuleShifts[stationNum][0],
295 ZModuleShifts[stationNum][0] + ZModuleSize_Station163x45 * 0.5);
296
297 TGeoCombiTrans* module1_transform = new TGeoCombiTrans();
298 module1_transform->ReflectX(true);
299 module1_transform->SetTranslation(XModuleShifts[stationNum][1], YModuleShifts[stationNum][1],
300 ZModuleShifts[stationNum][1] + ZModuleSize_Station163x45 * 0.5);
301
302 TGeoCombiTrans* station_transform = new TGeoCombiTrans();
303 station_transform->SetTranslation(XStationPositions[stationNum], YStationPositions[stationNum],
304 ZStationPositions[stationNum]);
305
306 station->AddNode(module0, 0, new TGeoCombiTrans(*module0_transform)); // module
307 station->AddNode(module1, 0, new TGeoCombiTrans(*module1_transform)); // module
308
309 station->AddNode(frame0, 0, new TGeoCombiTrans(*module0_transform)); // frame
310 station->AddNode(frame1, 0, new TGeoCombiTrans(*module1_transform)); // frame
311
312 GEMS->AddNode(station, 0, station_transform);
313 }
314
315 // station 4 (big 163x45 GEM consisting two modules)
316 if (1) {
317 Int_t stationNum = 4; // station number
318
319 TGeoVolume* station = CreateStation(TString("station") + TString::Itoa(stationNum, 10));
320 TGeoVolume* module0 =
323 TGeoVolume* module1 =
326 TGeoVolume* frame0 =
329 TGeoVolume* frame1 =
332
333 TGeoCombiTrans* module0_transform = new TGeoCombiTrans();
334 module0_transform->SetTranslation(XModuleShifts[stationNum][0], YModuleShifts[stationNum][0],
335 ZModuleShifts[stationNum][0] + ZModuleSize_Station163x45 * 0.5);
336
337 TGeoCombiTrans* module1_transform = new TGeoCombiTrans();
338 module1_transform->ReflectX(true);
339 module1_transform->SetTranslation(XModuleShifts[stationNum][1], YModuleShifts[stationNum][1],
340 ZModuleShifts[stationNum][1] + ZModuleSize_Station163x45 * 0.5);
341
342 TGeoCombiTrans* station_transform = new TGeoCombiTrans();
343 station_transform->SetTranslation(XStationPositions[stationNum], YStationPositions[stationNum],
344 ZStationPositions[stationNum]);
345
346 station->AddNode(module0, 0, new TGeoCombiTrans(*module0_transform)); // module
347 station->AddNode(module1, 0, new TGeoCombiTrans(*module1_transform)); // module
348
349 station->AddNode(frame0, 0, new TGeoCombiTrans(*module0_transform)); // frame
350 station->AddNode(frame1, 0, new TGeoCombiTrans(*module1_transform)); // frame
351
352 GEMS->AddNode(station, 0, station_transform);
353 }
354
355 // station 5 (big 163x45 GEM consisting two modules)
356 if (1) {
357 Int_t stationNum = 5; // station number
358
359 TGeoVolume* station = CreateStation(TString("station") + TString::Itoa(stationNum, 10));
360 TGeoVolume* module0 =
363 TGeoVolume* module1 =
366 TGeoVolume* frame0 =
369 TGeoVolume* frame1 =
372
373 TGeoCombiTrans* module0_transform = new TGeoCombiTrans();
374 module0_transform->SetTranslation(XModuleShifts[stationNum][0], YModuleShifts[stationNum][0],
375 ZModuleShifts[stationNum][0] + ZModuleSize_Station163x45 * 0.5);
376
377 TGeoCombiTrans* module1_transform = new TGeoCombiTrans();
378 module1_transform->ReflectX(true);
379 module1_transform->SetTranslation(XModuleShifts[stationNum][1], YModuleShifts[stationNum][1],
380 ZModuleShifts[stationNum][1] + ZModuleSize_Station163x45 * 0.5);
381
382 TGeoCombiTrans* station_transform = new TGeoCombiTrans();
383 station_transform->SetTranslation(XStationPositions[stationNum], YStationPositions[stationNum],
384 ZStationPositions[stationNum]);
385
386 station->AddNode(module0, 0, new TGeoCombiTrans(*module0_transform)); // module
387 station->AddNode(module1, 0, new TGeoCombiTrans(*module1_transform)); // module
388
389 station->AddNode(frame0, 0, new TGeoCombiTrans(*module0_transform)); // frame
390 station->AddNode(frame1, 0, new TGeoCombiTrans(*module1_transform)); // frame
391
392 GEMS->AddNode(station, 0, station_transform);
393 }
394
395 top->AddNode(GEMS, 0);
397
398 // --------------- Finish -----------------------------------------------
399 gGeoMan->CloseGeometry();
400 gGeoMan->CheckOverlaps(0.0001);
401 gGeoMan->PrintOverlaps();
402 gGeoMan->Test();
403 // gGeoMan->RestoreMasterVolume();
404
405 TFile* geoFile = new TFile(geoFileName, "RECREATE");
406 top->Write();
407 geoFile->Close();
408 top->Draw("ogl");
409}
410//------------------------------------------------------------------------------
411
413{
414
415 TGeoVolume* stationA = new TGeoVolumeAssembly(station_name);
416 stationA->SetMedium(pMedAir);
417
418 return stationA;
419}
420
422{
423
424 // module shape
425 TGeoShape* moduleS = new TGeoBBox("moduleS", xsize * 0.5, ysize * 0.5, zsize * 0.5);
426
427 // module volume
428 TGeoVolume* moduleV = new TGeoVolume(module_name, moduleS);
429
430 // medium
431 if (pMedArCO27030)
432 moduleV->SetMedium(pMedArCO27030);
433 else
434 Fatal("Main", "Invalid medium for sensitive modules!");
435
436 // visual parameters
437 moduleV->SetLineColor(TColor::GetColor("#ff47ca"));
438 moduleV->SetTransparency(20);
439
440 return moduleV;
441}
442
444{
445
446 // frame shapes
447 TGeoShape* vertical_frameS =
448 new TGeoBBox("vertical_frameS", dx * 0.5, YModuleSize_Station66x41 * 0.5 + dy, dz * 0.5);
449 TGeoShape* horizontal_frameS =
450 new TGeoBBox("horizontal_frameS", XModuleSize_Station66x41 * 0.5, dy * 0.5, dz * 0.5);
451
452 // frame volumes
453 TGeoVolume* composite_frameV = new TGeoVolumeAssembly(frame_name);
454 TGeoVolume* vertical_frameV = new TGeoVolume(frame_name + "_vertical_frameV", vertical_frameS);
455 TGeoVolume* horizontal_frameV = new TGeoVolume(frame_name + "_horizontal_frameV", horizontal_frameS);
456
457 // media
458 TGeoMedium* frame_medium = pMedCarbon; // set medium
459 if (pMedCarbon) {
460 vertical_frameV->SetMedium(frame_medium);
461 horizontal_frameV->SetMedium(frame_medium);
462 } else
463 Fatal("Main", "Invalid medium for frames!");
464 if (pMedAir) {
465 composite_frameV->SetMedium(pMedAir);
466 } else
467 Fatal("Main", "Invalid medium for frames!");
468
469 // visual parameters
470 vertical_frameV->SetLineColor(TColor::GetColor("#9999ff"));
471 horizontal_frameV->SetLineColor(TColor::GetColor("#9999ff"));
472
473 // frame part positions in the frame
474 TGeoCombiTrans* left_vertical_frame_position = new TGeoCombiTrans();
475 left_vertical_frame_position->SetTranslation(XModuleSize_Station66x41 * 0.5 + dXFrame_Station66x41 * 0.5, 0.0, 0.0);
476
477 TGeoCombiTrans* right_vertical_frame_position = new TGeoCombiTrans();
478 right_vertical_frame_position->SetTranslation(-XModuleSize_Station66x41 * 0.5 - dXFrame_Station66x41 * 0.5, 0.0,
479 0.0);
480
481 TGeoCombiTrans* bottom_horizontal_frame_position = new TGeoCombiTrans();
482 bottom_horizontal_frame_position->SetTranslation(0.0, YModuleSize_Station66x41 * 0.5 + dYFrame_Station66x41 * 0.5,
483 0.0);
484
485 TGeoCombiTrans* lower_horizontal_frame_position = new TGeoCombiTrans();
486 lower_horizontal_frame_position->SetTranslation(0.0, -YModuleSize_Station66x41 * 0.5 - dYFrame_Station66x41 * 0.5,
487 0.0);
488
489 composite_frameV->AddNode(vertical_frameV, 0, left_vertical_frame_position);
490 composite_frameV->AddNode(vertical_frameV, 1, right_vertical_frame_position);
491 composite_frameV->AddNode(horizontal_frameV, 0, bottom_horizontal_frame_position);
492 composite_frameV->AddNode(horizontal_frameV, 1, lower_horizontal_frame_position);
493
494 return composite_frameV;
495}
496
498 Double_t xsize,
499 Double_t ysize,
500 Double_t zsize,
501 Double_t hole_radius)
502{
503
504 // module shapes
505 TGeoShape* module_partS = new TGeoBBox("module_partS", xsize * 0.5, ysize * 0.5, zsize * 0.5);
506 TGeoShape* holeS = new TGeoTube("holeS", 0.0, hole_radius, zsize * 0.5 + 0.01);
507
508 gRandom->SetSeed(0);
509 Int_t uniqueId = gRandom->Integer(10000);
510 TGeoTranslation* hole_module_trans = new TGeoTranslation(
511 TString("hole_module_trans_") + TString::Itoa(uniqueId, 10), -xsize * 0.5, -ysize * 0.5, 0.0);
512
513 hole_module_trans->RegisterYourself();
514
515 TString bool_expression_module = TString(module_partS->GetName()) + TString(" - ") + TString(holeS->GetName())
516 + TString(":") + TString(hole_module_trans->GetName());
517 TGeoCompositeShape* moduleS = new TGeoCompositeShape(bool_expression_module);
518
519 // module volume
520 TGeoVolume* moduleV = new TGeoVolume(module_name, moduleS);
521
522 // medium
523 if (pMedArCO27030)
524 moduleV->SetMedium(pMedArCO27030);
525 else
526 Fatal("Main", "Invalid medium for sensitive modules!");
527
528 // visual parameters
529 moduleV->SetLineColor(TColor::GetColor("#ff47ca"));
530 moduleV->SetTransparency(20);
531
532 return moduleV;
533}
534
536 Double_t dx,
537 Double_t dy,
538 Double_t dz,
539 Double_t hole_radius)
540{
541
542 // frame shapes
543 TGeoShape* vertical_frameS =
544 new TGeoBBox("vertical_frameS", dx * 0.5, YModuleSize_Station163x45 * 0.5 + dy, dz * 0.5);
545 TGeoShape* horizontal_upper_frameS =
546 new TGeoBBox("horizontal_upper_frameS", XModuleSize_Station163x45 * 0.5, dy * 0.5, dz * 0.5);
547 TGeoShape* horizontal_bottom_frameS = new TGeoBBox(
548 "horizontal_upper_frameS", XModuleSize_Station163x45 * 0.5 - hole_radius * 0.5, dy * 0.5, dz * 0.5);
549
550 // frame volumes
551 TGeoVolume* composite_frameV = new TGeoVolumeAssembly(frame_name);
552 TGeoVolume* vertical_frameV = new TGeoVolume(frame_name + "_vertical_frameV", vertical_frameS);
553 TGeoVolume* horizontal_upper_frameV =
554 new TGeoVolume(frame_name + "_horizontal_upper_frameV", horizontal_upper_frameS);
555 TGeoVolume* horizontal_bottom_frameV =
556 new TGeoVolume(frame_name + "_horizontal_bottom_frameV", horizontal_bottom_frameS);
557
558 // media
559 TGeoMedium* frame_medium = pMedCarbon; // set medium
560 if (pMedCarbon) {
561 vertical_frameV->SetMedium(frame_medium);
562 horizontal_upper_frameV->SetMedium(frame_medium);
563 horizontal_bottom_frameV->SetMedium(frame_medium);
564 } else
565 Fatal("Main", "Invalid medium for frames!");
566 if (pMedAir) {
567 composite_frameV->SetMedium(pMedAir);
568 } else
569 Fatal("Main", "Invalid medium for frames!");
570
571 // visual parameters
572 vertical_frameV->SetLineColor(TColor::GetColor("#9999ff"));
573 horizontal_upper_frameV->SetLineColor(TColor::GetColor("#9999ff"));
574 horizontal_bottom_frameV->SetLineColor(TColor::GetColor("#9999ff"));
575
576 // frame part positions in the frame
577 TGeoCombiTrans* left_vertical_frame_position = new TGeoCombiTrans();
578 left_vertical_frame_position->SetTranslation(XModuleSize_Station163x45 * 0.5 + dXFrame_Station163x45 * 0.5, 0.0,
579 0.0);
580
581 TGeoCombiTrans* upper_horizontal_frame_position = new TGeoCombiTrans();
582 upper_horizontal_frame_position->SetTranslation(0.0, YModuleSize_Station163x45 * 0.5 + dYFrame_Station163x45 * 0.5,
583 0.0);
584
585 TGeoCombiTrans* bottom_horizontal_frame_position = new TGeoCombiTrans();
586 bottom_horizontal_frame_position->SetTranslation(
587 hole_radius * 0.5, -YModuleSize_Station163x45 * 0.5 - dYFrame_Station163x45 * 0.5, 0.0);
588
589 composite_frameV->AddNode(vertical_frameV, 0, left_vertical_frame_position);
590 composite_frameV->AddNode(horizontal_upper_frameV, 0, upper_horizontal_frame_position);
591 composite_frameV->AddNode(horizontal_bottom_frameV, 0, bottom_horizontal_frame_position);
592
593 return composite_frameV;
594}
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 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
TGeoMedium * pMedAir
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
TGeoMedium * pMedCarbon
const Double_t dZFrame_Station163x45
TGeoManager * gGeoMan
const Int_t NMaxModules
const Double_t ZStationPositions[NStations]
TGeoMedium * pMedArCO27030
const Int_t NStations
const Double_t YModuleSize_Station66x41
const Double_t XModuleSize_Station163x45
const Double_t XModuleSize_Station66x41
TGeoMedium * pMedFiberGlass
const Double_t XStationPositions[NStations]
TGeoMedium * pMedCopper
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)
void create_rootgeom_GEMS_RunSpring2018()
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)