CMS 3D CMS Logo

GlobalDetLayerGeometry.cc
Go to the documentation of this file.
4 
5 const DetLayer*
7  if(detId.det() == DetId::Tracker) return tracker_->idToLayer(detId);
8  else if(detId.det() == DetId::Muon) return muon_->idToLayer(detId);
9  else if(mtd_ != nullptr &&
10  detId.det() == DetId::Forward &&
11  detId.subdetId() == FastTime ) return mtd_->idToLayer(detId);
12  else{
13  throw cms::Exception("DetLayers")
14  << "Error: called GlobalDetLayerGeometry::idToLayer() for a detId which is neither Tracker nor Muon " << (mtd_ == nullptr ? "" : "nor MTD ")
15  << detId;
16  }
17 
18 }
19 
20 
const DetLayer * idToLayer(const DetId &detId) const override
return the DetLayer which correspond to a certain DetId
const MTDDetLayerGeometry * mtd_
const DetLayer * idToLayer(const DetId &detId) const override
Give the DetId of a module, returns the pointer to the corresponding DetLayer.
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
const MuonDetLayerGeometry * muon_
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition: typelookup.h:102
Definition: DetId.h:18
const DetLayer * idToLayer(const DetId &detId) const override
return the DetLayer which correspond to a certain DetId
const GeometricSearchTracker * tracker_
const DetLayer * idToLayer(const DetId &detId) const override
Give the DetId of a module, returns the pointer to the corresponding DetLayer.
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39