45 for(
unsigned int i=0;
i<6;++
i) {
51 LogDebug(
"BuildingSubDetTypeMap") <<
"GeometriDet and GeomDetEnumerators enumerator values of the subdetectors";
52 for(
unsigned int i=0;
i<subdetgd.size();++
i) {
53 assert(subdetgd[
i]->geographicalId().subdetId()>0 && subdetgd[
i]->geographicalId().subdetId()<7);
55 theNumberOfLayers[subdetgd[
i]->geographicalId().subdetId()-1]= subdetgd[
i]->components().size();
56 LogTrace(
"BuildingSubDetTypeMap") <<
"subdet " <<
i
57 <<
" Geometric Det type " << subdetgd[
i]->type()
58 <<
" Geom Det type " <<
theSubDetTypeMap[subdetgd[
i]->geographicalId().subdetId()-1]
59 <<
" detid " << subdetgd[
i]->geographicalId()
60 <<
" subdetid " << subdetgd[
i]->geographicalId().subdetId()
61 <<
" number of layers " << subdetgd[
i]->components().size();
63 LogDebug(
"SubDetTypeMapContent") <<
"Content of theSubDetTypeMap";
64 for(
unsigned int i=1;
i<7;++
i) {
67 LogDebug(
"NumberOfLayers") <<
"Content of theNumberOfLayers";
68 for(
unsigned int i=1;
i<7;++
i) {
115 switch(
id.subdetId()){
135 edm::LogError(
"TrackerGeometry")<<
"ERROR - I was expecting a Tracker Subdetector, I got a "<<
id.subdetId();
198 return static_cast<const TrackerGeomDet *>(p->second);
199 edm::LogError(
"TrackerGeometry")<<
"Invalid DetID: no GeomDetUnit associated";
208 return static_cast<const TrackerGeomDet *>(p->second);
209 edm::LogError(
"TrackerGeometry")<<
"Invalid DetID: no GeomDet associated";
215 if(subdet>=1 && subdet<=6) {
218 throw cms::Exception(
"WrongTrackerSubDet") <<
"Subdetector " << subdet;
224 if(subdet>=1 && subdet<=6) {
227 throw cms::Exception(
"WrongTrackerSubDet") <<
"Subdetector " << subdet;
233 for(
unsigned int i=1;
i<7;++
i) {
virtual const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::vector< GeomDetType const * > DetTypeContainer
void addDet(GeomDet const *p)
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
unsigned int theNumberOfLayers[6]
TrackerGeometry(GeometricDet const *gd=0)
DetIdContainer theDetUnitIds
GeomDetEnumerators::SubDetector theSubDetTypeMap[6]
unsigned int numberOfLayers(int subdet) const
ConstGeometricDetContainer & components()
DetUnitContainer theDetUnits
bool isThere(GeomDetEnumerators::SubDetector subdet) const
uint32_t rawId() const
get the raw id
virtual const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.
void addDetUnit(GeomDetUnit const *p)
virtual const DetIdContainer & detIds() const
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
mapIdToDetUnit theMapUnit
const DetContainer & detsTEC() const
DetTypeContainer theDetTypes
virtual ~TrackerGeometry()
void addType(GeomDetType const *p)
virtual const DetTypeContainer & detTypes() const
Return a vector of all det types.
const DetContainer & detsPXB() const
DetId geographicalId() const
The label of this GeomDet.
const DetContainer & detsTIB() const
std::vector< GeometricDet const * > ConstGeometricDetContainer
void addDetUnitId(DetId p)
virtual const DetIdContainer & detUnitIds() const
Returm a vector of all GeomDetUnit DetIds.
const DetContainer & detsPXF() const
const DetContainer & detsTOB() const
std::vector< GeomDet const * > DetContainer
std::vector< GeomDetUnit const * > DetUnitContainer
virtual const DetContainer & dets() const
Returm a vector of all GeomDet (including all GeomDetUnits)
const DetContainer & detsTID() const
virtual const TrackerGeomDet * idToDet(DetId) const
std::vector< DetId > DetIdContainer