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)
 
 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::GlobalDetLayerGeometry ( const GeometricSearchTracker tracker,
const MuonDetLayerGeometry muon 
)
inline

Definition at line 22 of file GlobalDetLayerGeometry.h.

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

Definition at line 26 of file GlobalDetLayerGeometry.h.

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

Definition at line 31 of file GlobalDetLayerGeometry.h.

References idToLayer().

31 {}

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 6 of file GlobalDetLayerGeometry.cc.

References DetId::det(), Exception, FastTime, DetId::Forward, GeometricSearchTracker::idToLayer(), MTDDetLayerGeometry::idToLayer(), MuonDetLayerGeometry::idToLayer(), mtd_, DetId::Muon, muon_, DetId::subdetId(), DetId::Tracker, and tracker_.

Referenced by ~GlobalDetLayerGeometry().

6  {
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 }
const DetLayer * idToLayer(const DetId &detId) const override
return the DetLayer which correspond to a certain DetId
const MTDDetLayerGeometry * mtd_
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_
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

Member Data Documentation

const MTDDetLayerGeometry* GlobalDetLayerGeometry::mtd_
private

Definition at line 47 of file GlobalDetLayerGeometry.h.

Referenced by idToLayer().

const MuonDetLayerGeometry* GlobalDetLayerGeometry::muon_
private

Definition at line 46 of file GlobalDetLayerGeometry.h.

Referenced by idToLayer().

const GeometricSearchTracker* GlobalDetLayerGeometry::tracker_
private

Definition at line 45 of file GlobalDetLayerGeometry.h.

Referenced by idToLayer().