16 #include "DD4hep/VolumeManager.h"
17 #include "DD4hep/Detector.h"
23 using namespace detail ;
28 SurfaceManager::SurfaceManager(Detector& theDetector){
33 VolumeManager::getVolumeManager(theDetector);
35 initialize(theDetector) ;
38 SurfaceManager::~SurfaceManager(){
45 SurfaceMapsMap::const_iterator it = _map.
find( name ) ;
47 if( it != _map.end() ){
59 for(
unsigned i=0,N=types.
size();i<N;++i){
63 for(
unsigned j=0,M=dets.
size();j<M;++j){
74 for( SurfaceList::const_iterator it = detSL.
begin() ; it != detSL.
end() ; ++it ){
78 _map[ name ].emplace(surf->
id(), surf );
81 _map[ types[i] ].emplace(surf->
id(), surf );
84 _map[
"world" ].emplace(surf->
id(), surf );
96 sstr <<
"-------- SurfaceManager contains the following maps : --------- " <<
std::endl ;
98 for( SurfaceMapsMap::const_iterator mi = _map.begin() ; mi != _map.end() ; ++mi ) {
100 sstr <<
" key: " << mi->first <<
" \t number of surfaces : " << mi->second.size() <<
std::endl ;
102 sstr <<
"---------------------------------------------------------------- " <<
std::endl ;
const SurfaceList & surfaceList()
Get the list of all surfaces added to this DetElement and all its daughters - instantiate SurfaceHelp...
Interface for tracking surfaces.
Surface helper class that allows to access all surfaces assigned to a DetElement and all its daughter...
std::multimap< unsigned long, ISurface * > SurfaceMap
typedef for surface maps, keyed by the cellID
std::list of Surfaces that optionally takes ownership.
virtual long64 id() const =0
The id of this surface - corresponds to DetElement id ( or'ed with the placement ids ) ...