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 (DTChamberId id) const
 Return a DTChamber given its id. More...
 
const std::vector< const DTChamber * > & chambers () const
 Return a vector of all Chamber. More...
 
virtual const DetIdContainerdetIds () const override
 Returm a vector of all GeomDet DetIds (including those of GeomDetUnits) More...
 
virtual const DetContainerdets () const override
 Returm a vector of all GeomDet (including all GeomDetUnits) More...
 
virtual const DetTypeContainerdetTypes () const override
 Return a vector of all det types. More...
 
virtual const DetIdContainerdetUnitIds () const override
 Returm a vector of all GeomDetUnit DetIds. More...
 
virtual const DetUnitContainerdetUnits () const override
 Returm a vector of all GeomDetUnit. More...
 
 DTGeometry ()
 Default constructor. More...
 
virtual const GeomDetidToDet (DetId) const override
 
virtual const GeomDetUnitidToDetUnit (DetId) const override
 Return the pointer to the GeomDetUnit corresponding to a given DetId. More...
 
const DTLayerlayer (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 (DTSuperLayerId id) const
 Return a DTSuperLayer given its id. More...
 
const std::vector< const DTSuperLayer * > & superLayers () const
 Return a vector of all SuperLayer. More...
 
virtual ~DTGeometry ()
 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
 
DetUnitContainer 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
typedef std::vector< GeomDet const * > DetContainer
 
typedef std::vector< DetIdDetIdContainer
 
typedef std::vector< GeomDetType const * > DetTypeContainer
 
typedef std::vector< GeomDetUnit const * > DetUnitContainer
 
typedef std::unordered_map< unsigned int, GeomDet const * > mapIdToDet
 
typedef std::unordered_map< unsigned int, GeomDetUnit const * > mapIdToDetUnit
 

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

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 ich=theChambers.begin();
18  ich!=theChambers.end(); ++ich) delete (*ich);
19 }
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 27 of file DTGeometry.cc.

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

Referenced by counter.Counter::register().

27  {
28  theDets.push_back(ch);
29  theChambers.push_back(ch);
30  theMap.insert(DTDetMap::value_type(ch->geographicalId(),ch));
31 }
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 34 of file DTGeometry.cc.

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

Referenced by counter.Counter::register().

34  {
35  theDets.push_back(sl);
36  theSuperLayers.push_back(sl);
37  theMap.insert(DTDetMap::value_type(sl->geographicalId(),sl));
38 }
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 41 of file DTGeometry.cc.

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

Referenced by counter.Counter::register().

41  {
42  theDetUnits.push_back(l);
43  theDets.push_back(l);
44  theLayers.push_back(l);
46 }
DetUnitContainer theDetUnits
Definition: DTGeometry.h:115
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 theDets
Definition: DTGeometry.h:116
const DTChamber * DTGeometry::chamber ( 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 65 of file DTGeometry.cc.

References theDetIds.

65  {
66  // FIXME - fill it at runtime
67  return theDetIds;
68 }
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 54 of file DTGeometry.cc.

References theDets.

54  {
55  return theDets;
56 }
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 21 of file DTGeometry.cc.

References theDetTypes.

21  {
22  // FIXME - fill it at runtime
23  return theDetTypes;
24 }
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 59 of file DTGeometry.cc.

References theDetUnitIds.

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

Returm a vector of all GeomDetUnit.

Implements TrackingGeometry.

Definition at line 49 of file DTGeometry.cc.

References theDetUnits.

49  {
50  return theDetUnits;
51 }
DetUnitContainer 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 76 of file DTGeometry.cc.

References i, and theMap.

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

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

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

Implements TrackingGeometry.

Definition at line 71 of file DTGeometry.cc.

References idToDet().

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

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

Return a vector of all SuperLayer.

Definition at line 95 of file DTGeometry.cc.

References theLayers.

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

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

Return a vector of all SuperLayer.

Definition at line 90 of file DTGeometry.cc.

References theSuperLayers.

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

90  {
91  return theSuperLayers;
92 }
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().

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