22 const Int_t nStations = 12;
37 Double_t dx = sizeLad / 2 + widthFrame;
38 Double_t dy = sizeLad / 2 + widthFrame;
45 Double_t sizeSensX[4] = {80.0, 320.0, 320.0, 80.0};
46 Double_t sizeSensY[4] = {80.0, 80.0, 320.0, 320.0};
47 Double_t sizeSensX2[4] = {200.0, 200.0, 200.0, 200.0};
48 Double_t sizeSensY2[4] = {200.0, 200.0, 200.0, 200.0};
60 const char* filename =
"gem_bmn_40_VV.geo";
61 ofstream* f =
new ofstream(filename, ios::out | ios::trunc);
63 std::ostringstream points, position, rotation;
64 points.setf(ios::showpoint);
65 points.setf(ios::fixed);
66 points << setprecision(6);
67 position.setf(ios::showpoint);
68 position.setf(ios::fixed);
69 position << setprecision(6);
70 rotation.setf(ios::showpoint);
71 rotation.setf(ios::fixed);
72 rotation << setprecision(6);
79 zShift = zMag - lengSts / 2 - 100;
80 Mpdshape* gem =
new Mpdshape(f,
"STS1",
"cave",
"PGON",
"air", points.str());
82 gem->
Fill_PGON(-lengSts / 2, lengSts / 2, hole - 0.1, size / 2 + 0.1 + margin, 45.0, 4);
88 Mpdshape* station =
new Mpdshape(f,
"STSStation01",
"STS1",
"PGON",
"air", points.str());
90 station->
Fill_PGON(-thickStat / 2, thickStat / 2, hole, 3 * sizeLad + 2 * widthFrame + hole, 45.0, 4);
92 Double_t zSt = 300.0 - zMag + zShift;
97 Double_t dxy[12][2] = {{hole, -hole - 2 * widthFrame},
98 {hole + 2 * widthFrame, hole},
99 {-hole, hole + 2 * widthFrame},
100 {-hole - 2 * widthFrame, -hole},
101 {hole + widthFrame + 1.5 * sizeLad, -hole - widthFrame + 0.5 * sizeLad},
102 {-hole - widthFrame + 1.5 * sizeLad, -hole - widthFrame - 0.5 * sizeLad},
103 {-hole - widthFrame + 2.5 * sizeLad, -hole - widthFrame - 0.5 * sizeLad},
104 {hole + widthFrame + 2.5 * sizeLad, -hole - widthFrame + 0.5 * sizeLad},
105 {-hole - widthFrame - 1.5 * sizeLad, hole + widthFrame - 0.5 * sizeLad},
106 {hole + widthFrame - 1.5 * sizeLad, hole + widthFrame + 0.5 * sizeLad},
107 {hole + widthFrame - 2.5 * sizeLad, hole + widthFrame + 0.5 * sizeLad},
108 {-hole - widthFrame - 2.5 * sizeLad, hole + widthFrame - 0.5 * sizeLad}};
115 Mpdshape* ladder =
new Mpdshape(f,
"STSStation01Ladder",
"STSStation01",
"BOX",
"air", points.str());
116 ladder->
Fill_BOX(sizeLad / 2 + widthFrame, sizeLad / 2 + widthFrame, thickLad / 2);
117 ladder->
SetPosition(dx + dxy[0][0], dy + dxy[0][1], dz);
123 Mpdshape* ladder5 =
new Mpdshape(f,
"STSStation01Ladder1",
"STSStation01",
"BOX",
"air", points.str());
124 ladder5->
Fill_BOX(sizeLad / 2 + widthFrame, sizeLad / 2 + widthFrame, thickLad / 2);
131 Mpdshape* hladder =
new Mpdshape(f,
"STSStation01Hladd",
"STSStation01Ladder",
"BOX",
"air", points.str());
132 hladder->
Fill_BOX(sizeLad / 2 + widthFrame, sizeLad / 2 + widthFrame, thickLad / 2);
139 Mpdshape* hladder5 =
new Mpdshape(f,
"STSStation01Hladd",
"STSStation01Ladder1",
"BOX",
"air", points.str());
140 hladder5->
Fill_BOX(sizeLad / 2 + widthFrame, sizeLad / 2 + widthFrame, thickLad / 2);
164 TString name =
"STSStation01Module";
166 modules[
i] =
new Mpdshape(f, name.
Data(),
"STSStation01Hladd",
"BOX",
"air", points.str());
167 modules[
i]->
Fill_BOX(sizeSensX[
i] / 2 - 0.0, sizeSensY[
i] / 2 - 0.0, thickSens / 2);
168 Double_t x0 = sizeSensX[0] / 2, y0 = sizeSensY[0] / 2;
170 x0 = sizeSensX[1] / 2 + sizeSensX[0];
172 y0 = sizeSensY[2] / 2 + sizeSensY[0];
173 modules[
i]->
SetPosition(x0 - sizeLad / 2, y0 - sizeLad / 2, 0.0);
181 TString name =
"STSStation01Module";
183 modules5[
i] =
new Mpdshape(f, name.
Data(),
"STSStation01Hladd",
"BOX",
"air", points.str());
184 modules5[
i]->
Fill_BOX(sizeSensX2[
i] / 2 - 0.0, sizeSensY2[
i] / 2 - 0.0, thickSens / 2);
185 Double_t x0 = sizeSensX2[0] / 2, y0 = sizeSensY2[0] / 2;
187 x0 = sizeSensX2[1] / 2 + sizeSensX2[0];
189 y0 = sizeSensY2[2] / 2 + sizeSensY2[0];
190 modules5[
i]->
SetPosition(x0 - sizeLad / 2, y0 - sizeLad / 2, 0.0);
199 TString name =
"STSStation01Sensor";
201 TString mname =
"STSStation01Module";
203 sensors[
i] =
new Mpdshape(f, name.
Data(), mname.
Data(),
"BOX",
"titanium", points.str());
204 sensors[
i]->
Fill_BOX(sizeSensX[
i] / 2 - 0.2, sizeSensY[
i] / 2 - 0.2, thickSens / 2);
213 TString name =
"STSStation01Sensor";
215 TString mname =
"STSStation01Module";
217 sensors5[
i] =
new Mpdshape(f, name.
Data(), mname.
Data(),
"BOX",
"titanium", points.str());
218 sensors5[
i]->
Fill_BOX(sizeSensX2[
i] / 2 - 0.2, sizeSensY2[
i] / 2 - 0.2, thickSens / 2);
227 Double_t ddx = dx, ddy = dy, ddz = dz, dzExtra[4] = {-dz, -3 * dz, -5 * dz, -3 * dz};
229 for (
Int_t lad = 1; lad < 12; ++lad) {
238 ladder->
SetPosition(ddx + dxy[lad][0], ddy + dxy[lad][1], ddz);
240 }
else if (lad == 4) {
242 ladder->
SetPosition(dxy[lad][0], dxy[lad][1], dzExtra[lad % 4]);
248 modules5[
i]->DumpWithIncrement();
250 sensors5[
i]->DumpWithIncrement();
253 ladder->
SetPosition(dxy[lad][0], dxy[lad][1], dzExtra[lad % 4]);
268 Double_t zPosSt[nStations] = {30, 45, 60, 80, 100, 130, 160, 200, 240, 280, 320, 360};
269 for (
Int_t ist = 1; ist < nStations; ++ist) {
271 distStat = (zPosSt[ist] - zPosSt[ist - 1]) * 10.0;