CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
DTGeometry Class Reference

#include <DTGeometry.h>

Inheritance diagram for DTGeometry:
TrackingGeometry

Public Member Functions

const DTChamberchamber (const DTChamberId &id) const
 Return a DTChamber given its id. More...
 
const std::vector< const DTChamber * > & chambers () const
 Return a vector of all Chamber. More...
 
const DetIdContainerdetIds () const override
 Returm a vector of all GeomDet DetIds (including those of GeomDetUnits) More...
 
const DetContainerdets () const override
 Returm a vector of all GeomDet (including all GeomDetUnits) More...
 
const DetTypeContainerdetTypes () const override
 Return a vector of all det types. More...
 
const DetIdContainerdetUnitIds () const override
 Returm a vector of all GeomDetUnit DetIds. More...
 
const DetContainerdetUnits () const override
 Returm a vector of all GeomDet. More...
 
 DTGeometry ()
 Default constructor. More...
 
const GeomDetidToDet (DetId) const override
 
const GeomDetidToDetUnit (DetId) const override
 Return the pointer to the GeomDetUnit corresponding to a given DetId. More...
 
const DTLayerlayer (const DTLayerId &id) const
 Return a layer given its id. More...
 
const std::vector< const DTLayer * > & layers () const
 Return a vector of all SuperLayer. More...
 
const DTSuperLayersuperLayer (const DTSuperLayerId &id) const
 Return a DTSuperLayer given its id. More...
 
const std::vector< const DTSuperLayer * > & superLayers () const
 Return a vector of all SuperLayer. More...
 
 ~DTGeometry () override
 Destructor. More...
 
- Public Member Functions inherited from TrackingGeometry
virtual ~TrackingGeometry ()
 Destructor. More...
 

Private Types

typedef std::map< DetId, GeomDet * > DTDetMap
 

Private Member Functions

void add (DTChamber *ch)
 Add a DTChamber to Geometry. More...
 
void add (DTSuperLayer *sl)
 Add a DTSuperLayer to Geometry. More...
 
void add (DTLayer *l)
 Add a DTLayer to Geometry. More...
 

Private Attributes

std::vector< const DTChamber * > theChambers
 
DetIdContainer theDetIds
 
DetContainer theDets
 
DetTypeContainer theDetTypes
 
DetIdContainer theDetUnitIds
 
DetContainer theDetUnits
 
std::vector< const DTLayer * > theLayers
 
DTDetMap theMap
 
std::vector< const DTSuperLayer * > theSuperLayers
 

Friends

class DTGeometryBuilderFromCondDB
 
class DTGeometryBuilderFromDDD
 
class GeometryAligner
 

Additional Inherited Members

- Public Types inherited from TrackingGeometry
using DetContainer = std::vector< const GeomDet * >
 
using DetIdContainer = std::vector< DetId >
 
using DetTypeContainer = std::vector< const GeomDetType * >
 
using mapIdToDet = std::unordered_map< unsigned int, const GeomDet * >
 
using mapIdToDetUnit = std::unordered_map< unsigned int, const GeomDet * >
 

Detailed Description

The model of the geometry of Muon Drift Tube detectors.

The geometry owns the DTChamber s; these own their DTSuperLayer s which in turn own their DTLayer s.

Author
N. Amapane - CERN

Definition at line 25 of file DTGeometry.h.

Member Typedef Documentation

typedef std::map<DetId, GeomDet*> DTGeometry::DTDetMap
private

Definition at line 27 of file DTGeometry.h.

Constructor & Destructor Documentation

DTGeometry::DTGeometry ( )

Default constructor.

Definition at line 12 of file DTGeometry.cc.

12 {}
DTGeometry::~DTGeometry ( )
override

Destructor.

Definition at line 14 of file DTGeometry.cc.

References theChambers.

14  {
15  // delete all the chambers (which will delete the SL which will delete the
16  // layers)
17  for (auto & theChamber : theChambers) delete theChamber;
18 }
std::vector< const DTChamber * > theChambers
Definition: DTGeometry.h:102

Member Function Documentation

void DTGeometry::add ( DTChamber ch)
private

Add a DTChamber to Geometry.

Definition at line 26 of file DTGeometry.cc.

References GeomDet::geographicalId(), theChambers, theDets, and theMap.

Referenced by counter.Counter::register().

26  {
27  theDets.emplace_back(ch);
28  theChambers.emplace_back(ch);
29  theMap.insert(DTDetMap::value_type(ch->geographicalId(),ch));
30 }
DTDetMap theMap
Definition: DTGeometry.h:111
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
std::vector< const DTChamber * > theChambers
Definition: DTGeometry.h:102
DetContainer theDets
Definition: DTGeometry.h:116
void DTGeometry::add ( DTSuperLayer sl)
private

Add a DTSuperLayer to Geometry.

Definition at line 33 of file DTGeometry.cc.

References GeomDet::geographicalId(), theDets, theMap, and theSuperLayers.

Referenced by counter.Counter::register().

33  {
34  theDets.emplace_back(sl);
35  theSuperLayers.emplace_back(sl);
36  theMap.insert(DTDetMap::value_type(sl->geographicalId(),sl));
37 }
DTDetMap theMap
Definition: DTGeometry.h:111
std::vector< const DTSuperLayer * > theSuperLayers
Definition: DTGeometry.h:107
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
DetContainer theDets
Definition: DTGeometry.h:116
void DTGeometry::add ( DTLayer l)
private

Add a DTLayer to Geometry.

Definition at line 40 of file DTGeometry.cc.

References GeomDet::geographicalId(), checklumidiff::l, theDets, theDetUnits, theLayers, and theMap.

Referenced by counter.Counter::register().

40  {
41  theDetUnits.emplace_back(l);
42  theDets.emplace_back(l);
43  theLayers.emplace_back(l);
45 }
DTDetMap theMap
Definition: DTGeometry.h:111
std::vector< const DTLayer * > theLayers
Definition: DTGeometry.h:108
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
DetContainer theDetUnits
Definition: DTGeometry.h:115
DetContainer theDets
Definition: DTGeometry.h:116
const DTChamber * DTGeometry::chamber ( const DTChamberId id) const
const std::vector< const DTChamber * > & DTGeometry::chambers ( ) const
const DTGeometry::DetIdContainer & DTGeometry::detIds ( ) const
overridevirtual

Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)

Implements TrackingGeometry.

Definition at line 64 of file DTGeometry.cc.

References theDetIds.

64  {
65  // FIXME - fill it at runtime
66  return theDetIds;
67 }
DetIdContainer theDetIds
Definition: DTGeometry.h:122
const DTGeometry::DetContainer & DTGeometry::dets ( ) const
overridevirtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 53 of file DTGeometry.cc.

References theDets.

53  {
54  return theDets;
55 }
DetContainer theDets
Definition: DTGeometry.h:116
const DTGeometry::DetTypeContainer & DTGeometry::detTypes ( ) const
overridevirtual

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 20 of file DTGeometry.cc.

References theDetTypes.

20  {
21  // FIXME - fill it at runtime
22  return theDetTypes;
23 }
DetTypeContainer theDetTypes
Definition: DTGeometry.h:120
const DTGeometry::DetIdContainer & DTGeometry::detUnitIds ( ) const
overridevirtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 58 of file DTGeometry.cc.

References theDetUnitIds.

58  {
59  // FIXME - fill it at runtime
60  return theDetUnitIds;
61 }
DetIdContainer theDetUnitIds
Definition: DTGeometry.h:121
const DTGeometry::DetContainer & DTGeometry::detUnits ( ) const
overridevirtual

Returm a vector of all GeomDet.

Implements TrackingGeometry.

Definition at line 48 of file DTGeometry.cc.

References theDetUnits.

48  {
49  return theDetUnits;
50 }
DetContainer theDetUnits
Definition: DTGeometry.h:115
const GeomDet * DTGeometry::idToDet ( DetId  ) const
overridevirtual

Return the pointer to the GeomDet corresponding to a given DetId (valid also for GeomDetUnits)

Implements TrackingGeometry.

Definition at line 75 of file DTGeometry.cc.

References mps_fire::i, and theMap.

Referenced by MuonGeometrySanityCheck::analyze(), RPCEfficiency::analyze(), MuonDTDetLayerGeometryBuilder::buildLayers(), DTSegmentUpdator::calculateT0corr(), chamber(), DTSegtoRPC::DTSegtoRPC(), DTSegmentUpdator::fit(), idToDetUnit(), layer(), MuonSegmentProducer::produce(), TrackerToMuonPropagator::produce(), DTSurvey::ReadChambers(), DTSegmentUpdator::rejectBadHits(), superLayer(), TracktoRPC::TracktoRPC(), and DTSegmentUpdator::update().

75  {
76  // Strip away wire#, if any!
77  DTLayerId lId(id.rawId());
78  DTDetMap::const_iterator i = theMap.find(lId);
79  return (i != theMap.end()) ?
80  i->second : nullptr ;
81 }
DTDetMap theMap
Definition: DTGeometry.h:111
const GeomDet * DTGeometry::idToDetUnit ( DetId  ) const
overridevirtual

Return the pointer to the GeomDetUnit corresponding to a given DetId.

Implements TrackingGeometry.

Definition at line 70 of file DTGeometry.cc.

References idToDet().

Referenced by MuonSimHitsValidAnalyzer::fillDT(), and MuonSimHitProducer::produce().

70  {
71  return dynamic_cast<const GeomDet*>(idToDet(id));
72 }
const GeomDet * idToDet(DetId) const override
Definition: DTGeometry.cc:75
const DTLayer * DTGeometry::layer ( const DTLayerId id) const
const std::vector< const DTLayer * > & DTGeometry::layers ( ) const

Return a vector of all SuperLayer.

Definition at line 94 of file DTGeometry.cc.

References theLayers.

Referenced by FWRecoGeometryESProducer::addDTGeometry(), DTDCSByLumiTask::endLuminosityBlock(), and ValidateGeometry::validateDTLayerGeometry().

94  {
95  return theLayers;
96 }
std::vector< const DTLayer * > theLayers
Definition: DTGeometry.h:108
const DTSuperLayer * DTGeometry::superLayer ( const DTSuperLayerId id) const
const std::vector< const DTSuperLayer * > & DTGeometry::superLayers ( ) const

Return a vector of all SuperLayer.

Definition at line 89 of file DTGeometry.cc.

References theSuperLayers.

Referenced by DTTTrigWriter::analyze(), DTVDriftWriter::endJob(), DTTTrigCorrection::endJob(), and dtCalibration::DTTTrigFillWithAverage::getAverage().

89  {
90  return theSuperLayers;
91 }
std::vector< const DTSuperLayer * > theSuperLayers
Definition: DTGeometry.h:107

Friends And Related Function Documentation

friend class DTGeometryBuilderFromCondDB
friend

Definition at line 85 of file DTGeometry.h.

friend class DTGeometryBuilderFromDDD
friend

Definition at line 84 of file DTGeometry.h.

friend class GeometryAligner
friend

Definition at line 87 of file DTGeometry.h.

Member Data Documentation

std::vector<const DTChamber*> DTGeometry::theChambers
private

Definition at line 102 of file DTGeometry.h.

Referenced by add(), chambers(), and ~DTGeometry().

DetIdContainer DTGeometry::theDetIds
private

Definition at line 122 of file DTGeometry.h.

Referenced by detIds().

DetContainer DTGeometry::theDets
private

Definition at line 116 of file DTGeometry.h.

Referenced by add(), and dets().

DetTypeContainer DTGeometry::theDetTypes
private

Definition at line 120 of file DTGeometry.h.

Referenced by detTypes().

DetIdContainer DTGeometry::theDetUnitIds
private

Definition at line 121 of file DTGeometry.h.

Referenced by detUnitIds().

DetContainer DTGeometry::theDetUnits
private

Definition at line 115 of file DTGeometry.h.

Referenced by add(), and detUnits().

std::vector<const DTLayer*> DTGeometry::theLayers
private

Definition at line 108 of file DTGeometry.h.

Referenced by add(), and layers().

DTDetMap DTGeometry::theMap
private

Definition at line 111 of file DTGeometry.h.

Referenced by add(), and idToDet().

std::vector<const DTSuperLayer*> DTGeometry::theSuperLayers
private

Definition at line 107 of file DTGeometry.h.

Referenced by add(), and superLayers().