19 fst->SetFileName(
"fwdst.root");
24 Double_t waferThickness = 200 *
eic::um;
27 Double_t waferWidth = 250 *
eic::mm;
28 Double_t waferSpacing = 100 *
eic::mm;
31 Double_t containerVolumeLength = (waferNum-1) * waferSpacing + waferThickness + (10 *
eic::mm);
32 Double_t containerVolumeWidth = waferWidth + (10 *
eic::mm);
35 auto container =
new TGeoBBox(
"ContainerVolume",
36 containerVolumeWidth/2,
37 containerVolumeWidth/2,
38 containerVolumeLength/2);
40 auto vcontainer =
new TGeoVolume(
"ContainerVolume", container, fst->GetMedium(
"air"));
43 auto wafer =
new TGeoBBox(
"SiliconWafer",
47 auto vwafer =
new TGeoVolume(
"SiliconWafer", wafer, fst->GetMedium(
"silicon"));
49 auto fgmap = fst->CreateNewMap();
50 fgmap->AddGeantVolumeLevel(
"SiliconWafer", waferNum);
51 fgmap->SetSingleSensorContainerVolume(
"SiliconWafer");
55 fst->AddLogicalVolumeGroup(0, 0, waferNum);
58 for(
unsigned wf=0; wf<waferNum; wf++)
60 double offset = (wf - (waferNum-1)/2.)*waferSpacing;
62 UInt_t geant[1] = {wf}, group = 0, logical[3] = {0, 0, wf};
64 if (fst->SetMappingTableEntry(fgmap, geant, group, logical)) {
65 cout <<
"Failed to set mapping table entry!" << endl;
69 vcontainer->AddNode(vwafer, wf,
new TGeoCombiTrans(0.0, 0.0, offset,
new TGeoRotation()));
73 fst->GetTopVolume()->AddNode(vcontainer, 0,
new TGeoCombiTrans(0.0, 0.0, 0.0,
new TGeoRotation()));
75 fst->SetTopVolumeTransformation(
new TGeoTranslation(0.0, 0.0, beamLineOffset));
77 fst->GetColorTable()->AddPatternMatch (
"Silicon", kYellow);
78 fst->GetTransparencyTable()->AddPatternMatch(
"Silicon", 50);
83 fst->FinalizeOutput();