CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules 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)
 
 GlobalDetLayerGeometry (const GeometricSearchTracker *tracker, const MuonDetLayerGeometry *muon, const MTDDetLayerGeometry *mtd)
 
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 MTDDetLayerGeometrymtd_
 
const MuonDetLayerGeometrymuon_
 
const GeometricSearchTrackertracker_
 

Detailed Description

Definition at line 20 of file GlobalDetLayerGeometry.h.

Constructor & Destructor Documentation

◆ GlobalDetLayerGeometry() [1/2]

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

Definition at line 22 of file GlobalDetLayerGeometry.h.

23  : tracker_(tracker), muon_(muon), mtd_(nullptr){};
const MTDDetLayerGeometry * mtd_
const MuonDetLayerGeometry * muon_
const GeometricSearchTracker * tracker_

◆ GlobalDetLayerGeometry() [2/2]

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

Definition at line 25 of file GlobalDetLayerGeometry.h.

28  : tracker_(tracker), muon_(muon), mtd_(mtd){};
const MTDDetLayerGeometry * mtd_
const MuonDetLayerGeometry * muon_
const GeometricSearchTracker * tracker_

◆ ~GlobalDetLayerGeometry()

GlobalDetLayerGeometry::~GlobalDetLayerGeometry ( )
inlineoverride

Definition at line 30 of file GlobalDetLayerGeometry.h.

30 {}

Member Function Documentation

◆ idToLayer()

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 hcalRecHitTable_cff::detId, Exception, FastTime, DetId::Forward, MTDDetLayerGeometry::idToLayer(), GeometricSearchTracker::idToLayer(), MuonDetLayerGeometry::idToLayer(), mtd_, DetId::Muon, muon_, DetId::Tracker, and tracker_.

5  {
6  if (detId.det() == DetId::Tracker)
7  return tracker_->idToLayer(detId);
8  else if (detId.det() == DetId::Muon)
9  return muon_->idToLayer(detId);
10  else if (mtd_ != nullptr && detId.det() == DetId::Forward && detId.subdetId() == FastTime)
11  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 "
15  << (mtd_ == nullptr ? "" : "nor MTD ") << " det rawId " << detId.rawId() << " det " << detId.det()
16  << " subdetId " << detId.subdetId();
17  }
18 }
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.
const DetLayer * idToLayer(const DetId &detId) const override
return the DetLayer which correspond to a certain DetId
const MuonDetLayerGeometry * muon_
const GeometricSearchTracker * tracker_

Member Data Documentation

◆ mtd_

const MTDDetLayerGeometry* GlobalDetLayerGeometry::mtd_
private

Definition at line 45 of file GlobalDetLayerGeometry.h.

Referenced by idToLayer().

◆ muon_

const MuonDetLayerGeometry* GlobalDetLayerGeometry::muon_
private

Definition at line 44 of file GlobalDetLayerGeometry.h.

Referenced by idToLayer().

◆ tracker_

const GeometricSearchTracker* GlobalDetLayerGeometry::tracker_
private

Definition at line 43 of file GlobalDetLayerGeometry.h.

Referenced by idToLayer().