68 {163.2 * 0.25, -163.2 * 0.25},
69 {163.2 * 0.25, -163.2 * 0.25},
70 {163.2 * 0.25, -163.2 * 0.25},
71 {163.2 * 0.25, -163.2 * 0.25},
72 {163.2 * 0.25, -163.2 * 0.25},
73 {163.2 * 0.25, -163.2 * 0.25}
152 FairGeoMedium* mAir = geoMedia->getMedium(
"air");
154 Fatal(
"Main",
"FairMedium air not found");
155 geoBuild->createMedium(mAir);
158 Fatal(
"Main",
"Medium air not found");
161 FairGeoMedium* mCarbon = geoMedia->getMedium(
"carbon");
163 Fatal(
"Main",
"FairMedium carbon not found");
164 geoBuild->createMedium(mCarbon);
167 Fatal(
"Main",
"Medium carbon not found");
170 FairGeoMedium* mFiberGlass = geoMedia->getMedium(
"fiberglass");
172 Fatal(
"Main",
"FairMedium fiberglass not found");
173 geoBuild->createMedium(mFiberGlass);
176 Fatal(
"Main",
"Medium fiberglass not found");
179 FairGeoMedium* mArCO27030 = geoMedia->getMedium(
"arco27030");
181 Fatal(
"Main",
"FairMedium arco27030 not found");
182 geoBuild->createMedium(mArCO27030);
185 Fatal(
"Main",
"Medium arco27030 not found");
195 const TString geoDetectorName =
"GEMS";
196 const TString geoDetectorVersion =
"RunSRCSpring2018";
197 const TString geoFileName = gPath +
"/geometry/" + geoDetectorName +
"_" + geoDetectorVersion +
".root";
200 FairGeoLoader* geoLoad =
new FairGeoLoader(
"TGeo",
"FairGeoLoader");
201 FairGeoInterface* geoFace = geoLoad->getGeoInterface();
204 TString medFile = gPath +
"/geometry/media.geo";
205 geoFace->setMediaFile(medFile);
206 geoFace->readMedia();
207 FairGeoMedia* geoMedia = geoFace->getMedia();
208 FairGeoBuilder* geoBuild = geoLoad->getGeoBuilder();
215 gGeoMan->SetName(geoDetectorName +
"_geom");
231 Int_t stationNum = 0;
243 module0_transform->
RotateY(+30.5843);
252 GEMS->AddNode(station, 0, station_transform);
257 Int_t stationNum = 1;
269 module0_transform->
RotateY(+30.5843);
278 GEMS->AddNode(station, 0, station_transform);
283 Int_t stationNum = 2;
295 module0_transform->
RotateY(-30.6845);
304 GEMS->AddNode(station, 0, station_transform);
309 Int_t stationNum = 3;
321 module0_transform->
RotateY(-30.6845);
330 GEMS->AddNode(station, 0, station_transform);
335 for (
Int_t istation = 4; istation < 10; ++istation) {
337 Int_t stationNum = istation;
372 GEMS->AddNode(station, 0, station_transform);
381 gGeoMan->CheckOverlaps(0.0001);
386 TFile* geoFile =
new TFile(geoFileName,
"RECREATE");
406 TGeoShape* moduleS =
new TGeoBBox(
"moduleS", xsize * 0.5, ysize * 0.5, zsize * 0.5);
415 Fatal(
"Main",
"Invalid medium for sensitive modules!");
436 TGeoVolume* horizontal_frameV =
new TGeoVolume(frame_name +
"_horizontal_frameV", horizontal_frameS);
441 vertical_frameV->
SetMedium(frame_medium);
442 horizontal_frameV->
SetMedium(frame_medium);
444 Fatal(
"Main",
"Invalid medium for frames!");
448 Fatal(
"Main",
"Invalid medium for frames!");
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);
475 return composite_frameV;
486 TGeoShape* module_partS =
new TGeoBBox(
"module_partS", xsize * 0.5, ysize * 0.5, zsize * 0.5);
507 Fatal(
"Main",
"Invalid medium for sensitive modules!");
535 new TGeoVolume(frame_name +
"_horizontal_upper_frameV", horizontal_upper_frameS);
537 new TGeoVolume(frame_name +
"_horizontal_bottom_frameV", horizontal_bottom_frameS);
542 vertical_frameV->
SetMedium(frame_medium);
543 horizontal_upper_frameV->
SetMedium(frame_medium);
544 horizontal_bottom_frameV->
SetMedium(frame_medium);
546 Fatal(
"Main",
"Invalid medium for frames!");
550 Fatal(
"Main",
"Invalid medium for frames!");
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);
574 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 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]
TGeoMedium * pMedArCO27030
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)