CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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< DTChamber * > & chambers () const
 Return a vector of all Chamber. More...
 
virtual const DetIdContainerdetIds () const
 Returm a vector of all GeomDet DetIds (including those of GeomDetUnits) More...
 
virtual const DetContainerdets () const
 Returm a vector of all GeomDet (including all GeomDetUnits) More...
 
virtual const DetTypeContainerdetTypes () const
 Return a vector of all det types. More...
 
virtual const DetIdContainerdetUnitIds () const
 Returm a vector of all GeomDetUnit DetIds. More...
 
virtual const DetUnitContainerdetUnits () const
 Returm a vector of all GeomDetUnit. More...
 
 DTGeometry ()
 Default constructor. More...
 
virtual const GeomDetidToDet (DetId) const
 
virtual const GeomDetUnitidToDetUnit (DetId) const
 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< 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
< 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< DTChamber * > theChambers
 
DetContainer theDets
 
DetUnitContainer theDetUnits
 
std::vector< DTLayer * > theLayers
 
DTDetMap theMap
 
std::vector< DTSuperLayer * > theSuperLayers
 

Friends

class DTGeometryBuilderFromCondDB
 
class DTGeometryBuilderFromDDD
 
class GeometryAligner
 

Additional Inherited Members

- Public Types inherited from TrackingGeometry
typedef std::vector< GeomDet * > DetContainer
 
typedef std::vector< DetIdDetIdContainer
 
typedef std::vector
< GeomDetType * > 
DetTypeContainer
 
typedef std::vector
< GeomDetUnit * > 
DetUnitContainer
 
typedef __gnu_cxx::hash_map
< unsigned int, GeomDet * > 
mapIdToDet
 
typedef __gnu_cxx::hash_map
< unsigned int, GeomDetUnit * > 
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.

Date:
2009/01/16 11:12:10
Revision:
1.7
Author
N. Amapane - CERN

Definition at line 27 of file DTGeometry.h.

Member Typedef Documentation

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

Definition at line 29 of file DTGeometry.h.

Constructor & Destructor Documentation

DTGeometry::DTGeometry ( )

Default constructor.

Definition at line 14 of file DTGeometry.cc.

14 {}
DTGeometry::~DTGeometry ( )
virtual

Destructor.

Definition at line 16 of file DTGeometry.cc.

References theChambers.

16  {
17  // delete all the chambers (which will delete the SL which will delete the
18  // layers)
19  for (std::vector<DTChamber*>::const_iterator ich=theChambers.begin();
20  ich!=theChambers.end(); ++ich) delete (*ich);
21 }
std::vector< DTChamber * > theChambers
Definition: DTGeometry.h:104

Member Function Documentation

void DTGeometry::add ( DTChamber ch)
private

Add a DTChamber to Geometry.

Definition at line 30 of file DTGeometry.cc.

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

30  {
31  theDets.push_back(ch);
32  theChambers.push_back(ch);
33  theMap.insert(DTDetMap::value_type(ch->geographicalId(),ch));
34 }
DTDetMap theMap
Definition: DTGeometry.h:113
std::vector< DTChamber * > theChambers
Definition: DTGeometry.h:104
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
Container::value_type value_type
DetContainer theDets
Definition: DTGeometry.h:118
void DTGeometry::add ( DTSuperLayer sl)
private

Add a DTSuperLayer to Geometry.

Definition at line 37 of file DTGeometry.cc.

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

37  {
38  theDets.push_back(sl);
39  theSuperLayers.push_back(sl);
40  theMap.insert(DTDetMap::value_type(sl->geographicalId(),sl));
41 }
DTDetMap theMap
Definition: DTGeometry.h:113
std::vector< DTSuperLayer * > theSuperLayers
Definition: DTGeometry.h:109
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
Container::value_type value_type
DetContainer theDets
Definition: DTGeometry.h:118
void DTGeometry::add ( DTLayer l)
private

Add a DTLayer to Geometry.

Definition at line 44 of file DTGeometry.cc.

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

44  {
45  theDetUnits.push_back(l);
46  theDets.push_back(l);
47  theLayers.push_back(l);
49 }
DetUnitContainer theDetUnits
Definition: DTGeometry.h:117
DTDetMap theMap
Definition: DTGeometry.h:113
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
Container::value_type value_type
std::vector< DTLayer * > theLayers
Definition: DTGeometry.h:110
DetContainer theDets
Definition: DTGeometry.h:118
const DTChamber * DTGeometry::chamber ( DTChamberId  id) const

Return a DTChamber given its id.

Definition at line 105 of file DTGeometry.cc.

References idToDet().

Referenced by DTResidualCalibration::analyze(), DTRecHitSegmentResidual::compute(), DTCalibValidation::compute(), geometryXMLparser.CSCAlignable::index(), MuonSimHitProducer::produce(), and DTResidualCalibration::segmentToWireDistance().

105  {
106  return (const DTChamber*)(idToDet(id));
107 }
virtual const GeomDet * idToDet(DetId) const
Definition: DTGeometry.cc:81
const std::vector< DTChamber * > & DTGeometry::chambers ( ) const

Return a vector of all Chamber.

Definition at line 90 of file DTGeometry.cc.

References theChambers.

Referenced by FWRecoGeometryESProducer::addDTGeometry(), DTResidualCalibration::beginRun(), and AlignableMuon::buildDTBarrel().

90  {
91  return theChambers;
92 }
std::vector< DTChamber * > theChambers
Definition: DTGeometry.h:104
const DTGeometry::DetIdContainer & DTGeometry::detIds ( ) const
virtual

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

Implements TrackingGeometry.

Definition at line 69 of file DTGeometry.cc.

69  {
70  static DetIdContainer theDetIds;
71  // FIXME - fill it at runtime
72  return theDetIds;
73 }
std::vector< DetId > DetIdContainer
const DTGeometry::DetContainer & DTGeometry::dets ( ) const
virtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 57 of file DTGeometry.cc.

References theDets.

57  {
58  return theDets;
59 }
DetContainer theDets
Definition: DTGeometry.h:118
const DTGeometry::DetTypeContainer & DTGeometry::detTypes ( ) const
virtual

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 23 of file DTGeometry.cc.

23  {
24  static DetTypeContainer theDetTypes;
25  // FIXME - fill it at runtime
26  return theDetTypes;
27 }
std::vector< GeomDetType * > DetTypeContainer
const DTGeometry::DetIdContainer & DTGeometry::detUnitIds ( ) const
virtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 62 of file DTGeometry.cc.

62  {
63  static DetIdContainer theDetUnitIds;
64  // FIXME - fill it at runtime
65  return theDetUnitIds;
66 }
std::vector< DetId > DetIdContainer
const DTGeometry::DetUnitContainer & DTGeometry::detUnits ( ) const
virtual

Returm a vector of all GeomDetUnit.

Implements TrackingGeometry.

Definition at line 52 of file DTGeometry.cc.

References theDetUnits.

52  {
53  return theDetUnits;
54 }
DetUnitContainer theDetUnits
Definition: DTGeometry.h:117
const GeomDet * DTGeometry::idToDet ( DetId  ) const
virtual

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

Implements TrackingGeometry.

Definition at line 81 of file DTGeometry.cc.

References i, and theMap.

Referenced by MuonDTDetLayerGeometryBuilder::buildLayers(), chamber(), DTHitQualityUtils::findMuSimSegmentDirAndPos(), idToDetUnit(), layer(), and superLayer().

81  {
82  // Strip away wire#, if any!
83  DTLayerId lId(id.rawId());
84  DTDetMap::const_iterator i = theMap.find(lId);
85  return (i != theMap.end()) ?
86  i->second : 0 ;
87 }
int i
Definition: DBlmapReader.cc:9
DTDetMap theMap
Definition: DTGeometry.h:113
const GeomDetUnit * DTGeometry::idToDetUnit ( DetId  ) const
virtual

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

Implements TrackingGeometry.

Definition at line 76 of file DTGeometry.cc.

References idToDet().

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

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

Return a vector of all SuperLayer.

Definition at line 100 of file DTGeometry.cc.

References theLayers.

Referenced by FWRecoGeometryESProducer::addDTGeometry().

100  {
101  return theLayers;
102 }
std::vector< DTLayer * > theLayers
Definition: DTGeometry.h:110
const DTSuperLayer * DTGeometry::superLayer ( DTSuperLayerId  id) const

Return a DTSuperLayer given its id.

Definition at line 110 of file DTGeometry.cc.

References idToDet().

110  {
111  return (const DTSuperLayer*)(idToDet(id));
112 }
virtual const GeomDet * idToDet(DetId) const
Definition: DTGeometry.cc:81
const std::vector< DTSuperLayer * > & DTGeometry::superLayers ( ) const

Return a vector of all SuperLayer.

Definition at line 95 of file DTGeometry.cc.

References theSuperLayers.

95  {
96  return theSuperLayers;
97 }
std::vector< DTSuperLayer * > theSuperLayers
Definition: DTGeometry.h:109

Friends And Related Function Documentation

friend class DTGeometryBuilderFromCondDB
friend

Definition at line 87 of file DTGeometry.h.

friend class DTGeometryBuilderFromDDD
friend

Definition at line 86 of file DTGeometry.h.

friend class GeometryAligner
friend

Definition at line 89 of file DTGeometry.h.

Member Data Documentation

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

Definition at line 104 of file DTGeometry.h.

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

DetContainer DTGeometry::theDets
private

Definition at line 118 of file DTGeometry.h.

Referenced by add(), and dets().

DetUnitContainer DTGeometry::theDetUnits
private

Definition at line 117 of file DTGeometry.h.

Referenced by add(), and detUnits().

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

Definition at line 110 of file DTGeometry.h.

Referenced by add(), and layers().

DTDetMap DTGeometry::theMap
private

Definition at line 113 of file DTGeometry.h.

Referenced by add(), and idToDet().

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

Definition at line 109 of file DTGeometry.h.

Referenced by add(), and superLayers().