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

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

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  GeomDetType* _t = const_cast<GeomDetType*>(&etaPartition->type());
74  theEtaPartitionTypes.push_back(_t);
75  theMap.insert(std::pair<DetId,GeomDetUnit*>
76  (etaPartition->geographicalId(),etaPartition));
77 }
DetTypeContainer theEtaPartitionTypes
Definition: ME0Geometry.h:64
mapIdToDet theMap
Definition: ME0Geometry.h:69
DetIdContainer theDetIds
Definition: ME0Geometry.h:66
DetContainer theDets
Definition: ME0Geometry.h:63
std::vector< ME0EtaPartition const * > allEtaPartitions
Definition: ME0Geometry.h:71
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:77
DetUnitContainer theEtaPartitions
Definition: ME0Geometry.h:62
DetIdContainer theEtaPartitionIds
Definition: ME0Geometry.h:65
const GeomDetType & type() const
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:66
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:63
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:64
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:65
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:62
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().

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 ME0DigiPreRecoProducer::produce().

57  {
58  return allEtaPartitions;
59 }
std::vector< ME0EtaPartition const * > allEtaPartitions
Definition: ME0Geometry.h:71
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 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:69
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<ME0EtaPartition const*> ME0Geometry::allEtaPartitions
private

Definition at line 71 of file ME0Geometry.h.

Referenced by add(), and etaPartitions().

DetIdContainer ME0Geometry::theDetIds
private

Definition at line 66 of file ME0Geometry.h.

Referenced by add(), and detIds().

DetContainer ME0Geometry::theDets
private

Definition at line 63 of file ME0Geometry.h.

Referenced by add(), and dets().

DetIdContainer ME0Geometry::theEtaPartitionIds
private

Definition at line 65 of file ME0Geometry.h.

Referenced by add(), and detUnitIds().

DetUnitContainer ME0Geometry::theEtaPartitions
private

Definition at line 62 of file ME0Geometry.h.

Referenced by add(), and detUnits().

DetTypeContainer ME0Geometry::theEtaPartitionTypes
private

Definition at line 64 of file ME0Geometry.h.

Referenced by add(), and detTypes().

mapIdToDet ME0Geometry::theMap
private

Definition at line 69 of file ME0Geometry.h.

Referenced by add(), and idToDet().