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...
 
void clear ()
 
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...
 
void deallocate ()
 

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 cms::DTGeometryBuilder
 
class DTGeometryBuilderFromCondDB
 
class DTGeometryBuilderFromDD4hep
 
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 28 of file DTGeometry.h.

Member Typedef Documentation

◆ DTDetMap

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

Definition at line 29 of file DTGeometry.h.

Constructor & Destructor Documentation

◆ DTGeometry()

DTGeometry::DTGeometry ( )

Default constructor.

Definition at line 12 of file DTGeometry.cc.

12 {}

◆ ~DTGeometry()

DTGeometry::~DTGeometry ( )
override

Destructor.

Definition at line 14 of file DTGeometry.cc.

References deallocate().

14 { deallocate(); }
void deallocate()
Definition: DTGeometry.cc:16

Member Function Documentation

◆ add() [1/3]

void DTGeometry::add ( DTChamber ch)
private

Add a DTChamber to Geometry.

Definition at line 42 of file DTGeometry.cc.

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

Referenced by DTGeometryBuilderFromDDD::buildGeometry(), and counter.Counter::register().

42  {
43  theDets.emplace_back(ch);
44  theChambers.emplace_back(ch);
45  theMap.insert(DTDetMap::value_type(ch->geographicalId(), ch));
46 }
DTDetMap theMap
Definition: DTGeometry.h:113
std::vector< const DTChamber * > theChambers
Definition: DTGeometry.h:104
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
DetContainer theDets
Definition: DTGeometry.h:118

◆ add() [2/3]

void DTGeometry::add ( DTSuperLayer sl)
private

Add a DTSuperLayer to Geometry.

Definition at line 48 of file DTGeometry.cc.

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

Referenced by counter.Counter::register().

48  {
49  theDets.emplace_back(sl);
50  theSuperLayers.emplace_back(sl);
51  theMap.insert(DTDetMap::value_type(sl->geographicalId(), sl));
52 }
DTDetMap theMap
Definition: DTGeometry.h:113
std::vector< const DTSuperLayer * > theSuperLayers
Definition: DTGeometry.h:109
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
DetContainer theDets
Definition: DTGeometry.h:118

◆ add() [3/3]

void DTGeometry::add ( DTLayer l)
private

Add a DTLayer to Geometry.

Definition at line 54 of file DTGeometry.cc.

References MainPageGenerator::l, theDets, theDetUnits, theLayers, and theMap.

Referenced by counter.Counter::register().

54  {
55  theDetUnits.emplace_back(l);
56  theDets.emplace_back(l);
57  theLayers.emplace_back(l);
58  theMap.insert(DTDetMap::value_type(l->geographicalId(), l));
59 }
DTDetMap theMap
Definition: DTGeometry.h:113
std::vector< const DTLayer * > theLayers
Definition: DTGeometry.h:110
DetContainer theDetUnits
Definition: DTGeometry.h:117
DetContainer theDets
Definition: DTGeometry.h:118

◆ chamber()

const DTChamber * DTGeometry::chamber ( const DTChamberId id) const

Return a DTChamber given its id.

Definition at line 90 of file DTGeometry.cc.

References idToDet().

Referenced by DTVDriftSegmentCalibration::analyze(), DTTTrigOffsetCalibration::analyze(), DTResidualCalibration::analyze(), DTVDriftCalibration::analyze(), DTEfficiencyTask::analyze(), DTChamberEfficiencyTask::analyze(), DTResolutionAnalysisTask::analyze(), MuonPathAnalyzerInChamber::analyze(), DTnoiseDBValidation::bookHisto(), DTNoiseTask::bookHistos(), L1TMuon::GeometryTranslator::calcDTSpecificPoint(), DTRecHitSegmentResidual::compute(), DTCalibValidationFromMuons::compute(), DTCalibValidation::compute(), MuonPathAssociator::correlateMPaths(), DTSegment2DSLPhiQuality::dqmAnalyze(), DTSegment4DQuality::dqmAnalyze(), DTTrigGeomUtils::DTTrigGeomUtils(), DTSegmentUpdator::fit(), OmtfAngleConverter::getGlobalEta(), AngleConverter::getGlobalEta(), AngleConverterBase::getGlobalEta(), AngleConverterBase::getGlobalEtaDt(), geometryXMLparser.CSCAlignable::index(), DTChamberEfficiencyTask::interpolate(), StubsSimHitsMatcher::match(), HLTDTActivityFilter::matchChamber(), RPCIntegrator::phiBending(), MuonSimHitProducer::produce(), MuonPathAnalyticAnalyzer::segment_fitter(), DTResidualCalibration::segmentToWireDistance(), DTCombinatorialPatternReco4D::setChamber(), DTMeantimerPatternReco4D::setChamber(), DTRefitAndCombineReco4D::setChamber(), DTTrigGeomUtils::trigPos(), and DTTrig::updateES().

90 { return (const DTChamber*)(idToDet(id)); }
const GeomDet * idToDet(DetId) const override
Definition: DTGeometry.cc:77

◆ chambers()

const std::vector< const DTChamber * > & DTGeometry::chambers ( ) const

◆ clear()

void DTGeometry::clear ( void  )

Definition at line 23 of file DTGeometry.cc.

References deallocate(), theChambers, theDetIds, theDets, theDetTypes, theDetUnitIds, theDetUnits, theLayers, theMap, and theSuperLayers.

23  {
24  deallocate();
25 
26  theChambers.clear();
27  theSuperLayers.clear();
28  theLayers.clear();
29  theMap.clear();
30  theDetUnits.clear();
31  theDets.clear();
32  theDetTypes.clear();
33  theDetUnitIds.clear();
34  theDetIds.clear();
35 }
void deallocate()
Definition: DTGeometry.cc:16
DTDetMap theMap
Definition: DTGeometry.h:113
DetTypeContainer theDetTypes
Definition: DTGeometry.h:122
std::vector< const DTSuperLayer * > theSuperLayers
Definition: DTGeometry.h:109
std::vector< const DTLayer * > theLayers
Definition: DTGeometry.h:110
DetIdContainer theDetUnitIds
Definition: DTGeometry.h:123
DetIdContainer theDetIds
Definition: DTGeometry.h:124
std::vector< const DTChamber * > theChambers
Definition: DTGeometry.h:104
DetContainer theDetUnits
Definition: DTGeometry.h:117
DetContainer theDets
Definition: DTGeometry.h:118

◆ deallocate()

void DTGeometry::deallocate ( )
private

Definition at line 16 of file DTGeometry.cc.

References theChambers.

Referenced by clear(), and ~DTGeometry().

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

◆ detIds()

const DTGeometry::DetIdContainer & DTGeometry::detIds ( ) const
overridevirtual

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

Implements TrackingGeometry.

Definition at line 70 of file DTGeometry.cc.

References theDetIds.

70  {
71  // FIXME - fill it at runtime
72  return theDetIds;
73 }
DetIdContainer theDetIds
Definition: DTGeometry.h:124

◆ dets()

const DTGeometry::DetContainer & DTGeometry::dets ( ) const
overridevirtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 63 of file DTGeometry.cc.

References theDets.

Referenced by DTGeometryTest::analyze().

63 { return theDets; }
DetContainer theDets
Definition: DTGeometry.h:118

◆ detTypes()

const DTGeometry::DetTypeContainer & DTGeometry::detTypes ( ) const
overridevirtual

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 37 of file DTGeometry.cc.

References theDetTypes.

Referenced by DTGeometryTest::analyze().

37  {
38  // FIXME - fill it at runtime
39  return theDetTypes;
40 }
DetTypeContainer theDetTypes
Definition: DTGeometry.h:122

◆ detUnitIds()

const DTGeometry::DetIdContainer & DTGeometry::detUnitIds ( ) const
overridevirtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 65 of file DTGeometry.cc.

References theDetUnitIds.

65  {
66  // FIXME - fill it at runtime
67  return theDetUnitIds;
68 }
DetIdContainer theDetUnitIds
Definition: DTGeometry.h:123

◆ detUnits()

const DTGeometry::DetContainer & DTGeometry::detUnits ( ) const
overridevirtual

Returm a vector of all GeomDet.

Implements TrackingGeometry.

Definition at line 61 of file DTGeometry.cc.

References theDetUnits.

Referenced by DTGeometryTest::analyze().

61 { return theDetUnits; }
DetContainer theDetUnits
Definition: DTGeometry.h:117

◆ idToDet()

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 77 of file DTGeometry.cc.

References mps_fire::i, and theMap.

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

77  {
78  // Strip away wire#, if any!
79  DTLayerId lId(id.rawId());
80  DTDetMap::const_iterator i = theMap.find(lId);
81  return (i != theMap.end()) ? i->second : nullptr;
82 }
DTDetMap theMap
Definition: DTGeometry.h:113

◆ idToDetUnit()

const GeomDet * DTGeometry::idToDetUnit ( DetId  ) const
overridevirtual

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

Implements TrackingGeometry.

Definition at line 75 of file DTGeometry.cc.

References idToDet().

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

75 { return dynamic_cast<const GeomDet*>(idToDet(id)); }
const GeomDet * idToDet(DetId) const override
Definition: DTGeometry.cc:77

◆ layer()

const DTLayer * DTGeometry::layer ( const DTLayerId id) const

Return a layer given its id.

Definition at line 96 of file DTGeometry.cc.

References idToDet().

Referenced by DTTPDeadWriter::analyze(), DTNoiseCalibration::analyze(), DTEfficiencyTask::analyze(), DTnoiseDBValidation::beginRun(), DTt0DBValidation::beginRun(), DTSegmentUpdator::calculateT0corr(), DTRecHitSegmentResidual::compute(), DTCalibValidationFromMuons::compute(), DTCalibValidation::compute(), DTRecHitQuality::compute(), GlobalRecHitsAnalyzer::compute(), GlobalRecHitsProducer::compute(), dtCalibration::DTT0WireInChamberReferenceCorrection::correction(), DTNoiseAnalysisTest::dqmEndLuminosityBlock(), DTEfficiencyTest::dqmEndLuminosityBlock(), DTHitPairForFit::DTHitPairForFit(), DTTPAnalyzer::endJob(), DTNoiseCalibration::endJob(), MuonShowerDigiFiller::fill(), GlobalHitsProdHist::fillMuon(), GlobalHitsAnalyzer::fillMuon(), GlobalHitsProducer::fillMuon(), DTTimingExtractor::fillTiming(), DTSegmentUpdator::fit(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), StubsSimHitsMatcher::match(), DTTrigGeomUtils::phiRange(), DTRecHitProducer::produce(), DTDigitizer::produce(), DTSegmentUpdator::rejectBadHits(), DTOccupancyTest::runOccupancyTest(), DTOccupancyTestML::runOccupancyTest(), MuonPathAnalyticAnalyzer::segment_fitter(), DTResidualCalibration::segmentToWireDistance(), DTHitAssociator::SimHitOK(), DTTrigGeomUtils::thetaRange(), and DTSegmentUpdator::updateHits().

96 { return (const DTLayer*)(idToDet(id)); }
const GeomDet * idToDet(DetId) const override
Definition: DTGeometry.cc:77

◆ layers()

const std::vector< const DTLayer * > & DTGeometry::layers ( ) const

Return a vector of all SuperLayer.

Definition at line 88 of file DTGeometry.cc.

References theLayers.

Referenced by FWRecoGeometryESProducer::addDTGeometry(), DTGeometryTest::analyze(), DTDCSByLumiTask::dqmEndLuminosityBlock(), DTGeometryValidate::validateDTLayerGeometry(), and ValidateGeometry::validateDTLayerGeometry().

88 { return theLayers; }
std::vector< const DTLayer * > theLayers
Definition: DTGeometry.h:110

◆ superLayer()

const DTSuperLayer * DTGeometry::superLayer ( const DTSuperLayerId id) const

◆ superLayers()

const std::vector< const DTSuperLayer * > & DTGeometry::superLayers ( ) const

Friends And Related Function Documentation

◆ cms::DTGeometryBuilder

friend class cms::DTGeometryBuilder
friend

Definition at line 84 of file DTGeometry.h.

◆ DTGeometryBuilderFromCondDB

friend class DTGeometryBuilderFromCondDB
friend

Definition at line 87 of file DTGeometry.h.

◆ DTGeometryBuilderFromDD4hep

friend class DTGeometryBuilderFromDD4hep
friend

Definition at line 86 of file DTGeometry.h.

◆ DTGeometryBuilderFromDDD

friend class DTGeometryBuilderFromDDD
friend

Definition at line 85 of file DTGeometry.h.

◆ GeometryAligner

friend class GeometryAligner
friend

Definition at line 89 of file DTGeometry.h.

Member Data Documentation

◆ theChambers

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

Definition at line 104 of file DTGeometry.h.

Referenced by add(), chambers(), clear(), and deallocate().

◆ theDetIds

DetIdContainer DTGeometry::theDetIds
private

Definition at line 124 of file DTGeometry.h.

Referenced by clear(), and detIds().

◆ theDets

DetContainer DTGeometry::theDets
private

Definition at line 118 of file DTGeometry.h.

Referenced by add(), clear(), and dets().

◆ theDetTypes

DetTypeContainer DTGeometry::theDetTypes
private

Definition at line 122 of file DTGeometry.h.

Referenced by clear(), and detTypes().

◆ theDetUnitIds

DetIdContainer DTGeometry::theDetUnitIds
private

Definition at line 123 of file DTGeometry.h.

Referenced by clear(), and detUnitIds().

◆ theDetUnits

DetContainer DTGeometry::theDetUnits
private

Definition at line 117 of file DTGeometry.h.

Referenced by add(), clear(), and detUnits().

◆ theLayers

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

Definition at line 110 of file DTGeometry.h.

Referenced by add(), clear(), and layers().

◆ theMap

DTDetMap DTGeometry::theMap
private

Definition at line 113 of file DTGeometry.h.

Referenced by add(), clear(), and idToDet().

◆ theSuperLayers

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

Definition at line 109 of file DTGeometry.h.

Referenced by add(), clear(), and superLayers().