test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
GlobalDetLayerGeometry Class Reference

#include <GlobalDetLayerGeometry.h>

Inheritance diagram for GlobalDetLayerGeometry:
DetLayerGeometry

Public Member Functions

 GlobalDetLayerGeometry (const GeometricSearchTracker *tracker, const MuonDetLayerGeometry *muon)
 
virtual const DetLayeridToLayer (const DetId &detId) const
 Give the DetId of a module, returns the pointer to the corresponding DetLayer. More...
 
virtual ~GlobalDetLayerGeometry ()
 
- Public Member Functions inherited from DetLayerGeometry
 DetLayerGeometry ()
 
virtual ~DetLayerGeometry ()
 

Private Attributes

const MuonDetLayerGeometrymuon_
 
const GeometricSearchTrackertracker_
 

Detailed Description

Definition at line 19 of file GlobalDetLayerGeometry.h.

Constructor & Destructor Documentation

GlobalDetLayerGeometry::GlobalDetLayerGeometry ( const GeometricSearchTracker tracker,
const MuonDetLayerGeometry muon 
)
inline

Definition at line 21 of file GlobalDetLayerGeometry.h.

22  :
23  tracker_(tracker),muon_(muon){};
const MuonDetLayerGeometry * muon_
const GeometricSearchTracker * tracker_
virtual GlobalDetLayerGeometry::~GlobalDetLayerGeometry ( )
inlinevirtual

Definition at line 25 of file GlobalDetLayerGeometry.h.

25 {}

Member Function Documentation

const DetLayer * GlobalDetLayerGeometry::idToLayer ( const DetId detId) const
virtual

Give the DetId of a module, returns the pointer to the corresponding DetLayer.

Reimplemented from DetLayerGeometry.

Definition at line 5 of file GlobalDetLayerGeometry.cc.

References DetId::det(), Exception, GeometricSearchTracker::idToLayer(), MuonDetLayerGeometry::idToLayer(), muon_, and tracker_.

5  {
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 }
virtual const DetLayer * idToLayer(const DetId &detId) const override
return the DetLayer which correspond to a certain DetId
const MuonDetLayerGeometry * muon_
virtual const DetLayer * idToLayer(const DetId &detId) const
Give the DetId of a module, returns the pointer to the corresponding DetLayer.
const GeometricSearchTracker * tracker_
Detector det() const
get the detector field from this detid
Definition: DetId.h:35

Member Data Documentation

const MuonDetLayerGeometry* GlobalDetLayerGeometry::muon_
private

Definition at line 40 of file GlobalDetLayerGeometry.h.

Referenced by idToLayer().

const GeometricSearchTracker* GlobalDetLayerGeometry::tracker_
private

Definition at line 39 of file GlobalDetLayerGeometry.h.

Referenced by idToLayer().