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}};
23 {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}};
78 FairGeoMedium* mAir = geoMedia->getMedium(
"air");
80 Fatal(
"Main",
"FairMedium air not found");
81 geoBuild->createMedium(mAir);
84 Fatal(
"Main",
"Medium air not found");
87 FairGeoMedium* mCarbon = geoMedia->getMedium(
"carbon");
89 Fatal(
"Main",
"FairMedium carbon not found");
90 geoBuild->createMedium(mCarbon);
93 Fatal(
"Main",
"Medium carbon not found");
96 FairGeoMedium* mFiberGlass = geoMedia->getMedium(
"fiberglass");
98 Fatal(
"Main",
"FairMedium fiberglass not found");
99 geoBuild->createMedium(mFiberGlass);
102 Fatal(
"Main",
"Medium fiberglass not found");
105 FairGeoMedium* mArCO27030 = geoMedia->getMedium(
"arco27030");
107 Fatal(
"Main",
"FairMedium arco27030 not found");
108 geoBuild->createMedium(mArCO27030);
111 Fatal(
"Main",
"Medium arco27030 not found");
121 const TString geoDetectorName =
"GEMS";
122 const TString geoDetectorVersion =
"RunSpring2018";
123 const TString geoFileName = gPath +
"/geometry/" + geoDetectorName +
"_" + geoDetectorVersion +
".root";
126 FairGeoLoader* geoLoad =
new FairGeoLoader(
"TGeo",
"FairGeoLoader");
127 FairGeoInterface* geoFace = geoLoad->getGeoInterface();
130 TString medFile = gPath +
"/geometry/media.geo";
131 geoFace->setMediaFile(medFile);
132 geoFace->readMedia();
133 FairGeoMedia* geoMedia = geoFace->getMedia();
134 FairGeoBuilder* geoBuild = geoLoad->getGeoBuilder();
141 gGeoMan->SetName(geoDetectorName +
"_geom");
157 Int_t stationNum = 0;
192 GEMS->AddNode(station, 0, station_transform);
197 Int_t stationNum = 1;
232 GEMS->AddNode(station, 0, station_transform);
237 Int_t stationNum = 2;
272 GEMS->AddNode(station, 0, station_transform);
277 Int_t stationNum = 3;
312 GEMS->AddNode(station, 0, station_transform);
317 Int_t stationNum = 4;
352 GEMS->AddNode(station, 0, station_transform);
357 Int_t stationNum = 5;
392 GEMS->AddNode(station, 0, station_transform);
400 gGeoMan->CheckOverlaps(0.0001);
405 TFile* geoFile =
new TFile(geoFileName,
"RECREATE");
425 TGeoShape* moduleS =
new TGeoBBox(
"moduleS", xsize * 0.5, ysize * 0.5, zsize * 0.5);
434 Fatal(
"Main",
"Invalid medium for sensitive modules!");
455 TGeoVolume* horizontal_frameV =
new TGeoVolume(frame_name +
"_horizontal_frameV", horizontal_frameS);
460 vertical_frameV->
SetMedium(frame_medium);
461 horizontal_frameV->
SetMedium(frame_medium);
463 Fatal(
"Main",
"Invalid medium for frames!");
467 Fatal(
"Main",
"Invalid medium for frames!");
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);
494 return composite_frameV;
505 TGeoShape* module_partS =
new TGeoBBox(
"module_partS", xsize * 0.5, ysize * 0.5, zsize * 0.5);
526 Fatal(
"Main",
"Invalid medium for sensitive modules!");
554 new TGeoVolume(frame_name +
"_horizontal_upper_frameV", horizontal_upper_frameS);
556 new TGeoVolume(frame_name +
"_horizontal_bottom_frameV", horizontal_bottom_frameS);
561 vertical_frameV->
SetMedium(frame_medium);
562 horizontal_upper_frameV->
SetMedium(frame_medium);
563 horizontal_bottom_frameV->
SetMedium(frame_medium);
565 Fatal(
"Main",
"Invalid medium for frames!");
569 Fatal(
"Main",
"Invalid medium for frames!");
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);
593 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]
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)