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 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 (ME0Chamber *chamber)
 Add a ME0 Chamber to the Geometry. 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...
 
 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
 
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

The model of the geometry of ME0.

Author
M. Maggi - INFN Bari by D. Nash

Definition at line 19 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 12 of file ME0Geometry.cc.

12 {}

Member Function Documentation

void ME0Geometry::add ( ME0EtaPartition etaPartition)

Add a ME0 etaPartition to the Geometry.

Definition at line 67 of file ME0Geometry.cc.

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

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

67  {
68  theDets.push_back(etaPartition);
69  allEtaPartitions.push_back(etaPartition);
70  theEtaPartitions.push_back(etaPartition);
71  theEtaPartitionIds.push_back(etaPartition->geographicalId());
72  theDetIds.push_back(etaPartition->geographicalId());
73  theEtaPartitionTypes.push_back(&etaPartition->type());
74  theMap.insert(std::pair<DetId,GeomDetUnit*>
75  (etaPartition->geographicalId(),etaPartition));
76 }
DetTypeContainer theEtaPartitionTypes
Definition: ME0Geometry.h:70
mapIdToDet theMap
Definition: ME0Geometry.h:75
DetIdContainer theDetIds
Definition: ME0Geometry.h:72
DetContainer theDets
Definition: ME0Geometry.h:69
std::vector< ME0EtaPartition const * > allEtaPartitions
Definition: ME0Geometry.h:77
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return a etaPartition given its id.
Definition: ME0Geometry.cc:61
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
DetUnitContainer theEtaPartitions
Definition: ME0Geometry.h:68
DetIdContainer theEtaPartitionIds
Definition: ME0Geometry.h:71
const GeomDetType & type() const
void ME0Geometry::add ( ME0Chamber chamber)

Add a ME0 Chamber to the Geometry.

Definition at line 81 of file ME0Geometry.cc.

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

Referenced by counter.Counter::register().

81  {
82  allChambers.push_back(chamber);
83  theDets.push_back(chamber);
84  theDetIds.push_back(chamber->geographicalId());
85  theMap.insert(std::pair<DetId,GeomDet*>
86  (chamber->geographicalId(),chamber));
87 }
mapIdToDet theMap
Definition: ME0Geometry.h:75
DetIdContainer theDetIds
Definition: ME0Geometry.h:72
DetContainer theDets
Definition: ME0Geometry.h:69
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
std::vector< ME0Chamber const * > allChambers
Definition: ME0Geometry.h:78
const std::vector< ME0Chamber const * > & ME0Geometry::chambers ( ) const

Return a vector of all ME0 chambers.

Definition at line 51 of file ME0Geometry.cc.

References allChambers.

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

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

Implements TrackingGeometry.

Definition at line 35 of file ME0Geometry.cc.

References theDetIds.

35  {
36  return theDetIds;
37 }
DetIdContainer theDetIds
Definition: ME0Geometry.h:72
const ME0Geometry::DetContainer & ME0Geometry::dets ( ) const
virtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 25 of file ME0Geometry.cc.

References theDets.

25  {
26  return theDets;
27 }
DetContainer theDets
Definition: ME0Geometry.h:69
const ME0Geometry::DetTypeContainer & ME0Geometry::detTypes ( ) const
virtual

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 15 of file ME0Geometry.cc.

References theEtaPartitionTypes.

15  {
16  return theEtaPartitionTypes;
17 }
DetTypeContainer theEtaPartitionTypes
Definition: ME0Geometry.h:70
const ME0Geometry::DetIdContainer & ME0Geometry::detUnitIds ( ) const
virtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 30 of file ME0Geometry.cc.

References theEtaPartitionIds.

30  {
31  return theEtaPartitionIds;
32 }
DetIdContainer theEtaPartitionIds
Definition: ME0Geometry.h:71
const ME0Geometry::DetUnitContainer & ME0Geometry::detUnits ( ) const
virtual

Returm a vector of all GeomDetUnit.

Implements TrackingGeometry.

Definition at line 20 of file ME0Geometry.cc.

References theEtaPartitions.

20  {
21  return theEtaPartitions;
22 }
DetUnitContainer theEtaPartitions
Definition: ME0Geometry.h:68
const ME0EtaPartition * ME0Geometry::etaPartition ( ME0DetId  id) const

Return a etaPartition given its id.

Definition at line 61 of file ME0Geometry.cc.

References idToDetUnit().

Referenced by add(), ME0SegmentBuilder::build(), and ME0GeometryBuilderFromDDD::buildGeometry().

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

Return a vector of all ME0 eta partitions.

Definition at line 57 of file ME0Geometry.cc.

References allEtaPartitions.

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

57  {
58  return allEtaPartitions;
59 }
std::vector< ME0EtaPartition const * > allEtaPartitions
Definition: ME0Geometry.h:77
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 44 of file ME0Geometry.cc.

References i, and theMap.

Referenced by MuonME0DetLayerGeometryBuilder::buildLayer(), and idToDetUnit().

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

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

Implements TrackingGeometry.

Definition at line 40 of file ME0Geometry.cc.

References idToDet().

Referenced by etaPartition().

40  {
41  return dynamic_cast<const GeomDetUnit*>(idToDet(id));
42 }
virtual const GeomDet * idToDet(DetId) const
Definition: ME0Geometry.cc:44

Member Data Documentation

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

Definition at line 78 of file ME0Geometry.h.

Referenced by add(), and chambers().

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

Definition at line 77 of file ME0Geometry.h.

Referenced by add(), and etaPartitions().

DetIdContainer ME0Geometry::theDetIds
private

Definition at line 72 of file ME0Geometry.h.

Referenced by add(), and detIds().

DetContainer ME0Geometry::theDets
private

Definition at line 69 of file ME0Geometry.h.

Referenced by add(), and dets().

DetIdContainer ME0Geometry::theEtaPartitionIds
private

Definition at line 71 of file ME0Geometry.h.

Referenced by add(), and detUnitIds().

DetUnitContainer ME0Geometry::theEtaPartitions
private

Definition at line 68 of file ME0Geometry.h.

Referenced by add(), and detUnits().

DetTypeContainer ME0Geometry::theEtaPartitionTypes
private

Definition at line 70 of file ME0Geometry.h.

Referenced by add(), and detTypes().

mapIdToDet ME0Geometry::theMap
private

Definition at line 75 of file ME0Geometry.h.

Referenced by add(), and idToDet().