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 (ME0Chamber *chamber)
 Add a ME0 Chamber to the Geometry. More...
 
void add (ME0EtaPartition *etaPartition)
 Add a ME0 etaPartition to the Geometry. More...
 
void add (ME0Layer *layer)
 Add a ME0 layer 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...
 
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 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...
 
const GeomDetidToDet (DetId) const override
 
const GeomDetidToDetUnit (DetId) const override
 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...
 
 ~ME0Geometry () override
 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
 
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

Definition at line 12 of file ME0Geometry.h.

Constructor & Destructor Documentation

◆ ME0Geometry()

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::~ME0Geometry ( )
override

Destructor.

Definition at line 10 of file ME0Geometry.cc.

10 {}

Member Function Documentation

◆ add() [1/3]

void ME0Geometry::add ( ME0Chamber chamber)

Add a ME0 Chamber to the Geometry.

Definition at line 67 of file ME0Geometry.cc.

67  {
68  allChambers.emplace_back(chamber);
69  theDets.emplace_back(chamber);
70  theDetIds.emplace_back(chamber->geographicalId());
71  theMap.insert(std::pair<DetId, GeomDet*>(chamber->geographicalId(), chamber));
72 }

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

Referenced by counter.Counter::register().

◆ add() [2/3]

void ME0Geometry::add ( ME0EtaPartition etaPartition)

Add a ME0 etaPartition to the Geometry.

Definition at line 47 of file ME0Geometry.cc.

47  {
48  allEtaPartitions.emplace_back(etaPartition);
49  theEtaPartitions.emplace_back(etaPartition);
51  theDets.emplace_back(etaPartition);
52  theDetIds.emplace_back(etaPartition->geographicalId());
53  theEtaPartitionTypes.emplace_back(&etaPartition->type());
54  theMap.insert(std::pair<DetId, GeomDet*>(etaPartition->geographicalId(), etaPartition));
55 }

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

Referenced by counter.Counter::register().

◆ add() [3/3]

void ME0Geometry::add ( ME0Layer layer)

Add a ME0 layer to the Geometry.

Definition at line 57 of file ME0Geometry.cc.

57  {
58  allLayers.emplace_back(layer);
59  // theLayers.emplace_back(layer); ??? what would this be fore?
60  // theLayerIds.emplace_back(layer->geographicalId()); ??? what would this be fore?
61  theDets.emplace_back(layer);
62  theDetIds.emplace_back(layer->geographicalId());
63  theEtaPartitionTypes.emplace_back(&layer->type());
64  theMap.insert(std::pair<DetId, GeomDet*>(layer->geographicalId(), layer));
65 }

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

Referenced by counter.Counter::register().

◆ chamber()

const ME0Chamber * ME0Geometry::chamber ( ME0DetId  id) const

Return a chamber given its id.

Definition at line 43 of file ME0Geometry.cc.

43  {
44  return dynamic_cast<const ME0Chamber*>(idToDetUnit(id.chamberId()));
45 }

References idToDetUnit().

Referenced by add(), ME0SegmentsValidation::analyze(), ME0TriggerBuilder::build(), ME0SegmentBuilder::build(), L1TMuon::GeometryTranslator::getME0SpecificPoint(), geometryXMLparser.CSCAlignable::index(), and ME0TriggerPseudoBuilder::segmentConversion().

◆ chambers()

const std::vector< ME0Chamber const * > & ME0Geometry::chambers ( ) const

Return a vector of all ME0 chambers.

Definition at line 29 of file ME0Geometry.cc.

29 { return allChambers; }

References allChambers.

Referenced by ME0GeometryValidate::validateME0ChamberGeometry().

◆ detIds()

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

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

Implements TrackingGeometry.

Definition at line 20 of file ME0Geometry.cc.

20 { return theDetIds; }

References theDetIds.

◆ dets()

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

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 16 of file ME0Geometry.cc.

16 { return theDets; }

References theDets.

◆ detTypes()

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

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 12 of file ME0Geometry.cc.

12 { return theEtaPartitionTypes; }

References theEtaPartitionTypes.

◆ detUnitIds()

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

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 18 of file ME0Geometry.cc.

18 { return theEtaPartitionIds; }

References theEtaPartitionIds.

◆ detUnits()

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

Returm a vector of all GeomDet.

Implements TrackingGeometry.

Definition at line 14 of file ME0Geometry.cc.

14 { return theEtaPartitions; }

References theEtaPartitions.

◆ etaPartition()

const ME0EtaPartition * ME0Geometry::etaPartition ( ME0DetId  id) const

Return a etaPartition given its id.

Definition at line 35 of file ME0Geometry.cc.

35  {
36  return dynamic_cast<const ME0EtaPartition*>(idToDetUnit(id));
37 }

References idToDetUnit().

Referenced by add(), ME0SegmentsValidation::analyze(), ME0SegmentBuilder::build(), and ME0SimpleModel::getSimHitBx().

◆ etaPartitions()

const std::vector< ME0EtaPartition const * > & ME0Geometry::etaPartitions ( ) const

◆ idToDet()

const GeomDet * ME0Geometry::idToDet ( DetId  ) const
overridevirtual

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

Implements TrackingGeometry.

Definition at line 24 of file ME0Geometry.cc.

24  {
25  mapIdToDet::const_iterator i = theMap.find(id);
26  return (i != theMap.end()) ? i->second : nullptr;
27 }

References mps_fire::i, and theMap.

Referenced by ME0HitsValidation::analyze(), ME0RecHitsValidation::analyze(), ME0SegmentsValidation::analyze(), ME0DigisValidation::analyze(), MuonME0DetLayerGeometryBuilder::buildLayer(), ME0TriggerPseudoBuilder::dumpAllME0Segments(), idToDetUnit(), and ME0TriggerPseudoBuilder::segmentConversion().

◆ idToDetUnit()

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

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

Implements TrackingGeometry.

Definition at line 22 of file ME0Geometry.cc.

22 { return dynamic_cast<const GeomDet*>(idToDet(id)); }

References idToDet().

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

◆ layer()

const ME0Layer * ME0Geometry::layer ( ME0DetId  id) const

Return a layer given its id.

Definition at line 39 of file ME0Geometry.cc.

39  {
40  return dynamic_cast<const ME0Layer*>(idToDetUnit(id.layerId()));
41 }

References idToDetUnit().

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

◆ layers()

const std::vector< ME0Layer const * > & ME0Geometry::layers ( ) const

Return a vector of all ME0 layers.

Definition at line 31 of file ME0Geometry.cc.

31 { return allLayers; }

References allLayers.

Member Data Documentation

◆ allChambers

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

Definition at line 82 of file ME0Geometry.h.

Referenced by add(), and chambers().

◆ allEtaPartitions

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

Definition at line 80 of file ME0Geometry.h.

Referenced by add(), and etaPartitions().

◆ allLayers

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

Definition at line 81 of file ME0Geometry.h.

Referenced by add(), and layers().

◆ theDetIds

DetIdContainer ME0Geometry::theDetIds
private

Definition at line 74 of file ME0Geometry.h.

Referenced by add(), and detIds().

◆ theDets

DetContainer ME0Geometry::theDets
private

Definition at line 75 of file ME0Geometry.h.

Referenced by add(), and dets().

◆ theEtaPartitionIds

DetIdContainer ME0Geometry::theEtaPartitionIds
private

Definition at line 73 of file ME0Geometry.h.

Referenced by add(), and detUnitIds().

◆ theEtaPartitions

DetContainer ME0Geometry::theEtaPartitions
private

Definition at line 71 of file ME0Geometry.h.

Referenced by add(), and detUnits().

◆ theEtaPartitionTypes

DetTypeContainer ME0Geometry::theEtaPartitionTypes
private

Definition at line 72 of file ME0Geometry.h.

Referenced by add(), and detTypes().

◆ theMap

mapIdToDet ME0Geometry::theMap
private

Definition at line 78 of file ME0Geometry.h.

Referenced by add(), and idToDet().

mps_fire.i
i
Definition: mps_fire.py:428
ME0Geometry::theEtaPartitions
DetContainer theEtaPartitions
Definition: ME0Geometry.h:71
ME0Geometry::theDetIds
DetIdContainer theDetIds
Definition: ME0Geometry.h:74
ME0EtaPartition::type
const GeomDetType & type() const override
Definition: ME0EtaPartition.cc:22
ME0Geometry::theDets
DetContainer theDets
Definition: ME0Geometry.h:75
GeomDet::type
virtual const GeomDetType & type() const
Definition: GeomDet.cc:69
ME0Geometry::theEtaPartitionTypes
DetTypeContainer theEtaPartitionTypes
Definition: ME0Geometry.h:72
ME0Geometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition: ME0Geometry.cc:24
ME0Geometry::idToDetUnit
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: ME0Geometry.cc:22
ME0Geometry::allEtaPartitions
std::vector< ME0EtaPartition const * > allEtaPartitions
Definition: ME0Geometry.h:80
ME0Geometry::chamber
const ME0Chamber * chamber(ME0DetId id) const
Return a chamber given its id.
Definition: ME0Geometry.cc:43
ME0Geometry::theMap
mapIdToDet theMap
Definition: ME0Geometry.h:78
ME0Geometry::theEtaPartitionIds
DetIdContainer theEtaPartitionIds
Definition: ME0Geometry.h:73
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
ME0Geometry::allChambers
std::vector< ME0Chamber const * > allChambers
Definition: ME0Geometry.h:82
ME0Geometry::etaPartition
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return a etaPartition given its id.
Definition: ME0Geometry.cc:35
ME0Geometry::allLayers
std::vector< ME0Layer const * > allLayers
Definition: ME0Geometry.h:81
ME0Geometry::layer
const ME0Layer * layer(ME0DetId id) const
Return a layer given its id.
Definition: ME0Geometry.cc:39