27 #include "GaudiKernel/MsgStream.h"
38 , m_boundsOrientation()
46 , m_boundsOrientation()
52 , m_outer(bobo.m_outer)
53 , m_inner(bobo.m_inner)
54 , m_objectAccessor(bobo.m_objectAccessor)
55 , m_boundsOrientation()
64 m_boundsOrientation.clear();
84 const std::vector<const Trk::Surface*>*
90 const std::vector<const Trk::Surface*>* outerSurfaces =
91 m_outer->volumeBounds().decomposeToSurfaces(transf * m_outer->transform());
93 const std::vector<const Trk::Surface*>* innerSurfaces =
94 m_inner->volumeBounds().decomposeToSurfaces(transf * m_inner->transform());
95 std::vector<unsigned int> subtrInner;
96 std::vector<const Trk::Surface*>* retsf =
97 new std::vector<const Trk::Surface*>;
99 unsigned int nSurf = outerSurfaces->size() + innerSurfaces->size();
100 m_boundsOrientation.resize(nSurf);
106 &(m_outer->volumeBounds()));
111 &(m_outer->volumeBounds()));
114 for (
unsigned int out = 0;
out < outerSurfaces->size();
out++) {
125 if (!(splo || plo || sclo || clo || dlo)) {
126 throw std::runtime_error(
"Unhandled surface.");
134 else if (cylVol && clo &&
out == 3)
135 m_boundsOrientation[
out] =
false;
136 else if (spbVol &&
out == 0)
137 m_boundsOrientation[
out] =
false;
139 m_boundsOrientation[
out] =
true;
158 throw std::logic_error(
"Not a VolumeExcluder");
186 throw std::logic_error(
"Not DiscBounds");
188 db->rMin(),
db->rMin(),
db->rMax(),
db->rMax(),
db->halfPhiSector());
203 &(m_inner->volumeBounds()));
207 &(m_inner->volumeBounds()));
208 unsigned int nOut = outerSurfaces->size();
210 for (
unsigned int in = 0; in < innerSurfaces->size(); in++) {
214 dynamic_cast<const PlaneSurface*
>((*innerSurfaces)[in]);
220 dynamic_cast<const DiscSurface*
>((*innerSurfaces)[in]);
227 else if (cylVol && cli && in == 3)
228 m_boundsOrientation[nOut + in] =
true;
229 else if (spbVol && in == 0)
230 m_boundsOrientation[nOut + in] =
true;
232 m_boundsOrientation[nOut + in] =
false;
251 throw std::logic_error(
"Not a VolumeExcluder");
269 }
else if (pli || cli) {
279 throw std::logic_error(
"Not DiscBounds");
281 db->rMin(),
db->rMin(),
db->rMax(),
db->rMax(),
db->halfPhiSector());
286 throw std::runtime_error(
287 "Unhandled surface in "
288 "Trk::SubtractedVolumeBounds::decomposeToSurfaces.");
292 for (
const auto *outerSurface : *outerSurfaces)
294 for (
const auto *innerSurface : *innerSurfaces)
296 delete outerSurfaces;
297 delete innerSurfaces;
307 std::stringstream temp_sl;
308 temp_sl << std::setiosflags(std::ios::fixed);
309 temp_sl << std::setprecision(7);
310 temp_sl <<
"Trk::SubtractedVolumeBounds: outer,inner ";
312 std::as_const(*m_outer).volumeBounds().dump(sl);
313 std::as_const(*m_inner).volumeBounds().dump(sl);
320 std::stringstream temp_sl;
321 temp_sl << std::setiosflags(std::ios::fixed);
322 temp_sl << std::setprecision(7);
323 temp_sl <<
"Trk::SubtractedVolumeBounds: outer,inner ";
325 std::as_const(*m_outer).volumeBounds().dump(sl);
326 std::as_const(*m_inner).volumeBounds().dump(sl);