CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ME0Geometry Class Reference

#include <ME0Geometry.h>

Inheritance diagram for ME0Geometry:
TrackingGeometry

Public Member Functions

void add (ME0EtaPartition *etaPartition)
 Add a ME0 etaPartition to the Geometry. More...
 
void add (ME0Layer *layer)
 Add a ME0 layer to the Geometry. More...
 
void add (ME0Chamber *chamber)
 Add a ME0 Chamber to the Geometry. More...
 
const ME0Chamberchamber (ME0DetId id) const
 Return a chamber given its id. More...
 
const std::vector< const ME0Chamber * > & chambers () const
 Return a vector of all ME0 chambers. 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...
 
const ME0EtaPartitionetaPartition (ME0DetId id) const
 Return a etaPartition given its id. More...
 
const std::vector< ME0EtaPartition const * > & etaPartitions () const
 Return a vector of all ME0 eta partitions. More...
 
virtual const GeomDetidToDet (DetId) const
 
virtual const GeomDetUnitidToDetUnit (DetId) const
 Return the pointer to the GeomDetUnit corresponding to a given DetId. More...
 
const ME0Layerlayer (ME0DetId id) const
 Return a layer given its id. More...
 
const std::vector< const ME0Layer * > & layers () const
 Return a vector of all ME0 layers. More...
 
 ME0Geometry ()
 Default constructor. More...
 
virtual ~ME0Geometry ()
 Destructor. More...
 
- Public Member Functions inherited from TrackingGeometry
virtual ~TrackingGeometry ()
 Destructor. More...
 

Private Attributes

std::vector< ME0Chamber const * > allChambers
 
std::vector< ME0EtaPartition const * > allEtaPartitions
 
std::vector< ME0Layer const * > allLayers
 
DetIdContainer theDetIds
 
DetContainer theDets
 
DetIdContainer theEtaPartitionIds
 
DetUnitContainer theEtaPartitions
 
DetTypeContainer theEtaPartitionTypes
 
mapIdToDet theMap
 

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

Definition at line 12 of file ME0Geometry.h.

Constructor & Destructor Documentation

ME0Geometry::ME0Geometry ( )

Default constructor.

Implementation of the Model for ME0 Geometry

Author
M. Maggi - INFN Bari

Definition at line 9 of file ME0Geometry.cc.

9 {}
ME0Geometry::~ME0Geometry ( )
virtual

Destructor.

Definition at line 10 of file ME0Geometry.cc.

10 {}

Member Function Documentation

void ME0Geometry::add ( ME0EtaPartition etaPartition)

Add a ME0 etaPartition to the Geometry.

Definition at line 79 of file ME0Geometry.cc.

References allEtaPartitions, etaPartition(), GeomDet::geographicalId(), theDetIds, theDets, theEtaPartitionIds, theEtaPartitions, theEtaPartitionTypes, theMap, and ME0EtaPartition::type().

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

79  {
80  allEtaPartitions.push_back(etaPartition);
81  theEtaPartitions.push_back(etaPartition);
82  theEtaPartitionIds.push_back(etaPartition->geographicalId());
83  theDets.push_back(etaPartition);
84  theDetIds.push_back(etaPartition->geographicalId());
85  theEtaPartitionTypes.push_back(&etaPartition->type());
86  theMap.insert(std::pair<DetId,GeomDetUnit*>
87  (etaPartition->geographicalId(),etaPartition));
88 }
DetTypeContainer theEtaPartitionTypes
Definition: ME0Geometry.h:75
mapIdToDet theMap
Definition: ME0Geometry.h:81
DetIdContainer theDetIds
Definition: ME0Geometry.h:77
DetContainer theDets
Definition: ME0Geometry.h:78
std::vector< ME0EtaPartition const * > allEtaPartitions
Definition: ME0Geometry.h:83
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return a etaPartition given its id.
Definition: ME0Geometry.cc:64
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
DetUnitContainer theEtaPartitions
Definition: ME0Geometry.h:74
DetIdContainer theEtaPartitionIds
Definition: ME0Geometry.h:76
const GeomDetType & type() const
void ME0Geometry::add ( ME0Layer layer)

Add a ME0 layer to the Geometry.

Definition at line 92 of file ME0Geometry.cc.

References allLayers, GeomDet::geographicalId(), layer(), theDetIds, theDets, theEtaPartitionTypes, theMap, and GeomDet::type().

Referenced by counter.Counter::register().

92  {
93  allLayers.push_back(layer);
94  // theLayers.push_back(layer); ??? what would this be fore?
95  // theLayerIds.push_back(layer->geographicalId()); ??? what would this be fore?
96  theDets.push_back(layer);
97  theDetIds.push_back(layer->geographicalId());
98  theEtaPartitionTypes.push_back(&layer->type());
99  theMap.insert(std::pair<DetId,GeomDetUnit*>
100  (layer->geographicalId(),layer));
101 }
std::vector< ME0Layer const * > allLayers
Definition: ME0Geometry.h:84
DetTypeContainer theEtaPartitionTypes
Definition: ME0Geometry.h:75
const ME0Layer * layer(ME0DetId id) const
Return a layer given its id.
Definition: ME0Geometry.cc:69
virtual const GeomDetType & type() const
Definition: GeomDet.cc:85
mapIdToDet theMap
Definition: ME0Geometry.h:81
DetIdContainer theDetIds
Definition: ME0Geometry.h:77
DetContainer theDets
Definition: ME0Geometry.h:78
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
void ME0Geometry::add ( ME0Chamber chamber)

Add a ME0 Chamber to the Geometry.

Definition at line 105 of file ME0Geometry.cc.

References allChambers, chamber(), GeomDet::geographicalId(), theDetIds, theDets, and theMap.

Referenced by counter.Counter::register().

105  {
106  allChambers.push_back(chamber);
107  theDets.push_back(chamber);
108  theDetIds.push_back(chamber->geographicalId());
109  theMap.insert(std::pair<DetId,GeomDet*>
110  (chamber->geographicalId(),chamber));
111 }
mapIdToDet theMap
Definition: ME0Geometry.h:81
DetIdContainer theDetIds
Definition: ME0Geometry.h:77
DetContainer theDets
Definition: ME0Geometry.h:78
const ME0Chamber * chamber(ME0DetId id) const
Return a chamber given its id.
Definition: ME0Geometry.cc:73
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
std::vector< ME0Chamber const * > allChambers
Definition: ME0Geometry.h:85
const ME0Chamber * ME0Geometry::chamber ( ME0DetId  id) const

Return a chamber given its id.

Definition at line 73 of file ME0Geometry.cc.

References idToDetUnit().

Referenced by add(), ME0SegmentsValidation::analyze(), ME0SegmentBuilder::build(), geometryXMLparser.CSCAlignable::index(), and ME0SegmentMatcher::produce().

73  {
74  return dynamic_cast<const ME0Chamber*>(idToDetUnit(id.chamberId()));
75 }
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: ME0Geometry.cc:38
const std::vector< ME0Chamber const * > & ME0Geometry::chambers ( ) const

Return a vector of all ME0 chambers.

Definition at line 49 of file ME0Geometry.cc.

References allChambers.

49  {
50  return allChambers;
51 }
std::vector< ME0Chamber const * > allChambers
Definition: ME0Geometry.h:85
const ME0Geometry::DetIdContainer & ME0Geometry::detIds ( ) const
virtual

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

Implements TrackingGeometry.

Definition at line 33 of file ME0Geometry.cc.

References theDetIds.

33  {
34  return theDetIds;
35 }
DetIdContainer theDetIds
Definition: ME0Geometry.h:77
const ME0Geometry::DetContainer & ME0Geometry::dets ( ) const
virtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 23 of file ME0Geometry.cc.

References theDets.

23  {
24  return theDets;
25 }
DetContainer theDets
Definition: ME0Geometry.h:78
const ME0Geometry::DetTypeContainer & ME0Geometry::detTypes ( ) const
virtual

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 13 of file ME0Geometry.cc.

References theEtaPartitionTypes.

13  {
14  return theEtaPartitionTypes;
15 }
DetTypeContainer theEtaPartitionTypes
Definition: ME0Geometry.h:75
const ME0Geometry::DetIdContainer & ME0Geometry::detUnitIds ( ) const
virtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 28 of file ME0Geometry.cc.

References theEtaPartitionIds.

28  {
29  return theEtaPartitionIds;
30 }
DetIdContainer theEtaPartitionIds
Definition: ME0Geometry.h:76
const ME0Geometry::DetUnitContainer & ME0Geometry::detUnits ( ) const
virtual

Returm a vector of all GeomDetUnit.

Implements TrackingGeometry.

Definition at line 18 of file ME0Geometry.cc.

References theEtaPartitions.

18  {
19  return theEtaPartitions;
20 }
DetUnitContainer theEtaPartitions
Definition: ME0Geometry.h:74
const ME0EtaPartition * ME0Geometry::etaPartition ( ME0DetId  id) const

Return a etaPartition given its id.

Definition at line 64 of file ME0Geometry.cc.

References idToDetUnit().

Referenced by add(), ME0SegmentsValidation::analyze(), ME0SegmentBuilder::build(), ME0ReDigiProducer::buildDigis(), and ME0GeometryBuilderFromDDD::buildGeometry().

64  {
65  return dynamic_cast<const ME0EtaPartition*>(idToDetUnit(id));
66 }
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: ME0Geometry.cc:38
const std::vector< ME0EtaPartition const * > & ME0Geometry::etaPartitions ( ) const

Return a vector of all ME0 eta partitions.

Definition at line 59 of file ME0Geometry.cc.

References allEtaPartitions.

Referenced by FWRecoGeometryESProducer::addME0Geometry(), FWTGeoRecoGeometryESProducer::addME0Geometry(), ME0ReDigiProducer::beginRun(), ME0ReDigiProducer::buildDigis(), ME0GeometryBuilderFromDDD::buildGeometry(), and ME0DigiPreRecoProducer::produce().

59  {
60  return allEtaPartitions;
61 }
std::vector< ME0EtaPartition const * > allEtaPartitions
Definition: ME0Geometry.h:83
const GeomDet * ME0Geometry::idToDet ( DetId  ) const
virtual

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

Implements TrackingGeometry.

Definition at line 42 of file ME0Geometry.cc.

References i, and theMap.

Referenced by ME0HitsValidation::analyze(), ME0DigisValidation::analyze(), ME0RecHitsValidation::analyze(), MuonME0DetLayerGeometryBuilder::buildLayer(), and idToDetUnit().

42  {
43  mapIdToDet::const_iterator i = theMap.find(id);
44  return (i != theMap.end()) ?
45  i->second : 0 ;
46 }
int i
Definition: DBlmapReader.cc:9
mapIdToDet theMap
Definition: ME0Geometry.h:81
const GeomDetUnit * ME0Geometry::idToDetUnit ( DetId  ) const
virtual

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

Implements TrackingGeometry.

Definition at line 38 of file ME0Geometry.cc.

References idToDet().

Referenced by chamber(), etaPartition(), and layer().

38  {
39  return dynamic_cast<const GeomDetUnit*>(idToDet(id));
40 }
virtual const GeomDet * idToDet(DetId) const
Definition: ME0Geometry.cc:42
const ME0Layer * ME0Geometry::layer ( ME0DetId  id) const

Return a layer given its id.

Definition at line 69 of file ME0Geometry.cc.

References idToDetUnit().

Referenced by add(), geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

69  {
70  return dynamic_cast<const ME0Layer*>(idToDetUnit(id.layerId()));
71 }
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: ME0Geometry.cc:38
const std::vector< ME0Layer const * > & ME0Geometry::layers ( ) const

Return a vector of all ME0 layers.

Definition at line 54 of file ME0Geometry.cc.

References allLayers.

54  {
55  return allLayers;
56 }
std::vector< ME0Layer const * > allLayers
Definition: ME0Geometry.h:84

Member Data Documentation

std::vector<ME0Chamber const*> ME0Geometry::allChambers
private

Definition at line 85 of file ME0Geometry.h.

Referenced by add(), and chambers().

std::vector<ME0EtaPartition const*> ME0Geometry::allEtaPartitions
private

Definition at line 83 of file ME0Geometry.h.

Referenced by add(), and etaPartitions().

std::vector<ME0Layer const*> ME0Geometry::allLayers
private

Definition at line 84 of file ME0Geometry.h.

Referenced by add(), and layers().

DetIdContainer ME0Geometry::theDetIds
private

Definition at line 77 of file ME0Geometry.h.

Referenced by add(), and detIds().

DetContainer ME0Geometry::theDets
private

Definition at line 78 of file ME0Geometry.h.

Referenced by add(), and dets().

DetIdContainer ME0Geometry::theEtaPartitionIds
private

Definition at line 76 of file ME0Geometry.h.

Referenced by add(), and detUnitIds().

DetUnitContainer ME0Geometry::theEtaPartitions
private

Definition at line 74 of file ME0Geometry.h.

Referenced by add(), and detUnits().

DetTypeContainer ME0Geometry::theEtaPartitionTypes
private

Definition at line 75 of file ME0Geometry.h.

Referenced by add(), and detTypes().

mapIdToDet ME0Geometry::theMap
private

Definition at line 81 of file ME0Geometry.h.

Referenced by add(), and idToDet().