53 FairGeoMedium* mVacuum = geoMedia->getMedium(
"vacuum");
55 Fatal(
"Main",
"FairMedium vacuum not found");
56 geoBuild->createMedium(mVacuum);
59 Fatal(
"Main",
"Medium vacuum not found");
62 FairGeoMedium* mAir = geoMedia->getMedium(
"air");
64 Fatal(
"Main",
"FairMedium air not found");
65 geoBuild->createMedium(mAir);
68 Fatal(
"Main",
"Medium air not found");
71 FairGeoMedium* mIron = geoMedia->getMedium(
"iron");
73 Fatal(
"Main",
"FairMedium iron not found");
74 geoBuild->createMedium(mIron);
77 Fatal(
"Main",
"Medium iron not found");
80 FairGeoMedium* mTyvec = geoMedia->getMedium(
"tyvec_ZDC");
82 Fatal(
"Main",
"FairMedium tyvec_ZDC not found");
83 geoBuild->createMedium(mTyvec);
86 Fatal(
"Main",
"Medium tyvec not found");
89 FairGeoMedium* mLead = geoMedia->getMedium(
"lead");
91 Fatal(
"Main",
"FairMedium lead not found");
92 geoBuild->createMedium(mLead);
95 Fatal(
"Main",
"Medium lead not found");
98 FairGeoMedium* mPolystyrene = geoMedia->getMedium(
"polystyrene");
100 Fatal(
"Main",
"FairMedium polystyrene not found");
101 geoBuild->createMedium(mPolystyrene);
104 Fatal(
"Main",
"Medium polystyrene not found");
116 FairGeoMedium* mPlastic = geoMedia->getMedium(
"plasticWLS_ZDC");
118 Fatal(
"Main",
"FairMedium plastic not found");
119 geoBuild->createMedium(mPlastic);
122 Fatal(
"Main",
"Medium plasticWLS_ZDC not found");
138 const TString geoDetectorName =
"rootgeom_bmnzdc_104mods";
139 const TString geoDetectorVersion =
"v1";
150 TString geoFileName = gPath +
"/geometry/" + geoDetectorName +
"_" + geoDetectorVersion +
"_" +
"Zpos_" + sZshift
151 +
"mm" +
"_" +
"Xshift_" + sXshift +
"mm" +
"_" +
"Yshift_" + sYshift +
"mm" +
".root";
155 FairGeoLoader* geoLoad =
new FairGeoLoader(
"TGeo",
"FairGeoLoader");
156 FairGeoInterface* geoFace = geoLoad->getGeoInterface();
159 TString medFile = gPath +
"/geometry/media.geo";
160 geoFace->setMediaFile(medFile);
161 geoFace->readMedia();
162 FairGeoMedia* geoMedia = geoFace->getMedia();
163 FairGeoBuilder* geoBuild = geoLoad->getGeoBuilder();
179 TString zdc_common_name =
"ZDC_common";
189 TString zdcModule_name =
"zdc01m";
194 TString zdcModule_name_small =
"zdc01m_small";
200 cout <<
"ZDC_pos " << ZDC_Xpos <<
" " << ZDC_Ypos << endl;
204 for (
int i = 0;
i < 77;
i++) {
207 if ((
i >= 30 &&
i <= 32) || (
i >= 37 &&
i <= 39) || (
i >= 44 &&
i <= 46))
212 ZDCV->
AddNode(zdcModuleV, iMod + 1, zdcModuleV_position);
213 std::cout <<
"iMod = " << iMod + 1 <<
" at " << xMod <<
", " << yMod << std::endl;
217 for (
int i = 0;
i < 36;
i++) {
221 Double_t yMod = -18.75 + 7.5 * iRow;
223 ZDCV->
AddNode(zdcModuleV_small, iMod + 1, zdcModuleV_position);
224 std::cout <<
"iMod = " << iMod + 1 <<
" at " << xMod <<
", " << yMod << std::endl;
234 ZDC_common->
AddNode(ZDCV, 1, zdcZDC);
246 TFile* geoFile =
new TFile(geoFileName,
"RECREATE");
278 Double_t Zdc_Y_Pb_Sc_position = -0.2;
286 Zdc_Y_slot_position = Zdc_Fe_Y_size - Zdc_VRMM_Y_size;
287 cout <<
"Zdc_Y_slot_position " << Zdc_Y_slot_position << endl;
291 TString SensitiveVolume_name =
"zdc01s";
292 TString slot_Mod_name =
"Mod_slot";
295 TGeoShape* FeS =
new TGeoBBox(Fe_name, Zdc_Fe_X_size, Zdc_Fe_Y_size, Zdc_Fe_Z_size);
301 Fatal(
"Main",
"Invalid medium for Fe!");
303 TGeoShape* PbS =
new TGeoBBox(Pb_name, Zdc_Pb_X_size, Zdc_Pb_Y_size, Zdc_Pb_Z_size);
309 Fatal(
"Main",
"Invalid medium for Pb!");
311 TGeoShape* zdcSensitiveVolumeS =
new TGeoBBox(SensitiveVolume_name, Zdc_Sc_X_size, Zdc_Sc_Y_size, Zdc_Sc_Z_size);
315 zdcSensitiveVolumeV->
SetMedium(Sc_medium);
317 Fatal(
"Main",
"Invalid medium for Sc!");
320 TGeoShape* slot_ModS =
new TGeoBBox(slot_Mod_name, Zdc_VRMM_X_size, Zdc_VRMM_Y_size, Zdc_VRMM_Z_size);
326 Fatal(
"Main",
"Invalid medium for slot_Mod!");
332 zPos = zPos + Zdc_Fe_Z_size;
339 zPos = zPos + Zdc_Sc_Z_size;
341 cout <<
"Sc 1 " << zPos << endl;
342 zPos = zPos + Zdc_Sc_Z_size;
347 zPos = zPos + Zdc_Pb_Z_size;
349 cout <<
"Pb " << iSlice + 1 <<
" " << zPos << endl;
350 zPos = zPos + Zdc_Pb_Z_size;
353 zPos = zPos + Zdc_Sc_Z_size;
354 mother_volume->
AddNode(zdcSensitiveVolumeV, iSlice + 2,
new TGeoTranslation(0, Zdc_Y_Pb_Sc_position, zPos));
355 cout <<
"Sc " << iSlice + 2 <<
" " << zPos << endl;
356 zPos = zPos + Zdc_Sc_Z_size;
381 Double_t Zdc_Y_Pb_Sc_position = -0.2;
390 Zdc_Y_slot_position = Zdc_Fe_Y_size - Zdc_VRMM_Y_size;
391 cout <<
"Zdc_Y_slot_position small " << Zdc_Y_slot_position << endl;
393 TString Fe_name_small =
"Fe_small";
394 TString Pb_name_small =
"zdc01a_small";
395 TString SensitiveVolume_name_small =
"zdc01s_small";
396 TString slot_Mod_name =
"Mod_slot";
399 TGeoShape* FeS_small =
new TGeoBBox(Fe_name_small, Zdc_Fe_X_size, Zdc_Fe_Y_size, Zdc_Fe_Z_size);
405 Fatal(
"Main",
"Invalid medium for Fe_small!");
407 TGeoShape* PbS_small =
new TGeoBBox(Pb_name_small, Zdc_Pb_X_size, Zdc_Pb_Y_size, Zdc_Pb_Z_size);
413 Fatal(
"Main",
"Invalid medium for Pb_small!");
416 new TGeoBBox(SensitiveVolume_name_small, Zdc_Sc_X_size, Zdc_Sc_Y_size, Zdc_Sc_Z_size);
417 TGeoVolume* zdcSensitiveVolumeV_small =
new TGeoVolume(SensitiveVolume_name_small, zdcSensitiveVolumeS_small);
420 zdcSensitiveVolumeV_small->
SetMedium(Sc_medium_small);
422 Fatal(
"Main",
"Invalid medium for Sc_small!");
425 TGeoShape* slot_ModS =
new TGeoBBox(slot_Mod_name, Zdc_VRMM_X_size, Zdc_VRMM_Y_size, Zdc_VRMM_Z_size);
431 Fatal(
"Main",
"Invalid medium for slot_Mod!");
437 zPos = zPos + Zdc_Fe_Z_size;
444 zPos = zPos + Zdc_Sc_Z_size;
445 mother_volume_small->
AddNode(zdcSensitiveVolumeV_small, 1,
new TGeoTranslation(0, Zdc_Y_Pb_Sc_position, zPos));
446 cout <<
"Sc 1 " << zPos << endl;
447 zPos = zPos + Zdc_Sc_Z_size;
452 zPos = zPos + Zdc_Pb_Z_size;
454 cout <<
"Pb " << iSlice + 1 <<
" " << zPos << endl;
455 zPos = zPos + Zdc_Pb_Z_size;
458 zPos = zPos + Zdc_Sc_Z_size;
459 mother_volume_small->
AddNode(zdcSensitiveVolumeV_small, iSlice + 2,
461 cout <<
"Sc " << iSlice + 2 <<
" " << zPos << endl;
462 zPos = zPos + Zdc_Sc_Z_size;