84{
85
88
90
92
93
94
95
96
97
98
99
100
101
111
112
113
114
115 GeoTrf::Vector3D
a(0.0, 0.5 * sensorWidth, 0.5 * sensorLength);
116 GeoTrf::Vector3D
b(0.0, -0.5 * sensorWidth,
a.z());
117 GeoTrf::Vector3D
c(0.0,
b.y(),-0.5 * sensorLength);
118 GeoTrf::Vector3D
d(0.0,
a.y(),
c.z());
119
120
121 GeoTrf::Vector3D
e(0.0,
a.y(),
a.z());
122 GeoTrf::Vector3D
f(0.0,
b.y(),
b.z());
123 GeoTrf::Vector3D
g(0.0,
c.y(),
c.z());
124 GeoTrf::Vector3D
h(0.0,
d.y(),
d.z());
125
126
127 GeoTrf::Vector3D
u(0.0,
132 GeoTrf::Vector3D
x(0.0,
u.y(),
w.z());
133
134
135 GeoTrf::Vector3D
i(0.0,
136 0.5*outerSideHybridWidth,
137 m_outerSide->hybridOffsetZ() + 0.5*outerSidePigtailLength);
138 GeoTrf::Vector3D
l(0.0,
139 -0.5*outerSideHybridWidth -
m_outerSide->pigtail()->width(),
i.z());
140 GeoTrf::Vector3D
m(0.0,
l.y(),
141 m_outerSide->hybridOffsetZ() - 0.5*outerSidePigtailLength);
142 GeoTrf::Vector3D
p(0.0,
i.y(),
144
145
146
147
148 GeoTrf::Vector3D
q(0.0, 0.5*outerSideHybridWidth,
m_outerSide->hybridOffsetZ() + 0.5*outerSideHybridLength );
149 GeoTrf::Vector3D
r(0.0, -0.5*innerSideHybridWidth,
q.z());
150 GeoTrf::Vector3D
s(0.0,
r.y(),
m_innerSide->hybridOffsetZ() - 0.5*innerSideHybridLength);
151 GeoTrf::Vector3D
t(0.0,
q.y(),
s.z());
152
153
158
163
165
168
170
175
176
177 const double z_ab = std::max(
a.z(),
b.z());
178 const double z_ef = std::max(
e.z(),
f.z());
179 const double z_cd = std::min(
c.z(),
d.z());
180 const double z_gh = std::min(
g.z(),
h.z());
181
182 const double y_ad = std::max(
a.y(),
d.y());
183 const double y_eh = std::max(
e.y(),
h.y());
184 const double y_bc = std::min(
b.y(),
c.y());
185 const double y_fg = std::min(
f.y(),
g.y());
186
187 const double zmaxEnv1 = std::max(z_ab, z_ef);
188 const double zminEnv1 = std::min(z_cd, z_gh);
189
190 const double ypre_maxEnv1 = std::max(y_ad, y_eh);
191 const double ypre_minEnv1 = std::min(y_bc, y_fg);
192
193 const double ymaxEnv1 = std::max(ypre_maxEnv1,
u.y());
194 const double yminEnv1 = std::min(ypre_minEnv1,
v.y());
195
196
198 const double lengthEnv1 = zmaxEnv1 - zminEnv1;
199 const double widthEnv1 = ymaxEnv1 - yminEnv1;
200
201
202 const double xCenterEnv1 = 0.0;
203 const double yCenterEnv1 = yminEnv1 + 0.5*widthEnv1;
204 const double zCenterEnv1 = zmaxEnv1 - 0.5*lengthEnv1;
205
206 m_env1RefPointVector = std::make_unique<GeoTrf::Vector3D>(-xCenterEnv1, -yCenterEnv1, -zCenterEnv1);
207
208
209 const double z_ikl = std::max(
i.z(),
l.z());
210 const double z_qr = std::max(
q.z(),
r.z());
211 const double z_mnp = std::min(
m.z(),
p.z());
212 const double z_st = std::min(
s.z(),
t.z());
213
214 const double y_ip = std::max(
i.y(),
p.y());
215 const double y_qt = std::max(
q.y(),
t.y());
216 const double y_lm = std::min(
l.y(),
m.y());
217 const double y_rs = std::min(
r.y(),
s.y());
218
219 const double zmaxEnv2 = std::max(z_ikl, z_qr);
220 const double zminEnv2 = std::min(z_mnp, z_st);
221
222 const double ymaxEnv2 = std::max(y_ip, y_qt);
223 const double yminEnv2 = std::min(y_lm, y_rs);
224
225 const double thicknessEnv2 = 2.0*(
m_outerSide->hybridOffsetX() +
229 const double lengthEnv2 = zmaxEnv2 - zminEnv2;
230 const double widthEnv2 = ymaxEnv2 - yminEnv2;
231
232
233 const double xCenterEnv2 = 0.0;
234 const double yCenterEnv2 = ymaxEnv2 - 0.5*widthEnv2;
235 const double zCenterEnv2 = zmaxEnv2 - 0.5*lengthEnv2;
236
237 m_env2RefPointVector = std::make_unique<GeoTrf::Vector3D>(-xCenterEnv2, -yCenterEnv2, -zCenterEnv2);
238
239
241 const double xminSubBox = - 0.5*thicknessEnv2 - 2.0*
m_safety;
242
243 const double ymaxSubBox = std::min(
r.y(),
s.y()) -
m_safety;
244 const double yminSubBox = yminEnv2 - 2.0*
m_safety;
245
246 const double zmaxSubBox = zmaxEnv1 + 2.0*
m_safety;
247 const double zminSubBox = zminEnv1 - 2.0*
m_safety;
248
249 const double thicknessSubBox = xmaxSubBox - xminSubBox;
250 const double widthSubBox = ymaxSubBox - yminSubBox;
251 const double lengthSubBox = zmaxSubBox - zminSubBox;
252
253
254 const double xCenterSubBox = xmaxSubBox - 0.5*thicknessSubBox;
255 const double yCenterSubBox = ymaxSubBox - 0.5*widthSubBox;
256 const double zCenterSubBox = zmaxSubBox - 0.5*lengthSubBox;
257
258
262
266
267
268
273
274
277
278
279
280
283
284 const GeoBox * subBox = new GeoBox(0.5*thicknessSubBox, 0.5*widthSubBox, 0.6*lengthSubBox);
285
286
287 const GeoShape & moduleEnvelope = (*envelope1 << GeoTrf::Translate3D(xCenterEnv1, yCenterEnv1, zCenterEnv1)).
288 add(*envelope2 << GeoTrf::Translate3D(xCenterEnv2, yCenterEnv2, zCenterEnv2)).
289 subtract(*subBox << GeoTrf::Translate3D(xCenterSubBox, yCenterSubBox, zCenterSubBox));
290
291 const GeoLogVol * moduleLog =
new GeoLogVol(
getName(), &moduleEnvelope,
m_materials->gasMaterial());
292
293
294
295
296 GeoTrf::Transform3D rotInner = GeoTrf::RotateX3D(
m_stereoInner) * GeoTrf::RotateZ3D(180*Gaudi::Units::deg);
297 m_innerSidePos = std::make_unique<GeoTrf::Transform3D>(GeoTrf::Transform3D(GeoTrf::Translation3D(ISPosX, 0.0, 0.0)*rotInner));
298
299
300
301
303 m_outerSidePos = std::make_unique<GeoTrf::Transform3D>(GeoTrf::Transform3D(GeoTrf::Translation3D(OSPosX, 0.0, 0.0)*rotOuter));
304
305
306
307
310 m_baseBoardPos = std::make_unique<GeoTrf::Translate3D>(0.0, baseBoardPosY, baseBoardPosZ);
311
312 return moduleLog;
313}
const std::string & getName() const
SCT_MaterialManager * m_materials
bool add(const std::string &hname, TKey *tobj)
l
Printing final latex table to .tex output file.
@ u
Enums for curvilinear frames.