CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/TrackingTools/RecoGeometry/src/GlobalDetLayerGeometry.cc

Go to the documentation of this file.
00001 #include "TrackingTools/RecoGeometry/interface/GlobalDetLayerGeometry.h"
00002 #include "FWCore/Utilities/interface/typelookup.h"
00003 
00004 const DetLayer* 
00005 GlobalDetLayerGeometry::idToLayer(const DetId& detId) const{
00006   if(detId.det() ==1) return tracker_->idToLayer(detId);
00007   else if(detId.det() ==2) return muon_->idToLayer(detId);
00008   else{
00009     throw cms::Exception("DetLayers") 
00010       << "Error: called GlobalDetLayerGeometry::idToLayer() for a detId which is neither Tracker nor Muon";      
00011   }
00012 
00013 }
00014 
00015 
00016 TYPELOOKUP_DATA_REG(GlobalDetLayerGeometry);