test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GlobalDetLayerGeometry.cc
Go to the documentation of this file.
3 
4 const DetLayer*
6  if(detId.det() ==1) return tracker_->idToLayer(detId);
7  else if(detId.det() ==2) return muon_->idToLayer(detId);
8  else{
9  throw cms::Exception("DetLayers")
10  << "Error: called GlobalDetLayerGeometry::idToLayer() for a detId which is neither Tracker nor Muon " << detId;
11  }
12 
13 }
14 
15 
virtual const DetLayer * idToLayer(const DetId &detId) const override
return the DetLayer which correspond to a certain DetId
const MuonDetLayerGeometry * muon_
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition: typelookup.h:96
virtual const DetLayer * idToLayer(const DetId &detId) const
Give the DetId of a module, returns the pointer to the corresponding DetLayer.
Definition: DetId.h:18
const GeometricSearchTracker * tracker_
virtual const DetLayer * idToLayer(const DetId &detId) const
Give the DetId of a module, returns the pointer to the corresponding DetLayer.
Detector det() const
get the detector field from this detid
Definition: DetId.h:35