CMS 3D CMS Logo

Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends

DTGeometry Class Reference

#include <DTGeometry.h>

Inheritance diagram for DTGeometry:
TrackingGeometry

List of all members.

Public Member Functions

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

Private Types

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

Private Member Functions

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

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

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.

{}
DTGeometry::~DTGeometry ( ) [virtual]

Destructor.

Definition at line 16 of file DTGeometry.cc.

References theChambers.

                       {
  // delete all the chambers (which will delete the SL which will delete the
  // layers)
  for (std::vector<DTChamber*>::const_iterator ich=theChambers.begin();
       ich!=theChambers.end(); ++ich) delete (*ich);
}

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.

                                  {
  theDets.push_back(ch);
  theChambers.push_back(ch);
  theMap.insert(DTDetMap::value_type(ch->geographicalId(),ch));
}
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.

                               {
  theDetUnits.push_back(l);
  theDets.push_back(l);
  theLayers.push_back(l); 
  theMap.insert(DTDetMap::value_type(l->geographicalId(),l));
}
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.

                                     {
  theDets.push_back(sl);
  theSuperLayers.push_back(sl);
  theMap.insert(DTDetMap::value_type(sl->geographicalId(),sl));
}
const DTChamber * DTGeometry::chamber ( DTChamberId  id) const
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().

                                                       {
  return theChambers;
}
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.

                                                        {
  static DetIdContainer theDetIds;
  // FIXME - fill it at runtime
  return theDetIds;
}
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.

                                                    {
  return theDets; 
}
const DTGeometry::DetTypeContainer & DTGeometry::detTypes ( ) const [virtual]

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 23 of file DTGeometry.cc.

                                                             {
  static DetTypeContainer  theDetTypes;
  // FIXME - fill it at runtime
  return theDetTypes;
}
const DTGeometry::DetIdContainer & DTGeometry::detUnitIds ( ) const [virtual]

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 62 of file DTGeometry.cc.

                                                            {
  static DetIdContainer    theDetUnitIds;
  // FIXME - fill it at runtime
  return theDetUnitIds;
}
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.

                                                            {
  return theDetUnits;
}
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().

                                                {
  // Strip away wire#, if any!
  DTLayerId lId(id.rawId());
  DTDetMap::const_iterator i = theMap.find(lId);
  return (i != theMap.end()) ?
    i->second : 0 ;
}
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().

                                                        {
  return dynamic_cast<const GeomDetUnit*>(idToDet(id));
}
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().

                                                   {
  return theLayers;
}
const DTSuperLayer * DTGeometry::superLayer ( DTSuperLayerId  id) const

Return a DTSuperLayer given its id.

Definition at line 110 of file DTGeometry.cc.

References idToDet().

                                                                  {
  return (const DTSuperLayer*)(idToDet(id));
}
const std::vector< DTSuperLayer * > & DTGeometry::superLayers ( ) const

Return a vector of all SuperLayer.

Definition at line 95 of file DTGeometry.cc.

References theSuperLayers.

                                                             {
  return theSuperLayers;
}

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

Definition at line 118 of file DTGeometry.h.

Referenced by add(), and dets().

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

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