10#include <ecl/geometry/GeoECLCreator.h>
13#include <ecl/dataobjects/ECLElementNumbers.h>
14#include <ecl/geometry/BelleLathe.h>
15#include <ecl/geometry/BelleCrystal.h>
16#include <ecl/geometry/shapes.h>
19#include <geometry/Materials.h>
22#include <G4AssemblyVolume.hh>
24#include <G4LogicalVolume.hh>
25#include <G4PVPlacement.hh>
26#include <G4PVReplica.hh>
29#include <G4TwoVector.hh>
30#include <G4VisAttributes.hh>
33#include <CLHEP/Matrix/Vector.h>
44 G4LogicalVolume* top = &_top;
47 const double phi0 = 0;
48 const double dphi = sec ? M_PI / 16 : 2 * M_PI;
50 const bool b_inner_support_ring =
true;
51 const bool b_outer_support_ring =
true;
52 const bool b_support_wall =
true;
53 const bool b_ribs =
true;
54 const bool b_septum_wall =
true;
55 const bool b_crystals =
true;
56 const bool b_preamplifier =
true;
57 const bool b_support_leg =
true;
60 int npoints = 1000 * 1000;
63 vector<cplacement_t> bp = load_placements(
m_sap, ECLParts::backward);
64 vector<cplacement_t>::iterator fp = find_if(bp.begin(), bp.end(), [](
const cplacement_t& p) {
65 const int ECL_backward_part = 1000;
66 return p.nshape == ECL_backward_part;
69 G4Transform3D gTrans = (fp == bp.end()) ? G4Translate3D(0, 0, -1020) : get_transform(*fp);
70 if (fp != bp.end()) bp.erase(fp);
72 if (b_inner_support_ring) {
73 zr_t vc1[] = {{0., 452.3 + 3}, {0., 452.3}, {3., 474.9 - 20 / cosd(27.81)}, {434., 702.27 - 20 / cosd(27.81)}, {434., 702.27}, {3., 474.9}, {3., 452.3 + 3}};
74 std::vector<zr_t> contour1(vc1, vc1 +
sizeof(vc1) /
sizeof(
zr_t));
75 G4VSolid* part1solid =
new BelleLathe(
"part1solid", phi0, dphi, contour1);
76 G4LogicalVolume* part1logical =
new G4LogicalVolume(part1solid,
Materials::get(
"SUS304"),
"part1logical", 0, 0, 0);
77 part1logical->SetVisAttributes(
att(
"iron"));
78 auto pv =
new G4PVPlacement(gTrans * G4RotateY3D(M_PI), part1logical,
"ECL_BackwardSupport_part1physical", top,
false, 0, 0);
79 if (overlap) pv->CheckOverlaps(npoints);
84 double L = (435 - 202.67 - 3 - 1.6 * cosd(52.90 + 90)) / cosd(52.90);
85 zr_t vc23[] = {{0, 452.3 + 3}, {3, 452.3 + 3}, {3, 1190.2}, {3 + L * cosd(52.90), 1190.2 + L * sind(52.90)},
86 {3 + L * cosd(52.90) + 1.6 * cosd(52.90 + 90), 1190.2 + L * sind(52.90) + 1.6 * sind(52.90 + 90)}, {3 + 1.6 * cosd(52.90 + 90), 1190.2 + 1.6 * sind(52.90 + 90)}, {0, 1190.2}
88 std::vector<zr_t> contour23(vc23, vc23 +
sizeof(vc23) /
sizeof(
zr_t));
89 G4VSolid* part23solid =
new BelleLathe(
"part23solid", phi0, dphi, contour23);
90 G4LogicalVolume* part23logical =
new G4LogicalVolume(part23solid,
Materials::get(
"A5052"),
"part23logical", 0, 0, 0);
91 part23logical->SetVisAttributes(
att(
"alum"));
92 auto pv =
new G4PVPlacement(gTrans * G4RotateY3D(M_PI), part23logical,
"ECL_BackwardSupport_part23physical", top,
false, 0, 0);
93 if (overlap) pv->CheckOverlaps(npoints);
96 if (b_outer_support_ring) {
97 zr_t vc4[] = {{434 - 214.8, 1496 - 20}, {434, 1496 - 20}, {434, 1496 - 5}, {434 + 5, 1496 - 5}, {434 + 5, 1496}, {434 - 199.66, 1496}};
98 std::vector<zr_t> contour4(vc4, vc4 +
sizeof(vc4) /
sizeof(
zr_t));
99 G4VSolid* part4solid =
new BelleLathe(
"part4solid", phi0, dphi, contour4);
100 G4LogicalVolume* part4logical =
new G4LogicalVolume(part4solid,
Materials::get(
"SUS304"),
"part4logical", 0, 0, 0);
101 part4logical->SetVisAttributes(
att(
"iron"));
102 auto pv =
new G4PVPlacement(gTrans * G4RotateY3D(M_PI), part4logical,
"ECL_BackwardSupport_part4physical", top,
false, 0, 0);
103 if (overlap) pv->CheckOverlaps(npoints);
106 zr_t cont_array_in[] = {{3., 474.9}, {434., 702.27}, {434, 1496 - 20}, {434 - 214.8, 1496 - 20}, {3, 1190.2}};
107 std::vector<zr_t> contour_in(cont_array_in, cont_array_in +
sizeof(cont_array_in) /
sizeof(
zr_t));
108 G4VSolid* innervolume_solid =
new BelleLathe(
"innervolume_solid", 0, 2 * M_PI, contour_in);
109 G4LogicalVolume* innervolume_logical =
new G4LogicalVolume(innervolume_solid,
Materials::get(
"G4_AIR"),
110 "innervolume_logical", 0, 0, 0);
111 innervolume_logical->SetVisAttributes(
att(
"air"));
114 G4Region* aRegion =
new G4Region(
"ECLBackwardEnvelope");
115 innervolume_logical->SetRegion(aRegion);
116 aRegion->AddRootLogicalVolume(innervolume_logical);
118 auto gpvbp =
new G4PVPlacement(gTrans * G4RotateY3D(M_PI),
119 innervolume_logical,
"ECLBackwardPhysical",
121 if (overlap) gpvbp->CheckOverlaps(npoints);
123 G4VSolid* innervolumesector_solid =
new BelleLathe(
"innervolumesector_solid", -M_PI / 8, M_PI / 4, contour_in);
124 G4LogicalVolume* innervolumesector_logical =
new G4LogicalVolume(innervolumesector_solid,
Materials::get(
"G4_AIR"),
125 "innervolumesector_logical", 0, 0, 0);
126 innervolumesector_logical->SetVisAttributes(
att(
"air"));
127 new G4PVReplica(
"ECLBackwardSectorPhysical", innervolumesector_logical, innervolume_logical, kPhi, 8, M_PI / 4, 0);
130 double H = 60, W = 20;
131 double X0 = 702.27 + 0.001, X1 = 1496 - 20;
132 G4TwoVector r0o(X1, 0), r1o(X1 *
sqrt(1 - pow(W / X1, 2)), W);
133 double beta = asin(W / X0);
134 G4TwoVector r0i(X0 / cos(beta / 2), 0), r1i(X0 * cos(beta / 2) - tan(beta / 2) * (W - X0 * sin(beta / 2)), W);
135 double dxymzp = (r0o - r0i).x(), dxypzp = (r1o - r1i).x();
136 double theta =
atan(tand(27.81) / 2);
137 double dxymzm = dxymzp + tand(27.81) * H, dxypzm = dxypzp + tand(27.81) * H;
139 G4TwoVector m0 = (r0i + r0o) * 0.5, m1 = (r1i + r1o) * 0.5, dm = m1 - m0;
140 double alpha =
atan(dm.x() / dm.y());
142 G4VSolid* solid6_p1 =
new G4Trap(
"solid6_p1", H / 2, theta, 0, W / 2, dxymzm / 2, dxypzm / 2, alpha, W / 2, dxymzp / 2, dxypzp / 2,
144 G4LogicalVolume* lsolid6_p1 =
new G4LogicalVolume(solid6_p1,
Materials::get(
"SUS304"),
"lsolid6", 0, 0, 0);
145 lsolid6_p1->SetVisAttributes(
att(
"asolid6"));
146 G4Transform3D tsolid6_p1(G4Translate3D(X0 * cos(beta / 2) + (dxymzp / 2 + dxypzp / 2) / 2 - tan(theta)*H / 2, W / 2, 434 - H / 2));
147 auto pv61 =
new G4PVPlacement(G4RotateZ3D(-M_PI / 8)*tsolid6_p1, lsolid6_p1,
"psolid6_p1", innervolumesector_logical,
false, 0, 0);
148 if (overlap) pv61->CheckOverlaps(npoints);
149 auto pv62 =
new G4PVPlacement(G4RotateZ3D(0)*tsolid6_p1, lsolid6_p1,
"psolid6_p2", innervolumesector_logical,
false, 0, 0);
150 if (overlap) pv62->CheckOverlaps(npoints);
153 dxymzm = dxymzp + tand(27.81) * H, dxypzm = dxypzp + tand(27.81) * H;
154 G4VSolid* solid6_p2 =
new G4Trap(
"solid6_p2", H / 2, theta, 0, W / 2, dxypzm / 2, dxymzm / 2, -alpha, W / 2, dxypzp / 2, dxymzp / 2,
156 G4LogicalVolume* lsolid6_p2 =
new G4LogicalVolume(solid6_p2,
Materials::get(
"SUS304"),
"lsolid6", 0, 0, 0);
157 lsolid6_p2->SetVisAttributes(
att(
"asolid6"));
158 G4Transform3D tsolid6_p2(G4Translate3D(X0 * cos(beta / 2) + (dxymzp / 2 + dxypzp / 2) / 2 - tan(theta)*H / 2, -W / 2, 434 - H / 2));
159 auto pv63 =
new G4PVPlacement(G4RotateZ3D(0)*tsolid6_p2, lsolid6_p2,
"psolid6_p3", innervolumesector_logical,
false, 0, 0);
160 if (overlap) pv63->CheckOverlaps(npoints);
161 auto pv64 =
new G4PVPlacement(G4RotateZ3D(M_PI / 8)*tsolid6_p2, lsolid6_p2,
"psolid6_p4", innervolumesector_logical,
false, 0, 0);
162 if (overlap) pv64->CheckOverlaps(npoints);
164 G4VSolid* solid7_p8 =
new G4Box(
"solid7_p8", 171. / 2, (140. - 40) / 2 / 2, 40. / 2);
165 G4LogicalVolume* lsolid7 =
new G4LogicalVolume(solid7_p8,
Materials::get(
"SUS304"),
"lsolid7", 0, 0, 0);
166 lsolid7->SetVisAttributes(
att(
"asolid7"));
167 double dx =
sqrt(X1 * X1 - 70 * 70) - 171. / 2;
168 G4Transform3D tsolid7_p1(G4Translate3D(dx, -20 - 25, 434 - 40. / 2));
169 auto pv71 =
new G4PVPlacement(tsolid7_p1, lsolid7,
"psolid7_p1", innervolumesector_logical,
false, 0, 0);
170 if (overlap) pv71->CheckOverlaps(npoints);
171 G4Transform3D tsolid7_p2(G4Translate3D(dx, 20 + 25, 434 - 40. / 2));
172 auto pv72 =
new G4PVPlacement(tsolid7_p2, lsolid7,
"psolid7_p2", innervolumesector_logical,
false, 0, 0);
173 if (overlap) pv72->CheckOverlaps(npoints);
175 double L = X1 - (X0 - tand(27.81) * 40) - 10;
176 G4VSolid* solid13 =
new G4Box(
"solid13", L / 2, 5. / 2, 18. / 2);
177 G4LogicalVolume* lsolid13 =
new G4LogicalVolume(solid13,
Materials::get(
"SUS304"),
"lsolid13", 0, 0, 0);
178 lsolid13->SetVisAttributes(
att(
"asolid13"));
179 G4Transform3D tsolid13(G4TranslateZ3D(434 - 60 + 18. / 2)*G4TranslateY3D(-5. / 2 - 0.5 / 2)*G4TranslateX3D(X0 - tand(
180 27.81) * 40 + L / 2 + 5));
181 auto pv131 =
new G4PVPlacement(tsolid13, lsolid13,
"psolid13_p1", innervolumesector_logical,
false, 0, 0);
182 if (overlap) pv131->CheckOverlaps(npoints);
183 auto pv132 =
new G4PVPlacement(G4RotateZ3D(M_PI / 8)*tsolid13, lsolid13,
"psolid13_p2", innervolumesector_logical,
false, 0, 0);
184 if (overlap) pv132->CheckOverlaps(npoints);
191 Point_t vin[] = {{434. - zsep, 702.27 - tand(27.81)* zsep}, {434. - 60, 702.27 - tand(27.81) * 60}, {434. - 60, 1496 - 20 - d}, {434. - zsep, 1496 - 20 - d}};
192 const int n =
sizeof(vin) /
sizeof(
Point_t);
193 Point_t c = centerofgravity(vin, vin + n);
194 G4ThreeVector contour_swall[n * 2];
195 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);
196 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);
198 G4VSolid* septumwall_solid =
new BelleCrystal(
"septumwall_solid", n, contour_swall);
200 G4LogicalVolume* septumwall_logical =
new G4LogicalVolume(septumwall_solid,
Materials::get(
"A5052"),
201 "septumwall_logical", 0, 0, 0);
202 septumwall_logical->SetVisAttributes(
att(
"alum2"));
203 auto pv =
new G4PVPlacement(G4RotateZ3D(-M_PI / 2)*G4RotateY3D(-M_PI / 2)*G4Translate3D(c.x, c.y, 0), septumwall_logical,
204 "septumwall_physical", innervolumesector_logical,
false, 0, 0);
205 if (overlap) pv->CheckOverlaps(npoints);
207 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);
208 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);
210 G4VSolid* septumwall2_solid =
new BelleCrystal(
"septumwall2_solid", n, contour_swall);
212 G4LogicalVolume* septumwall2_logical =
new G4LogicalVolume(septumwall2_solid,
Materials::get(
"A5052"),
213 "septumwall2_logical", 0, 0, 0);
214 septumwall2_logical->SetVisAttributes(
att(
"alum2"));
215 auto pv0 =
new G4PVPlacement(G4RotateZ3D(-M_PI / 8)*G4RotateZ3D(-M_PI / 2)*G4RotateY3D(-M_PI / 2)*G4Translate3D(c.x, c.y,
217 septumwall2_logical,
"septumwall2_physical", innervolumesector_logical,
false, 0, 0);
218 if (overlap) pv0->CheckOverlaps(npoints);
219 auto pv1 =
new G4PVPlacement(G4RotateZ3D(M_PI / 8)*G4RotateZ3D(-M_PI / 2)*G4RotateY3D(-M_PI / 2)*G4Translate3D(c.x, c.y,
221 septumwall2_logical,
"septumwall2_physical", innervolumesector_logical,
false, 1, 0);
222 if (overlap) pv1->CheckOverlaps(npoints);
225 zr_t vcr[] = {{3., 474.9}, {434. - zsep, 702.27 - tand(27.81)* zsep}, {434 - zsep, 1496 - 20}, {434 - 214.8, 1496 - 20}, {3, 1190.2}};
226 std::vector<zr_t> ccr(vcr, vcr +
sizeof(vcr) /
sizeof(
zr_t));
227 G4VSolid* crystalvolume_solid =
new BelleLathe(
"crystalvolume_solid", 0, M_PI / 8, ccr);
228 G4LogicalVolume* crystalvolume_logical =
new G4LogicalVolume(crystalvolume_solid,
Materials::get(
"G4_AIR"),
229 "crystalvolume_logical", 0, 0, 0);
230 crystalvolume_logical->SetVisAttributes(
att(
"air"));
231 auto gpv0 =
new G4PVPlacement(G4RotateZ3D(-M_PI / 8), crystalvolume_logical,
"ECLBackwardCrystalSectorPhysical_0",
232 innervolumesector_logical,
234 if (overlap) gpv0->CheckOverlaps(npoints);
235 auto gpv1 =
new G4PVPlacement(G4RotateZ3D(0), crystalvolume_logical,
"ECLBackwardCrystalSectorPhysical_1",
236 innervolumesector_logical,
false, 1,
238 if (overlap) gpv1->CheckOverlaps(npoints);
241 double d = 5, dr = 0.001;
242 Point_t vin[] = {{3., 474.9}, {434. - zsep, 702.27 - tand(27.81)* zsep}, {434 - zsep, 1496 - 20 - d - dr}, {434 - 214.8 - d / tand(52.90), 1496 - 20 - d - dr}, {3, 1190.2 - dr}};
243 const int n =
sizeof(vin) /
sizeof(
Point_t);
244 Point_t c = centerofgravity(vin, vin + n);
245 G4ThreeVector contour_swall[n * 2];
247 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);
248 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);
250 G4VSolid* septumwall3_solid =
new BelleCrystal(
"septumwall3_solid", n, contour_swall);
252 G4LogicalVolume* septumwall3_logical =
new G4LogicalVolume(septumwall3_solid,
Materials::get(
"A5052"),
253 "septumwall3_logical", 0, 0, 0);
254 septumwall3_logical->SetVisAttributes(
att(
"alum2"));
255 auto pv0 =
new G4PVPlacement(G4RotateZ3D(-M_PI / 2)*G4RotateY3D(-M_PI / 2)*G4Translate3D(c.x, c.y, 0.5 / 2 / 2),
257 "septumwall3_physical_0", crystalvolume_logical,
false, 0, overlap);
258 if (overlap) pv0->CheckOverlaps(npoints);
259 auto pv1 =
new G4PVPlacement(G4RotateZ3D(M_PI / 8)*G4RotateZ3D(-M_PI / 2)*G4RotateY3D(-M_PI / 2)*G4Translate3D(c.x, c.y,
261 septumwall3_logical,
"septumwall3_physical_1", crystalvolume_logical,
false, 1, overlap);
262 if (overlap) pv1->CheckOverlaps(npoints);
267 vector<shape_t*> cryst = load_shapes(
m_sap, ECLParts::backward);
268 vector<G4LogicalVolume*> wrapped_crystals;
269 for (
auto it = cryst.begin(); it != cryst.end(); it++) {
271 wrapped_crystals.push_back(
wrapped_crystal(s,
"backward", 0.20 - 0.02));
273 for (vector<cplacement_t>::const_iterator it = bp.begin(); it != bp.end(); ++it) {
275 auto s = find_if(cryst.begin(), cryst.end(), [&t](
const shape_t* shape) {return shape->nshape == t.nshape;});
276 if (s == cryst.end())
continue;
278 G4Transform3D twc = G4Translate3D(0, 0, 3) * get_transform(t);
279 int indx = it - bp.begin();
280 auto pv =
new G4PVPlacement(twc, wrapped_crystals[s - cryst.begin()], suf(
"ECLBackwardWrappedCrystal_Physical", indx),
281 crystalvolume_logical,
283 if (overlap)pv->CheckOverlaps(npoints);
291 if (b_preamplifier) {
292 for (vector<cplacement_t>::const_iterator it = bp.begin(); it != bp.end(); ++it) {
293 G4Transform3D twc = G4Translate3D(0, 0, 3) * get_transform(*it);
294 int indx = it - bp.begin();
298 if (overlap)pv->CheckOverlaps(npoints);
303 const G4VisAttributes* batt =
att(
"iron");
305 G4VSolid* s1 =
new G4Box(
"leg_p1", 130. / 2, 185. / 2, (40. - 5) / 2);
306 G4LogicalVolume* l1 =
new G4LogicalVolume(s1,
Materials::get(
"SUS304"),
"l1", 0, 0, 0);
307 G4Transform3D t1 = G4Translate3D(0, 185. / 2, (40. - 5) / 2);
308 l1->SetVisAttributes(batt);
310 Point_t v3[] = {{ -212. / 2, -135. / 2}, {212. / 2 - 30, -135. / 2}, {212. / 2, -135. / 2 + 30}, {212. / 2, 135. / 2}, { -212. / 2, 135. / 2}};
311 const int n3 =
sizeof(v3) /
sizeof(
Point_t);
312 G4ThreeVector c3[n3 * 2];
314 for (
int i = 0; i < n3; i++) c3[i + 0] = G4ThreeVector(v3[i].x, v3[i].y, -60. / 2);
315 for (
int i = 0; i < n3; i++) c3[i + n3] = G4ThreeVector(v3[i].x, v3[i].y, 60. / 2);
318 G4LogicalVolume* l3 =
new G4LogicalVolume(s3,
Materials::get(
"SUS304"),
"l3", 0, 0, 0);
319 G4Transform3D t3 = G4Translate3D(0, 135. / 2 + 35, 40. - 5. + 212. / 2) * G4RotateY3D(-M_PI / 2);
320 l3->SetVisAttributes(batt);
322 G4VSolid* s6 =
new G4Box(
"leg_p6", 140. / 2, 189. / 2, 160. / 2);
323 G4LogicalVolume* l6 =
new G4LogicalVolume(s6,
Materials::get(
"G4_AIR"),
"l6", 0, 0, 0);
324 G4Transform3D t6 = G4Translate3D(0, 170. + 189. / 2, 57. + 35. + 160. / 2);
325 l6->SetVisAttributes(
att(
"air"));
327 G4VSolid* s6a =
new G4Box(
"leg_p6a", 140. / 2, (189. - 45.) / 2, 160. / 2);
328 G4LogicalVolume* l6a =
new G4LogicalVolume(s6a,
Materials::get(
"SUS304"),
"l6a", 0, 0, 0);
329 l6a->SetVisAttributes(batt);
330 new G4PVPlacement(G4TranslateY3D(-45. / 2), l6a,
"l6a_physical", l6,
false, 0, overlap);
332 G4VSolid* s6b =
new G4Box(
"leg_p6b", 60. / 2, 45. / 2, 160. / 2);
333 G4LogicalVolume* l6b =
new G4LogicalVolume(s6b,
Materials::get(
"SUS304"),
"l6b", 0, 0, 0);
334 l6b->SetVisAttributes(batt);
335 double dy = 189. / 2 - 45 + 45. / 2;
336 new G4PVPlacement(G4TranslateY3D(dy), l6b,
"l6b_physical", l6,
false, 0, overlap);
338 G4VSolid* s6c =
new G4Box(
"leg_p6c", 40. / 2, 45. / 2, 22.5 / 2);
339 G4LogicalVolume* l6c =
new G4LogicalVolume(s6c,
Materials::get(
"SUS304"),
"l6c", 0, 0, 0);
340 l6c->SetVisAttributes(batt);
341 new G4PVPlacement(G4Translate3D(30 + 20, dy, 20 + 22.5 / 2), l6c,
"l6c_physical", l6,
false, 0, overlap);
342 new G4PVPlacement(G4Translate3D(30 + 20, dy, -20 - 22.5 / 2), l6c,
"l6c_physical", l6,
false, 1, overlap);
343 new G4PVPlacement(G4Translate3D(-30 - 20, dy, 20 + 22.5 / 2), l6c,
"l6c_physical", l6,
false, 2, overlap);
344 new G4PVPlacement(G4Translate3D(-30 - 20, dy, -20 - 22.5 / 2), l6c,
"l6c_physical", l6,
false, 3, overlap);
346 G4AssemblyVolume* support_leg =
new G4AssemblyVolume();
348 support_leg->AddPlacedVolume(l1, t1);
350 support_leg->AddPlacedVolume(l3, t3);
353 support_leg->AddPlacedVolume(l6, t6);
355 G4VSolid* s_all =
new G4Box(
"leg_all", 140. / 2, 359. / 2, (257. - 5.) / 2);
356 G4LogicalVolume* l_all =
new G4LogicalVolume(s_all,
Materials::get(
"G4_AIR"),
"l_all", 0, 0, 0);
357 l_all->SetVisAttributes(
att(
"air"));
358 G4Transform3D tp = G4Translate3D(0, -359. / 2, -(257. - 5.) / 2);
359 support_leg->MakeImprint(l_all, tp, 0, overlap);
362 for (
int i = 0; i < 8; i++)
363 new G4PVPlacement(gTrans * G4RotateX3D(M_PI)*G4RotateZ3D(-M_PI / 2 + M_PI / 8 + i * M_PI / 4)*G4Translate3D(0,
364 1496 - 185 + 359. / 2,
365 434 + 5 + (257. - 5.) / 2), l_all,
"ECL_BackwardSupport_lall_physical", top,
false, i, overlap);
368 G4VSolid* s1a =
new G4Box(
"leg_p1a", 130. / 2, 178. / 2, 5. / 2);
369 G4LogicalVolume* l1a =
new G4LogicalVolume(s1a,
Materials::get(
"SUS304"),
"l1a", 0, 0, 0);
370 l1a->SetVisAttributes(batt);
371 for (
int i = 0; i < 8; i++)
372 new G4PVPlacement(gTrans * G4RotateX3D(M_PI)*G4RotateZ3D(-M_PI / 2 + M_PI / 8 + i * M_PI / 4)*G4Translate3D(0,
373 1496 - 185 + 178. / 2,
374 434 + 5 - 5. / 2), l1a,
"l1a_physical", top,
false, i, overlap);
a Belle crystal in Geant4
double get_pa_box_height() const
Getter for preamplifier box height (hard-coded to be 2)
const G4VisAttributes * att(const std::string &n) const
Define visual attributes.
void backward(G4LogicalVolume &)
Place elements inside the backward endcap.
const ECLCrystalsShapeAndPosition * m_sap
pointer to a storage with crystal shapes and positions
G4LogicalVolume * get_preamp() const
Get Logical volume of preamplifier.
G4LogicalVolume * wrapped_crystal(const shape_t *s, const std::string &endcap, double wrapthickness)
Wrapped crystal.
static G4Material * get(const std::string &name)
Find given material.
double atan(double a)
atan for double
double sqrt(double a)
sqrt for double
const int c_NCrystalsForwardBarrel
Number of crystals in the forward and barrel ECL.
Common code concerning the geometry representation of the detector.
Abstract base class for different kinds of events.
simple struct with z and r coordinates