27 #include "GaudiKernel/MsgStream.h" 
   37   , m_outer(std::move(vol1))
 
   38   , m_inner(std::move(vol2))
 
   40   , m_boundsOrientation()
 
   46   , m_outer{bobo.
m_outer->clone()}
 
   47   , m_inner{bobo.m_inner->clone()}
 
   48   , m_objectAccessor(bobo.m_objectAccessor)
 
   49   , m_boundsOrientation(bobo.m_boundsOrientation)
 
   58     m_outer.reset(bobo.
m_outer->clone());
 
   59     m_inner.reset(bobo.
m_inner->clone());
 
   66 std::vector<std::unique_ptr<Trk::Surface>>
 
   71   std::vector<std::unique_ptr<Trk::Surface>> outerSurfaces =
 
   72     m_outer->volumeBounds().decomposeToSurfaces(transf * m_outer->transform());
 
   74   std::vector<std::unique_ptr<Trk::Surface>> innerSurfaces =
 
   75     m_inner->volumeBounds().decomposeToSurfaces(transf * m_inner->transform());
 
   76   std::vector<unsigned int> subtrInner;
 
   79   auto retsf = std::vector<std::unique_ptr<Trk::Surface>>();
 
   81   unsigned int nSurf = outerSurfaces.size() + innerSurfaces.size();
 
   82   m_boundsOrientation.resize(nSurf);
 
   90   for (
unsigned int out = 0; 
out < outerSurfaces.size(); 
out++) {
 
   97     if (!(splo || plo || sclo || clo || dlo)) {
 
   98       throw std::runtime_error(
"Unhandled surface.");
 
  108     else if (cylVol && clo && 
out == 3){
 
  109       m_boundsOrientation[
out] = 
false;
 
  111     else if (spbVol && 
out == 0){
 
  112       m_boundsOrientation[
out] = 
false;
 
  115       m_boundsOrientation[
out] = 
true;
 
  118     auto innerSub = std::unique_ptr<Trk::Volume>(createSubtractedVolume(
 
  119       outerSurfaces[
out]->
transform().inverse() * transf, m_inner.get()));
 
  134         throw std::logic_error(
"Not a VolumeExcluder");
 
  137       auto outerSub = std::make_unique<Trk::Volume>(*volExcl->
volume());
 
  138       std::unique_ptr<Trk::Volume> comb_sub;
 
  140         comb_sub = std::make_unique<Trk::Volume>(
 
  142             std::make_shared<Trk::CombinedVolumeBounds>(std::move(innerSub), std::move(outerSub), 
false));
 
  144         comb_sub = std::make_unique<Trk::Volume>(
 
  146           std::make_shared<Trk::SubtractedVolumeBounds>(std::move(outerSub), std::move(innerSub)));
 
  148       auto volEx = std::make_shared<const Trk::VolumeExcluder>(std::move(comb_sub));
 
  150         retsf.push_back(std::make_unique<Trk::SubtractedPlaneSurface>(*splo, std::move(volEx), shared));
 
  154           std::make_unique<Trk::SubtractedCylinderSurface>(*sclo, std::move(volEx), shared));
 
  157       auto volEx = std::make_shared<const Trk::VolumeExcluder>(std::move(innerSub));
 
  159         retsf.push_back(std::make_unique<Trk::SubtractedPlaneSurface>(*plo, std::move(volEx), 
false));
 
  162         retsf.push_back(std::make_unique<Trk::SubtractedCylinderSurface>(*clo, std::move(volEx), 
false));
 
  168           throw std::logic_error(
"Not DiscBounds");
 
  170         auto eb = std::make_shared<EllipseBounds>(
db->rMin(), 
db->rMin(), 
db->rMax(), 
db->rMax(), 
db->halfPhiSector());
 
  172         retsf.push_back(std::make_unique<Trk::SubtractedPlaneSurface>(ploA, std::move(volEx), 
false));
 
  184   unsigned int nOut = outerSurfaces.size();
 
  186   for (
unsigned int in = 0; in < innerSurfaces.size(); in++) {
 
  200     else if (cylVol && cli && in == 3){
 
  201       m_boundsOrientation[nOut + in] = 
true;
 
  203     else if (spbVol && in == 0){
 
  204       m_boundsOrientation[nOut + in] = 
true;
 
  207       m_boundsOrientation[nOut + in] = 
false;
 
  210     auto outerSub = std::unique_ptr<Trk::Volume>(createSubtractedVolume(
 
  211       innerSurfaces[in]->
transform().inverse() * transf, m_outer.get()));
 
  226         throw std::logic_error(
"Not a VolumeExcluder");
 
  229       auto innerSub = std::make_unique<Trk::Volume>(*volExcl->
volume());
 
  231       std::unique_ptr<Trk::Volume> comb_sub;
 
  233         comb_sub = std::make_unique<Trk::Volume>(
 
  235           std::make_shared<Trk::SubtractedVolumeBounds>(std::move(outerSub), std::move(innerSub)));
 
  238         comb_sub = std::make_unique<Trk::Volume>(
 
  240           std::make_shared<Trk::CombinedVolumeBounds>(std::move(innerSub), std::move(outerSub), 
true));
 
  242       auto volEx = std::make_shared<const Trk::VolumeExcluder>(std::move(comb_sub));
 
  244         retsf.push_back(std::make_unique<Trk::SubtractedPlaneSurface>(*spli, std::move(volEx), 
true));
 
  247         retsf.push_back(std::make_unique<Trk::SubtractedCylinderSurface>(*scli, std::move(volEx), 
true));
 
  250     } 
else if (pli || cli) {
 
  251       auto volEx = std::make_shared<const Trk::VolumeExcluder>(std::move(outerSub));
 
  253         retsf.push_back(std::make_unique<Trk::SubtractedPlaneSurface>(*pli, std::move(volEx), 
true));
 
  256         retsf.push_back(std::make_unique<Trk::SubtractedCylinderSurface>(*cli, std::move(volEx), 
true));
 
  262         throw std::logic_error(
"Not DiscBounds");
 
  264       auto eb = std::make_shared<EllipseBounds>(
db->rMin(), 
db->rMin(), 
db->rMax(), 
db->rMax(), 
db->halfPhiSector());
 
  266       auto volEx = std::make_shared<const Trk::VolumeExcluder>(std::move(outerSub));
 
  267       retsf.push_back(std::make_unique<Trk::SubtractedPlaneSurface>(pla, std::move(volEx), 
true));
 
  269       throw std::runtime_error(
 
  270         "Unhandled surface in " 
  271         "Trk::SubtractedVolumeBounds::decomposeToSurfaces.");
 
  283   std::stringstream temp_sl;
 
  284   temp_sl << std::setiosflags(std::ios::fixed);
 
  285   temp_sl << std::setprecision(7);
 
  286   temp_sl << 
"Trk::SubtractedVolumeBounds: outer,inner ";
 
  288   std::as_const(*m_outer).volumeBounds().dump(sl);
 
  289   std::as_const(*m_inner).volumeBounds().dump(sl);
 
  296   std::stringstream temp_sl;
 
  297   temp_sl << std::setiosflags(std::ios::fixed);
 
  298   temp_sl << std::setprecision(7);
 
  299   temp_sl << 
"Trk::SubtractedVolumeBounds: outer,inner ";
 
  301   std::as_const(*m_outer).volumeBounds().dump(sl);
 
  302   std::as_const(*m_inner).volumeBounds().dump(sl);