1 #include <ecl/geometry/GeoECLCreator.h>
2 #include "ecl/geometry/BelleLathe.h"
3 #include "ecl/geometry/BelleCrystal.h"
4 #include "G4LogicalVolume.hh"
5 #include "G4PVPlacement.hh"
6 #include <G4VisAttributes.hh>
9 #include <G4AssemblyVolume.hh>
10 #include <G4SubtractionSolid.hh>
11 #include <G4Region.hh>
12 #include <G4UnionSolid.hh>
13 #include <G4TwoVector.hh>
14 #include <G4PVReplica.hh>
15 #include "G4ReflectionFactory.hh"
19 #include "CLHEP/Matrix/Vector.h"
20 #include "G4Vector3D.hh"
21 #include "G4Point3D.hh"
22 #include "ecl/geometry/shapes.h"
23 #include <geometry/Materials.h>
31 G4LogicalVolume* top = &_top;
34 double phi0 = 0, dphi = (sec) ? M_PI / 16 : 2 * M_PI;
36 bool b_inner_support_ring = 1;
37 bool b_outer_support_ring = 1;
38 bool b_support_wall = 1;
40 bool b_septum_wall = 1;
42 bool b_preamplifier = 1;
43 bool b_support_leg = 1;
44 bool b_support_structure_13 = 1;
45 bool b_support_structure_15 = 1;
46 bool b_connectors = 1;
50 b_connectors &= b_support_structure_15;
51 b_boards &= b_support_structure_15;
53 int overlap = m_overlap;
56 vector<cplacement_t> bp = load_placements(m_sap, ECLParts::forward);
57 vector<cplacement_t>::iterator fp = find_if(bp.begin(), bp.end(), [](
const cplacement_t& p) {
58 const int ECL_forward_part = 1000;
59 return p.nshape == ECL_forward_part;
62 G4Transform3D gTrans = (fp == bp.end()) ? G4Translate3D(0, 0, 1960) : get_transform(*fp);
67 double milled_thickness = gTrans.dz() - 1960;
68 if (fp != bp.end()) bp.erase(fp);
70 const double th0 = 13.12, th1 = 32.98;
71 const double ZT = 437, ZI = 434, RI = 431, RIp = 532.2, RC = 1200.4, RT = 1415;
73 if (b_inner_support_ring) {
74 zr_t vc1[] = {{ZI - 487, 410}, {ZT - (RIp - 410 - 20 / cosd(th0)) / tand(th0), 410}, {ZT, RIp - 20 / cosd(th0)}, {ZT, RIp}, {3., RI}, {3., 418}, {ZI - 487, 418}};
75 std::vector<zr_t> contour1(vc1, vc1 +
sizeof(vc1) /
sizeof(
zr_t));
76 G4VSolid* part1solid =
new BelleLathe(
"fwd_part1solid", phi0, dphi, contour1);
77 G4LogicalVolume* part1logical =
new G4LogicalVolume(part1solid, Materials::get(
"SUS304"),
"part1logical", 0, 0, 0);
78 part1logical->SetVisAttributes(att(
"iron"));
79 new G4PVPlacement(gTrans, part1logical,
"part1physical", top,
false, 0, overlap);
85 double L = (ZT - 107.24 - 3 - 1.6 * cosd(th1 + 90)) / cosd(th1);
86 double R0 = 418, R1 = RC;
87 zr_t vc23[] = {{0, R0}, {3, R0}, {3, R1}, {3 + L * cosd(th1), R1 + L * sind(th1)},
88 {3 + L * cosd(th1) + 1.6 * cosd(th1 + 90), R1 + L * sind(th1) + 1.6 * sind(th1 + 90)}, {3 + 1.6 * cosd(th1 + 90), R1 + 1.6 * sind(th1 + 90)}, {0, R1}
90 std::vector<zr_t> contour23(vc23, vc23 +
sizeof(vc23) /
sizeof(
zr_t));
91 G4VSolid* part23solid =
new BelleLathe(
"fwd_part23solid", phi0, dphi, contour23);
92 G4LogicalVolume* part23logical =
new G4LogicalVolume(part23solid, Materials::get(
"A5052"),
"part23logical", 0, 0, 0);
93 part23logical->SetVisAttributes(att(
"alum"));
94 new G4PVPlacement(gTrans, part23logical,
"part23physical", top,
false, 0, overlap);
98 if (b_outer_support_ring) {
99 zr_t vc4[] = {{3 + (RT - 20 - RC) / tand(th1), RT - 20}, {ZT, RT - 20}, {ZT, RT}, {3 + (RT - RC) / tand(th1), RT}};
100 std::vector<zr_t> contour4(vc4, vc4 +
sizeof(vc4) /
sizeof(
zr_t));
101 G4VSolid* part4solid =
new BelleLathe(
"fwd_part4solid", phi0, dphi, contour4);
102 G4LogicalVolume* part4logical =
new G4LogicalVolume(part4solid, Materials::get(
"SUS304"),
"part4logical", 0, 0, 0);
103 part4logical->SetVisAttributes(att(
"iron"));
104 new G4PVPlacement(gTrans, part4logical,
"part4physical", top,
false, 0, overlap);
107 zr_t cont_array_in[] = {{3., RI}, {ZT, RIp}, {ZT, RT - 20}, {3 + (RT - 20 - RC) / tand(th1), RT - 20}, {3, RC}};
108 std::vector<zr_t> contour_in(cont_array_in, cont_array_in +
sizeof(cont_array_in) /
sizeof(
zr_t));
109 G4VSolid* innervolume_solid =
new BelleLathe(
"fwd_innervolume_solid", 0, 2 * M_PI, contour_in);
110 G4LogicalVolume* innervolume_logical =
new G4LogicalVolume(innervolume_solid, Materials::get(
"G4_AIR"),
111 "innervolume_logical", 0, 0, 0);
112 innervolume_logical->SetVisAttributes(att(
"air"));
115 G4Region* aRegion =
new G4Region(
"ECLForwardEnvelope");
116 innervolume_logical->SetRegion(aRegion);
117 aRegion->AddRootLogicalVolume(innervolume_logical);
119 new G4PVPlacement(gTrans, innervolume_logical,
"ECLForwardPhysical", top,
false, 0, overlap);
121 G4VSolid* innervolumesector_solid =
new BelleLathe(
"fwd_innervolumesector_solid", -M_PI / 8, M_PI / 4, contour_in);
122 G4LogicalVolume* innervolumesector_logical =
new G4LogicalVolume(innervolumesector_solid, Materials::get(
"G4_AIR"),
123 "innervolumesector_logical", 0, 0, 0);
124 innervolumesector_logical->SetVisAttributes(att(
"air"));
125 new G4PVReplica(
"ECLForwardSectorPhysical", innervolumesector_logical, innervolume_logical, kPhi, 8, M_PI / 4, 0);
129 double H = 60, W = 20;
130 double X0 = RIp, X1 = RT - 20;
131 G4TwoVector r0o(X1, 0), r1o(X1 * sqrt(1 - pow(W / X1, 2)), W);
132 double beta = asin(W / X0);
133 G4TwoVector r0i(X0 / cos(beta / 2), 0), r1i(X0 * cos(beta / 2) - tan(beta / 2) * (W - X0 * sin(beta / 2)), W);
134 double dxymzp = (r0o - r0i).x(), dxypzp = (r1o - r1i).x();
135 double theta = atan(tand(th0) / 2);
136 double dxymzm = dxymzp + tand(th0) * H, dxypzm = dxypzp + tand(th0) * H;
138 G4TwoVector m0 = (r0i + r0o) * 0.5, m1 = (r1i + r1o) * 0.5, dm = m1 - m0;
139 double alpha = atan(dm.x() / dm.y());
141 G4VSolid* solid6_p1 =
new G4Trap(
"fwd_solid6_p1", H / 2, theta, 0, W / 2, dxymzm / 2, dxypzm / 2, alpha, W / 2, dxymzp / 2,
144 G4LogicalVolume* lsolid6_p1 =
new G4LogicalVolume(solid6_p1, Materials::get(
"SUS304"),
"lsolid6", 0, 0, 0);
145 lsolid6_p1->SetVisAttributes(att(
"iron"));
146 G4Transform3D tsolid6_p1(G4Translate3D(X0 * cos(beta / 2) + (dxymzp / 2 + dxypzp / 2) / 2 - tan(theta)*H / 2, W / 2, ZT - H / 2));
147 new G4PVPlacement(G4RotateZ3D(-M_PI / 8)*tsolid6_p1, lsolid6_p1,
"psolid6_p1", innervolumesector_logical,
false, 0, overlap);
148 new G4PVPlacement(G4RotateZ3D(0)*tsolid6_p1, lsolid6_p1,
"psolid6_p2", innervolumesector_logical,
false, 0, overlap);
151 dxymzm = dxymzp + tand(th0) * H, dxypzm = dxypzp + tand(th0) * H;
152 G4VSolid* solid6_p2 =
new G4Trap(
"fwd_solid6_p2", H / 2, theta, 0, W / 2, dxypzm / 2, dxymzm / 2, -alpha, W / 2, dxypzp / 2,
155 G4LogicalVolume* lsolid6_p2 =
new G4LogicalVolume(solid6_p2, Materials::get(
"SUS304"),
"lsolid6", 0, 0, 0);
156 lsolid6_p2->SetVisAttributes(att(
"iron"));
157 G4Transform3D tsolid6_p2(G4Translate3D(X0 * cos(beta / 2) + (dxymzp / 2 + dxypzp / 2) / 2 - tan(theta)*H / 2, -W / 2, ZT - H / 2));
158 new G4PVPlacement(G4RotateZ3D(0)*tsolid6_p2, lsolid6_p2,
"psolid6_p3", innervolumesector_logical,
false, 0, overlap);
159 new G4PVPlacement(G4RotateZ3D(M_PI / 8)*tsolid6_p2, lsolid6_p2,
"psolid6_p4", innervolumesector_logical,
false, 0, overlap);
162 G4VSolid* solid7_p8 =
new G4Box(
"fwd_solid7_p8", hpad / 2, (140. - 40) / 2 / 2, 40. / 2);
163 G4LogicalVolume* lsolid7 =
new G4LogicalVolume(solid7_p8, Materials::get(
"SUS304"),
"lsolid7", 0, 0, 0);
164 lsolid7->SetVisAttributes(att(
"iron"));
165 double dx = sqrt(X1 * X1 - 70 * 70) - hpad / 2;
166 G4Transform3D tsolid7_p1(G4Translate3D(dx, -20 - 25, ZT - 40. / 2));
167 new G4PVPlacement(tsolid7_p1, lsolid7,
"psolid7_p1", innervolumesector_logical,
false, 0, overlap);
168 G4Transform3D tsolid7_p2(G4Translate3D(dx, 20 + 25, ZT - 40. / 2));
169 new G4PVPlacement(tsolid7_p2, lsolid7,
"psolid7_p2", innervolumesector_logical,
false, 0, overlap);
171 double L = X1 - (X0 - tand(th0) * 40) - 10;
172 G4VSolid* solid13 =
new G4Box(
"fwd_solid13", L / 2, 5. / 2, 18. / 2);
173 G4LogicalVolume* lsolid13 =
new G4LogicalVolume(solid13, Materials::get(
"SUS304"),
"lsolid13", 0, 0, 0);
174 lsolid13->SetVisAttributes(att(
"iron"));
175 G4Transform3D tsolid13(G4TranslateZ3D(ZT - 60 + 18. / 2)*G4TranslateY3D(-5. / 2 - 0.5 / 2)*G4TranslateX3D(X0 - tand(
176 th0) * 40 + L / 2 + 5));
177 new G4PVPlacement(tsolid13, lsolid13,
"psolid13_p1", innervolumesector_logical,
false, 0, overlap);
178 new G4PVPlacement(G4RotateZ3D(M_PI / 8)*tsolid13, lsolid13,
"psolid13_p2", innervolumesector_logical,
false, 0, overlap);
186 Point_t vin[] = {{ZT - zsep, RIp - tand(th0)* zsep}, {ZT - 60, RIp - tand(th0) * 60}, {ZT - 60, RT - 20 - d}, {ZT - zsep, RT - 20 - d}};
187 const int n =
sizeof(vin) /
sizeof(
Point_t);
188 Point_t c = centerofgravity(vin, vin + n);
189 G4ThreeVector contour_swall[n * 2];
190 for (
int i = 0; i < n; i++) contour_swall[i + 0] = G4ThreeVector(vin[i].x - c.x, vin[i].y - c.y, -0.5 / 2);
191 for (
int i = 0; i < n; i++) contour_swall[i + n] = G4ThreeVector(vin[i].x - c.x, vin[i].y - c.y, 0.5 / 2);
193 G4VSolid* septumwall_solid =
new BelleCrystal(
"fwd_septumwall_solid", n, contour_swall);
195 G4LogicalVolume* septumwall_logical =
new G4LogicalVolume(septumwall_solid, Materials::get(
"A5052"),
196 "septumwall_logical", 0, 0, 0);
197 septumwall_logical->SetVisAttributes(att(
"alum2"));
198 new G4PVPlacement(G4RotateZ3D(-M_PI / 2)*G4RotateY3D(-M_PI / 2)*G4Translate3D(c.x, c.y, 0), septumwall_logical,
199 "septumwall_physical", innervolumesector_logical,
false, 0, overlap);
201 for (
int i = 0; i < n; i++) contour_swall[i + 0] = G4ThreeVector(vin[i].x - c.x, vin[i].y - c.y, -0.5 / 2 / 2);
202 for (
int i = 0; i < n; i++) contour_swall[i + n] = G4ThreeVector(vin[i].x - c.x, vin[i].y - c.y, 0.5 / 2 / 2);
204 G4VSolid* septumwall2_solid =
new BelleCrystal(
"fwd_septumwall2_solid", n, contour_swall);
206 G4LogicalVolume* septumwall2_logical =
new G4LogicalVolume(septumwall2_solid, Materials::get(
"A5052"),
207 "septumwall2_logical", 0, 0, 0);
208 septumwall2_logical->SetVisAttributes(att(
"alum2"));
209 new G4PVPlacement(G4RotateZ3D(-M_PI / 8)*G4RotateZ3D(-M_PI / 2)*G4RotateY3D(-M_PI / 2)*G4Translate3D(c.x, c.y, 0.5 / 2 / 2),
210 septumwall2_logical,
"septumwall2_physical", innervolumesector_logical,
false, 0, overlap);
211 new G4PVPlacement(G4RotateZ3D(M_PI / 8)*G4RotateZ3D(-M_PI / 2)*G4RotateY3D(-M_PI / 2)*G4Translate3D(c.x, c.y, -0.5 / 2 / 2),
212 septumwall2_logical,
"septumwall2_physical", innervolumesector_logical,
false, 1, overlap);
215 zr_t vcr[] = {{3., RI}, {ZT - zsep, RIp - tand(th0)* zsep}, {ZT - zsep, RT - 20}, {3 + (RT - 20 - RC) / tand(th1), RT - 20}, {3, RC}};
216 std::vector<zr_t> ccr(vcr, vcr +
sizeof(vcr) /
sizeof(
zr_t));
217 G4VSolid* crystalvolume_solid =
new BelleLathe(
"fwd_crystalvolume_solid", 0, M_PI / 8, ccr);
218 G4LogicalVolume* crystalvolume_logical =
new G4LogicalVolume(crystalvolume_solid, Materials::get(
"G4_AIR"),
219 "crystalvolume_logical", 0, 0, 0);
220 crystalvolume_logical->SetVisAttributes(att(
"air"));
221 new G4PVPlacement(G4RotateZ3D(-M_PI / 8), crystalvolume_logical,
"ECLForwardCrystalSectorPhysical_0", innervolumesector_logical,
223 new G4PVPlacement(G4RotateZ3D(0), crystalvolume_logical,
"ECLForwardCrystalSectorPhysical_1", innervolumesector_logical,
false, 1,
228 double d = 5, aRC = RC - 30e-6;
229 Point_t vin[] = {{3., RI}, {ZT - zsep, RIp - tand(th0)* zsep}, {ZT - zsep, RT - 20 - d}, {3 + (RT - 20 - d - aRC) / tand(th1), RT - 20 - d}, {3, aRC}};
230 const int n =
sizeof(vin) /
sizeof(
Point_t);
231 Point_t c = centerofgravity(vin, vin + n);
232 G4ThreeVector contour_swall[n * 2];
234 for (
int i = 0; i < n; i++) contour_swall[i + 0] = G4ThreeVector(vin[i].x - c.x, vin[i].y - c.y, -0.5 / 2 / 2);
235 for (
int i = 0; i < n; i++) contour_swall[i + n] = G4ThreeVector(vin[i].x - c.x, vin[i].y - c.y, 0.5 / 2 / 2);
237 G4VSolid* septumwall3_solid =
new BelleCrystal(
"fwd_septumwall3_solid", n, contour_swall);
239 G4LogicalVolume* septumwall3_logical =
new G4LogicalVolume(septumwall3_solid, Materials::get(
"A5052"),
240 "septumwall3_logical", 0, 0, 0);
241 septumwall3_logical->SetVisAttributes(att(
"alum2"));
242 new G4PVPlacement(G4RotateZ3D(-M_PI / 2)*G4RotateY3D(-M_PI / 2)*G4Translate3D(c.x, c.y, 0.5 / 2 / 2), septumwall3_logical,
243 "septumwall3_physical_0", crystalvolume_logical,
false, 0, overlap);
244 new G4PVPlacement(G4RotateZ3D(M_PI / 8)*G4RotateZ3D(-M_PI / 2)*G4RotateY3D(-M_PI / 2)*G4Translate3D(c.x, c.y, -0.5 / 2 / 2),
245 septumwall3_logical,
"septumwall3_physical_1", crystalvolume_logical,
false, 1, overlap);
251 vector<shape_t*> cryst = load_shapes(m_sap, ECLParts::forward);
252 vector<G4LogicalVolume*> wrapped_crystals;
253 for (
auto it = cryst.begin(); it != cryst.end(); it++) {
255 wrapped_crystals.push_back(wrapped_crystal(s,
"forward", 0.20 - 0.02));
258 for (vector<cplacement_t>::const_iterator it = bp.begin(); it != bp.end(); ++it) {
260 auto s = find_if(cryst.begin(), cryst.end(), [&t](
const shape_t* shape) {return shape->nshape == t.nshape;});
261 if (s == cryst.end())
continue;
263 G4Transform3D twc = G4Translate3D(0, 0, 3) * get_transform(t);
264 int indx = it - bp.begin();
265 new G4PVPlacement(twc, wrapped_crystals[s - cryst.begin()], suf(
"ECLForwardWrappedCrystal_Physical", indx), crystalvolume_logical,
266 false, indx, overlap);
271 if (b_preamplifier) {
272 for (vector<cplacement_t>::const_iterator it = bp.begin(); it != bp.end(); ++it) {
273 G4Transform3D twc = G4Translate3D(0, 0, 3) * get_transform(*it);
274 int indx = it - bp.begin();
275 auto pv =
new G4PVPlacement(twc * G4TranslateZ3D(300 / 2 + 0.20 + get_pa_box_height() / 2)*G4RotateZ3D(-M_PI / 2), get_preamp(),
276 suf(
"phys_forward_preamplifier", indx), crystalvolume_logical,
false, indx, 0);
277 if (overlap)pv->CheckOverlaps(1000);
283 const G4VisAttributes* batt = att(
"iron");
285 G4VSolid* s1 =
new G4Box(
"fwd_leg_p1", 130. / 2, 170. / 2, (40. - milled_thickness) / 2);
286 G4LogicalVolume* l1 =
new G4LogicalVolume(s1, Materials::get(
"SUS304"),
"l1", 0, 0, 0);
287 G4Transform3D t1 = G4Translate3D(0, 170. / 2, (40. - milled_thickness) / 2 + milled_thickness);
288 l1->SetVisAttributes(batt);
290 G4VSolid* s2 =
new G4Box(
"fwd_leg_p2", 60. / 2, 130. / 2, 137. / 2);
291 G4LogicalVolume* l2 =
new G4LogicalVolume(s2, Materials::get(
"SUS304"),
"l2", 0, 0, 0);
292 G4Transform3D t2 = G4Translate3D(0, 130. / 2 + 35, 40. + 137. / 2);
293 l2->SetVisAttributes(batt);
295 Point_t v3[] = {{ -75. / 2, -265. / 2}, {75. / 2 - 30, -265. / 2}, {75. / 2, -265. / 2 + 30}, {75. / 2, 265. / 2} , { -75. / 2, 265. / 2}};
296 const int n3 =
sizeof(v3) /
sizeof(
Point_t);
297 G4ThreeVector c3[n3 * 2];
299 for (
int i = 0; i < n3; i++) c3[i + 0] = G4ThreeVector(v3[i].x, v3[i].y, -140. / 2);
300 for (
int i = 0; i < n3; i++) c3[i + n3] = G4ThreeVector(v3[i].x, v3[i].y, 140. / 2);
303 G4LogicalVolume* l3 =
new G4LogicalVolume(s3, Materials::get(
"SUS304"),
"l3", 0, 0, 0);
304 G4Transform3D t3 = G4Translate3D(0, 265. / 2 + 35, 40. + 137. + 75. / 2) * G4RotateY3D(-M_PI / 2);
305 l3->SetVisAttributes(batt);
307 G4VSolid* s4 =
new G4Box(
"fwd_leg_p4", 130. / 2, 5. / 2, (5. + milled_thickness) / 2);
308 G4LogicalVolume* l4 =
new G4LogicalVolume(s4, Materials::get(
"SUS304"),
"l4", 0, 0, 0);
309 G4Transform3D t4 = G4Translate3D(0, 170. - 5. / 2, (milled_thickness - 5.) / 2);
310 l4->SetVisAttributes(batt);
312 G4VSolid* s5 =
new G4Box(
"fwd_leg_p5", 140. / 2, 130. / 2, 80. / 2);
313 G4LogicalVolume* l5 =
new G4LogicalVolume(s5, Materials::get(
"SUS304"),
"l5", 0, 0, 0);
314 G4Transform3D t5 = G4Translate3D(0, 180. + 130. / 2, 97. + 80. / 2);
315 l5->SetVisAttributes(batt);
317 G4VSolid* s6 =
new G4Box(
"fwd_leg_p6", 140. / 2, 110. / 2, 160. / 2);
318 G4LogicalVolume* l6 =
new G4LogicalVolume(s6, Materials::get(
"G4_AIR"),
"l6", 0, 0, 0);
319 G4Transform3D t6 = G4Translate3D(0, 310. + 110. / 2, 97. + 160. / 2);
320 l6->SetVisAttributes(att(
"air"));
322 G4VSolid* s6a =
new G4Box(
"fwd_leg_p6a", 140. / 2, (110. - 45.) / 2, 160. / 2);
323 G4LogicalVolume* l6a =
new G4LogicalVolume(s6a, Materials::get(
"SUS304"),
"l6a", 0, 0, 0);
324 l6a->SetVisAttributes(batt);
325 new G4PVPlacement(G4TranslateY3D(-45. / 2), l6a,
"l6a_physical", l6,
false, 0, overlap);
327 G4VSolid* s6b =
new G4Box(
"fwd_leg_p6b", 60. / 2, 45. / 2, 160. / 2);
328 G4LogicalVolume* l6b =
new G4LogicalVolume(s6b, Materials::get(
"SUS304"),
"l6b", 0, 0, 0);
329 l6b->SetVisAttributes(batt);
330 double dy = 110. / 2 - 45 + 45. / 2;
331 new G4PVPlacement(G4TranslateY3D(dy), l6b,
"l6b_physical", l6,
false, 0, overlap);
333 G4VSolid* s6c =
new G4Box(
"fwd_leg_p6c", 40. / 2, 45. / 2, 22.5 / 2);
334 G4LogicalVolume* l6c =
new G4LogicalVolume(s6c, Materials::get(
"SUS304"),
"l6c", 0, 0, 0);
335 l6c->SetVisAttributes(batt);
336 new G4PVPlacement(G4Translate3D(30 + 20, dy, 20 + 22.5 / 2), l6c,
"l6c_physical", l6,
false, 0, overlap);
337 new G4PVPlacement(G4Translate3D(30 + 20, dy, -20 - 22.5 / 2), l6c,
"l6c_physical", l6,
false, 1, overlap);
338 new G4PVPlacement(G4Translate3D(-30 - 20, dy, 20 + 22.5 / 2), l6c,
"l6c_physical", l6,
false, 2, overlap);
339 new G4PVPlacement(G4Translate3D(-30 - 20, dy, -20 - 22.5 / 2), l6c,
"l6c_physical", l6,
false, 3, overlap);
341 G4AssemblyVolume* support_leg =
new G4AssemblyVolume();
343 support_leg->AddPlacedVolume(l1, t1);
344 support_leg->AddPlacedVolume(l2, t2);
345 support_leg->AddPlacedVolume(l3, t3);
346 support_leg->AddPlacedVolume(l4, t4);
347 support_leg->AddPlacedVolume(l5, t5);
348 support_leg->AddPlacedVolume(l6, t6);
350 for (
int i = 0; i < 8; i++) {
351 G4Transform3D tp = G4Translate3D(0, 0, 1960) * G4RotateZ3D(-M_PI / 2 + M_PI / 8 + i * M_PI / 4) *
352 G4Translate3D(0, 1415 - 165 + 420. / 2, ZT + (97. + 160.) / 2) * G4Translate3D(0, -420. / 2, -(97. + 160.) / 2);
353 support_leg->MakeImprint(top, tp, 0, overlap);
373 if (b_support_structure_13) {
376 G4AssemblyVolume* acs =
new G4AssemblyVolume();
378 double Z0 = 434, Ro = 1415 - 20;
392 G4VSolid* solid10_p1 =
new G4Box(
"fwd_solid10_p1", 558. / 2 + 9.5, 20. / 2, 105. / 2);
393 G4VSolid* solid10_p2 =
new G4Box(
"fwd_solid10_p2", 559. / 2 + 9.5, 11. / 2, 71. / 2);
394 G4VSolid* solid10_p3 =
new G4SubtractionSolid(
"fwd_solid10_p3", solid10_p1, solid10_p2, G4Translate3D(0, -11. / 2, 71. / 2 - 17.5));
396 G4LogicalVolume* lsolid10 =
new G4LogicalVolume(solid10_p3, Materials::get(
"A6063"),
"lsolid10", 0, 0, 0);
397 lsolid10->SetVisAttributes(att(
"alum"));
398 G4Transform3D tsolid10_p1(G4RotateZ3D(M_PI / 16)*G4Translate3D(954.5 + 2.55 - 1, -30, Z0 - 105. / 2 - 5));
399 acs->AddPlacedVolume(lsolid10, tsolid10_p1);
401 G4Transform3D tsolid10_p2(G4RotateZ3D(-M_PI / 16)*G4Translate3D(954.5 + 2.55 - 1, 30, Z0 - 105. / 2 - 5)*G4RotateZ3D(M_PI));
402 acs->AddPlacedVolume(lsolid10, tsolid10_p2);
405 G4VSolid* solid1_p1 =
new G4Box(
"fwd_solid1_p1", 100. / 2, 30. / 2, 30. / 2);
406 G4VSolid* solid1_p2 =
new G4Box(
"fwd_solid1_p2", 80. / 2, 10. / 2, 31. / 2);
407 G4VSolid* solid1_p3 =
new G4SubtractionSolid(
"fwd_solid1_p3", solid1_p1, solid1_p2, G4Transform3D::Identity);
409 G4LogicalVolume* lsolid1 =
new G4LogicalVolume(solid1_p3, Materials::get(
"A5052"),
"lsolid1", 0, 0, 0);
410 lsolid1->SetVisAttributes(att(
"alum"));
412 G4Transform3D tsolid1_p1(G4RotateZ3D(M_PI / 16 * (-1 + 2 / 3.))*G4Translate3D(Ro - 8 - 50 - 3 * 140, 0, Z0 - 95));
413 acs->AddPlacedVolume(lsolid1, tsolid1_p1);
415 G4Transform3D tsolid1_p2(G4RotateZ3D(M_PI / 16 * (1 - 2 / 3.))*G4Translate3D(Ro - 8 - 50 - 3 * 140, 0, Z0 - 95));
416 acs->AddPlacedVolume(lsolid1, tsolid1_p2);
419 G4Transform3D tsolid1_p3(G4RotateZ3D(M_PI / 16 * (-1 + 2 / 3.))*G4Translate3D(Ro - 8 - 50 - 2 * 140, 0, Z0 - 95));
420 acs->AddPlacedVolume(lsolid1, tsolid1_p3);
422 G4Transform3D tsolid1_p4(G4RotateZ3D(M_PI / 16 * (1 - 2 / 3.))*G4Translate3D(Ro - 8 - 50 - 2 * 140, 0, Z0 - 95));
423 acs->AddPlacedVolume(lsolid1, tsolid1_p4);
426 G4Transform3D tsolid1_p5(G4RotateZ3D(M_PI / 16 * (-1 + 2 / 3.))*G4Translate3D(Ro - 8 - 50 - 1 * 140, 0, Z0 - 95));
427 acs->AddPlacedVolume(lsolid1, tsolid1_p5);
429 G4Transform3D tsolid1_p6(G4RotateZ3D(M_PI / 16 * (1 - 2 / 3.))*G4Translate3D(Ro - 8 - 50 - 1 * 140, 0, Z0 - 95));
430 acs->AddPlacedVolume(lsolid1, tsolid1_p6);
433 G4Transform3D tsolid1_p8(G4RotateZ3D(M_PI / 16 * (-1 + 2 / 3.))*G4Translate3D(Ro - 8 - 50, 0, Z0 - 100));
434 acs->AddPlacedVolume(lsolid1, tsolid1_p8);
436 G4Transform3D tsolid1_p9(G4RotateZ3D(M_PI / 16 * (-1 + 2 / 3. + (1 + 1. / 3) / 3))*G4Translate3D(Ro - 8 - 50, 0, Z0 - 100));
437 acs->AddPlacedVolume(lsolid1, tsolid1_p9);
439 G4Transform3D tsolid1_p10(G4RotateZ3D(M_PI / 16 * (-1 + 2 / 3. + 2 * (1 + 1. / 3) / 3))*G4Translate3D(Ro - 8 - 50, 0, Z0 - 100));
440 acs->AddPlacedVolume(lsolid1, tsolid1_p10);
443 G4VSolid* solid1_p11 =
new G4Box(
"fwd_solid1_p1", 100. / 2, 10. / 2, 30. / 2);
444 G4LogicalVolume* lsolid1_p2 =
new G4LogicalVolume(solid1_p11, Materials::get(
"A5052"),
"lsolid1_p2", 0, 0, 0);
445 lsolid1_p2->SetVisAttributes(att(
"alum"));
446 G4Transform3D tsolid1_p11(G4RotateZ3D(M_PI / 16 * (-1 + 2 / 3. - 1. / 3))*G4Translate3D(Ro - 8 - 50, 0, Z0 - 100));
447 acs->AddPlacedVolume(lsolid1_p2, tsolid1_p11);
450 G4VSolid* solid1_p12 =
new G4Box(
"fwd_solid1_p1", 86. / 2, 10. / 2, 30. / 2);
451 G4LogicalVolume* lsolid1_p3 =
new G4LogicalVolume(solid1_p12, Materials::get(
"A5052"),
"lsolid1_p3", 0, 0, 0);
452 lsolid1_p3->SetVisAttributes(att(
"alum"));
453 double alpha_p12 = M_PI / 16 * (-1 + 1. / 3);
454 G4Transform3D tsolid1_p12(G4Translate3D(532.2 + 43, 0, Z0 - 75));
455 acs->AddPlacedVolume(lsolid1_p3, tsolid1_p12);
457 G4Transform3D tsolid1_p13(G4RotateZ3D(alpha_p12)*G4Translate3D(532.2 + 43, 0, Z0 - 75));
458 acs->AddPlacedVolume(lsolid1_p3, tsolid1_p13);
460 G4Transform3D tsolid1_p14(G4RotateZ3D(-alpha_p12)*G4Translate3D(532.2 + 43, 0, Z0 - 75));
461 acs->AddPlacedVolume(lsolid1_p3, tsolid1_p14);
464 G4VSolid* solid1_p4 =
new G4Box(
"fwd_solid1_p4", 160. / 2, 30. / 2, 30. / 2);
465 G4VSolid* solid1_p5 =
new G4Box(
"fwd_solid1_p5", 140. / 2, 10. / 2, 31. / 2);
466 G4VSolid* solid1_p7 =
new G4SubtractionSolid(
"fwd_solid1_p7", solid1_p4, solid1_p5, G4Transform3D::Identity);
467 G4LogicalVolume* lsolid1_p7 =
new G4LogicalVolume(solid1_p7, Materials::get(
"A5052"),
"lsolid1_p7", 0, 0, 0);
468 lsolid1_p7->SetVisAttributes(att(
"alum"));
469 G4Transform3D tsolid1_p7(G4Translate3D(Ro - 8 - 80 - 4 * 140 + 4, 0, Z0 - 95));
470 acs->AddPlacedVolume(lsolid1_p7, tsolid1_p7);
474 auto get_bracket = [&](
double L,
double ang, G4Transform3D & lt) {
476 double dL = (ang > 0) ? 0 : thick * abs(tan(ang));
478 G4VSolid* solid2_p1 =
new G4Box(
"fwd_solid2_p1", (L - 2 * dL) / 2, thick / 2, 30. / 2);
479 G4VSolid* solid2_p2 =
new G4Box(
"fwd_solid2_p2", thick / 2, (15. - dL) / 2, 30. / 2);
480 double dx = thick / 2, y0 = (15. + dL) / 2;
481 G4Transform3D t1(G4Translate3D(L / 2, -dx, 0.)*G4RotateZ3D(-ang)*G4Translate3D(-dx, y0, 0));
482 G4Transform3D t2(G4Translate3D(-L / 2, -dx, 0.)*G4RotateZ3D(ang)*G4Translate3D(dx, y0, 0));
483 G4VSolid* solid2_p3 =
new G4UnionSolid(
"fwd_solid2_p3", solid2_p1, solid2_p2, t1);
484 G4VSolid* solid2_p4 =
new G4UnionSolid(
"fwd_solid2_p4", solid2_p3, solid2_p2, t2);
486 G4Transform3D u((ang > 0) ? G4Transform3D::Identity : G4RotateZ3D(M_PI));
487 lt = u * G4Translate3D(dx, 0, 0) * G4RotateZ3D(-M_PI / 2);
491 double obj2_dz = Z0 - 95;
492 auto place_solid2 = [&](
double dz,
double L,
double ang,
double phi,
double mx,
double dy) {
494 G4LogicalVolume* lsolid2 =
new G4LogicalVolume(get_bracket(L, ang, lt), Materials::get(
"A5052"),
"lsolid2", 0, 0, 0);
495 lsolid2->SetVisAttributes(att(
"alum"));
497 G4Transform3D tsolid2_p1(G4RotateZ3D(phi)*G4Translate3D(mx, dy, dz)*lt);
499 acs->AddPlacedVolume(lsolid2, tsolid2_p1);
502 auto place_solid3 = [&](
double L,
double ang,
const G4Transform3D & t) {
504 G4LogicalVolume* lsolid2 =
new G4LogicalVolume(get_bracket(L, ang, lt), Materials::get(
"A5052"),
"lsolid2", 0, 0, 0);
505 lsolid2->SetVisAttributes(att(
"alum"));
507 G4Transform3D tsolid2_p1(t * lt);
509 acs->AddPlacedVolume(lsolid2, tsolid2_p1);
513 G4Point3D aa(-50 + 15, 15, 0), bb(-50 + 15, -15, 0);
515 aa = tsolid1_p1 * G4Point3D(-50 + 15, 15, 0);
516 bb = tsolid1_p2 * G4Point3D(-50 + 15, -15, 0);
517 place_solid2(obj2_dz, (aa - bb).mag(), -M_PI / 48, (aa + bb).phi(), (aa + bb).rho() / 2, 0);
519 aa = tsolid1_p1 * G4Point3D(50 - 15, 15, 0);
520 bb = tsolid1_p2 * G4Point3D(50 - 15, -15, 0);
521 place_solid2(obj2_dz, (aa - bb).mag(), M_PI / 48, (aa + bb).phi(), (aa + bb).rho() / 2, 0);
523 G4Point3D r0(0, 40 / cos(M_PI / 16), 0);
524 G4Vector3D np(sin(M_PI / 16), cos(M_PI / 16), 0), mid;
525 G4RotateZ3D rb(M_PI / 24);
529 phi_uu = (tsolid1_p1 * G4Vector3D(1, 0, 0)).angle(G4Vector3D(cos(M_PI / 16), -sin(M_PI / 16), 0));
530 G4Vector3D n = tsolid1_p1 * G4Vector3D(-sin(phi_uu / 2), -cos(phi_uu / 2), 0);
532 aa = tsolid1_p1 * G4Point3D(-xj, -15, 0);
533 L = -((aa - r0) * np) / (n * np);
534 place_solid3(L, -phi_uu / 2, tsolid1_p1 * G4Translate3D(-xj, -15, 0)*G4RotateZ3D(-phi_uu / 2)*G4Translate3D(0, -L / 2, 0));
535 place_solid3(L, -phi_uu / 2, tsolid1_p2 * G4Translate3D(-xj, 15, 0)*G4RotateZ3D(phi_uu / 2)*G4Translate3D(0, L / 2, 0));
536 aa = tsolid1_p1 * G4Point3D(xj, -15, 0);
537 L = -((aa - r0) * np) / (n * np);
538 place_solid3(L, phi_uu / 2, tsolid1_p1 * G4Translate3D(xj, -15, 0)*G4RotateZ3D(-phi_uu / 2)*G4Translate3D(0, -L / 2, 0));
539 place_solid3(L, phi_uu / 2, tsolid1_p2 * G4Translate3D(xj, 15, 0)*G4RotateZ3D(phi_uu / 2)*G4Translate3D(0, L / 2, 0));
541 aa = tsolid1_p3 * G4Point3D(-xj, -15, 0);
542 L = -((aa - r0) * np) / (n * np);
543 place_solid3(L, -phi_uu / 2, tsolid1_p3 * G4Translate3D(-xj, -15, 0)*G4RotateZ3D(-phi_uu / 2)*G4Translate3D(0, -L / 2, 0));
544 place_solid3(L, -phi_uu / 2, tsolid1_p4 * G4Translate3D(-xj, 15, 0)*G4RotateZ3D(phi_uu / 2)*G4Translate3D(0, L / 2, 0));
545 aa = tsolid1_p3 * G4Point3D(xj, -15, 0);
546 L = -((aa - r0) * np) / (n * np);
547 place_solid3(L, phi_uu / 2, tsolid1_p3 * G4Translate3D(xj, -15, 0)*G4RotateZ3D(-phi_uu / 2)*G4Translate3D(0, -L / 2, 0));
548 place_solid3(L, phi_uu / 2, tsolid1_p4 * G4Translate3D(xj, 15, 0)*G4RotateZ3D(phi_uu / 2)*G4Translate3D(0, L / 2, 0));
550 aa = tsolid1_p5 * G4Point3D(-xj, -15, 0);
551 L = -((aa - r0) * np) / (n * np);
552 place_solid3(L, -phi_uu / 2, tsolid1_p5 * G4Translate3D(-xj, -15, 0)*G4RotateZ3D(-phi_uu / 2)*G4Translate3D(0, -L / 2, 0));
553 place_solid3(L, -phi_uu / 2, tsolid1_p6 * G4Translate3D(-xj, 15, 0)*G4RotateZ3D(phi_uu / 2)*G4Translate3D(0, L / 2, 0));
554 aa = tsolid1_p5 * G4Point3D(xj, -15, 0);
555 L = -((aa - r0) * np) / (n * np);
556 place_solid3(L, phi_uu / 2, tsolid1_p5 * G4Translate3D(xj, -15, 0)*G4RotateZ3D(-phi_uu / 2)*G4Translate3D(0, -L / 2, 0));
557 place_solid3(L, phi_uu / 2, tsolid1_p6 * G4Translate3D(xj, 15, 0)*G4RotateZ3D(phi_uu / 2)*G4Translate3D(0, L / 2, 0));
560 n = tsolid1_p7 * G4Vector3D(-sin(phi_uu / 2), -cos(phi_uu / 2), 0);
562 aa = tsolid1_p7 * G4Point3D(-xj, -15, 0);
563 L = -((aa - r0) * np) / (n * np);
564 place_solid3(L, -phi_uu / 2, tsolid1_p7 * G4Translate3D(-xj, -15, 0)*G4RotateZ3D(-phi_uu / 2)*G4Translate3D(0, -L / 2, 0));
565 place_solid3(L, -phi_uu / 2, tsolid1_p7 * G4Translate3D(-xj, 15, 0)*G4RotateZ3D(phi_uu / 2)*G4Translate3D(0, L / 2, 0));
566 aa = tsolid1_p7 * G4Point3D(xj, -15, 0);
567 L = -((aa - r0) * np) / (n * np);
568 place_solid3(L, phi_uu / 2, tsolid1_p7 * G4Translate3D(xj, -15, 0)*G4RotateZ3D(-phi_uu / 2)*G4Translate3D(0, -L / 2, 0));
569 place_solid3(L, phi_uu / 2, tsolid1_p7 * G4Translate3D(xj, 15, 0)*G4RotateZ3D(phi_uu / 2)*G4Translate3D(0, L / 2, 0));
572 aa = tsolid1_p3 * G4Point3D(-50 + 15, 15, 0);
573 bb = tsolid1_p4 * G4Point3D(-50 + 15, -15, 0);
574 place_solid2(obj2_dz, (aa - bb).mag(), -M_PI / 48, (aa + bb).phi(), (aa + bb).rho() / 2, 0);
576 aa = tsolid1_p3 * G4Point3D(50 - 15, 15, 0);
577 bb = tsolid1_p4 * G4Point3D(50 - 15, -15, 0);
578 place_solid2(obj2_dz, (aa - bb).mag(), M_PI / 48, (aa + bb).phi(), (aa + bb).rho() / 2, 0);
581 aa = tsolid1_p5 * G4Point3D(-50 + 15, 15, 0);
582 bb = tsolid1_p6 * G4Point3D(-50 + 15, -15, 0);
583 place_solid2(obj2_dz, (aa - bb).mag(), -M_PI / 48, (aa + bb).phi(), (aa + bb).rho() / 2, 0);
585 aa = tsolid1_p5 * G4Point3D(50 - 15, 15, 0);
586 bb = tsolid1_p6 * G4Point3D(50 - 15, -15, 0);
587 place_solid2(obj2_dz, (aa - bb).mag(), M_PI / 48, (aa + bb).phi(), (aa + bb).rho() / 2, 0);
591 aa = tsolid1_p8 * G4Point3D(-50 + 15, 15, 0);
592 bb = tsolid1_p9 * G4Point3D(-50 + 15, -15, 0);
593 place_solid2(obj2_dz, (aa - bb).mag(), -M_PI / 72, (aa + bb).phi(), (aa + bb).rho() / 2, 0);
595 aa = tsolid1_p8 * G4Point3D(50 - 15, 15, 0);
596 bb = tsolid1_p9 * G4Point3D(50 - 15, -15, 0);
597 place_solid2(obj2_dz, (aa - bb).mag(), M_PI / 72, (aa + bb).phi(), (aa + bb).rho() / 2, 0);
599 aa = tsolid1_p9 * G4Point3D(-50 + 15, 15, 0);
600 bb = tsolid1_p10 * G4Point3D(-50 + 15, -15, 0);
601 place_solid2(obj2_dz, (aa - bb).mag(), -M_PI / 72, (aa + bb).phi(), (aa + bb).rho() / 2, 0);
603 aa = tsolid1_p9 * G4Point3D(50 - 15, 15, 0);
604 bb = tsolid1_p10 * G4Point3D(50 - 15, -15, 0);
605 place_solid2(obj2_dz, (aa - bb).mag(), M_PI / 72, (aa + bb).phi(), (aa + bb).rho() / 2, 0);
607 phi_uu = (tsolid1_p8 * G4Vector3D(1, 0, 0)).angle(tsolid1_p11 * G4Vector3D(1, 0, 0));
608 r0 = tsolid1_p11 * G4Point3D(-50 + 15, 5, 0);
609 np = tsolid1_p11 * G4Vector3D(0, 1, 0);
611 n = tsolid1_p8 * G4Vector3D(-sin(phi_uu / 2), -cos(phi_uu / 2), 0);
612 aa = tsolid1_p8 * G4Point3D(-50 + 15, -15, 0);
613 L = -((aa - r0) * np) / (n * np);
614 place_solid3(L, -phi_uu / 2, tsolid1_p8 * G4Translate3D(-50 + 15, -15, 0)*G4RotateZ3D(-phi_uu / 2)*G4Translate3D(0, -L / 2, 0));
616 aa = tsolid1_p8 * G4Point3D(50 - 15, -15, 0);
617 L = -((aa - r0) * np) / (n * np);
618 place_solid3(L, phi_uu / 2, tsolid1_p8 * G4Translate3D(50 - 15, -15, 0)*G4RotateZ3D(-phi_uu / 2)*G4Translate3D(0, -L / 2, 0));
620 phi_uu = (tsolid1_p11 * G4Vector3D(1, 0, 0)).angle(G4RotateZ3D(-M_PI / 16) * G4Vector3D(1, 0, 0));
621 r0 = G4RotateZ3D(-M_PI / 16) * G4Point3D(0, 40, 0);
622 np = G4RotateZ3D(-M_PI / 16) * G4Vector3D(0, 1, 0);
624 n = tsolid1_p11 * G4Vector3D(-sin(phi_uu / 2), -cos(phi_uu / 2), 0);
625 aa = tsolid1_p11 * G4Point3D(-50 + 15, -5, 0);
626 L = -((aa - r0) * np) / (n * np);
627 place_solid3(L, -phi_uu / 2, tsolid1_p11 * G4Translate3D(-50 + 15, -5, 0)*G4RotateZ3D(-phi_uu / 2)*G4Translate3D(0, -L / 2, 0));
629 aa = tsolid1_p11 * G4Point3D(50 - 15, -5, 0);
630 L = -((aa - r0) * np) / (n * np);
631 place_solid3(L, phi_uu / 2, tsolid1_p11 * G4Translate3D(50 - 15, -5, 0)*G4RotateZ3D(-phi_uu / 2)*G4Translate3D(0, -L / 2, 0));
633 G4Transform3D ttt(G4RotateZ3D(M_PI / 16)*G4Translate3D(Ro - 8 - 50, 0, Z0 - 100));
634 phi_uu = (tsolid1_p10 * G4Vector3D(1, 0, 0)).angle(ttt * G4Vector3D(1, 0, 0));
635 r0 = ttt * G4Point3D(0, -40, 0);
636 np = ttt * G4Vector3D(0, 1, 0);
637 n = tsolid1_p10 * G4Vector3D(-sin(phi_uu / 2), cos(phi_uu / 2), 0);
638 aa = tsolid1_p10 * G4Point3D(-50 + 15, 15, 0);
639 L = -((aa - r0) * np) / (n * np);
640 place_solid3(L, -phi_uu / 2, tsolid1_p10 * G4Translate3D(-50 + 15, 15, 0)*G4RotateZ3D(phi_uu / 2)*G4Translate3D(0, L / 2, 0));
642 aa = tsolid1_p10 * G4Point3D(50 - 15, 15, 0);
643 L = -((aa - r0) * np) / (n * np);
644 place_solid3(L, phi_uu / 2, tsolid1_p10 * G4Translate3D(50 - 15, 15, 0)*G4RotateZ3D(phi_uu / 2)*G4Translate3D(0, L / 2, 0));
647 aa = tsolid1_p12 * G4Point3D(-43 + 15, -5, 0);
648 bb = tsolid1_p13 * G4Point3D(-43 + 15, 5, 0);
649 place_solid2(obj2_dz, (aa - bb).mag(), -M_PI / 48, (aa + bb).phi(), (aa + bb).rho() / 2, 0);
651 aa = tsolid1_p12 * G4Point3D(43 - 15, -5, 0);
652 bb = tsolid1_p13 * G4Point3D(43 - 15, 5, 0);
653 place_solid2(obj2_dz, (aa - bb).mag(), M_PI / 48, (aa + bb).phi(), (aa + bb).rho() / 2, 0);
655 aa = tsolid1_p12 * G4Point3D(-43 + 15, 5, 0);
656 bb = tsolid1_p14 * G4Point3D(-43 + 15, -5, 0);
657 place_solid2(obj2_dz, (aa - bb).mag(), -M_PI / 48, (aa + bb).phi(), (aa + bb).rho() / 2, 0);
659 aa = tsolid1_p12 * G4Point3D(43 - 15, 5, 0);
660 bb = tsolid1_p14 * G4Point3D(43 - 15, -5, 0);
661 place_solid2(obj2_dz, (aa - bb).mag(), M_PI / 48, (aa + bb).phi(), (aa + bb).rho() / 2, 0);
663 G4VSolid* solid11_p1 =
new G4Box(
"fwd_solid11_p1", 80. / 2, 30. / 2, 40. / 2);
664 G4VSolid* solid11_p2 =
new G4Box(
"fwd_solid11_p2", 81. / 2, 30. / 2, 40. / 2);
665 G4VSolid* solid11_p3 =
new G4SubtractionSolid(
"fwd_solid11_p3", solid11_p1, solid11_p2, G4Translate3D(0, -3, 3));
667 G4LogicalVolume* lsolid11 =
new G4LogicalVolume(solid11_p3, Materials::get(
"SUS304"),
"lsolid11", 0, 0, 0);
668 lsolid11->SetVisAttributes(att(
"iron"));
669 G4Transform3D tsolid11_p1(G4RotateZ3D(M_PI / 16)*G4Translate3D(580, -35, Z0 - 40));
670 acs->AddPlacedVolume(lsolid11, tsolid11_p1);
672 G4Transform3D tsolid11_p2(G4RotateZ3D(-M_PI / 16)*G4Translate3D(580, 35, Z0 - 40)*G4RotateZ3D(M_PI));
673 acs->AddPlacedVolume(lsolid11, tsolid11_p2);
675 G4VSolid* solid12_p1 =
new G4Box(
"fwd_solid12_p1", 120. / 2, 20. / 2, 115. / 2);
676 G4VSolid* solid12_p2 =
new G4Box(
"fwd_solid12_p2", 121. / 2, 12. / 2, 86. / 2);
677 G4VSolid* solid12_p3 =
new G4SubtractionSolid(
"fwd_solid12_p3", solid12_p1, solid12_p2, G4Translate3D(0, -11. / 2 + 1,
678 86. / 2 - 17.5 - 5));
679 G4LogicalVolume* lsolid12 =
new G4LogicalVolume(solid12_p3, Materials::get(
"A6063"),
"lsolid12", 0, 0, 0);
680 lsolid12->SetVisAttributes(att(
"alum"));
682 G4Transform3D tsolid12_p2(G4RotateZ3D(-M_PI / 16)*G4Translate3D(Ro - 8 - 60, 30, Z0 - 115. / 2)*G4RotateZ3D(M_PI));
683 acs->AddPlacedVolume(lsolid12, tsolid12_p2);
685 G4VSolid* solid12r_p1 =
new G4Box(
"fwd_solid12r_p1", 100. / 2, 30. / 2, 75. / 2);
686 G4VSolid* solid12r_p2 =
new G4Box(
"fwd_solid12r_p2", 101. / 2, 21. / 2, 41. / 2);
687 G4VSolid* solid12r_p3 =
new G4SubtractionSolid(
"fwd_solid12r_p3", solid12r_p1, solid12r_p2, G4Translate3D(0, -21. / 2 + 5,
688 -41. / 2 - 75. / 2 + 40));
689 G4LogicalVolume* lsolid12r =
new G4LogicalVolume(solid12r_p3, Materials::get(
"A6063"),
"lsolid12r", 0, 0, 0);
690 lsolid12r->SetVisAttributes(att(
"alum"));
691 G4Transform3D tsolid12r_p1(G4RotateZ3D(M_PI / 16)*G4Translate3D(Ro - 8 - 50, -30 - 15, Z0 - 40 - 75. / 2));
692 acs->AddPlacedVolume(lsolid12r, tsolid12r_p1);
694 G4Transform3D tr = G4RotateZ3D(M_PI / 16) * G4ReflectY3D();
695 acs->MakeImprint(innervolumesector_logical, tr, 0, overlap);
696 tr = G4RotateZ3D(-M_PI / 16);
697 acs->MakeImprint(innervolumesector_logical, tr, 1, overlap);
701 if (b_support_structure_15) {
702 G4AssemblyVolume* acs =
new G4AssemblyVolume();
704 double Z0 = 434, Ro = 1415 - 20;
706 G4VSolid* solid1_p1 =
new G4Box(
"fwd_solid1_p1", 10. / 2, 398. / 2, 5. / 2);
707 G4VSolid* solid1_p2 =
new G4Box(
"fwd_solid1_p2", 4. / 2, 398. / 2 - 32, 6. / 2);
708 G4VSolid* solid1_p3 =
new G4SubtractionSolid(
"fwd_solid1_p3", solid1_p1, solid1_p2, G4Transform3D(G4RotationMatrix(),
712 G4LogicalVolume* lsolid1 =
new G4LogicalVolume(solid1_p3, Materials::get(
"SUS304"),
"lsolid1", 0, 0, 0);
713 lsolid1->SetVisAttributes(att(
"iron"));
714 G4Transform3D tsolid1_p1(G4Translate3D(1350, -16, Z0 - 40 + 3 + 2.5));
715 acs->AddPlacedVolume(lsolid1, tsolid1_p1);
717 G4VSolid* solid1a_p1 =
new G4Box(
"fwd_solid1a_p1", 10. / 2, 348.5 / 2, 5. / 2);
718 G4VSolid* solid1a_p2 =
new G4Box(
"fwd_solid1a_p2", 4. / 2, 348.5 / 2 - 32, 6. / 2);
719 G4VSolid* solid1a_p3 =
new G4SubtractionSolid(
"fwd_solid1a_p3", solid1a_p1, solid1a_p2, G4Transform3D(G4RotationMatrix(),
720 G4ThreeVector(4, 0, 0)));
722 G4LogicalVolume* lsolid1a =
new G4LogicalVolume(solid1a_p3, Materials::get(
"SUS304"),
"lsolid1a", 0, 0, 0);
723 lsolid1a->SetVisAttributes(att(
"iron"));
724 G4Transform3D tsolid1a_p1(G4Translate3D(1250, -16, Z0 - 40 + 3 + 2.5));
725 acs->AddPlacedVolume(lsolid1a, tsolid1a_p1);
727 G4VSolid* solid1b_p1 =
new G4Box(
"fwd_solid1b_p1", 10. / 2, (210 + 210 + 16) / 2, 5. / 2);
728 G4VSolid* solid1b_p2 =
new G4Box(
"fwd_solid1b_p2", 4. / 2, (210 + 210 + 16) / 2 - 16, 6. / 2);
729 G4VSolid* solid1b_p3 =
new G4SubtractionSolid(
"fwd_solid1b_p3", solid1b_p1, solid1b_p2, G4Transform3D(G4RotationMatrix(),
730 G4ThreeVector(4, 0, 0)));
732 G4LogicalVolume* lsolid1b =
new G4LogicalVolume(solid1b_p3, Materials::get(
"SUS304"),
"lsolid1b", 0, 0, 0);
733 lsolid1b->SetVisAttributes(att(
"iron"));
734 G4Transform3D t1b(G4Translate3D(1204 - (210 + 210 + 16) / 2 + 16, 0, Z0 - 52 + 8 + 5. / 2));
735 G4Transform3D tsolid1b_p1(t1b * G4TranslateY3D(-10)*G4RotateZ3D(-M_PI / 2));
736 acs->AddPlacedVolume(lsolid1b, tsolid1b_p1);
737 G4Transform3D tsolid1b_p2(t1b * G4TranslateY3D(10)*G4RotateZ3D(M_PI / 2));
738 acs->AddPlacedVolume(lsolid1b, tsolid1b_p2);
739 G4Transform3D tsolid1b_p3(t1b * G4TranslateY3D(-110)*G4RotateZ3D(M_PI / 2));
740 acs->AddPlacedVolume(lsolid1b, tsolid1b_p3);
741 G4Transform3D tsolid1b_p4(t1b * G4TranslateY3D(110)*G4RotateZ3D(-M_PI / 2));
742 acs->AddPlacedVolume(lsolid1b, tsolid1b_p4);
744 G4VSolid* solid2_p1 =
new G4Box(
"fwd_solid2_p1", 20. / 2, 210. / 2, 5. / 2);
745 G4VSolid* solid2_p2 =
new G4Box(
"fwd_solid2_p2", 14. / 2, 210. / 2 - 16, 6. / 2);
746 G4VSolid* solid2_p3 =
new G4SubtractionSolid(
"fwd_solid2_p3", solid2_p1, solid2_p2, G4Transform3D(G4RotationMatrix(),
750 G4LogicalVolume* lsolid2 =
new G4LogicalVolume(solid2_p3, Materials::get(
"SUS304"),
"lsolid2", 0, 0, 0);
751 lsolid2->SetVisAttributes(att(
"iron"));
752 G4Transform3D tsolid2_p1(G4Translate3D(1204 - (210 + 210) - 210 / 2 + 16, 58, Z0 - 52 + 8 + 5. / 2)*G4RotateZ3D(-M_PI / 2));
753 acs->AddPlacedVolume(lsolid2, tsolid2_p1);
755 G4Transform3D tsolid2_p2(G4Translate3D(1204 - (210 + 210) - 210 / 2 + 16, -58, Z0 - 52 + 8 + 5. / 2)*G4RotateZ3D(M_PI / 2));
756 acs->AddPlacedVolume(lsolid2, tsolid2_p2);
759 G4VSolid* solid3_p1 =
new G4Box(
"fwd_solid3_p1", 32. / 2, 396. / 2, 8. / 2);
760 G4LogicalVolume* lsolid3 =
new G4LogicalVolume(solid3_p1, Materials::get(
"SUS304"),
"lsolid3", 0, 0, 0);
761 lsolid3->SetVisAttributes(att(
"iron"));
762 G4Transform3D tsolid3_p1(G4Translate3D(1204, 0, Z0 - 52 + 8. / 2));
763 acs->AddPlacedVolume(lsolid3, tsolid3_p1);
766 G4VSolid* solid3n_p1 =
new G4Box(
"fwd_solid3n_p1", 32. / 2, 230. / 2, 8. / 2);
767 G4LogicalVolume* lsolid3n =
new G4LogicalVolume(solid3n_p1, Materials::get(
"SUS304"),
"lsolid3n", 0, 0, 0);
768 lsolid3n->SetVisAttributes(att(
"iron"));
769 G4Transform3D tsolid3n_p1(G4Translate3D(1204 - 420, 0, Z0 - 52 + 8. / 2));
770 acs->AddPlacedVolume(lsolid3n, tsolid3n_p1);
773 G4VSolid* solid4_p1 =
new G4Box(
"fwd_solid4_p1", 16. / 2, 160. / 2, 8. / 2);
774 G4LogicalVolume* lsolid4 =
new G4LogicalVolume(solid4_p1, Materials::get(
"SUS304"),
"lsolid4", 0, 0, 0);
775 lsolid4->SetVisAttributes(att(
"iron"));
776 G4Transform3D tsolid4_p1(G4Translate3D(598, 0, Z0 - 52 + 8. / 2));
777 acs->AddPlacedVolume(lsolid4, tsolid4_p1);
780 G4VSolid* solid5_p1 =
new G4Box(
"fwd_solid5_p1", 650. / 2, 30. / 2, 40. / 2);
781 G4VSolid* solid5_p2 =
new G4Box(
"fwd_solid5_p2", 651. / 2, 30. / 2, 40. / 2);
782 G4VSolid* solid5_p3 =
new G4SubtractionSolid(
"solid5_p3", solid5_p1, solid5_p2, G4Translate3D(0, -3, 3));
784 G4LogicalVolume* lsolid5 =
new G4LogicalVolume(solid5_p3, Materials::get(
"SUS304"),
"lsolid5", 0, 0, 0);
785 lsolid5->SetVisAttributes(att(
"iron"));
786 G4Transform3D tsolid5_p1(G4RotateZ3D(M_PI / 16)*G4Translate3D(910, -45, Z0 - 20 - 15));
787 acs->AddPlacedVolume(lsolid5, tsolid5_p1);
789 G4Transform3D tsolid5_p3(G4RotateZ3D(-M_PI / 16)*G4Translate3D(910, 45, Z0 - 20 - 15)*G4RotateZ3D(M_PI));
790 acs->AddPlacedVolume(lsolid5, tsolid5_p3);
793 G4VSolid* solid7_p1 =
new G4Box(
"fwd_solid7_p1", 130. / 2, 30. / 2, 40. / 2);
794 G4VSolid* solid7_p2 =
new G4Box(
"fwd_solid7_p2", 131. / 2, 30. / 2, 40. / 2);
795 G4VSolid* solid7_p3 =
new G4SubtractionSolid(
"fwd_solid7_p3", solid7_p1, solid7_p2, G4Transform3D(G4RotationMatrix(),
798 G4LogicalVolume* lsolid7 =
new G4LogicalVolume(solid7_p3, Materials::get(
"SUS304"),
"lsolid7", 0, 0, 0);
799 lsolid7->SetVisAttributes(att(
"iron"));
800 G4Transform3D tsolid7_p1(G4RotateZ3D(-M_PI / 16)*G4Translate3D(Ro - 8 - 65, 54, Z0 - 40. / 2)*G4RotateZ3D(M_PI));
801 acs->AddPlacedVolume(lsolid7, tsolid7_p1);
803 G4Transform3D tsolid7_p2(G4RotateZ3D(M_PI / 16)*G4Translate3D(Ro - 8 - 65 - 8, -85, Z0 - 40. / 2));
804 acs->AddPlacedVolume(lsolid7, tsolid7_p2);
812 G4VSolid* solid8_p1 =
new G4Box(
"fwd_solid8_p1", 120. / 2, 10. / 2, 42. / 2);
813 G4LogicalVolume* lsolid8 =
new G4LogicalVolume(solid8_p1, Materials::get(
"SUS304"),
"lsolid8", 0, 0, 0);
814 lsolid8->SetVisAttributes(att(
"iron"));
815 G4Transform3D tsolid8_p1(G4RotateZ3D(-M_PI / 16)*G4Translate3D(Ro - 8 - 60, 34, Z0 - 42. / 2));
816 acs->AddPlacedVolume(lsolid8, tsolid8_p1);
822 G4VSolid* solid9_p1 =
new G4Box(
"fwd_solid9_p1", 26. / 2, 12. / 2, 26. / 2);
823 G4LogicalVolume* lsolid9 =
new G4LogicalVolume(solid9_p1, Materials::get(
"SUS304"),
"lsolid9", 0, 0, 0);
824 lsolid9->SetVisAttributes(att(
"iron"));
825 G4Transform3D tsolid9_p1(G4RotateZ3D(-M_PI / 16)*G4Translate3D(Ro - 8 - 120 + 26. / 2 + 17, 20 + 9 + 10 + 9 + 3,
827 acs->AddPlacedVolume(lsolid9, tsolid9_p1);
831 G4VSolid* solid10_p1 =
new G4Box(
"fwd_solid10_p1", 26. / 2, 12. / 2, 42. / 2);
832 G4LogicalVolume* lsolid10 =
new G4LogicalVolume(solid10_p1, Materials::get(
"SUS304"),
"lsolid10", 0, 0, 0);
833 lsolid10->SetVisAttributes(att(
"iron"));
835 G4Transform3D tsolid10_p1(G4RotateZ3D(-M_PI / 16)*G4Translate3D(910 + 650. / 2 - 221, 20 + 10 + 6 + 6, Z0 - 52 + 42. / 2));
836 acs->AddPlacedVolume(lsolid10, tsolid10_p1);
841 double t = 2, h20 = 32;
842 G4VSolid* solid_connector =
new G4Box(
"fwd_solid_connector", (110 + 2 * 20) / 2, (250 + 2 * 20) / 2, h20 / 2);
843 G4VSolid* solid_connector2 =
new G4Box(
"fwd_solid_connector2", (20 + t) / 2, (20 + t) / 2, 1.01 * h20 / 2);
844 G4VSolid* solid_connector3 =
new G4Box(
"fwd_solid_connector3", 20 / 2, (250 + 2 * 20 + 2) / 2, h20 / 2);
845 solid_connector =
new G4SubtractionSolid(
"fwd_solid_connector", solid_connector, solid_connector2, G4Translate3D(55 + (20 + t) / 2,
847 solid_connector =
new G4SubtractionSolid(
"fwd_solid_connector", solid_connector, solid_connector3, G4Translate3D(-70, 0, -t - 1));
848 G4LogicalVolume* lsolid_connector =
new G4LogicalVolume(solid_connector, Materials::get(
"G4_AIR"),
"lsolid_connector", 0,
850 lsolid_connector->SetVisAttributes(att(
"air"));
851 G4Transform3D tsolid_connector(G4Translate3D(1360 - 60, 0, Z0 - h20 / 2));
852 acs->AddPlacedVolume(lsolid_connector, tsolid_connector);
855 auto lvolume = [&](
int part,
double dx,
double dy,
double dz) {
856 ostringstream ost(
""); ost <<
"solid20_p" << part;
857 G4VSolid* sv =
new G4Box(ost.str().c_str(), dx / 2, dy / 2, dz / 2);
858 ost.str(
""); ost <<
"lsolid20_p" << part;
859 return new G4LogicalVolume(sv, Materials::get(
"A5052"), ost.str().c_str(), 0, 0, 0);
862 auto place = [&](G4LogicalVolume * lv,
const G4Translate3D & move,
int n) {
863 lv->SetVisAttributes(att(
"alum"));
864 ostringstream ost(
""); ost <<
"phys_" << lv->GetName();
865 new G4PVPlacement(move, lv, ost.str().c_str(), lsolid_connector,
false, n, overlap);
867 G4LogicalVolume* lv1 = lvolume(1, 20, 250 + 2 * 20, t);
868 place(lv1, G4Translate3D(-55 - 10, 0, h20 / 2 - t / 2), 0);
869 G4LogicalVolume* lv1_2 = lvolume(1, 20, 250 + 20, t);
870 place(lv1_2, G4Translate3D(55 + 10, 10, h20 / 2 - t / 2), 1);
872 G4LogicalVolume* lv2 = lvolume(2, 110., 20., t);
873 place(lv2, G4Translate3D(0, 250 / 2 + 10, h20 / 2 - t / 2), 0);
874 place(lv2, G4Translate3D(0, -250 / 2 - 10, h20 / 2 - t / 2), 1);
876 G4LogicalVolume* lv3 = lvolume(3, 110., t, h20 - t);
877 place(lv3, G4Translate3D(0, 250 / 2 + t / 2, -t / 2), 0);
878 place(lv3, G4Translate3D(0, -250 / 2 - t / 2, -t / 2), 1);
880 G4LogicalVolume* lv4 = lvolume(4, t, 250 + 2 * t, h20 - t);
881 place(lv4, G4Translate3D(55 + t / 2, 0, -t / 2), 0);
882 place(lv4, G4Translate3D(-55 - t / 2, 0, -t / 2), 1);
884 G4LogicalVolume* lv5 = lvolume(5, 7, 250, t);
885 place(lv5, G4Translate3D(55 - 7. / 2, 0, -h20 / 2 + t / 2 + t), 0);
886 place(lv5, G4Translate3D(-55 + 7. / 2, 0, -h20 / 2 + t / 2 + t), 1);
888 G4LogicalVolume* lv6 = lvolume(6, 110 - 14, 7, t);
889 place(lv6, G4Translate3D(0, 250 / 2 - 7. / 2, -h20 / 2 + t / 2 + t), 0);
890 place(lv6, G4Translate3D(0, -250 / 2 + 7. / 2, -h20 / 2 + t / 2 + t), 1);
892 G4LogicalVolume* lv7 = lvolume(7, 110, 250, t);
893 place(lv7, G4Translate3D(0, 0, -h20 / 2 + t / 2), 0);
896 G4VSolid* p8_1 =
new G4Box(
"fwd_solid20_p8_1", 90. / 2, 10. / 2, 30. / 2);
897 G4VSolid* p8_2 =
new G4Box(
"fwd_solid20_p8_2", 88. / 2, 8. / 2, 30. / 2);
898 G4VSolid* sp8 =
new G4SubtractionSolid(
"fwd_solid20_p8", p8_1, p8_2, G4TranslateZ3D(-1));
899 G4LogicalVolume* lv8 =
new G4LogicalVolume(sp8, Materials::get(
"A5052"),
"lsolid20_p8", 0, 0, 0);
900 lv8->SetVisAttributes(att(
"alum2"));
901 for (
int i = 0; i < 10; i++) place(lv8, G4Translate3D(0, 25 * (i - 4.5), -h20 / 2 + t + 30 / 2), i);
907 G4VSolid* solid_board =
new G4Box(
"fwd_solid_board", (210) / 2, (110) / 2, hbv / 2);
908 G4LogicalVolume* lsolid_board =
new G4LogicalVolume(solid_board, Materials::get(
"G4_AIR"),
"lsolid_board", 0, 0, 0);
909 lsolid_board->SetVisAttributes(att(
"air"));
910 for (
int i = 0; i < 1; i++) {
912 G4Transform3D t0 = G4Translate3D(598 - 8 + 210 / 2, 0, Z0 - 52 + 8 + 5 + hbv / 2);
913 G4Transform3D t1 = t0 * G4Translate3D(210, 110 / 2 + 5, 0);
914 G4Transform3D t2 = t0 * G4Translate3D(210, -110 / 2 + 5, 0);
915 G4Transform3D t3 = t0 * G4Translate3D(2 * 210, 110 / 2 + 5, 0);
916 G4Transform3D t4 = t0 * G4Translate3D(2 * 210, -110 / 2 + 5, 0);
922 acs->AddPlacedVolume(lsolid_board, t0);
923 acs->AddPlacedVolume(lsolid_board, t1);
924 acs->AddPlacedVolume(lsolid_board, t2);
925 acs->AddPlacedVolume(lsolid_board, t3);
926 acs->AddPlacedVolume(lsolid_board, t4);
928 G4Material* boxmaterial = Materials::get(
"G4_GLASS_PLATE");
929 auto lvolumeb = [&](
int part,
double dx,
double dy,
double dz) {
930 ostringstream ost(
""); ost <<
"fwd_sboard_p" << part;
931 G4VSolid* sv =
new G4Box(ost.str().c_str(), dx / 2, dy / 2, dz / 2);
932 ost.str(
""); ost <<
"lboard_p" << part;
933 return new G4LogicalVolume(sv, boxmaterial, ost.str().c_str(), 0, 0, 0);
936 const G4VisAttributes* asolid20 = att(
"plate");
938 auto placeb = [&](G4LogicalVolume * lv,
const G4Translate3D & move,
int n) {
939 lv->SetVisAttributes(asolid20);
940 ostringstream ost(
""); ost <<
"phys_" << lv->GetName();
941 new G4PVPlacement(move, lv, ost.str().c_str(), lsolid_board,
false, n, overlap);
945 G4LogicalVolume* lb1 = lvolumeb(1, 210, 110, hboard);
946 placeb(lb1, G4Translate3D(0, 0, -hbv / 2 + hboard / 2), 0);
948 double wcon = 20, hcon = 40, hc = hbv - hboard;
949 G4VSolid* sv_connector_bundle =
new G4Box(
"fwd_sv_connector_bundle", 4 * wcon / 2, hcon / 2, hc / 2);
950 G4LogicalVolume* lv_connector_bundle =
new G4LogicalVolume(sv_connector_bundle, Materials::get(
"G4_AIR"),
951 "lv_connector_bundle", 0, 0, 0);
952 lv_connector_bundle->SetVisAttributes(att(
"air"));
953 new G4PVPlacement(G4Translate3D(-210 / 2 + 10 + wcon * 2, -110 / 2 + hcon / 2, -hbv / 2 + hboard + hc / 2), lv_connector_bundle,
954 "pv_connector_bundle", lsolid_board,
false, 0, overlap);
955 new G4PVPlacement(G4Translate3D(-210 / 2 + 10 + wcon * 2, 10 + hcon / 2, -hbv / 2 + hboard + hc / 2), lv_connector_bundle,
956 "pv_connector_bundle", lsolid_board,
false, 0, overlap);
957 new G4PVPlacement(G4Translate3D(10 + wcon * 2, -110 / 2 + hcon / 2, -hbv / 2 + hboard + hc / 2), lv_connector_bundle,
958 "pv_connector_bundle", lsolid_board,
false, 0, overlap);
959 new G4PVPlacement(G4Translate3D(10 + wcon * 2, 10 + hcon / 2, -hbv / 2 + hboard + hc / 2), lv_connector_bundle,
960 "pv_connector_bundle", lsolid_board,
false, 0, overlap);
962 G4VSolid* sv_crystal_connector =
new G4Box(
"fwd_sv_crystal_connector", wcon / 2, hcon / 2, hc / 2);
963 G4LogicalVolume* lv_crystal_connector =
new G4LogicalVolume(sv_crystal_connector, Materials::get(
"G4_AIR"),
964 "lv_crystal_connector", 0, 0, 0);
965 lv_crystal_connector->SetVisAttributes(att(
"air"));
967 new G4PVPlacement(G4Translate3D(-1.5 * 20, 0, 0), lv_crystal_connector,
"pv_crystal_connector", lv_connector_bundle,
false, 0,
969 new G4PVPlacement(G4Translate3D(-0.5 * 20, 0, 0), lv_crystal_connector,
"pv_crystal_connector", lv_connector_bundle,
false, 1,
971 new G4PVPlacement(G4Translate3D(0.5 * 20, 0, 0), lv_crystal_connector,
"pv_crystal_connector", lv_connector_bundle,
false, 2,
973 new G4PVPlacement(G4Translate3D(1.5 * 20, 0, 0), lv_crystal_connector,
"pv_crystal_connector", lv_connector_bundle,
false, 3,
976 G4VSolid* sv_crystal_connector_p1 =
new G4Box(
"fwd_sv_crystal_connector_p1", 8 / 2, 30 / 2, 20 / 2);
977 G4LogicalVolume* lv_crystal_connector_p1 =
new G4LogicalVolume(sv_crystal_connector_p1, Materials::get(
"SUS304"),
978 "lv_crystal_connector_p1", 0, 0, 0);
979 lv_crystal_connector_p1->SetVisAttributes(att(
"connector"));
981 new G4PVPlacement(G4Translate3D(-5, 0, -hc / 2 + 20. / 2), lv_crystal_connector_p1,
"pv_crystal_connector_p1", lv_crystal_connector,
984 G4VSolid* sv_capacitor =
new G4Tubs(
"fwd_sv_capacitor", 0, 5, 5. / 2, 0, 2 * M_PI);
985 G4LogicalVolume* lv_capacitor =
new G4LogicalVolume(sv_capacitor, Materials::get(
"SUS304"),
"lv_capacitor", 0, 0, 0);
986 lv_capacitor->SetVisAttributes(att(
"capacitor"));
988 new G4PVPlacement(G4Translate3D(5, -15, -hc / 2 + 5. / 2), lv_capacitor,
"pv_capacitor", lv_crystal_connector,
false, 0, overlap);
989 new G4PVPlacement(G4Translate3D(5, -5, -hc / 2 + 5. / 2), lv_capacitor,
"pv_capacitor", lv_crystal_connector,
false, 1, overlap);
990 new G4PVPlacement(G4Translate3D(5, 5, -hc / 2 + 5. / 2), lv_capacitor,
"pv_capacitor", lv_crystal_connector,
false, 2, overlap);
991 new G4PVPlacement(G4Translate3D(5, 15, -hc / 2 + 5. / 2), lv_capacitor,
"pv_capacitor", lv_crystal_connector,
false, 3, overlap);
993 G4VSolid* sv_board_connector_p1 =
new G4Box(
"fwd_sv_board_connector_p1", 80. / 2, 8. / 2, 20. / 2);
994 G4LogicalVolume* lv_board_connector_p1 =
new G4LogicalVolume(sv_board_connector_p1, Materials::get(
"SUS304"),
995 "lv_board_connector_p1", 0, 0, 0);
996 lv_board_connector_p1->SetVisAttributes(att(
"connector"));
998 new G4PVPlacement(G4Translate3D(-210 / 2 + 10 + 80 / 2, 0, -hbv / 2 + hboard + 20. / 2), lv_board_connector_p1,
999 "pv_board_connector_p1", lsolid_board,
false, 0, overlap);
1000 new G4PVPlacement(G4Translate3D(210 / 2 - 10 - 80 / 2, 0, -hbv / 2 + hboard + 20. / 2), lv_board_connector_p1,
1001 "pv_board_connector_p1", lsolid_board,
false, 1, overlap);
1004 G4Transform3D tr = G4RotateZ3D(M_PI / 16) * G4ReflectY3D();
1005 acs->MakeImprint(innervolumesector_logical, tr, 0, overlap);
1006 tr = G4RotateZ3D(-M_PI / 16);
1007 acs->MakeImprint(innervolumesector_logical, tr, 1, overlap);
1012 G4VSolid* solid8_p1 =
new G4Tubs(
"fwd_solid8_p1", RI + tand(13.12) * (434 + 1) - 20 / cosd(13.12), 1415, 1. / 2, -M_PI / 16,
1014 G4VSolid* solid8_p2 =
new G4Box(
"fwd_solid8_p2", 130. / 2, 270. / 2, 2. / 2);
1015 G4VSolid* solid8_p3 =
new G4Tubs(
"fwd_solid8_p3", 0, 16, 2, 0, 2 * M_PI);
1016 G4VSolid* solid8_p4 =
new G4Box(
"fwd_solid8_p4", 130. / 2, (75. - 2 * 16.) / 2, 2. / 2);
1017 double width_p5 = 180;
1018 G4VSolid* solid8_p5 =
new G4Box(
"fwd_solid8_p5", width_p5 / 2, 2.5 + 75. / 2, 2. / 2);
1020 double xx0 = 1415 - 47.8715;
1021 G4VSolid* solid8 =
new G4SubtractionSolid(
"fwd_solid8", solid8_p1, solid8_p2, G4TranslateX3D(xx0 - 130. / 2));
1022 double xx1 = xx0 + 1.7;
1023 solid8 =
new G4SubtractionSolid(
"fwd_solid8", solid8, solid8_p3, G4Translate3D(xx1, 159.5, 0));
1024 solid8 =
new G4SubtractionSolid(
"fwd_solid8", solid8, solid8_p3, G4Translate3D(xx1, 202.5, 0));
1025 solid8 =
new G4SubtractionSolid(
"fwd_solid8", solid8, solid8_p4, G4Translate3D(xx1 - 16 + 130. / 2, (202.5 + 159.5) / 2, 0));
1026 solid8 =
new G4SubtractionSolid(
"fwd_solid8", solid8, solid8_p5, G4Translate3D(xx1 + width_p5 / 2, (202.5 + 159.5) / 2, 0));
1027 solid8 =
new G4SubtractionSolid(
"fwd_solid8", solid8, solid8_p5, G4Translate3D(xx1 - 130 + (1230.77 - 1230.88), -177.57,
1028 0)*G4RotateZ3D(-M_PI / 16)*G4Translate3D(width_p5 / 2, -75. / 2, 0));
1035 G4LogicalVolume* lsolid8 =
new G4LogicalVolume(solid8, Materials::get(
"A5052"),
"lsolid8", 0, 0, 0);
1036 lsolid8->SetVisAttributes(att(
"alum"));
1037 for (
int i = 0; i < 8; i++) {
1038 G4Transform3D tc = gTrans * G4Translate3D(0, 0, 3 + 434 + 0.5) * G4RotateZ3D(M_PI / 8 + i * M_PI / 4);
1039 new G4PVPlacement(tc * G4RotateZ3D(M_PI / 16), lsolid8, suf(
"cover", 0 + 2 * i), top,
false, 0 + 2 * i, overlap);
1040 G4ReflectionFactory::Instance()->Place(tc * G4RotateZ3D(-M_PI / 16)*G4ReflectY3D(), suf(
"cover", 0 + 2 * i), lsolid8, top,
false,
1041 1 + 2 * i, overlap);