27 #include "GaudiKernel/MsgStream.h"
38 , m_intersection(false)
40 , m_boundsOrientation()
52 , m_boundsOrientation()
58 , m_first(bobo.m_first)
59 , m_second(bobo.m_second)
60 , m_intersection(bobo.m_intersection)
61 , m_objectAccessor(bobo.m_objectAccessor)
62 , m_boundsOrientation()
71 m_boundsOrientation.clear();
92 const std::vector<const Trk::Surface*>*
96 std::vector<const Trk::Surface*>* retsf =
97 new std::vector<const Trk::Surface*>;
103 &(m_first->volumeBounds()));
108 &(m_first->volumeBounds()));
111 const std::vector<const Trk::Surface*>* firstSurfaces =
114 const std::vector<const Trk::Surface*>* secondSurfaces =
115 m_second->volumeBounds().decomposeToSurfaces(
116 transf * m_second->transform());
117 unsigned int nSurf = firstSurfaces->size() + secondSurfaces->size();
118 m_boundsOrientation.resize(nSurf);
120 std::vector<unsigned int> subtrSecond;
124 for (
unsigned int out = 0;
out < firstSurfaces->size();
out++) {
143 else if (cylVol && clo &&
out == 3)
144 m_boundsOrientation[
out] =
false;
145 else if (spbVol &&
out == 0)
146 m_boundsOrientation[
out] =
false;
148 m_boundsOrientation[
out] =
true;
167 throw std::logic_error(
"Not a VolumeExcluder");
172 if (!shared && !m_intersection)
176 if (!shared && m_intersection)
179 if (shared && m_intersection)
183 if (shared && !m_intersection)
187 bool new_shared = shared;
197 }
else if (plo || clo || dlo) {
209 throw std::logic_error(
"Not DiscBounds");
212 db->rMin(),
db->rMin(),
db->rMax(),
db->rMax(),
db->halfPhiSector());
219 throw std::runtime_error(
220 "Unhandled surface in CombinedVolumeBounds::decomposeToSurfaces.");
227 &(m_second->volumeBounds()));
231 &(m_second->volumeBounds()));
232 unsigned int nOut = firstSurfaces->size();
234 for (
unsigned int in = 0; in < secondSurfaces->size(); in++) {
239 dynamic_cast<const PlaneSurface*
>((*secondSurfaces)[in]);
245 dynamic_cast<const DiscSurface*
>((*secondSurfaces)[in]);
253 else if (cylVol && cli && in == 3)
254 m_boundsOrientation[nOut + in] =
false;
255 else if (spbVol && in == 0)
256 m_boundsOrientation[nOut + in] =
false;
258 m_boundsOrientation[nOut + in] =
true;
276 throw std::logic_error(
"Not a VolumeExcluder");
280 if (!shared && !m_intersection)
284 if (!shared && m_intersection)
287 if (shared && m_intersection)
291 if (shared && !m_intersection)
295 bool new_shared = shared;
305 }
else if (pli || cli || dli) {
317 throw std::logic_error(
"Not DiscBounds");
320 db->rMin(),
db->rMin(),
db->rMax(),
db->rMax(),
db->halfPhiSector());
327 throw std::runtime_error(
328 "Unhandled surface in CombinedVolumeBounds::decomposeToSurfaces.");
332 for (
const auto *firstSurface : *firstSurfaces) {
335 for (
const auto *secondSurface : *secondSurfaces) {
336 delete secondSurface;
338 delete firstSurfaces;
339 delete secondSurfaces;
349 std::stringstream temp_sl;
350 temp_sl << std::setiosflags(std::ios::fixed);
351 temp_sl << std::setprecision(7);
352 temp_sl <<
"Trk::CombinedVolumeBounds: first,second ";
354 std::as_const(*m_first).volumeBounds().dump(sl);
355 std::as_const(*m_second).volumeBounds().dump(sl);
362 std::stringstream temp_sl;
363 temp_sl << std::setiosflags(std::ios::fixed);
364 temp_sl << std::setprecision(7);
365 temp_sl <<
"Trk::CombinedVolumeBounds: first,second ";
367 std::as_const(*m_first).volumeBounds().dump(sl);
368 std::as_const(*m_second).volumeBounds().dump(sl);