49 if (
theGeometries[idx]==0)
throw cms::Exception(
"NoGeometry") <<
"No Tracking Geometry is available for DetId " <<
id.rawId() << std::endl;
57 if ( ! result.empty() )
return result;
58 for(std::vector<const TrackingGeometry*>::const_iterator
geom =
theGeometries.begin();
61 if (*
geom == 0)
continue;
63 if (
detTypes.size()+result.size()<result.capacity() ) result.resize(
detTypes.size()+result.size());
64 for( DetTypeContainer::const_iterator detType =
detTypes.begin(); detType!=
detTypes.end(); detType++)
65 result.push_back(*detType);
73 if ( ! result.empty() )
return result;
74 for(std::vector<const TrackingGeometry*>::const_iterator
geom =
theGeometries.begin();
77 if (*
geom == 0)
continue;
79 if (
detUnits.size()+result.size()<result.capacity() ) result.resize(
detUnits.size()+result.size());
80 for( DetUnitContainer::const_iterator detUnit =
detUnits.begin(); detUnit!=
detUnits.end(); detUnit++)
81 result.push_back(*detUnit);
89 if ( ! result.empty() )
return result;
90 for(std::vector<const TrackingGeometry*>::const_iterator
geom =
theGeometries.begin();
93 if (*
geom == 0)
continue;
95 if (
dets.size()+result.size()<result.capacity() ) result.resize(
dets.size()+result.size());
96 for( DetContainer::const_iterator det =
dets.begin(); det!=
dets.end(); det++)
97 result.push_back(*det);
105 if ( ! result.empty() )
return result;
106 for(std::vector<const TrackingGeometry*>::const_iterator
geom =
theGeometries.begin();
109 if (*
geom == 0)
continue;
111 if (
detUnitIds.size()+result.size()<result.capacity() ) result.resize(
detUnitIds.size()+result.size());
112 for( DetIdContainer::const_iterator detUnitId =
detUnitIds.begin(); detUnitId!=
detUnitIds.end(); detUnitId++)
113 result.push_back(*detUnitId);
121 if ( ! result.empty() )
return result;
122 for(std::vector<const TrackingGeometry*>::const_iterator
geom =
theGeometries.begin();
125 if (*
geom == 0)
continue;
127 if (
detIds.size()+result.size()<result.capacity() ) result.resize(
detIds.size()+result.size());
128 for( DetIdContainer::const_iterator detId =
detIds.begin(); detId!=
detIds.end(); detId++)
129 result.push_back(*detId);
std::vector< const TrackingGeometry * > theGeometries
std::vector< GeomDet * > DetContainer
virtual const GeomDet * idToDet(DetId) const
virtual const GeomDetUnit * idToDetUnit(DetId) const =0
Return the pointer to the GeomDetUnit corresponding to a given DetId.
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::vector< GeomDetUnit * > DetUnitContainer
const TrackingGeometry * slaveGeometry(DetId id) const
Return the pointer to the actual geometry for a given DetId.
virtual ~GlobalTrackingGeometry()
Destructor.
virtual const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.
std::vector< GeomDetType * > DetTypeContainer
virtual const DetIdContainer & detIds() const
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
virtual const DetContainer & dets() const
Returm a vector of all GeomDet (including all GeomDetUnits)
GlobalTrackingGeometry(std::vector< const TrackingGeometry * > &geos)
Constructor.
virtual const GeomDet * idToDet(DetId) const =0
virtual const DetTypeContainer & detTypes() const
Return a vector of all det types.
virtual const DetIdContainer & detUnitIds() const
Returm a vector of all GeomDetUnit DetIds.
std::vector< DetId > DetIdContainer