17 +0.0 - 4.5, -2.4 - 4.5, -2.4 - 4.5};
19 -186.0 + 0.1, 31.8 + 0.7, 63.8 + 0.7, 95.8 + 0.7,
20 127.8 + 0.7, 159.8 + 1.5, 191.8 + 1.5};
30 {163.2 * 0.25, -163.2 * 0.25},
31 {163.2 * 0.25, -163.2 * 0.25}
115 FairGeoMedium* mAir = geoMedia->getMedium(
"air");
117 Fatal(
"Main",
"FairMedium air not found");
118 geoBuild->createMedium(mAir);
121 Fatal(
"Main",
"Medium air not found");
124 FairGeoMedium* mCarbon = geoMedia->getMedium(
"carbon");
126 Fatal(
"Main",
"FairMedium carbon not found");
127 geoBuild->createMedium(mCarbon);
130 Fatal(
"Main",
"Medium carbon not found");
133 FairGeoMedium* mFiberGlass = geoMedia->getMedium(
"fiberglass");
135 Fatal(
"Main",
"FairMedium fiberglass not found");
136 geoBuild->createMedium(mFiberGlass);
139 Fatal(
"Main",
"Medium fiberglass not found");
142 FairGeoMedium* mArCO27030 = geoMedia->getMedium(
"arco27030");
144 Fatal(
"Main",
"FairMedium arco27030 not found");
145 geoBuild->createMedium(mArCO27030);
148 Fatal(
"Main",
"Medium arco27030 not found");
158 const TString geoDetectorName =
"GEMS";
159 const TString geoDetectorVersion =
"RunWinter2016";
160 const TString geoFileName = gPath +
"/geometry/" + geoDetectorName +
"_" + geoDetectorVersion +
".root";
163 FairGeoLoader* geoLoad =
new FairGeoLoader(
"TGeo",
"FairGeoLoader");
164 FairGeoInterface* geoFace = geoLoad->getGeoInterface();
167 TString medFile = gPath +
"/geometry/media.geo";
168 geoFace->setMediaFile(medFile);
169 geoFace->readMedia();
170 FairGeoMedia* geoMedia = geoFace->getMedia();
171 FairGeoBuilder* geoBuild = geoLoad->getGeoBuilder();
178 gGeoMan->SetName(geoDetectorName +
"_geom");
191 Int_t stationNum = 0;
211 GEMS->AddNode(station, 0, station_transform);
216 Int_t stationNum = 1;
236 GEMS->AddNode(station, 0, station_transform);
241 Int_t stationNum = 2;
261 GEMS->AddNode(station, 0, station_transform);
266 Int_t stationNum = 3;
286 GEMS->AddNode(station, 0, station_transform);
291 Int_t stationNum = 4;
323 GEMS->AddNode(station, 0, station_transform);
328 Int_t stationNum = 5;
363 GEMS->AddNode(station, 0, station_transform);
368 Int_t stationNum = 6;
403 GEMS->AddNode(station, 0, station_transform);
411 gGeoMan->CheckOverlaps(0.0001);
416 TFile* geoFile =
new TFile(geoFileName,
"RECREATE");
449 TGeoVolume* horizontal_frameV =
new TGeoVolume(frame_name +
"_horizontal_frameV", horizontal_frameS);
454 vertical_frameV->
SetMedium(frame_medium);
455 horizontal_frameV->
SetMedium(frame_medium);
457 Fatal(
"Main",
"Invalid medium for frames!");
461 Fatal(
"Main",
"Invalid medium for frames!");
483 composite_frameV->
AddNode(vertical_frameV, 0, left_vertical_frame_position);
484 composite_frameV->
AddNode(vertical_frameV, 1, right_vertical_frame_position);
485 composite_frameV->
AddNode(horizontal_frameV, 0, bottom_horizontal_frame_position);
486 composite_frameV->
AddNode(horizontal_frameV, 1, lower_horizontal_frame_position);
488 return composite_frameV;
495 TGeoShape* moduleS =
new TGeoBBox(
"moduleS", xsize * 0.5, ysize * 0.5, zsize * 0.5);
504 Fatal(
"Main",
"Invalid medium for sensitive modules!");
525 TGeoVolume* horizontal_frameV =
new TGeoVolume(frame_name +
"_horizontal_frameV", horizontal_frameS);
530 vertical_frameV->
SetMedium(frame_medium);
531 horizontal_frameV->
SetMedium(frame_medium);
533 Fatal(
"Main",
"Invalid medium for frames!");
537 Fatal(
"Main",
"Invalid medium for frames!");
559 composite_frameV->
AddNode(vertical_frameV, 0, left_vertical_frame_position);
560 composite_frameV->
AddNode(vertical_frameV, 1, right_vertical_frame_position);
561 composite_frameV->
AddNode(horizontal_frameV, 0, bottom_horizontal_frame_position);
562 composite_frameV->
AddNode(horizontal_frameV, 1, lower_horizontal_frame_position);
564 return composite_frameV;
575 TGeoShape* module_partS =
new TGeoBBox(
"module_partS", xsize * 0.5, ysize * 0.5, zsize * 0.5);
596 Fatal(
"Main",
"Invalid medium for sensitive modules!");
624 new TGeoVolume(frame_name +
"_horizontal_upper_frameV", horizontal_upper_frameS);
626 new TGeoVolume(frame_name +
"_horizontal_bottom_frameV", horizontal_bottom_frameS);
631 vertical_frameV->
SetMedium(frame_medium);
632 horizontal_upper_frameV->
SetMedium(frame_medium);
633 horizontal_bottom_frameV->
SetMedium(frame_medium);
635 Fatal(
"Main",
"Invalid medium for frames!");
639 Fatal(
"Main",
"Invalid medium for frames!");
659 composite_frameV->
AddNode(vertical_frameV, 0, left_vertical_frame_position);
660 composite_frameV->
AddNode(horizontal_upper_frameV, 0, upper_horizontal_frame_position);
661 composite_frameV->
AddNode(horizontal_bottom_frameV, 0, bottom_horizontal_frame_position);
663 return composite_frameV;
void Fatal(const char *location, const char *msgfmt,...)
R__EXTERN TGeoManager * gGeoManager
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
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]
TGeoMedium * pMedArCO27030
const Double_t YModuleSize_Station66x41
const Double_t XModuleSize_Station163x45
const Double_t XModuleSize_Station66x41
TGeoMedium * pMedFiberGlass
const Double_t XStationPositions[NStations]
const Double_t ZModuleSize_Station10x10
const Double_t dYFrame_Station10x10
const Double_t XModuleSize_Station10x10
const Double_t YModuleSize_Station10x10
const Double_t dXFrame_Station10x10
const Double_t dZFrame_Station10x10
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)
void create_rootgeom_GEMS_RunWinter2016()
TGeoVolume * CreateStation(TString station_name)
TGeoVolume * CreateModule_Station163x45(TString module_name, Double_t xsize, Double_t ysize, Double_t zsize, Double_t hole_radius)
TGeoVolume * CreateFrameForModule_Station10x10(TString frame_name, Double_t dx, Double_t dy, Double_t dz)
void DefineRequiredMedia(FairGeoMedia *geoMedia, FairGeoBuilder *geoBuild)
TGeoVolume * CreateFrameForModule_Station66x41(TString frame_name, Double_t dx, Double_t dy, Double_t dz)