CMS 3D CMS Logo

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)
 
const DetLayeridToLayer (const DetId &detId) const override
 Give the DetId of a module, returns the pointer to the corresponding DetLayer. More...
 
 ~GlobalDetLayerGeometry () override
 
- 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_
GlobalDetLayerGeometry::~GlobalDetLayerGeometry ( )
inlineoverride

Definition at line 25 of file GlobalDetLayerGeometry.h.

References idToLayer().

25 {}

Member Function Documentation

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

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_.

Referenced by ~GlobalDetLayerGeometry().

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 }
const DetLayer * idToLayer(const DetId &detId) const override
return the DetLayer which correspond to a certain DetId
const MuonDetLayerGeometry * muon_
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

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().