23 #include "GeoModelRead/ReadGeoModel.h"
24 #include "GeoModelKernel/GeoShape.h"
25 #include "GeoModelKernel/GeoShapeShift.h"
26 #include "GeoModelKernel/GeoShapeUnion.h"
27 #include "GeoModelKernel/GeoBox.h"
28 #include "GeoModelKernel/GeoLogVol.h"
29 #include "GeoModelKernel/GeoPhysVol.h"
30 #include "GeoModelKernel/GeoVPhysVol.h"
31 #include "GeoModelKernel/GeoFullPhysVol.h"
32 #include "GeoModelKernel/GeoNameTag.h"
33 #include "GeoModelKernel/GeoIdentifierTag.h"
34 #include "GeoModelKernel/GeoTransform.h"
35 #include "GeoModelKernel/GeoAlignableTransform.h"
36 #include "GeoModelKernel/GeoDefinitions.h"
37 #include "GaudiKernel/SystemOfUnits.h"
38 #include "GeoModelKernel/GeoShapeSubtraction.h"
47 GeoModelIO::ReadGeoModel* sqliteReader,
48 std::shared_ptr<std::map<std::string, GeoFullPhysVol*>> mapFPV,
49 std::shared_ptr<std::map<std::string, GeoAlignableTransform*>> mapAX)
136 0.5*outerSideHybridWidth,
137 m_outerSide->hybridOffsetZ() + 0.5*outerSidePigtailLength);
139 -0.5*outerSideHybridWidth -
m_outerSide->pigtail()->width(),
i.z());
141 m_outerSide->hybridOffsetZ() - 0.5*outerSidePigtailLength);
187 const double zmaxEnv1 =
std::max(z_ab, z_ef);
188 const double zminEnv1 =
std::min(z_cd, z_gh);
190 const double ypre_maxEnv1 =
std::max(y_ad, y_eh);
191 const double ypre_minEnv1 =
std::min(y_bc, y_fg);
193 const double ymaxEnv1 =
std::max(ypre_maxEnv1,
u.y());
194 const double yminEnv1 =
std::min(ypre_minEnv1,
v.y());
198 const double lengthEnv1 = zmaxEnv1 - zminEnv1;
199 const double widthEnv1 = ymaxEnv1 - yminEnv1;
202 const double xCenterEnv1 = 0.0;
203 const double yCenterEnv1 = yminEnv1 + 0.5*widthEnv1;
204 const double zCenterEnv1 = zmaxEnv1 - 0.5*lengthEnv1;
206 m_env1RefPointVector = std::make_unique<GeoTrf::Vector3D>(-xCenterEnv1, -yCenterEnv1, -zCenterEnv1);
219 const double zmaxEnv2 =
std::max(z_ikl, z_qr);
220 const double zminEnv2 =
std::min(z_mnp, z_st);
222 const double ymaxEnv2 =
std::max(y_ip, y_qt);
223 const double yminEnv2 =
std::min(y_lm, y_rs);
225 const double thicknessEnv2 = 2.0*(
m_outerSide->hybridOffsetX() +
229 const double lengthEnv2 = zmaxEnv2 - zminEnv2;
230 const double widthEnv2 = ymaxEnv2 - yminEnv2;
233 const double xCenterEnv2 = 0.0;
234 const double yCenterEnv2 = ymaxEnv2 - 0.5*widthEnv2;
235 const double zCenterEnv2 = zmaxEnv2 - 0.5*lengthEnv2;
237 m_env2RefPointVector = std::make_unique<GeoTrf::Vector3D>(-xCenterEnv2, -yCenterEnv2, -zCenterEnv2);
241 const double xminSubBox = - 0.5*thicknessEnv2 - 2.0*
m_safety;
244 const double yminSubBox = yminEnv2 - 2.0*
m_safety;
246 const double zmaxSubBox = zmaxEnv1 + 2.0*
m_safety;
247 const double zminSubBox = zminEnv1 - 2.0*
m_safety;
249 const double thicknessSubBox = xmaxSubBox - xminSubBox;
250 const double widthSubBox = ymaxSubBox - yminSubBox;
251 const double lengthSubBox = zmaxSubBox - zminSubBox;
254 const double xCenterSubBox = xmaxSubBox - 0.5*thicknessSubBox;
255 const double yCenterSubBox = ymaxSubBox - 0.5*widthSubBox;
256 const double zCenterSubBox = zmaxSubBox - 0.5*lengthSubBox;
284 const GeoBox * subBox =
new GeoBox(0.5*thicknessSubBox, 0.5*widthSubBox, 0.6*lengthSubBox);
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));
310 m_baseBoardPos = std::make_unique<GeoTrf::Translate3D>(0.0, baseBoardPosY, baseBoardPosZ);
319 GeoFullPhysVol *
module=
nullptr;
334 GeoTransform * baseBoardTransform =
new GeoTransform(*
m_baseBoardPos);
335 module->add(baseBoardTransform);
339 GeoAlignableTransform * innerTransform =
new GeoAlignableTransform(*
m_innerSidePos);
340 module->add(innerTransform);
343 module->add(
new GeoIdentifierTag(innerSideNumber));
344 id.setSide(innerSideNumber);
352 GeoAlignableTransform * outerTransform =
new GeoAlignableTransform(*
m_outerSidePos);
353 module->add(outerTransform);
356 module->add(
new GeoIdentifierTag(outerSideNumber));
357 id.setSide(outerSideNumber);
368 id.setSide(innerSideNumber);
379 id.setSide(outerSideNumber);