26 {+6.259 , +0.312 , -5.692 ,
28 +6.536 , +0.516 , -5.414 },
31 {+3.1385 , +6.0655 , +3.2225 ,
33 -3.056 , -5.801 , -2.976 },
36 {+8.4085 , +8.298 , +8.4435 ,
38 +6.991 , +7.118 , +6.979 },
53 {
false ,
false ,
false ,
false ,
false ,
false },
58 {
false ,
false ,
false ,
true ,
true ,
true },
106 FairGeoMedium* mAir = geoMedia->getMedium(
"air");
108 Fatal(
"Main",
"FairMedium air not found");
109 geoBuild->createMedium(mAir);
112 Fatal(
"Main",
"Medium air not found");
115 FairGeoMedium* mCarbon = geoMedia->getMedium(
"carbon");
117 Fatal(
"Main",
"FairMedium carbon not found");
118 geoBuild->createMedium(mCarbon);
121 Fatal(
"Main",
"Medium carbon not found");
124 FairGeoMedium* mFiberGlass = geoMedia->getMedium(
"fiberglass");
126 Fatal(
"Main",
"FairMedium fiberglass not found");
127 geoBuild->createMedium(mFiberGlass);
130 Fatal(
"Main",
"Medium fiberglass not found");
133 FairGeoMedium* mCopper = geoMedia->getMedium(
"copper");
135 Fatal(
"Main",
"FairMedium copper not found");
136 geoBuild->createMedium(mCopper);
139 Fatal(
"Main",
"Medium copper not found");
142 FairGeoMedium* mSilicon = geoMedia->getMedium(
"silicon");
144 Fatal(
"Main",
"FairMedium silicon not found");
145 geoBuild->createMedium(mSilicon);
148 Fatal(
"Main",
"Medium silicon not found");
154 cout <<
"Module parameters information : -----------------------------"
157 cout <<
"-------------------------------------------------------------\n";
164 cout <<
"station " << istation <<
":\n";
165 cout <<
" XStationPositions[" << istation <<
"] = " <<
XStationPositions[istation] <<
" cm\n";
166 cout <<
" YStationPositions[" << istation <<
"] = " <<
YStationPositions[istation] <<
" cm\n";
167 cout <<
" ZStationPositions[" << istation <<
"] = " <<
ZStationPositions[istation] <<
" cm\n";
171 cout <<
" module " << imodule <<
":\n";
172 cout <<
" XModuleShifts[" << istation <<
"][" << imodule <<
"] = " <<
XModuleShifts[istation][imodule]
174 cout <<
" YModuleShifts[" << istation <<
"][" << imodule <<
"] = " <<
YModuleShifts[istation][imodule]
176 cout <<
" ZModuleShifts[" << istation <<
"][" << imodule <<
"] = " <<
ZModuleShifts[istation][imodule]
179 cout <<
" ModulesYRotations[" << istation <<
"][" << imodule <<
"] = ";
181 cout <<
"not rotated around Y\n";
183 cout <<
"rotated around Y\n";
184 cout <<
" ModulesXRotations[" << istation <<
"][" << imodule <<
"] = ";
186 cout <<
"not rotated around X\n";
188 cout <<
"rotated around X\n";
191 cout <<
"-------------------------------------------------------------\n";
193 cout <<
"-------------------------------------------------------------\n";
204 const TString geoDetectorName =
"VSP";
205 const TString geoDetectorVersion =
"Run9";
206 const TString geoFileName = gPath +
"/geometry/" + geoDetectorName +
"_" + geoDetectorVersion +
".root";
209 FairGeoLoader* geoLoad =
new FairGeoLoader(
"TGeo",
"FairGeoLoader");
210 FairGeoInterface* geoFace = geoLoad->getGeoInterface();
213 TString medFile = gPath +
"/geometry/media.geo";
214 geoFace->setMediaFile(medFile);
215 geoFace->readMedia();
216 FairGeoMedia* geoMedia = geoFace->getMedia();
217 FairGeoBuilder* geoBuild = geoLoad->getGeoBuilder();
228 gGeoMan->SetName(geoDetectorName +
"_geom");
253 for (
Int_t imodule = 0; imodule < NModules; ++imodule) {
266 modTransforms[imodule]->
RotateY(180.0);
269 modTransforms[imodule]->
RotateX(180.0);
278 modFrameTransform[imodule] =
new TGeoCombiTrans(*modTransforms[imodule]);
280 modFrameTransform[imodule]->
SetDz(modFrameTransform[imodule]->GetTranslation()[2]
283 modFrameTransform[imodule]->
SetDz(modFrameTransform[imodule]->GetTranslation()[2]
287 station->
AddNode(modules[imodule], 0, modTransforms[imodule]);
288 station->
AddNode(moduleFrames[imodule], 0, modFrameTransform[imodule]);
295 VSP->
AddNode(station, 0, station_transform);
303 gGeoMan->CheckOverlaps(0.0001);
307 TFile* geoFile =
new TFile(geoFileName,
"RECREATE");
341 if (silicon_medium) {
345 Fatal(
"Main",
"Invalid medium for modules and sensors!");
386 +shortHSide * 0.5 + slopeHSide ,
387 +shortHSide * 0.5 + slopeHSide ,
388 -(shortHSide * 0.5 + slopeHSide) ,
389 -(shortHSide * 0.5 + slopeHSide) ,
403 -(
YModuleSize * 0.5 + holeVMargin - 0.1) + longVSide ,
404 -(
YModuleSize * 0.5 + holeVMargin - 0.1) + longVSide + slopeVSide ,
405 -(
YModuleSize * 0.5 + holeVMargin - 0.1) + longVSide + slopeVSide + shortVSide ,
406 -(
YModuleSize * 0.5 + holeVMargin - 0.1) + longVSide + slopeVSide + shortVSide ,
407 -(
YModuleSize * 0.5 + holeVMargin - 0.1) + longVSide + slopeVSide ,
408 -(
YModuleSize * 0.5 + holeVMargin - 0.1) + longVSide ,
419 ((
TGeoXtru*)moduleFrameS)->DefinePolygon(16, x_pos, y_pos);
431 if (fiberGlass_medium) {
432 moduleFrameV->
SetMedium(fiberGlass_medium);
434 Fatal(
"Main",
"Invalid medium for moduleFrameV!");
void Fatal(const char *location, const char *msgfmt,...)
R__EXTERN TGeoManager * gGeoManager
R__EXTERN TSystem * gSystem
static Int_t GetColor(const char *hexcolor)
void Close(Option_t *option="") override
void SetDz(Double_t dz) override
void RotateY(Double_t angle) override
void SetDy(Double_t dy) override
void SetDx(Double_t dx) override
void RotateX(Double_t angle) override
void SetTranslation(const TGeoTranslation &tr)
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 void SetName(const char *name)
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 YStationPositions[NStations]
const Double_t ZStationPositions[NStations]
TGeoMedium * pMedFiberGlass
const Double_t XStationPositions[NStations]
const Int_t NModulesInStations[NStations]
const Bool_t ModulesYRotations[NStations][NMaxModules]
const Bool_t ModulesXRotations[NStations][NMaxModules]
const ModuleFrameType ModulesFrameTypes[NStations][NMaxModules]
TGeoVolume * CreateModule(TString module_name)
TGeoVolume * CreateModuleFrame(TString moduleFrame_name, ModuleFrameType type)
void create_rootgeom_VSP_Run9()
TGeoVolume * CreateStation(TString station_name)
void PrintInfoAboutModuleParameters()
void DefineRequiredMedia(FairGeoMedia *geoMedia, FairGeoBuilder *geoBuild)
void PrintInformationAboutStations()