test
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
GEMGeometry Class Reference

#include <GEMGeometry.h>

Inheritance diagram for GEMGeometry:
TrackingGeometry

Public Member Functions

void add (GEMEtaPartition *etaPartition)
 Add a GEM etaPartition to the Geometry. More...
 
virtual const DetIdContainerdetIds () const override
 Returm a vector of all GeomDet DetIds (including those of GeomDetUnits) More...
 
virtual const DetContainerdets () const override
 Returm a vector of all GeomDet (including all GeomDetUnits) More...
 
virtual const DetTypeContainerdetTypes () const override
 Return a vector of all det types. More...
 
virtual const DetIdContainerdetUnitIds () const override
 Returm a vector of all GeomDetUnit DetIds. More...
 
virtual const DetUnitContainerdetUnits () const override
 Returm a vector of all GeomDetUnit. More...
 
const GEMEtaPartitionetaPartition (GEMDetId id) const
 Return a etaPartition given its id. More...
 
const std::vector< const
GEMEtaPartition * > & 
etaPartitions () const
 Return a vector of all GEM chambers. More...
 
 GEMGeometry ()
 Default constructor. More...
 
virtual const GeomDetidToDet (DetId) const override
 
virtual const GeomDetUnitidToDetUnit (DetId) const override
 Return the pointer to the GeomDetUnit corresponding to a given DetId. More...
 
virtual ~GEMGeometry ()
 Destructor. More...
 
- Public Member Functions inherited from TrackingGeometry
virtual ~TrackingGeometry ()
 Destructor. More...
 

Private Attributes

std::vector< const
GEMEtaPartition * > 
allEtaPartitions
 
DetIdContainer theDetIds
 
DetContainer theDets
 
DetIdContainer theEtaPartitionIds
 
DetUnitContainer theEtaPartitions
 Add a GEM Chamber to the Geometry. More...
 
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 __gnu_cxx::hash_map
< unsigned int, GeomDet const * > 
mapIdToDet
 
typedef __gnu_cxx::hash_map
< unsigned int, GeomDetUnit
const * > 
mapIdToDetUnit
 

Detailed Description

The model of the geometry of GEM.

Author
M. Maggi - INFN Bari

Definition at line 21 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 ( )
virtual

Destructor.

Definition at line 12 of file GEMGeometry.cc.

12 {}

Member Function Documentation

void GEMGeometry::add ( GEMEtaPartition etaPartition)

Add a GEM etaPartition to the Geometry.

Definition at line 71 of file GEMGeometry.cc.

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

Referenced by GEMGeometryBuilderFromDDD::buildGeometry().

71  {
72  theDets.push_back(etaPartition);
73  allEtaPartitions.push_back(etaPartition);
74  theEtaPartitions.push_back(etaPartition);
75  theEtaPartitionIds.push_back(etaPartition->geographicalId());
76  theDetIds.push_back(etaPartition->geographicalId());
77  GeomDetType const* _t = &etaPartition->type();
78  theEtaPartitionTypes.push_back(_t);
79  theMap.insert(std::pair<DetId,const GeomDetUnit*>
80  (etaPartition->geographicalId(),etaPartition));
81 }
std::vector< const GEMEtaPartition * > allEtaPartitions
Definition: GEMGeometry.h:82
DetIdContainer theEtaPartitionIds
Definition: GEMGeometry.h:76
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a etaPartition given its id.
Definition: GEMGeometry.cc:65
DetIdContainer theDetIds
Definition: GEMGeometry.h:77
mapIdToDet theMap
Definition: GEMGeometry.h:80
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
const GeomDetType & type() const
DetContainer theDets
Definition: GEMGeometry.h:74
DetUnitContainer theEtaPartitions
Add a GEM Chamber to the Geometry.
Definition: GEMGeometry.h:73
DetTypeContainer theEtaPartitionTypes
Definition: GEMGeometry.h:75
const GEMGeometry::DetIdContainer & GEMGeometry::detIds ( ) const
overridevirtual

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

Implements TrackingGeometry.

Definition at line 35 of file GEMGeometry.cc.

References theDetIds.

35  {
36  return theDetIds;
37 }
DetIdContainer theDetIds
Definition: GEMGeometry.h:77
const GEMGeometry::DetContainer & GEMGeometry::dets ( ) const
overridevirtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 25 of file GEMGeometry.cc.

References theDets.

25  {
26  return theDets;
27 }
DetContainer theDets
Definition: GEMGeometry.h:74
const GEMGeometry::DetTypeContainer & GEMGeometry::detTypes ( ) const
overridevirtual

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 15 of file GEMGeometry.cc.

References theEtaPartitionTypes.

15  {
16  return theEtaPartitionTypes;
17 }
DetTypeContainer theEtaPartitionTypes
Definition: GEMGeometry.h:75
const GEMGeometry::DetIdContainer & GEMGeometry::detUnitIds ( ) const
overridevirtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 30 of file GEMGeometry.cc.

References theEtaPartitionIds.

30  {
31  return theEtaPartitionIds;
32 }
DetIdContainer theEtaPartitionIds
Definition: GEMGeometry.h:76
const GEMGeometry::DetUnitContainer & GEMGeometry::detUnits ( ) const
overridevirtual

Returm a vector of all GeomDetUnit.

Implements TrackingGeometry.

Definition at line 20 of file GEMGeometry.cc.

References theEtaPartitions.

20  {
21  return theEtaPartitions;
22 }
DetUnitContainer theEtaPartitions
Add a GEM Chamber to the Geometry.
Definition: GEMGeometry.h:73
const GEMEtaPartition * GEMGeometry::etaPartition ( GEMDetId  id) const

Return a etaPartition given its id.

Definition at line 65 of file GEMGeometry.cc.

References idToDetUnit().

Referenced by add(), and GEMSimpleModel::getSimHitBx().

65  {
66  return dynamic_cast<const GEMEtaPartition*>(idToDetUnit(id));
67 }
virtual const GeomDetUnit * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: GEMGeometry.cc:40
const std::vector< const GEMEtaPartition * > & GEMGeometry::etaPartitions ( ) const

Return a vector of all GEM chambers.

Return a vector of all GEM eta partitions

Definition at line 57 of file GEMGeometry.cc.

References allEtaPartitions.

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

57  {
58  return allEtaPartitions;
59 }
std::vector< const GEMEtaPartition * > allEtaPartitions
Definition: GEMGeometry.h:82
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 44 of file GEMGeometry.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: GEMGeometry.h:80
const GeomDetUnit * GEMGeometry::idToDetUnit ( DetId  ) const
overridevirtual

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

Implements TrackingGeometry.

Definition at line 40 of file GEMGeometry.cc.

References idToDet().

Referenced by etaPartition().

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

Member Data Documentation

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

Definition at line 82 of file GEMGeometry.h.

Referenced by add(), and etaPartitions().

DetIdContainer GEMGeometry::theDetIds
private

Definition at line 77 of file GEMGeometry.h.

Referenced by add(), and detIds().

DetContainer GEMGeometry::theDets
private

Definition at line 74 of file GEMGeometry.h.

Referenced by add(), and dets().

DetIdContainer GEMGeometry::theEtaPartitionIds
private

Definition at line 76 of file GEMGeometry.h.

Referenced by add(), and detUnitIds().

DetUnitContainer GEMGeometry::theEtaPartitions
private

Add a GEM Chamber to the Geometry.

Definition at line 73 of file GEMGeometry.h.

Referenced by add(), and detUnits().

DetTypeContainer GEMGeometry::theEtaPartitionTypes
private

Definition at line 75 of file GEMGeometry.h.

Referenced by add(), and detTypes().

mapIdToDet GEMGeometry::theMap
private

Definition at line 80 of file GEMGeometry.h.

Referenced by add(), and idToDet().