BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
create_rootgeom_GEMS_Run8.C
Go to the documentation of this file.
1/*
2 * Baranov D.
3 * 25.02.2020 (created)
4 * 18.01.2021 (updated)
5 * 02.03.2021 (updated): radius of hole in active zone (4.0 -> 6.0 cm)
6 * 12.12.2022 (updated): small GEM added
7 * Use this macro to create ROOT geometry for the FutureConfig2020 GEM configuration
8 *
9 */
10
11// Set Parameters of GEMS -------------------------------------------------------
12const Int_t NStations = 8; // stations in the detector
13const Int_t NMaxModules = 4; // max. number of modules in a station
14
15//(X-Y-Z)Positions of stations (sensitive volumes)
16const Double_t XStationPositions[NStations] = {+1.474 /*0*/, +2.614 /*1*/, +3.393 /*2*/, +4.699 /*3*/,
17 +6.337 /*4*/, +8.189 /*5*/, +9.893 /*6*/, +50.494 /*7*/};
18const Double_t YStationPositions[NStations] = {-0.086 /*0*/, -0.107 /*1*/, +0.003 /*2*/, -0.097 /*3*/,
19 -0.003 /*4*/, +0.0245 /*5*/, +0.022 /*6*/, -0.186 /*7*/};
20const Double_t ZStationPositions[NStations] = {+60.76 /*0*/, +92.242 /*1*/, +123.512 /*2*/, +154.692 /*3*/,
21 +185.989 /*4*/, +217.287 /*5*/, +248.401 /*6*/, +792.532 /*7*/};
22
23//(X-Y-Z)Shifts of modules in each station
25 {163.2 * 0.25, -163.2 * 0.25, 163.2 * 0.25, -163.2 * 0.25}, // st. 0
26 {163.2 * 0.25, -163.2 * 0.25, 163.2 * 0.25, -163.2 * 0.25}, // st. 1
27 {163.2 * 0.25, -163.2 * 0.25, 163.2 * 0.25, -163.2 * 0.25}, // st. 2
28 {163.2 * 0.25, -163.2 * 0.25, 163.2 * 0.25, -163.2 * 0.25}, // st. 3
29 {163.2 * 0.25, -163.2 * 0.25, 163.2 * 0.25, -163.2 * 0.25}, // st. 4
30 {163.2 * 0.25, -163.2 * 0.25, 163.2 * 0.25, -163.2 * 0.25}, // st. 5
31 {163.2 * 0.25, -163.2 * 0.25, 163.2 * 0.25, -163.2 * 0.25}, // st. 6
32 {0.0} // st. 7
33};
35 {+22.5, +22.5, -19.5, -19.5}, // st. 0
36 {+22.5, +22.5, -19.5, -19.5}, // st. 1
37 {+22.5, +22.5, -19.5, -19.5}, // st. 2
38 {+22.5, +22.5, -19.5, -19.5}, // st. 3
39 {+22.5, +22.5, -19.5, -19.5}, // st. 4
40 {+22.5, +22.5, -19.5, -19.5}, // st. 5
41 {+22.5, +22.5, -19.5, -19.5}, // st. 6
42 {0.0} // st. 7
43};
45 {+4.1, +4.1, 0.0, 0.0}, // st. 0
46 {0.0, 0.0, +4.1, +4.1}, // st. 1
47 {+4.1, +4.1, 0.0, 0.0}, // st. 2
48 {0.0, 0.0, +4.1, +4.1}, // st. 3
49 {+4.1, +4.1, 0.0, 0.0}, // st. 4
50 {0.0, 0.0, +4.1, +4.1}, // st. 5
51 {+4.1, +4.1, 0.0, 0.0}, // st. 6
52 {0.0} // st. 7
53};
54
55// GEM plane sizes (66x41 type) -------------------------------------------------
59
63//------------------------------------------------------------------------------
64
65// GEM plane sizes (163x45 type) ------------------------------------------------
66const Double_t XModuleSize_Station163x45 = 163.2 * 0.5; // 81.6
69
73//------------------------------------------------------------------------------
74
75// GEM plane sizes (163x39 type) ------------------------------------------------
76const Double_t XModuleSize_Station163x39 = 163.2 * 0.5; // 81.6
78const Double_t ZModuleSize_Station163x39 = 0.9; // sensitive volume
79const Double_t ZGEMSize_Station163x39 = 4.1; // common thickness of GEM (including sens. vol)
80
84//------------------------------------------------------------------------------
85
86// GEM plane sizes (10x10 type) -------------------------------------------------
89const Double_t ZModuleSize_Station10x10 = 0.9; // sensitive volume
90const Double_t ZGEMSize_Station10x10 = 4.1; // common thickness of GEM (including sens. vol)
91
95//------------------------------------------------------------------------------
96
97// GeoManager
99
100// media
107
108class FairGeoMedia;
109class FairGeoBuilder;
110
111TGeoVolume* CreateStation(TString station_name);
112
113TGeoVolume* CreateModule_Station66x41(TString module_name, Double_t xsize, Double_t ysize, Double_t zsize);
115
117 Double_t xsize,
118 Double_t ysize,
119 Double_t zsize,
120 Double_t hole_radius);
122 Double_t dx,
123 Double_t dy,
124 Double_t dz,
125 Double_t hole_radius);
126
128 Double_t xsize,
129 Double_t ysize,
130 Double_t zsize,
131 Double_t hole_radius);
133 Double_t dx,
134 Double_t dy,
135 Double_t dz,
136 Double_t hole_radius);
137
138TGeoVolume* CreateModule_Station10x10(TString module_name, Double_t xsize, Double_t ysize, Double_t zsize);
139
140void DefineRequiredMedia(FairGeoMedia* geoMedia, FairGeoBuilder* geoBuild)
141{
142
143 // air medium
144 FairGeoMedium* mAir = geoMedia->getMedium("air");
145 if (!mAir)
146 Fatal("Main", "FairMedium air not found");
147 geoBuild->createMedium(mAir);
148 pMedAir = gGeoManager->GetMedium("air");
149 if (!pMedAir)
150 Fatal("Main", "Medium air not found");
151
152 // carbon medium
153 FairGeoMedium* mCarbon = geoMedia->getMedium("carbon");
154 if (!mCarbon)
155 Fatal("Main", "FairMedium carbon not found");
156 geoBuild->createMedium(mCarbon);
157 pMedCarbon = gGeoManager->GetMedium("carbon");
158 if (!pMedCarbon)
159 Fatal("Main", "Medium carbon not found");
160
161 // fiberglass medium
162 FairGeoMedium* mFiberGlass = geoMedia->getMedium("fiberglass");
163 if (!mFiberGlass)
164 Fatal("Main", "FairMedium fiberglass not found");
165 geoBuild->createMedium(mFiberGlass);
166 pMedFiberGlass = gGeoManager->GetMedium("fiberglass");
167 if (!pMedFiberGlass)
168 Fatal("Main", "Medium fiberglass not found");
169
170 // arco27020 medium
171 FairGeoMedium* mArCO27030 = geoMedia->getMedium("arco27030");
172 if (!mArCO27030)
173 Fatal("Main", "FairMedium arco27030 not found");
174 geoBuild->createMedium(mArCO27030);
175 pMedArCO27030 = gGeoManager->GetMedium("arco27030");
176 if (!pMedArCO27030)
177 Fatal("Main", "Medium arco27030 not found");
178
179 // ArC4H10_80_20 medium
180 FairGeoMedium* mArC4H10_80_20 = geoMedia->getMedium("ArC4H10_80_20");
181 if (!mArC4H10_80_20)
182 Fatal("Main", "FairMedium ArC4H10_80_20 not found");
183 geoBuild->createMedium(mArC4H10_80_20);
184 pMedArC4H10_80_20 = gGeoManager->GetMedium("ArC4H10_80_20");
186 Fatal("Main", "Medium ArC4H10_80_20 not found");
187}
188
190{
191
192 // ---- set working directory --------------------------------------------
193 TString gPath = gSystem->Getenv("VMCWORKDIR");
194
195 // ------- Geometry file name (output) ---------------------------------
196 const TString geoDetectorName = "GEMS";
197 const TString geoDetectorVersion = "Run8";
198 const TString geoFileName = gPath + "/geometry/" + geoDetectorName + "_" + geoDetectorVersion + ".root";
199
200 // ---- global geometry parameters ---------------------------------------
201 FairGeoLoader* geoLoad = new FairGeoLoader("TGeo", "FairGeoLoader");
202 FairGeoInterface* geoFace = geoLoad->getGeoInterface();
203
204 // ------- Load media from media file ----------------------------------
205 TString medFile = gPath + "/geometry/media.geo";
206 geoFace->setMediaFile(medFile);
207 geoFace->readMedia();
208 FairGeoMedia* geoMedia = geoFace->getMedia();
209 FairGeoBuilder* geoBuild = geoLoad->getGeoBuilder();
210
211 DefineRequiredMedia(geoMedia, geoBuild);
212 // -------------------------------------------------------------------------
213
214 // -------------- Create geometry and top volume ------------------------
215 gGeoMan = (TGeoManager*)gROOT->FindObject("FAIRGeom");
216 gGeoMan->SetName(geoDetectorName + "_geom");
217 TGeoVolume* top = new TGeoVolumeAssembly("TOP");
218 top->SetMedium(pMedAir);
219 gGeoMan->SetTopVolume(top);
220 // gGeoMan->SetTopVisible(1);
221 // -------------------------------------------------------------------------
222
223 // Define TOP Geometry
224 TGeoVolume* GEMS = new TGeoVolumeAssembly(geoDetectorName);
225 GEMS->SetMedium(pMedAir);
226
227 for (Int_t istation = 0; istation < NStations; ++istation) {
228
229 Int_t stationNum = istation;
230 TGeoVolume* station = CreateStation(TString("station") + TString::Itoa(stationNum, 10));
231
232 if (istation < 7) { // big GEMs
233
234 // upper part
235 TGeoVolume* module0 =
238 TGeoVolume* module1 =
241 TGeoVolume* frame0 =
244 TGeoVolume* frame1 =
247
248 // lower part
249 TGeoVolume* module2 =
252 TGeoVolume* module3 =
255 TGeoVolume* frame2 =
258 TGeoVolume* frame3 =
261
262 TGeoCombiTrans* module0_transform = new TGeoCombiTrans();
263 module0_transform->SetTranslation(XModuleShifts[stationNum][0], YModuleShifts[stationNum][0],
264 ZModuleShifts[stationNum][0] + ZModuleSize_Station163x45 * 0.5);
265
266 TGeoCombiTrans* module1_transform = new TGeoCombiTrans();
267 module1_transform->ReflectX(true);
268 module1_transform->SetTranslation(XModuleShifts[stationNum][1], YModuleShifts[stationNum][1],
269 ZModuleShifts[stationNum][1] + ZModuleSize_Station163x45 * 0.5);
270
271 TGeoCombiTrans* module2_transform = new TGeoCombiTrans();
272 module2_transform->ReflectY(true);
273 module2_transform->SetTranslation(XModuleShifts[stationNum][2], YModuleShifts[stationNum][2],
274 ZModuleShifts[stationNum][2] + ZModuleSize_Station163x45 * 0.5);
275
276 TGeoCombiTrans* module3_transform = new TGeoCombiTrans();
277 module3_transform->ReflectY(true);
278 module3_transform->ReflectX(true);
279 module3_transform->SetTranslation(XModuleShifts[stationNum][3], YModuleShifts[stationNum][3],
280 ZModuleShifts[stationNum][3] + ZModuleSize_Station163x45 * 0.5);
281
282 TGeoCombiTrans* station_transform = new TGeoCombiTrans();
283 station_transform->SetTranslation(XStationPositions[stationNum], YStationPositions[stationNum],
284 ZStationPositions[stationNum]);
285
286 station->AddNode(module0, 0, new TGeoCombiTrans(*module0_transform)); // module
287 station->AddNode(module1, 0, new TGeoCombiTrans(*module1_transform)); // module
288 station->AddNode(module2, 0, new TGeoCombiTrans(*module2_transform)); // module
289 station->AddNode(module3, 0, new TGeoCombiTrans(*module3_transform)); // module
290
291 station->AddNode(frame0, 0, new TGeoCombiTrans(*module0_transform)); // frame
292 station->AddNode(frame1, 0, new TGeoCombiTrans(*module1_transform)); // frame
293 station->AddNode(frame2, 0, new TGeoCombiTrans(*module2_transform)); // frame
294 station->AddNode(frame3, 0, new TGeoCombiTrans(*module3_transform)); // frame
295 }
296
297 if (istation == 7) { // small GEM
298 TGeoVolume* module0 =
299 CreateModule_Station10x10(TString("Sensor_module0_") + station->GetName(), XModuleSize_Station10x10,
301
302 TGeoCombiTrans* module0_transform = new TGeoCombiTrans();
303 module0_transform->SetTranslation(XModuleShifts[stationNum][0], YModuleShifts[stationNum][0],
304 ZModuleShifts[stationNum][0] + ZModuleSize_Station10x10 * 0.5);
305
306 station->AddNode(module0, 0, new TGeoCombiTrans(*module0_transform)); // module
307 }
308
309 TGeoCombiTrans* station_transform = new TGeoCombiTrans();
310 station_transform->SetTranslation(XStationPositions[stationNum], YStationPositions[stationNum],
311 ZStationPositions[stationNum]);
312
313 GEMS->AddNode(station, 0, station_transform);
314 }
315
316 top->AddNode(GEMS, 0);
318
319 // --------------- Finish -----------------------------------------------
320 gGeoMan->CloseGeometry();
321 gGeoMan->CheckOverlaps(0.0001);
322 gGeoMan->PrintOverlaps();
323 gGeoMan->Test();
324 // gGeoMan->RestoreMasterVolume();
325
326 TFile* geoFile = new TFile(geoFileName, "RECREATE");
327 top->Write();
328 geoFile->Close();
329 top->Draw("ogl");
330}
331
332//------------------------------------------------------------------------------
333
335{
336
337 TGeoVolume* stationA = new TGeoVolumeAssembly(station_name);
338 stationA->SetMedium(pMedAir);
339
340 return stationA;
341}
342
344{
345
346 // module shape
347 TGeoShape* moduleS = new TGeoBBox("moduleS", xsize * 0.5, ysize * 0.5, zsize * 0.5);
348
349 // module volume
350 TGeoVolume* moduleV = new TGeoVolume(module_name, moduleS);
351
352 // medium
355 else
356 Fatal("Main", "Invalid medium for sensitive modules!");
357
358 // visual parameters
359 moduleV->SetLineColor(TColor::GetColor("#ff47ca"));
360 moduleV->SetTransparency(20);
361
362 return moduleV;
363}
364
366{
367
368 // frame shapes
369 TGeoShape* vertical_frameS =
370 new TGeoBBox("vertical_frameS", dx * 0.5, YModuleSize_Station66x41 * 0.5 + dy, dz * 0.5);
371 TGeoShape* horizontal_frameS =
372 new TGeoBBox("horizontal_frameS", XModuleSize_Station66x41 * 0.5, dy * 0.5, dz * 0.5);
373
374 // frame volumes
375 TGeoVolume* composite_frameV = new TGeoVolumeAssembly(frame_name);
376 TGeoVolume* vertical_frameV = new TGeoVolume(frame_name + "_vertical_frameV", vertical_frameS);
377 TGeoVolume* horizontal_frameV = new TGeoVolume(frame_name + "_horizontal_frameV", horizontal_frameS);
378
379 // media
380 TGeoMedium* frame_medium = pMedCarbon; // set medium
381 if (pMedCarbon) {
382 vertical_frameV->SetMedium(frame_medium);
383 horizontal_frameV->SetMedium(frame_medium);
384 } else
385 Fatal("Main", "Invalid medium for frames!");
386 if (pMedAir) {
387 composite_frameV->SetMedium(pMedAir);
388 } else
389 Fatal("Main", "Invalid medium for frames!");
390
391 // visual parameters
392 vertical_frameV->SetLineColor(TColor::GetColor("#9999ff"));
393 horizontal_frameV->SetLineColor(TColor::GetColor("#9999ff"));
394
395 // frame part positions in the frame
396 TGeoCombiTrans* left_vertical_frame_position = new TGeoCombiTrans();
397 left_vertical_frame_position->SetTranslation(XModuleSize_Station66x41 * 0.5 + dXFrame_Station66x41 * 0.5, 0.0, 0.0);
398
399 TGeoCombiTrans* right_vertical_frame_position = new TGeoCombiTrans();
400 right_vertical_frame_position->SetTranslation(-XModuleSize_Station66x41 * 0.5 - dXFrame_Station66x41 * 0.5, 0.0,
401 0.0);
402
403 TGeoCombiTrans* bottom_horizontal_frame_position = new TGeoCombiTrans();
404 bottom_horizontal_frame_position->SetTranslation(0.0, YModuleSize_Station66x41 * 0.5 + dYFrame_Station66x41 * 0.5,
405 0.0);
406
407 TGeoCombiTrans* lower_horizontal_frame_position = new TGeoCombiTrans();
408 lower_horizontal_frame_position->SetTranslation(0.0, -YModuleSize_Station66x41 * 0.5 - dYFrame_Station66x41 * 0.5,
409 0.0);
410
411 composite_frameV->AddNode(vertical_frameV, 0, left_vertical_frame_position);
412 composite_frameV->AddNode(vertical_frameV, 1, right_vertical_frame_position);
413 composite_frameV->AddNode(horizontal_frameV, 0, bottom_horizontal_frame_position);
414 composite_frameV->AddNode(horizontal_frameV, 1, lower_horizontal_frame_position);
415
416 return composite_frameV;
417}
418
420 Double_t xsize,
421 Double_t ysize,
422 Double_t zsize,
423 Double_t hole_radius)
424{
425
426 gRandom->SetSeed(0);
427 Int_t uniqueId = gRandom->Integer(100000);
428
429 // module shapes
430 TGeoShape* module_partS =
431 new TGeoBBox(TString("module_partS") + TString::Itoa(uniqueId, 10), xsize * 0.5, ysize * 0.5, zsize * 0.5);
432 TGeoShape* holeS =
433 new TGeoTube(TString("holeS") + TString::Itoa(uniqueId, 10), 0.0, hole_radius, zsize * 0.5 + 0.01);
434
435 TGeoTranslation* hole_module_trans = new TGeoTranslation(
436 TString("hole_module_trans_") + TString::Itoa(uniqueId, 10), -xsize * 0.5, -ysize * 0.5, 0.0);
437
438 hole_module_trans->RegisterYourself();
439
440 TString bool_expression_module = TString(module_partS->GetName()) + TString(" - ") + TString(holeS->GetName())
441 + TString(":") + TString(hole_module_trans->GetName());
442 TGeoCompositeShape* moduleS = new TGeoCompositeShape(bool_expression_module);
443
444 // module volume
445 TGeoVolume* moduleV = new TGeoVolume(module_name, moduleS);
446
447 // medium
450 else
451 Fatal("Main", "Invalid medium for sensitive modules!");
452
453 // visual parameters
454 moduleV->SetLineColor(TColor::GetColor("#ff47ca"));
455 moduleV->SetTransparency(20);
456
457 return moduleV;
458}
459//------------------------------------------------------------------------------
460
462 Double_t dx,
463 Double_t dy,
464 Double_t dz,
465 Double_t hole_radius)
466{
467
468 // frame shapes
469 TGeoShape* vertical_frameS =
470 new TGeoBBox("vertical_frameS", dx * 0.5, YModuleSize_Station163x45 * 0.5 + dy, dz * 0.5);
471 TGeoShape* horizontal_upper_frameS =
472 new TGeoBBox("horizontal_upper_frameS", XModuleSize_Station163x45 * 0.5, dy * 0.5, dz * 0.5);
473 TGeoShape* horizontal_bottom_frameS = new TGeoBBox(
474 "horizontal_upper_frameS", XModuleSize_Station163x45 * 0.5 - hole_radius * 0.5, dy * 0.5, dz * 0.5);
475
476 // frame volumes
477 TGeoVolume* composite_frameV = new TGeoVolumeAssembly(frame_name);
478 TGeoVolume* vertical_frameV = new TGeoVolume(frame_name + "_vertical_frameV", vertical_frameS);
479 TGeoVolume* horizontal_upper_frameV =
480 new TGeoVolume(frame_name + "_horizontal_upper_frameV", horizontal_upper_frameS);
481 TGeoVolume* horizontal_bottom_frameV =
482 new TGeoVolume(frame_name + "_horizontal_bottom_frameV", horizontal_bottom_frameS);
483
484 // media
485 TGeoMedium* frame_medium = pMedCarbon; // set medium
486 if (pMedCarbon) {
487 vertical_frameV->SetMedium(frame_medium);
488 horizontal_upper_frameV->SetMedium(frame_medium);
489 horizontal_bottom_frameV->SetMedium(frame_medium);
490 } else
491 Fatal("Main", "Invalid medium for frames!");
492 if (pMedAir) {
493 composite_frameV->SetMedium(pMedAir);
494 } else
495 Fatal("Main", "Invalid medium for frames!");
496
497 // visual parameters
498 vertical_frameV->SetLineColor(TColor::GetColor("#9999ff"));
499 horizontal_upper_frameV->SetLineColor(TColor::GetColor("#9999ff"));
500 horizontal_bottom_frameV->SetLineColor(TColor::GetColor("#9999ff"));
501
502 // frame part positions in the frame
503 TGeoCombiTrans* left_vertical_frame_position = new TGeoCombiTrans();
504 left_vertical_frame_position->SetTranslation(XModuleSize_Station163x45 * 0.5 + dXFrame_Station163x45 * 0.5, 0.0,
505 0.0);
506
507 TGeoCombiTrans* upper_horizontal_frame_position = new TGeoCombiTrans();
508 upper_horizontal_frame_position->SetTranslation(0.0, YModuleSize_Station163x45 * 0.5 + dYFrame_Station163x45 * 0.5,
509 0.0);
510
511 TGeoCombiTrans* bottom_horizontal_frame_position = new TGeoCombiTrans();
512 bottom_horizontal_frame_position->SetTranslation(
513 hole_radius * 0.5, -YModuleSize_Station163x45 * 0.5 - dYFrame_Station163x45 * 0.5, 0.0);
514
515 composite_frameV->AddNode(vertical_frameV, 0, left_vertical_frame_position);
516 composite_frameV->AddNode(horizontal_upper_frameV, 0, upper_horizontal_frame_position);
517 composite_frameV->AddNode(horizontal_bottom_frameV, 0, bottom_horizontal_frame_position);
518
519 return composite_frameV;
520}
521//------------------------------------------------------------------------------
522
524 Double_t xsize,
525 Double_t ysize,
526 Double_t zsize,
527 Double_t hole_radius)
528{
529
530 return CreateModule_Station163x45(module_name, xsize, ysize, zsize, hole_radius);
531}
532//------------------------------------------------------------------------------
533
535 Double_t dx,
536 Double_t dy,
537 Double_t dz,
538 Double_t hole_radius)
539{
540
541 // frame shapes
542 TGeoShape* vertical_frameS = new TGeoBBox(TString("vertical_frameS") += TString("_") + frame_name, dx * 0.5,
543 YModuleSize_Station163x39 * 0.5 + dy, dz * 0.5);
544 TGeoShape* horizontal_upper_frameS = new TGeoBBox(TString("horizontal_upper_frameS") += TString("_") + frame_name,
545 XModuleSize_Station163x39 * 0.5, dy * 0.5, dz * 0.5);
546 TGeoShape* horizontal_bottom_frameS =
547 new TGeoBBox(TString("horizontal_upper_frameS") += TString("_") + frame_name,
548 XModuleSize_Station163x39 * 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_Station163x39 * 0.5 + dXFrame_Station163x39 * 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_Station163x39 * 0.5 + dYFrame_Station163x39 * 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_Station163x39 * 0.5 - dYFrame_Station163x39 * 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}
595//------------------------------------------------------------------------------
596
598{
599
600 // module shape
601 TGeoShape* moduleS = new TGeoBBox("moduleS", xsize * 0.5, ysize * 0.5, zsize * 0.5);
602
603 // module volume
604 TGeoVolume* moduleV = new TGeoVolume(module_name, moduleS);
605
606 // medium
609 else
610 Fatal("Main", "Invalid medium for sensitive modules!");
611
612 // visual parameters
613 moduleV->SetLineColor(TColor::GetColor("#ff47ca"));
614 moduleV->SetTransparency(20);
615
616 return moduleV;
617}
618//------------------------------------------------------------------------------
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)
void ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE) override
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
const Double_t ZModuleSize_Station10x10
const Double_t dYFrame_Station10x10
const Double_t XModuleSize_Station10x10
const Double_t YModuleSize_Station10x10
const Double_t dYFrame_Station163x39
const Double_t ZGEMSize_Station10x10
const Double_t dXFrame_Station10x10
const Double_t dXFrame_Station163x39
const Double_t XModuleSize_Station163x39
const Double_t YModuleSize_Station163x39
const Double_t ZGEMSize_Station163x39
const Double_t ZModuleSize_Station163x39
const Double_t dZFrame_Station163x39
const Double_t dZFrame_Station10x10
TGeoMedium * pMedArC4H10_80_20
TGeoVolume * CreateModule_Station10x10(TString module_name, Double_t xsize, Double_t ysize, Double_t zsize)
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_Run8()
TGeoVolume * CreateModule_Station163x45(TString module_name, Double_t xsize, Double_t ysize, Double_t zsize, Double_t hole_radius)
TGeoVolume * CreateFrameForModule_Station163x39(TString frame_name, Double_t dx, Double_t dy, Double_t dz, 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)
TGeoVolume * CreateModule_Station163x39(TString module_name, Double_t xsize, Double_t ysize, Double_t zsize, Double_t hole_radius)