CMS 3D CMS Logo

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

#include <GEMGeometry.h>

Inheritance diagram for GEMGeometry:
TrackingGeometry

Public Member Functions

void add (const GEMRegion *region)
 Add a GEMRegion to the Geometry. More...
 
void add (const GEMStation *station)
 Add a GEMStation to the Geometry. More...
 
void add (const GEMRing *ring)
 Add a GEMRing to the Geometry. More...
 
void add (const GEMSuperChamber *sch)
 Add a GEMSuperChamber to the Geometry. More...
 
void add (const GEMChamber *ch)
 Add a GEMChamber to the Geometry. More...
 
void add (const GEMEtaPartition *etaPartition)
 Add a GEMEtaPartition to the Geometry. More...
 
const GEMChamberchamber (GEMDetId id) const
 
const std::vector< const GEMChamber * > & chambers () const
 Return a vector of all GEM chambers. More...
 
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...
 
const GEMEtaPartitionetaPartition (GEMDetId id) const
 Return a GEMEtaPartition given its id. More...
 
const std::vector< const GEMEtaPartition * > & etaPartitions () const
 Return a vector of all GEM eta partitions. More...
 
 GEMGeometry ()
 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 GEMRegionregion (int region) const
 
const std::vector< const GEMRegion * > & regions () const
 Return a vector of all GEM regions. More...
 
const GEMRingring (int region, int station, int ring) const
 Return a GEMRing. More...
 
const std::vector< const GEMRing * > & rings () const
 Return a vector of all GEM rings. More...
 
const GEMStationstation (int region, int station) const
 
const std::vector< const GEMStation * > & stations () const
 Return a vector of all GEM stations. More...
 
const GEMSuperChambersuperChamber (GEMDetId id) const
 
const std::vector< const GEMSuperChamber * > & superChambers () const
 Return a vector of all GEM super chambers. More...
 
 ~GEMGeometry () override
 Destructor. More...
 
- Public Member Functions inherited from TrackingGeometry
virtual ~TrackingGeometry ()
 Destructor. More...
 

Private Attributes

std::vector< const GEMChamber * > allChambers
 
std::vector< const GEMEtaPartition * > allEtaPartitions
 
std::vector< const GEMRegion * > allRegions
 
std::vector< const GEMRing * > allRings
 
std::vector< const GEMStation * > allStations
 
std::vector< const GEMSuperChamber * > allSuperChambers
 
DetIdContainer theDetIds
 
DetContainer theDets
 
DetIdContainer theEtaPartitionIds
 
DetContainer theEtaPartitions
 
DetTypeContainer theEtaPartitionTypes
 
mapIdToDet theMap
 

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 GEM.

Author
M. Maggi - INFN Bari

Definition at line 24 of file GEMGeometry.h.

Constructor & Destructor Documentation

GEMGeometry::GEMGeometry ( )

Default constructor.

Implementation of the Model for GEM Geometry

Author
M. Maggi - INFN Bari

Definition at line 9 of file GEMGeometry.cc.

9 {}
GEMGeometry::~GEMGeometry ( )
override

Destructor.

Definition at line 11 of file GEMGeometry.cc.

11 {}

Member Function Documentation

void GEMGeometry::add ( const GEMRegion region)

Add a GEMRegion to the Geometry.

Definition at line 104 of file GEMGeometry.cc.

References allRegions.

Referenced by counter.Counter::register().

104  {
105  allRegions.emplace_back(region);
106 }
std::vector< const GEMRegion * > allRegions
Definition: GEMGeometry.h:126
void GEMGeometry::add ( const GEMStation station)

Add a GEMStation to the Geometry.

Definition at line 109 of file GEMGeometry.cc.

References allStations.

Referenced by counter.Counter::register().

109  {
110  allStations.emplace_back(station);
111 }
std::vector< const GEMStation * > allStations
Definition: GEMGeometry.h:125
void GEMGeometry::add ( const GEMRing ring)

Add a GEMRing to the Geometry.

Definition at line 114 of file GEMGeometry.cc.

References allRings.

Referenced by counter.Counter::register().

114  {
115  allRings.emplace_back(ring);
116 }
std::vector< const GEMRing * > allRings
Definition: GEMGeometry.h:124
void GEMGeometry::add ( const GEMSuperChamber sch)

Add a GEMSuperChamber to the Geometry.

Definition at line 119 of file GEMGeometry.cc.

References allSuperChambers, GeomDet::geographicalId(), superChamber(), theDetIds, theDets, and theMap.

Referenced by counter.Counter::register().

119  {
120  allSuperChambers.emplace_back(superChamber);
121  theDets.emplace_back(superChamber);
122  theDetIds.emplace_back(superChamber->geographicalId());
123  theMap.insert(std::pair<DetId,const GeomDet*>
125 }
std::vector< const GEMSuperChamber * > allSuperChambers
Definition: GEMGeometry.h:123
DetIdContainer theDetIds
Definition: GEMGeometry.h:116
mapIdToDet theMap
Definition: GEMGeometry.h:119
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
const GEMSuperChamber * superChamber(GEMDetId id) const
Definition: GEMGeometry.cc:91
DetContainer theDets
Definition: GEMGeometry.h:113
void GEMGeometry::add ( const GEMChamber ch)

Add a GEMChamber to the Geometry.

Definition at line 140 of file GEMGeometry.cc.

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

Referenced by counter.Counter::register().

140  {
141  allChambers.emplace_back(chamber);
142  theDets.emplace_back(chamber);
143  theDetIds.emplace_back(chamber->geographicalId());
144  theMap.insert(std::pair<DetId,const GeomDet*>
146 }
DetIdContainer theDetIds
Definition: GEMGeometry.h:116
mapIdToDet theMap
Definition: GEMGeometry.h:119
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
DetContainer theDets
Definition: GEMGeometry.h:113
const GEMChamber * chamber(GEMDetId id) const
Definition: GEMGeometry.cc:95
std::vector< const GEMChamber * > allChambers
Definition: GEMGeometry.h:122
void GEMGeometry::add ( const GEMEtaPartition etaPartition)

Add a GEMEtaPartition to the Geometry.

Definition at line 128 of file GEMGeometry.cc.

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

Referenced by counter.Counter::register().

128  {
129  theDets.emplace_back(etaPartition);
130  allEtaPartitions.emplace_back(etaPartition);
131  theEtaPartitions.emplace_back(etaPartition);
132  theEtaPartitionIds.emplace_back(etaPartition->geographicalId());
133  theDetIds.emplace_back(etaPartition->geographicalId());
134  theEtaPartitionTypes.emplace_back(&etaPartition->type());
135  theMap.insert(std::pair<DetId,const GeomDet*>
136  (etaPartition->geographicalId(),etaPartition));
137 }
std::vector< const GEMEtaPartition * > allEtaPartitions
Definition: GEMGeometry.h:121
DetContainer theEtaPartitions
Definition: GEMGeometry.h:112
DetIdContainer theEtaPartitionIds
Definition: GEMGeometry.h:115
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a GEMEtaPartition given its id.
Definition: GEMGeometry.cc:99
DetIdContainer theDetIds
Definition: GEMGeometry.h:116
mapIdToDet theMap
Definition: GEMGeometry.h:119
const GeomDetType & type() const override
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
DetContainer theDets
Definition: GEMGeometry.h:113
DetTypeContainer theEtaPartitionTypes
Definition: GEMGeometry.h:114
const GEMChamber * GEMGeometry::chamber ( GEMDetId  id) const
const std::vector< const GEMChamber * > & GEMGeometry::chambers ( ) const

Return a vector of all GEM chambers.

Definition at line 59 of file GEMGeometry.cc.

References allChambers.

Referenced by FWRecoGeometryESProducer::addGEMGeometry(), GEMPadDigiClusterProducer::buildClusters(), GEMTrackMatch::buildLUT(), GEMTrackMatch::getEtaRange(), GEMBaseValidation::initGeometry(), and GEMTrackMatch::setGeometry().

59  {
60  return allChambers;
61 }
std::vector< const GEMChamber * > allChambers
Definition: GEMGeometry.h:122
const GEMGeometry::DetIdContainer & GEMGeometry::detIds ( ) const
overridevirtual

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

Implements TrackingGeometry.

Definition at line 29 of file GEMGeometry.cc.

References theDetIds.

29  {
30  return theDetIds;
31 }
DetIdContainer theDetIds
Definition: GEMGeometry.h:116
const GEMGeometry::DetContainer & GEMGeometry::dets ( ) const
overridevirtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 21 of file GEMGeometry.cc.

References theDets.

Referenced by GEMCSCSegmentBuilder::LinkGEMRollsToCSCChamberIndex().

21  {
22  return theDets;
23 }
DetContainer theDets
Definition: GEMGeometry.h:113
const GEMGeometry::DetTypeContainer & GEMGeometry::detTypes ( ) const
overridevirtual

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 13 of file GEMGeometry.cc.

References theEtaPartitionTypes.

13  {
14  return theEtaPartitionTypes;
15 }
DetTypeContainer theEtaPartitionTypes
Definition: GEMGeometry.h:114
const GEMGeometry::DetIdContainer & GEMGeometry::detUnitIds ( ) const
overridevirtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 25 of file GEMGeometry.cc.

References theEtaPartitionIds.

25  {
26  return theEtaPartitionIds;
27 }
DetIdContainer theEtaPartitionIds
Definition: GEMGeometry.h:115
const GEMGeometry::DetContainer & GEMGeometry::detUnits ( ) const
overridevirtual

Returm a vector of all GeomDet.

Implements TrackingGeometry.

Definition at line 17 of file GEMGeometry.cc.

References theEtaPartitions.

17  {
18  return theEtaPartitions;
19 }
DetContainer theEtaPartitions
Definition: GEMGeometry.h:112
const GEMEtaPartition * GEMGeometry::etaPartition ( GEMDetId  id) const
const std::vector< const GEMEtaPartition * > & GEMGeometry::etaPartitions ( ) const

Return a vector of all GEM eta partitions.

Definition at line 63 of file GEMGeometry.cc.

References allEtaPartitions.

Referenced by FWRecoGeometryESProducer::addGEMGeometry(), FWTGeoRecoGeometryESProducer::addGEMGeometry(), GEMPadDigiProducer::buildPads(), GEMBaseValidation::initGeometry(), and GEMDigiProducer::produce().

63  {
64  return allEtaPartitions;
65 }
std::vector< const GEMEtaPartition * > allEtaPartitions
Definition: GEMGeometry.h:121
const GeomDet * GEMGeometry::idToDet ( DetId  ) const
overridevirtual

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

Implements TrackingGeometry.

Definition at line 38 of file GEMGeometry.cc.

References mps_fire::i, and theMap.

Referenced by GEMCoPadDigiValidation::analyze(), GEMPadDigiValidation::analyze(), GEMHitsValidation::analyze(), GEMRecHitsValidation::analyze(), GEMStripDigiValidation::analyze(), MuonGEMDetLayerGeometryBuilder::buildLayer(), chamber(), idToDetUnit(), GEMRecHitMatcher::recHitPosition(), SimHitMatcher::simHitsMeanPosition(), and superChamber().

38  {
39  mapIdToDet::const_iterator i = theMap.find(id);
40  return (i != theMap.end()) ? i->second : nullptr;
41 }
mapIdToDet theMap
Definition: GEMGeometry.h:119
const GeomDet * GEMGeometry::idToDetUnit ( DetId  ) const
overridevirtual

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

Implements TrackingGeometry.

Definition at line 33 of file GEMGeometry.cc.

References idToDet().

Referenced by etaPartition(), and GEMTrackMatch::setGeometry().

33  {
34  return dynamic_cast<const GeomDet*>(idToDet(id));
35 }
const GeomDet * idToDet(DetId) const override
Definition: GEMGeometry.cc:38
const GEMRegion * GEMGeometry::region ( int  region) const

Definition at line 67 of file GEMGeometry.cc.

References allRegions, and GEMRegion::region().

67  {
68  for (auto region : allRegions) {
69  if (re != region->region()) continue;
70  return region;
71  }
72  return nullptr;
73 }
std::vector< const GEMRegion * > allRegions
Definition: GEMGeometry.h:126
const GEMRegion * region(int region) const
Definition: GEMGeometry.cc:67
int region() const
Return the region.
Definition: GEMRegion.cc:74
const std::vector< const GEMRegion * > & GEMGeometry::regions ( ) const
const GEMRing * GEMGeometry::ring ( int  region,
int  station,
int  ring 
) const

Return a GEMRing.

Definition at line 83 of file GEMGeometry.cc.

References allRings, GEMRing::region(), GEMRing::ring(), and GEMRing::station().

Referenced by geometryXMLparser.CSCAlignable::index().

83  {
84  for (auto ring : allRings) {
85  if (re != ring->region() || st != ring->station() || ri != ring->ring()) continue;
86  return ring;
87  }
88  return nullptr;
89 }
int region() const
Return the region number.
Definition: GEMRing.cc:61
int station() const
Return the station number.
Definition: GEMRing.cc:65
const GEMRing * ring(int region, int station, int ring) const
Return a GEMRing.
Definition: GEMGeometry.cc:83
std::vector< const GEMRing * > allRings
Definition: GEMGeometry.h:124
int ring() const
Return the ring number.
Definition: GEMRing.cc:69
const std::vector< const GEMRing * > & GEMGeometry::rings ( ) const

Return a vector of all GEM rings.

Definition at line 51 of file GEMGeometry.cc.

References allRings.

51  {
52  return allRings;
53 }
std::vector< const GEMRing * > allRings
Definition: GEMGeometry.h:124
const GEMStation * GEMGeometry::station ( int  region,
int  station 
) const

Definition at line 75 of file GEMGeometry.cc.

References allStations, GEMStation::region(), and GEMStation::station().

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

75  {
76  for (auto station : allStations) {
77  if (re != station->region() || st != station->station()) continue;
78  return station;
79  }
80  return nullptr;
81 }
int region() const
Get the region.
Definition: GEMStation.cc:85
int station() const
Get the station.
Definition: GEMStation.cc:89
std::vector< const GEMStation * > allStations
Definition: GEMGeometry.h:125
const GEMStation * station(int region, int station) const
Definition: GEMGeometry.cc:75
const std::vector< const GEMStation * > & GEMGeometry::stations ( ) const

Return a vector of all GEM stations.

Definition at line 47 of file GEMGeometry.cc.

References allStations.

Referenced by CSCMotherboardME21GEM::run().

47  {
48  return allStations;
49 }
std::vector< const GEMStation * > allStations
Definition: GEMGeometry.h:125
const GEMSuperChamber * GEMGeometry::superChamber ( GEMDetId  id) const
const std::vector< const GEMSuperChamber * > & GEMGeometry::superChambers ( ) const

Return a vector of all GEM super chambers.

Definition at line 55 of file GEMGeometry.cc.

References allSuperChambers.

Referenced by FWRecoGeometryESProducer::addGEMGeometry(), FWTGeoRecoGeometryESProducer::addGEMGeometry(), and GEMBaseValidation::initGeometry().

55  {
56  return allSuperChambers;
57 }
std::vector< const GEMSuperChamber * > allSuperChambers
Definition: GEMGeometry.h:123

Member Data Documentation

std::vector<const GEMChamber*> GEMGeometry::allChambers
private

Definition at line 122 of file GEMGeometry.h.

Referenced by add(), and chambers().

std::vector<const GEMEtaPartition*> GEMGeometry::allEtaPartitions
private

Definition at line 121 of file GEMGeometry.h.

Referenced by add(), and etaPartitions().

std::vector<const GEMRegion*> GEMGeometry::allRegions
private

Definition at line 126 of file GEMGeometry.h.

Referenced by add(), region(), and regions().

std::vector<const GEMRing*> GEMGeometry::allRings
private

Definition at line 124 of file GEMGeometry.h.

Referenced by add(), ring(), and rings().

std::vector<const GEMStation*> GEMGeometry::allStations
private

Definition at line 125 of file GEMGeometry.h.

Referenced by add(), station(), and stations().

std::vector<const GEMSuperChamber*> GEMGeometry::allSuperChambers
private

Definition at line 123 of file GEMGeometry.h.

Referenced by add(), and superChambers().

DetIdContainer GEMGeometry::theDetIds
private

Definition at line 116 of file GEMGeometry.h.

Referenced by add(), and detIds().

DetContainer GEMGeometry::theDets
private

Definition at line 113 of file GEMGeometry.h.

Referenced by add(), and dets().

DetIdContainer GEMGeometry::theEtaPartitionIds
private

Definition at line 115 of file GEMGeometry.h.

Referenced by add(), and detUnitIds().

DetContainer GEMGeometry::theEtaPartitions
private

Definition at line 112 of file GEMGeometry.h.

Referenced by add(), and detUnits().

DetTypeContainer GEMGeometry::theEtaPartitionTypes
private

Definition at line 114 of file GEMGeometry.h.

Referenced by add(), and detTypes().

mapIdToDet GEMGeometry::theMap
private

Definition at line 119 of file GEMGeometry.h.

Referenced by add(), and idToDet().